first order logic chapter 1 sections 1 2
play

First-Order Logic Chapter 1 Sections 1-2 Aspects of Computational - PowerPoint PPT Presentation

First-Order Logic Chapter 1 Sections 1-2 Aspects of Computational Semantics Prof. Dr. Kurt Eberle Summer Semester 2018 Julia Dobczynska & Zara Kolagar 1. First-Order Logic: Definition & General Overview Overview: 2.


  1. First-Order Logic Chapter 1 Sections 1-2 Aspects of Computational Semantics Prof. Dr. Kurt Eberle Summer Semester 2018 Julia Dobczynska & Zara Kolagar

  2. 1. First-Order Logic: Definition & General Overview Overview: 2. First-Order Logic: Section 1 2.1. Vocabulary 2.2. First-Order Models 2.3. First-Order Languages 3. Mini Exercise No. 1 4. The Satisfaction Definition 5. Function Symbols, Equality, And Sorted First-Order Logic: Section 2 7. Three Inference Tasks 7.1. The Querying Task 7.2. The Consistency Checking Task 7.3. The Informativity Checking Task 8. Relating Consistency And Informativity 9. Mini Exercise No.2

  3. Propositional Logic vs. FOL: First-Order Logic: Propositional logic assumes the Definition & world contains “facts”, statements General Overview that may or may not be true of the world, e.g. “it is raining”, “grass is green”. ● Hard to identify “individuals” ● Can’t talk directly about properties of individuals or relations between individuals No generalisation ●

  4. Propositional Logic vs. FOL: First-Order Logic: Katy is a cat. Definition & All cats are mammals. General Overview Katy is a mammal. In propositional logic: c, m k In FOL: cat(Katy) ∀ cat MAMMAL(cat) MAMMAL(Katy)

  5. FOL assumes that the world First-Order Logic: contains: Definition & ● Objects: father, students, General Overview car, etc. ● Properties: father, tall, robber, etc. ● Relations: father, love, brother-of, etc. (binary) ● Functions: father-of, best friend, etc.

  6. ● Objects: First-Order Logic: (father, 0) → father is an individual Definition & ● Property: General Overview father(Jack) → Jack is a father ● Relation: father(Jack, Mary) → Jack is a father of Mary Function: ● father(Mary) → father of Mary

  7. ● also called signature Vocabulary: gives us all the information needed to ● define the model (the kinds of situations we want to describe) and the first-order language (the kinds of descriptions we can use) ● meaningfully describe relations(ternary, binary), properties(unary), and individuals (zero)

  8. Vocabulary: The usual convention in first-order logic : the same symbol is never used to talk about relations of different arity, or to talk about relations and refer to individuals. When writing Prolog programs it’s not at all unusual to use the same symbol in multiple ways. flub(x,y) - binary relation (flub,0) - individual

  9. First-Order Models: also called semantic entity ● ● contains the kinds of things we want to talk about The model gives us two pieces of information: 1) tells us which collection of entities we are talking about (defining a set/domain of the model, or D for short), e.g., D = {d 1 , d 2 ,d 3 ,d 4 }.

  10. First-Order Models: 2. for each symbol in the vocabulary, it gives us an appropriate semantic value, built from the items in D I.

  11. II. First-Order Models: III.

  12. Ingredients (symbols) of the first-order language First-Order built over some vocabulary: Languages: 1. An infinite number of variables x, y, z, w, ..., 2. The boolean connectives : ¬ (negation), ∧ (conjunction), V (disjunction), and — ► (implication)

  13. First-Order 3. The quantifiers : ∀ (the universal quantifier) and ∃ (the existential quantifier) Languages: The quantifiers can be combined: 4. The round/square brackets and the comma (used to group symbols)

  14. First-Order Common mistake: using ∧ as the main connective with ∀ : Languages: Typically, ⇒ is the main connective with ∀ ∀ x King(x) ∧ Smart(x) meaning: “Everyone is a king and everyone is smart” Correct version: ∀ x King(x) ⇒ Smart(x) Meaning: “If everyone is a king then everyone is smart”

  15. First-Order The conventions for the boolean connectives: Languages: ¬ binds more tightly than ∧ and V , both of which in turn bind more tightly than — ►

  16. First-Order Combining ‘noun phrases’ (vocabulary) with ‘predicates’ (symbols) to form atomic Languages: formulas: If R is a relation symbol of arity n, and t 1 ,...,t n are terms, then R {t 1 , t 2 , …,t n } is an atomic (or basic) formula. R can stand either for a relation : or property :

  17. Mini Exercise Time Prolog Notations: (Please complete the If → :- exercises in the handout) : Question → ?- Is there anything else?

  18. First-Order Forming Well-formed Formulas(wffs): Languages: 1. All atomic formulas are wffs. 2. If φ and ψ are wffs then so are: 3. If φ and ψ are wffs and x is a variable, then: 4. Nothing else is a wff.

  19. First-Order First-order formulas of the form Languages: are called quantified formulas. And they correspond to the natural language expressions of the form “some…”, like somebody or something for the first notation and “all…”, everything or everyone, and so on.

  20. First-Order Subformulas: Languages: The subformulas of a formula φ are φ itself and all the formulas used to build φ. For example, the subformulas of are:

  21. Consider the following formula: First-Order Languages: The first occurence of x is free. The other occurrences of x are bound. The variable y is also bound.

  22. Full Inductive definition: First-Order Languages:

  23. 1. If a formula contains no occurrences of free variables, then it is called a sentence First-Order of first-order logic. Languages: 2. Try thinking of a free variable as something like the pronoun ‘She’ in uttered in isolation. She even has a stud in her tongue.

  24. 1. Context: non-linguistic (e.g., the speaker points to a passer-by, in which case She First-Order was being used deictically or Languages: demonstratively) or linguistic (perhaps the speaker’s previous sentence was Honey Bunny is heavily into body piercing). 2. Supplying a model won’t be enough. We need additional information on how to link free variables to the entities in the model. 3. Sentences are relatively self-contained.

  25. Placeholder: First-Order Languages: This is a claim that every individual is a robber. Roughly speaking, the bound variable x in: acts as a sort of placeholder. The choice of x as a variable here is completely arbitrary which means we can replace it without a change in meaning

  26. The Truth that holds, or does not hold: The Satisfaction Definition: ● Intuitive definition: ● Inductive definition: The truth and falsity of the sentence comes from the truth or falsity of the sentences it is composed of.

  27. ● We define a three place relation (called The Satisfaction satisfaction) which holds between a Definition: formula, a model, and an assignment of values to variables. M=(D , F) ● Assignments are a technical device which tell us what the free variables stand for. The assignment functions should not ● be viewed as simply as a technical fix designed to get round the problem of defining truth. The assignment is context bound . ●

  28. The Satisfaction sentences contain no free variables ● Definition: the only free variables we will ● encounter when evaluating one are those produced when evaluating its quantified subformulas (if it has any). A sentence φ is true in a model M if and only if for any assignment g of values to variables in M, we have that M, g |= φ. If φ is true in M we write M |= (j)

  29. Function Symbols, Function symbols: Equality, And Forming recursively structured terms, ● let us express many concepts in a Sorted First-Order natural way Logic: This is a natural extension to first-order ● languages, as the fatherhood example should suggest.

  30. Function symbols: Function Symbols, ● It is the task of the vocabulary to tell us Equality, And what function symbols we have. ● Considering the model M=(D, F), F Sorted First-Order interprets the constants and relation Logic: symbols, and it also assigns to each ƒ an appropriate semantic entity. ● Then, we need to say what terms we can form using the new symbols.

  31. Function Symbols, Equality: Equality, And So far in the first-order languages we ● have no way to assert that two terms Sorted First-Order denote the same entity. Logic: if t 1 and t 2 are terms then we write t 1 = t 2 Yolanda is Honey-Bunny: Marsellus’s wife and Mia are the same person:

  32. Function Symbols, Sorted first-order logic: Equality, And the use of such sorted variables ● enables us to make simple and direct Sorted First-Order statements about (say) animate and Logic: inanimate objects. All animate objects breathe: No inanimate objects talk:

  33. Sorted first-order logic: Function Symbols, Anything that can be said in sorted ● Equality, And first-order logic can also be said in ordinary first-order logic. Sorted First-Order Logic: All animate objects breath. ● The variable x can refer to any object. Make use of unary relation symbol ● animate, to refer to animate objects exclusively.

  34. Three Inference The Querying Task: Task: given a model M and a first-order formula φ, is φ satisfied in M or not? Why? 1. Querying Task 2. The Consistency Checking Task ● to ask whether a description holds or 3. The Informativity Checking Task does not hold in a given situation is to ask a fundamental question. ● it is a question that can be very useful; this may become clearer if we think in terms of databases rather than situations.

Recommend


More recommend