First-Order Logic Chapter 1 Sections 1-2
Aspects of Computational Semantics
- Prof. Dr. Kurt Eberle
Summer Semester 2018 Julia Dobczynska & Zara Kolagar
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.
Aspects of Computational Semantics
Summer Semester 2018 Julia Dobczynska & Zara Kolagar
1. First-Order Logic: Definition & General Overview
2.1. Vocabulary 2.2. First-Order Models 2.3. First-Order Languages
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
Propositional Logic vs. FOL: Propositional logic assumes the world contains “facts”, statements that may or may not be true of the world, e.g. “it is raining”, “grass is green”.
properties of individuals or relations between individuals
Propositional Logic vs. FOL: Katy is a cat. All cats are mammals. Katy is a mammal. In propositional logic: c, m k In FOL: cat(Katy) ∀catMAMMAL(cat) MAMMAL(Katy)
(father, 0) → father is an individual
father(Jack) → Jack is a father
father(Jack, Mary) → Jack is a father of Mary
father(Mary) → father of Mary
define the model (the kinds of situations we want to describe) and the first-order language (the kinds of descriptions we can use)
binary), properties(unary), and individuals (zero)
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)
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 = {d1, d2,d3,d4}.
2. for each symbol in the vocabulary, it gives us an appropriate semantic value, built from the items in D
I.
II. III.
Ingredients (symbols) of the first-order language built over some vocabulary: 1. An infinite number of variables x, y, z, w, ..., 2. The boolean connectives: ¬ (negation), ∧ (conjunction), V (disjunction), and —► (implication)
and ∃ (the existential quantifier) The quantifiers can be combined:
(used to group symbols)
Common mistake: using ∧ as the main connective with ∀: 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”
The conventions for the boolean connectives: ¬ binds more tightly than ∧ and V, both of which in turn bind more tightly than —►
Combining ‘noun phrases’ (vocabulary) with ‘predicates’ (symbols) to form atomic formulas: If R is a relation symbol of arity n, and t1,...,tn are terms, then R {t1, t2, …,tn} is an atomic (or basic) formula. R can stand either for a relation:
Forming Well-formed Formulas(wffs):
then:
First-order formulas of the form 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.
Subformulas: The subformulas of a formula φ are φ itself and all the formulas used to build φ. For example, the subformulas of are:
Consider the following formula: The first occurence of x is free. The other occurrences of x are bound. The variable y is also bound.
Full Inductive definition:
1. If a formula contains no occurrences of free variables, then it is called a sentence
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.
1. Context: non-linguistic (e.g., the speaker points to a passer-by, in which case She was being used deictically
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.
Placeholder: This is a claim that every individual is a
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
The Truth that holds, or does not hold:
The truth and falsity of the sentence comes from the truth or falsity of the sentences it is composed of.
satisfaction) which holds between a formula, a model, and an assignment
M=(D , F)
which tell us what the free variables stand for.
be viewed as simply as a technical fix designed to get round the problem of defining truth.
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)
Function symbols:
let us express many concepts in a natural way
languages, as the fatherhood example should suggest.
Function symbols:
what function symbols we have.
interprets the constants and relation symbols, and it also assigns to each ƒ an appropriate semantic entity.
form using the new symbols.
Equality:
have no way to assert that two terms denote the same entity. if t1 and t2 are terms then we write t1 = t2 Yolanda is Honey-Bunny: Marsellus’s wife and Mia are the same person:
Sorted first-order logic:
enables us to make simple and direct statements about (say) animate and inanimate objects. All animate objects breathe: No inanimate objects talk:
Sorted first-order logic:
first-order logic can also be said in
All animate objects breath.
animate, to refer to animate objects exclusively.
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
The Querying Task: given a model M and a first-order formula φ, is φ satisfied in M or not? Why?
does not hold in a given situation is to ask a fundamental question.
this may become clearer if we think in terms of databases rather than situations.
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
The Querying Task:
performs the querying task.
not considered as an inference task.
not considered as an inference task.
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
The Consistency Checking Task:
“makes sense” , or “is intelligible” , or “describes something realisable” a first-order formula is called satisfiable if it is satisfied in at least one model.
unsatisfiable formula: inconsistent formula:
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
The Informativity Checking Task: A valid formula is a formula that is satisfied in all models (of the appropriate vocabulary) given any variable assignment. To put it the other way around: if φ is a valid formula, it is impossible to find a situation and a context in which φ is not satisfied.
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
Suppose φ1,..., φn, and ψ are a finite collection of first-order formulas. Then we say that the argument with premises φ1,..., φn and conclusion ψ is a valid argument if and only if whenever all the premises are satisfied in some model, using some variable assignment, then the conclusion is satisfied in the same model using the same variable assignment. Valid: Invalid:
1. Querying Task
2. The Consistency Checking Task 3. The Informativity Checking Task
Why informativity is important?
be a sign that something is going wrong with the communicative process Example of malfunctioning discourse: Mia is married. Mia is married. Mia is married. Example of a correct discourse: Maria is married. Maria has a husband.
The key observations:
and only if ¬φ is uninformative (that is, valid).
unsatisfiable).
1.Blackburn, Patrick. And Bos, Johan. (2006). Representation and Inference for Natural Language: A First Course in Computational
283-286. doi:10.1162/coli.2006.32.2.283 2.Logic Programming with Prolog. (2005). doi:10.1007/1-84628-212-8 3.https://ocw.mit.edu/courses/electrical-engineeri ng-and-computer-science/6-825-techniques-in-arti ficial-intelligence-sma-5504-fall-2002/lecture-note s/Lecture5FinalPart1Save.pdf 4.https://en.wikipedia.org/wiki/Well-formed_form ula