1 / 24

Knowledge Representation with Logic: First Order Predicate Calculus

Knowledge Representation with Logic: First Order Predicate Calculus. Outline Introduction to First Order Predicate Calculus (FOPC) syntax semantics Entailment Soundness and Completeness. Modeling Our World with Propositional Logic. Limited.

Télécharger la présentation

Knowledge Representation with Logic: First Order Predicate Calculus

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. Knowledge Representation with Logic: First Order Predicate Calculus Outline • Introduction to First Order Predicate Calculus (FOPC) • syntax • semantics • Entailment • Soundness and Completeness PredLogic

  2. Modeling Our World with Propositional Logic • Limited. • Quickly gets explosive and cumbersome, can’t express generalizations • Can’t distinguish between objects and relations PredLogic

  3. Comparing Logics Ontology (ont = ‘to be’; logica = ‘word’): kinds of things one can talk about in the language Examples: • Propositional Logic Facts • Predicate Logic Objects, Relationships among Objects • Temporal Logics Time Points or Intervals (divorce) PredLogic

  4. Syntax of Predicate Logic • Symbol set – give examples for: • constants • Boolean connectives • variables • functions • predicates (aka relations) • Quantifiers • Terms: variables, constants, functional expressions (can be arguments to predicates) PredLogic

  5. Syntax of Predicate Logic • Sentences: • atomic sentences (predicate expressions, literals) Ground literal? • complex sentences (atomic sentences connected by Booleans) • quantified sentences PredLogic

  6. Examples of Terms:Constants, Variables and Functions • Constants • Alan, Sam, R225, R216 • Variables • PersonX, PersonY, RoomS, RoomT • Functions • father_of(PersonX) • product_of(Number1,Number2) PredLogic

  7. Examples of Predicates and Quantifiers • Predicates • in(Alan,R225) • partOf(R225,Pender) • fatherOf(PersonX,PersonY) • Quantifiers • All dogs are mammals. • Some birds can’t fly. • 3 birds can’t fly. PredLogic

  8. Semantics of Predicate Logic • A term is a reference to an object • constants • variables • functional expressions • Sentences make claims about objects • Well-formed formulas, (wffs) PredLogic

  9. Semantics, part 2 • Object constants refer to individuals • There is a correspondence between • functions, which return values • Predicates (or relations), which are true or false Function: father_of(Mary) = Bill Predicate: father_of(Mary, Bill) PredLogic

  10. Semantics, part 3 • Referring to individuals • Jackie • son-of(Jackie), Sam • Referring to states of the world • person(Jackie), female(Jackie) • mother(Sam, Jackie) PredLogic

  11. Combining Logical Symbols • Terms:logical expressions referring to objects • first([a,b,c]), sq_root(9), sq_root(n), tail([a,b,c]) • Atomic Sentences: • loves(John,Mary), brother_of(John,Ted) • Complex Sentences: • loves(John,Mary) brother_of(John,Ted) teases(Ted, John) PredLogic

  12. Encoding Facts pass(John, courses,40) => graduate(John) cavity(molar) => x-ray_shadow(molar) leak(pipe, kitchen) /\ full(pipe,water) => location(water, kitchen_floor) PredLogic

  13. Design choice: red(block1) color(block1, red) val(color,block1,red) 2nd order predicate calculus.... Implication of choice: ????? nice(red) property(color) KB Design Choices PredLogic

  14. Quantifiers • Universal Quantifiers. • All cats are mammals. • Existential Quantifiers. • There is a cat owned by John. PredLogic

  15. Restricting Quantifiers To say “All lawyers ___ .” ( x Lawyer(x)  _____ ) To say “a lawyer ___.” “some lawyers ___.” ( x Lawyer(x)  _____ ) To say “no lawyers ___.” (x Lawyer(x)   _____ )  (x Lawyer(x)  _____ ) All lawyers do not ___.There does not exist a lawyer who ___. PredLogic

  16. Negation and Quantification • When you move negation inside or outside of a quantifier, then  and  get flipped. “All lawyers are not naïve.” is equivalent to“There is no lawyer that is naïve.” (Conditional Law) (DeMorgan’s Law) (Flip Quantifier) PredLogic

  17. Nested Quantification Order matterswhen some are and some . There is some cat that has some owner. All cats have an owner (but that owner could be different). There is some person who owns all the cats in the world. For all the owners and ownees in the world, the owner loves the ownee. PredLogic

  18. The Power of Expressivity • Indirect knowledge: Tall(MotherOf(john)) • Counterfactuals: ¬Tall(john) • Partial knowledge (disjunction): IsSisterOf(b,a) IsSisterOf(c,a) • Partial knowledge (indefiniteness): xIsSisterOf(X,a) PredLogic

  19. Inference Procedures • Mechanical rules that compute (derive) a new sentence from a set of sentences. • Proof theory: set of rules for deducing the entailments of a set of sentences. • Terminology: • proof = sequence of inference rule applications • derived wff = result of proof, theorem PredLogic

  20. General Resolution • Unit resolution with variables (requires unification) and more complex sentences • Complete – if something can be proven from KB, general resolution will prove it PredLogic

  21. Entailment is a Strong Requirement Q is a sentence; KB is a set of sentences If whenever the sentences in KB are true, Q is true, then KB Q (KB “entails” Q) PredLogic

  22. Logic as a representation of the World entails Representation: Sentences Sentence Refers to (semantics) follows World: Facts Fact PredLogic

  23. Soundness & Completeness • Soundness: anything derived is entailed; inference procedure (rule) only produces entailments. • Completeness: anything entailed is derived; inference procedure (rules) produces all entailments. PredLogic

  24. General Resolution • Complete, but only semi-decidable • If its true it can be proven • If its not true, theorem prover might not halt, may not be able to prove that its not true • Closed World Assumption – no missing information, if P can’t be proven, assume P is false. PredLogic

More Related