CSC-343
Artificial Intelligence
Lecture 3.1.
Models in First-Order Logic
Models in First-Order Logic
Objects / Terms:
Relationships / Predicates:
Graph Representation of a Model
Models in First-Order Logic
Domain is required to be non-empty i.e.
Every model must contain at least one object
Tuples of objects
Order of objects in the tuple is important, since relationships are often asymmetric
Functions are represented as unary tuples
Models in First-Order Logic
m(alice) = o1
m(bob) = o2
m(robert) = o2
m(arithmetic) = o3
and maps predicate symbols to tuples of objects
m(Knows) = {(o1 , o3) , (o2 , o3) , . . . }
m(Student) = {(o1)}
Models in First-Order Logic
Database Semantics
Database Semantics
Student(john) ∧ Student(bob)
This rules out w2
This rules out w3
Propositionalization
Propositionalization
(Studentalice ∧ Creativealice) ∨ (Studentbob ∧ Creativebob)
Horn Clauses in Propositional Logic
Clause | Goal | Definite | Horn |
¬ P ∨ ¬ Q ∨ ¬ R | | | |
¬ P ∨ ¬ Q ∨ R | | | |
P ∨ Q ∨ R | | | |
Inference in First-order Logic
Definite clauses in First-order Logic
∀x1···∀xn (a1 ∧···∧ ak) → b
for variables x1, ... , xn and atomic sentences a1 , ..., ak, b (which contain those variables).
For example:
∀x ∀y ∀z (Student(x) ∧ Course(y) ∧ Topic (z) ∧ Takes(x, y) ∧ Covers(y, z)) → Knows(x, z)
Note: if we propositionalize, we get one sentence for each value to (x, y, z), e.g.,
( Student(Alice) ∧ Course(343) ∧ Topic(FOL)
∧ Takes(Alice, csc343) ∧ Covers(csc343, FOL)) → Knows(Alice, FOL)
:
:
Modus Ponens (FOL)
∀x1··· ∀ xn(a1 ∧···∧ak) → b , a1,..., ak |
b |
Given P (Alice) and ∀x P (x) → Q(x).
Can’t infer Q(Alice) because P(x) and P(Alice) don’t match!
Substitution and Unification