Predicate Logic ​
Knowledge is represented by predicates, variables, quantifiers and logical connectives.
Examples
modelling with mother as a function (returns a value) instead of as a predicate (truth value)
Models ​
Models contain objects and relations among them.
- constant symbols refer to objects
- predicate symbols refer to relations
- function symbols refer to functional relations
An atomic sentence predicate(term1, ... termn
is true iff the objects referred to by term1 ... termn
are in the relation referred to by predicate
.
Quantifiers ​
Unification ​
A *unifier is a substitution that makes to literals equal.
Example
x = Jane
. Notation:
Unification is possible if:
- T1 and T2 are the same constant.
- T1 is a variable and T2 is any type of term, and T1 is instantiated to T2 (and vice-versa)
- T1 and T2 complex terms and
- have the same functor and arity
- all their arguments unify
- thee variable instantiations are compatible.
Example
{x/Jane, y/John}
Unified Literal: Knows(John, Jane)
{x/John, z/S(john)}
Unified Literal: Loves(John, S(John))
Most General Unifier
A unifier for which it holds that every other unifier is an extension.
Example
- a unifier
{x/Mary, y/John, z/Mary}
yields the literalKnows(John, Mary)
- but this is not hte most general unifier we did not have to commit to substitute x and z with mary.
- mgu:
{x/z, y/John}
with unified literal thusKnows(John, z)
occurs check: check whether a variable occurs as argument of a function with which it has to be unified.
Reasoning ​
info proving: applying rules to derive a proof
Logical Inference ​
- Transform to CNF
- Unification
- Resolution
Transforming to CNF ​
- Replace all
with conjunction - Replace
with - Move negation signs inwards starting from the outside until every negation sign is directly in front of a literal.
- Remove quantifiers.
- obtain CNF by changing or with and (de morgan's law)
Removing quantifiers ​
existentially (
Simple skolemisation:
problem if the variable is a function of another, for example
Resolution rule can be applied when
Example
unification: {x/G, y/John}