1 / 17

FIRST ORDER LOGIC

FIRST ORDER LOGIC. Levent Tolga EREN. Index. Propositional Logic Limitations of Propositional Logic Predicate Logic Predicate Logic Notations / Examples / Syntax Propositional Logic compared to Predicate Logic Atomic / Complex Sentences A Model for First Order Logic

conlan
Télécharger la présentation

FIRST ORDER LOGIC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FIRST ORDER LOGIC Levent Tolga EREN

  2. Index • PropositionalLogic • Limitations of PropositionalLogic • PredicateLogic • PredicateLogicNotations/Examples/Syntax • PropositionalLogiccomparedtoPredicateLogic • Atomic/ComplexSentences • A Model for First OrderLogic • Using First OrderLogic • Conclusion

  3. PropositionalLogic • In mathematical logic, a propositional logicis a formalsystem in which formulas of a formal language may be interpreted to represent propositions. • Symbols : ^ conjunction vdisjunction ->implication <->equivalence Etc… E.g : p=1 q=0 pVq=1

  4. Limitationsof PropositionalLogic • Propositional logic is declarative “peter is a man”, “paul is a man”, “john is a man” can be symbolized by P, Q and R respectively in propositional logic but can’t draw any conclusions about similarities between P, Q and R. • Propositional logic is compositional meaning of P Q  R is derived from meaning of P, Q andR • Meaning in PropositionalLogic is contextindependent Unlikenaturallanguage, wheremeaningdepends on context. (Domain) • Propositionallogic has verylimitedexpressivepower(unlikenaturallanguage) E.g., cannot say "pits cause breezes in adjacent squares“

  5. Predicate Logic • In Predicate Logic, these limitations are removed to great extent. • Propositional logic assumes the world contains factsmeansthatfirst-order logic (like natural language) assumes the world contains; • Objects: people, houses, numbers, colors, baseball games, … • Relations: red, round, prime, brother of, bigger than, part of, comes between, … • Functions: father of, best friend, one more than, plus, …

  6. PredicateLogicNotations • There arethreelogical notions as compared to propositional calculus. • Predicate a relation that maps n terms to a truth value true (T) or false (F). – LOVE (john , mary) – LOVE(father(john), john) – LOVEis a predicate. Fatheris a function. • Terma constant(single individual or concept i.e.,5,john etc.),a variable that stands for different individuals a function: a mappingthatmaps n termsto a term.I.e : if f is n-placefunctionsymboland t1,….tnareterms, then f(t1….., tn) is a term.

  7. Quantifiers: Variables are used in conjunction with quantifiers. – There are two types of quantifiers, “there exist” (∃) and “for all” (∀). – “every man is mortal”can be represented as (∀x) (MAN(x) →MORTAL(x)).

  8. NestingQuantifiers The order of quantifiers of the same type doesn’t matter ∀x∀y(Parent(x,y) ^ Male(y) -> Son(y,x)) ∃x ∃y(Loves(x,y) ^Loves(y,x)) The order of mixed quantifiers does matter: ∀x∃y(Loves(x,y)) Says everybody loves somebody, i.e. everyone hassomeone whom they love. ∃y∀x(Loves(x,y)) Says there is someone who is loved by everyone in theuniverse. ∀y∃x(Loves(x,y)) Says everyone has someone who loves them. ∃x∀y(Loves(x,y)) Says there is someone who loves everyone in the universe.

  9. PredicateLogicNotationsExample A statement “x is greater than y”isrepresented in predicate calculus as GREATER(x, y). It is defined as follows: GREATER( x, y) = T , if x >y= F , otherwise The predicate names GREATER takes two terms and map to Tor Fdepending upon the values of their terms.

  10. A statement “john loves everyone” isrepresented as – (∀ x) LOVE(john , x) which maps it to true when x gets instantiated to actual values. A statement “Every father loves his child” is represented as – (∀ x) LOVE(father(x), x). – Here father is a function that maps x to his father. The predicate name LOVE takes two terms and map to T or F depending upon the values of their terms.

  11. Syntax of PredicateLogic • 1. Constant Symbols: c, d, c1, c2,….., d1, d2,…; • 2. Function Symbols: f, g, h, f1, f2,…., g1, g2,….; • 3. Variables: x, y, z, x1, x2,……, y1, y2,….; • 4. Predicate (Relational) Symbols: P, Q, P1, P2,…., Q1, Q2,…; • 5. Logical Connectives: ^,v,->, <->; • 6. Quantifiers: ∀(read “for all” or “for each”) and ∃(read “there exists”); and • 7. Punctuation: “(”, “)”, “;” and “:”.

  12. Propositional vsPredicate Logic In propositional logic, each possible atomic fact requires a separateunique propositional symbol. If there are n people and m locations, representing the factthat some person moved from one location to anotherrequires nm^2separate symbols. Predicate logic includes a richer ontology: • -objects (terms) • -properties (unary predicates on terms) • -relations (n-ary predicates on terms) • -functions (mappings from terms to other terms) Allows more flexible and compact representation ofknowledge • Move(x, y, z) for person x moved from location y to z

  13. AtomicSentences Sentence ->AtomicSentence | Sentence Connective Sentence | Quantifier Variable Sentence | ¬ Sentence | (Sentence) AtomicSentence->Predicate(Term, Term, ...) | Term=Term Term ->Function(Term,Term,...) | Constant | Variable Recall of syntax Connective ->v | ^ | -> | <-> Quanitfier->∃ | ∀ Constant -> A | John | Car1 Variable -> x | y | z |... Predicate -> Brother | Owns | ... Function -> father-of | plus | ...

  14. ComplexSentences An atomic sentence is simply a predicate applied to a set ofterms. Owns(John,Car1) Sold(John,Car1,Fred) Semantics is True or False depending on the interpretation, i.e. is the predicate true of these arguments. The standard propositional connectives can be used to construct complex sentences: Owns(John,Car1) VOwns(Fred, Car1) Sold(John,Car1,Fred) ->¬ Owns(John, Car1) Semantics same as in propositional logic.

  15. A Model for First OrderLogic E.g. Sibling(KingJohn,Richard)  Sibling(Richard,KingJohn)

  16. Using First OrderLogic The kinship domain: Brothers are siblings x,yBrother(x,y) <->Sibling(x,y) One's mother is one's female parent m,cMother(c) = m <->(Female(m) Parent(m,c)) “Sibling” is symmetric

  17. Conclusion This presentationhas introduced first-order logic, a representation language that is far more powerfulthan propositional logic. The important points are as follows: Logics differ in their ontological commitments and epistemological commitments. While propositional logic commits only to the existence of facts, first-order logic commitsto the existence of objects and relations and thereby gains expressive power. A possible world, or model, for first-order logic is defined by a set of objects, the relations among them, and the functions that can be applied to them. An atomic sentence consists of a predicate applied to one or more terms; it is true just when the relation named by the predicate holds between the objects named by theterms. Complex sentences use connectives just like propositional logic

More Related