Inference in first-order logic Inference in first-order logic
First Order Logic
description
Transcript of First Order Logic
First Order Logic
Chapter 7
PL is a Weak Representational LanguagePropositional Logic (PL) is not a very
expressive language because: Hard to identify objects : mary, 3 Can't directly talk about properties of
individuals or relations between individuals:
Employee(Name, SoSec, Salary, Dept)Generalizations, patterns, regularities can't
easily be represented:
All persons are mortals
PL is a Weak Representational LanguageConsider the problem of representing the
following information:
Every person is mortal.
Bill is a person.
Bill is mortal.
How can these sentences be represented so that we can infer the third sentence from the first two?
PL is a Weak Representational LanguageIn PL we have to create propositional symbols to stand for all or part of each sentence. For example, we might do:
Person => Mortal
Person-Bill
Mortal-Bill
That is, we have used four symbols to represent the three given sentences. But, given this representation, the third sentence is not entailed by the first two.
A different representation would be to use three symbols to represent the three sentences as
Person => Mortal
Bill => Person
Bill => Mortal The third sentence is entailed by the first two, but we needed an explicit symbol, Bill, to represent an individual who is a member of the classes "person" and "mortal." So, to represent other individuals we must introduce separate symbols for each one, with means for representing the fact that all individuals who are ”person" are also "mortal." FOL is expressive enough to concisely represent this kind of situation.
Representational AdvantagesConcise Representations
Recursive Relations
Arbitrary structures (non-fixed size)
Propositional logic v. FOLPL deals only with propositions that have no
internal structure P : I-love-all-dogs
FOL makes a stronger commitment to what there is (ontology) objects: things in the world properties & relations of & between objects
FOL is as an extension of PLExample in FOL
AlphabetNon-Logical Symbols
(meaning given by interpretation) (infinite) set of object constants - strings of
alphanumeric characters beginning with a lowercase letter or a numeral: john, mary
(infinite) set of function constants of all arities - strings of alphanumeric characters beginning with a lowercase letter: fatherOf, distanceBetween, times
(infinite) set of predicates (relation constants) of all arities - strings of alphanumeric characters beginning with an uppercase letter: MarriedTo(john, mary)
AlphabetLogical Symbols (fixed meaning):Connectives:
not ()
and ()or ()implies ()
equivalent ()Punctuation Symbols: ( , )Truth symbols:
TRUE, FALSE
AlphabetLogical Symbols (fixed meaning):Variable symbols- strings beginning with an
uppercase letter near the end of the alphabet:
X, Y, ZQuantifier symbols:
Universal:
Existential: (Optional) Equality predicate: =
TermsTerms refer to objects in the world
(do not have a truth value assigned to them): object constants function constants of arity n, followed by n terms in
parentheses separated by commas:
fatherof(john, bill)
times(4, plus(3, 6)) variable symbols
Syntax rules: Wffs
atomic formulas are predicates of arity n, followed by n terms in parentheses separated by commas:
Loves(john, mary)
=(john, john)
(= usually in infix form: john = john)
(A proposition in PL is an atomic formula of arity 0)
Truth symbols (TRUE, FALSE) are wffs
WFFs
Complex wffs (just as in PL, we can make more complicated sentences by combining predicates using connectives):If A is a wff, so is A If A and B are wffs, so are
A BA BA B
A B
WFFs
If A is a wff and X is a variable then both X(A) and X(A) are wffs;
X (Person(X) Mortal(X))
X (Student(X) Smart(X))
X y Loves(X, Y)
There are no other wffs.
Language: set of all wffs