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

first order logic chapter 1 sections 1 2
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 1

First-Order Logic Chapter 1 Sections 1-2

Aspects of Computational Semantics

  • Prof. Dr. Kurt Eberle

Summer Semester 2018 Julia Dobczynska & Zara Kolagar

slide-2
SLIDE 2

Overview:

1. First-Order Logic: Definition & General 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

slide-3
SLIDE 3

First-Order Logic: Definition & General Overview

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”.

  • Hard to identify “individuals”
  • Can’t talk directly about

properties of individuals or relations between individuals

  • No generalisation
slide-4
SLIDE 4

First-Order Logic: Definition & General Overview

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)

slide-5
SLIDE 5

First-Order Logic: Definition & General Overview

FOL assumes that the world contains:

  • Objects: father, students,

car, etc.

  • Properties: father, tall,

robber, etc.

  • Relations: father, love,

brother-of, etc. (binary)

  • Functions: father-of, best

friend, etc.

slide-6
SLIDE 6

First-Order Logic: Definition & General Overview

  • Objects:

(father, 0) → father is an individual

  • Property:

father(Jack) → Jack is a father

  • Relation:

father(Jack, Mary) → Jack is a father of Mary

  • Function:

father(Mary) → father of Mary

slide-7
SLIDE 7

Vocabulary:

  • also called signature
  • 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)

slide-8
SLIDE 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
slide-9
SLIDE 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 = {d1, d2,d3,d4}.

slide-10
SLIDE 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.

slide-11
SLIDE 11

First-Order Models:

II. III.

slide-12
SLIDE 12

First-Order Languages:

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)

slide-13
SLIDE 13

First-Order Languages:

  • 3. The quantifiers: ∀ (the universal quantifier)

and ∃ (the existential quantifier) The quantifiers can be combined:

  • 4. The round/square brackets and the comma

(used to group symbols)

slide-14
SLIDE 14

First-Order Languages:

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”

slide-15
SLIDE 15

First-Order Languages:

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

slide-16
SLIDE 16

First-Order Languages:

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:

  • r property:
slide-17
SLIDE 17

Mini Exercise Time

(Please complete the exercises in the handout): Prolog Notations: If → :- Question → ?-

Is there anything else?

slide-18
SLIDE 18

First-Order Languages:

Forming Well-formed Formulas(wffs):

  • 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.
slide-19
SLIDE 19

First-Order Languages:

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.

slide-20
SLIDE 20

First-Order Languages:

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

slide-21
SLIDE 21

First-Order Languages:

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

slide-22
SLIDE 22

First-Order Languages:

Full Inductive definition:

slide-23
SLIDE 23

First-Order Languages:

1. If a formula contains no occurrences of free variables, then it is called a sentence

  • f first-order logic.

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.

slide-24
SLIDE 24

First-Order Languages:

1. Context: non-linguistic (e.g., the speaker points to a passer-by, in which case She was being used deictically

  • r

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.

slide-25
SLIDE 25

First-Order Languages:

Placeholder: 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

slide-26
SLIDE 26

The Satisfaction Definition:

The Truth that holds, or does not hold:

  • Intuitive definition:
  • Inductive definition:

The truth and falsity of the sentence comes from the truth or falsity of the sentences it is composed of.

slide-27
SLIDE 27

The Satisfaction Definition:

  • We define a three place relation (called

satisfaction) which holds between a formula, a model, and an assignment

  • f 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.
slide-28
SLIDE 28

The Satisfaction Definition:

  • sentences contain no free variables
  • 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)

slide-29
SLIDE 29

Function Symbols, Equality, And Sorted First-Order Logic:

Function symbols:

  • Forming recursively structured terms,

let us express many concepts in a natural way

  • This is a natural extension to first-order

languages, as the fatherhood example should suggest.

slide-30
SLIDE 30

Function Symbols, Equality, And Sorted First-Order Logic:

Function symbols:

  • It is the task of the vocabulary to tell us

what function symbols we have.

  • Considering the model M=(D, F), F

interprets the constants and relation 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.

slide-31
SLIDE 31

Function Symbols, Equality, And Sorted First-Order Logic:

Equality:

  • So far in the first-order languages we

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:

slide-32
SLIDE 32

Function Symbols, Equality, And Sorted First-Order Logic:

Sorted first-order logic:

  • the use of such sorted variables

enables us to make simple and direct statements about (say) animate and inanimate objects. All animate objects breathe: No inanimate objects talk:

slide-33
SLIDE 33

Function Symbols, Equality, And Sorted First-Order Logic:

Sorted first-order logic:

  • Anything that can be said in sorted

first-order logic can also be said in

  • rdinary 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.

slide-34
SLIDE 34

Three Inference Task:

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?

  • to ask whether a description holds or

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.

slide-35
SLIDE 35

Three Inference Task:

1. Querying Task

2. The Consistency Checking Task 3. The Informativity Checking Task

The Querying Task:

  • A model checker is a program which

performs the querying task.

  • In traditional logic, the querying task is

not considered as an inference task.

  • In traditional logic, evaluating a formula is

not considered as an inference task.

slide-36
SLIDE 36

Three Inference Task:

1. Querying Task

2. The Consistency Checking Task 3. The Informativity Checking Task

The Consistency Checking Task:

  • a consistent description is one that

“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:

slide-37
SLIDE 37

Three Inference Task:

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.

slide-38
SLIDE 38

Three Inference Task:

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:

slide-39
SLIDE 39

Three Inference Task:

1. Querying Task

2. The Consistency Checking Task 3. The Informativity Checking Task

Why informativity is important?

  • like inconsistency, uninformativity can

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.

slide-40
SLIDE 40

Relating Consistency And Informativity:

The key observations:

  • 1. φ is consistent (that is, satisfiable) if and
  • nly if ¬φ is informative (that is, invalid).
  • 2. φ is inconsistent (that is, unsatisfiable) if

and only if ¬φ is uninformative (that is, valid).

  • 3. φ is informative (that is, invalid) if and
  • nly if ¬φ is consistent (that is, satisfiable).
  • 4. φ is uninformative (that is, valid) if and
  • nly if ¬φ is inconsistent (that is,

unsatisfiable).

slide-41
SLIDE 41

Mini Exercise Time:

Please answer the questions in the handout.

slide-42
SLIDE 42

References:

1.Blackburn, Patrick. And Bos, Johan. (2006). Representation and Inference for Natural Language: A First Course in Computational

  • Semantics. Computational Linguistics,32(2),

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

slide-43
SLIDE 43