Horn Clauses Logic Procedures
Horn Clauses Logic Procedures
PROCEDURES
GRACE CLOSA
JOMARI FLORES
JOHN PAUL PADIGOS
BLADIMER VILLONES
HORN CLAUSES & LOGIC
PROCEDURES
Introduction
• Horn Clause: A special form of clause in propositional or
first-order logic.
• Applications: Basis for logic programming languages like
Prolog.
WHAT ARE HORN CLAUSES?
•Definition: A Horn clause is a disjunction of literals with at most one positive literal.
•Examples:
•Positive clause: P
•Negative clause: \neg P \lor \neg Q
•Mixed clause: \neg P \lor Q
•Characteristics:
•Efficient for computation.
•Useful in automated reasoning.
TYPES OF HORN CLAUSES
1.Definite Clauses:
•Exactly one positive literal.
•Example: P \leftarrow Q, R (equivalent to \neg Q \lor \neg R \lor P).
2.Goal Clauses:
•No positive literals (also called empty head).
•Example: \leftarrow Q, R (equivalent to \neg Q \lor \neg R).
3.Fact:
•A single positive literal.
•Example: P.
LOGIC PROCEDURES
Forward Chaining
•
:
Process
Resolution Principle
•
: A rule of inference leading to refutation proofs.
Definition
•Steps:
1.Convert statements to Conjunctive Normal Form (CNF).
2.Apply the resolution rule repeatedly.
3.Derive a contradiction (empty clause).
•Example:
•Statements: (P \lor Q), (\neg P \lor R)
•Resolvent: Q \lor R.
PROOF PROCEDURES
• Resolution-Based Proof
• Steps:
• Negate the statement to be proven.
• Add it to the knowledge base.
• Apply resolution to derive an empty clause.
APPLICATION