first order logic - syntax and semantics - lane department of

98
Outline First Order Logic - Syntax and Semantics K. Subramani 1 1 Lane Department of Computer Science and Electrical Engineering West Virginia University 30 January, 4 February, 6 February 2013 Subramani First Order Logic

Upload: others

Post on 09-Feb-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Outline

First Order Logic - Syntax and Semantics

K. Subramani1

1Lane Department of Computer Science and Electrical EngineeringWest Virginia University

30 January, 4 February, 6 February 2013

Subramani First Order Logic

Outline

Outline

1 Motivation

Subramani First Order Logic

Outline

Outline

1 Motivation

2 SyntaxTranslation

Subramani First Order Logic

Outline

Outline

1 Motivation

2 SyntaxTranslation

3 Semantics

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Limitations of Propositional Logic

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Limitations of Propositional Logic

Propositional Logic has limited expressiveness.

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Limitations of Propositional Logic

Propositional Logic has limited expressiveness. For instance, how would you capturethe assertion, “Property P is true of every positive number”?

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Limitations of Propositional Logic

Propositional Logic has limited expressiveness. For instance, how would you capturethe assertion, “Property P is true of every positive number”? P1 ∧ P2 . . . P∞ is neithercompact nor useful.

Subramani First Order Logic

MotivationSyntax

Semantics

First Order Logic

Limitations of Propositional Logic

Propositional Logic has limited expressiveness. For instance, how would you capturethe assertion, “Property P is true of every positive number”? P1 ∧ P2 . . . P∞ is neithercompact nor useful.First-order Logic (FOL) extends Propositional Logic (PL) with predicates, functions andquantifiers.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

(iii) The existential quantifier (∃x)P(x) indicates that property P holds for some x insome domain.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

(iii) The existential quantifier (∃x)P(x) indicates that property P holds for some x insome domain.

(iv) A function is a mapping from the domain of interest to a range.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

(iii) The existential quantifier (∃x)P(x) indicates that property P holds for some x insome domain.

(iv) A function is a mapping from the domain of interest to a range.

(v) Variables are used as placeholders (0-ary predicates).

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

(iii) The existential quantifier (∃x)P(x) indicates that property P holds for some x insome domain.

(iv) A function is a mapping from the domain of interest to a range.

(v) Variables are used as placeholders (0-ary predicates).

(vi) Constants are used to represent values that do not change.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Syntax of FOL

Basics

(i) Predicates are used to describe properties of objects. e.g., P(x) could stand forthe property that x is divisible by 3.

(ii) The universal quantifier (∀x)P(x) indicates that property P holds for all x in somedomain.

(iii) The existential quantifier (∃x)P(x) indicates that property P holds for some x insome domain.

(iv) A function is a mapping from the domain of interest to a range.

(v) Variables are used as placeholders (0-ary predicates).

(vi) Constants are used to represent values that do not change.

(vii) Terms, atom, literal, formula.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

(i) Existential closure.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

(i) Existential closure.

(ii) Universal closure.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

(i) Existential closure.

(ii) Universal closure.

Subformulas and Subterms

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

(i) Existential closure.

(ii) Universal closure.

Subformulas and Subterms

1 Subformulas and strict subformulas.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Scope

Bound and Free variables

Consider the expression:

(∀x)[Q(x, y) → (∃y)R(x, y)]

The x occurrences are bound to the (∀x) quantifier. The first y is said to be a freevariable, since it is not bound to any quantifier. The scope of a quantifier is the portionof the predicate formula to which it applies. A formula F is closed if it has no freevariables.

Closures

(i) Existential closure.

(ii) Universal closure.

Subformulas and Subterms

1 Subformulas and strict subformulas.2 Subterms and strict subterms.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Outline

1 Motivation

2 SyntaxTranslation

3 Semantics

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task!

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous).

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly. (∃x)[P(x) ∧ U(x)].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly. (∃x)[P(x) ∧ U(x)].

(iii) All dogs chase all rabbits.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly. (∃x)[P(x) ∧ U(x)].

(iii) All dogs chase all rabbits. (∀x)[D(x) → (∀y)[R(y) → C(x, y)]].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly. (∃x)[P(x) ∧ U(x)].

(iii) All dogs chase all rabbits. (∀x)[D(x) → (∀y)[R(y) → C(x, y)]].

(iv) Some dogs chase all rabbits.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Converting English to Predicate Logic

Note

Not an easy task! More than one result possible, depending on semantics of Englishlanguage (which is not unambiguous). “Hang him not, let him free” and “Hang him, notlet him free”!

Example

(i) All parrots are ugly. (∀x)[P(x) → U(x)].

(ii) Some parrots are ugly. (∃x)[P(x) ∧ U(x)].

(iii) All dogs chase all rabbits. (∀x)[D(x) → (∀y)[R(y) → C(x, y)]].

(iv) Some dogs chase all rabbits. (∃x)[D(x) ∧ (∀y)[R(y) → C(x, y)]].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Exercise

Exercise

Let S(x) denote “x is a student”, I(x) denote “x is intelligent” and M(x) denote “x likesmusic”.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Exercise

Exercise

Let S(x) denote “x is a student”, I(x) denote “x is intelligent” and M(x) denote “x likesmusic”. Give predicate wffs for:

(i) All students are intelligent.

(ii) Some intelligent students like music.

(iii) Only intelligent students like music.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Exercise

Exercise

Let S(x) denote “x is a student”, I(x) denote “x is intelligent” and M(x) denote “x likesmusic”. Give predicate wffs for:

(i) All students are intelligent.

(ii) Some intelligent students like music.

(iii) Only intelligent students like music.

Solution

(i) (∀x)[S(x) → I(x)].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Exercise

Exercise

Let S(x) denote “x is a student”, I(x) denote “x is intelligent” and M(x) denote “x likesmusic”. Give predicate wffs for:

(i) All students are intelligent.

(ii) Some intelligent students like music.

(iii) Only intelligent students like music.

Solution

(i) (∀x)[S(x) → I(x)].

(ii) (∃x)[S(x) ∧ I(x) ∧ M(x)].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

Exercise

Exercise

Let S(x) denote “x is a student”, I(x) denote “x is intelligent” and M(x) denote “x likesmusic”. Give predicate wffs for:

(i) All students are intelligent.

(ii) Some intelligent students like music.

(iii) Only intelligent students like music.

Solution

(i) (∀x)[S(x) → I(x)].

(ii) (∃x)[S(x) ∧ I(x) ∧ M(x)].

(iii) (∀x)[M(x) → [S(x) ∧ I(x)]].

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

FOL in mathematics

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

FOL in mathematics

Example

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

FOL in mathematics

Example

(i) The length of one side of a triangle is less than the sum of the lengths of the othertwo sides.

Subramani First Order Logic

MotivationSyntax

SemanticsTranslation

FOL in mathematics

Example

(i) The length of one side of a triangle is less than the sum of the lengths of the othertwo sides.

(ii) Fermat’s last theorem.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I,

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain,

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain,

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain,

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

(ii) G : (∀x) P(x, a)?

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

(ii) G : (∀x) P(x, a)?

These questions are meaningless without the interpretation! Consider the followinginterpretation for G:

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

(ii) G : (∀x) P(x, a)?

These questions are meaningless without the interpretation! Consider the followinginterpretation for G: The domain is the set of natural numbers N = {0, 1, ...,}, P(x, y)stands for x ≥ y and a is 0.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

(ii) G : (∀x) P(x, a)?

These questions are meaningless without the interpretation! Consider the followinginterpretation for G: The domain is the set of natural numbers N = {0, 1, ...,}, P(x, y)stands for x ≥ y and a is 0. Clearly, in this interpretation, the expression is true.

Subramani First Order Logic

MotivationSyntax

Semantics

Semantics

Main Points

(i) As with propositional logic, a FOL formula evaluates to true or false.

(ii) Terms of a FOL formula evaluate to values from a specified domain.

(iii) A first order interpretation I, is a 2-tuple (DI , αI), where DI is a non-empty setcalled the domain of interpretation and αI is an assignment function. Theassignment function maps constants and variables in the expression to objects inthe domain, predicates in the domain to properties of objects in the domain, andfunctions in the expression to functions over the domain, respecting arity.

Example

What is the truth-value of

(i) F : x + y ≥ z → y ≥ z − x?

(ii) G : (∀x) P(x, a)?

These questions are meaningless without the interpretation! Consider the followinginterpretation for G: The domain is the set of natural numbers N = {0, 1, ...,}, P(x, y)stands for x ≥ y and a is 0. Clearly, in this interpretation, the expression is true. Canyou think of an interpretation in which G is false?

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms.

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] =

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] = αI [f (αI [t1], αI [t2], . . . αI [tn]].

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] = αI [f (αI [t1], αI [t2], . . . αI [tn]].

(ii) αI [p(t1, t2, . . . tn)] =

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] = αI [f (αI [t1], αI [t2], . . . αI [tn]].

(ii) αI [p(t1, t2, . . . tn)] = αI [p(αI [t1], αI [t2], . . . αI [tn]].

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] = αI [f (αI [t1], αI [t2], . . . αI [tn]].

(ii) αI [p(t1, t2, . . . tn)] = αI [p(αI [t1], αI [t2], . . . αI [tn]].

ThenI |= p(t1, t2, . . . tn) iff

Subramani First Order Logic

MotivationSyntax

Semantics

Inductive definition of semantics

Goal

Given a FOL formula F and an interpretation I : (DI , αI), we want to compute if Fevaluates to true, under that interpretation.

Truth Symbols

(i) I |= ⊤.

(ii) I 6|=⊥.

Atoms

Use the assignment function αI to recursively evaluate arbitrary terms and arbitraryatoms. For instance,

(i) αI [f (t1, t2, . . . tn)] = αI [f (αI [t1], αI [t2], . . . αI [tn]].

(ii) αI [p(t1, t2, . . . tn)] = αI [p(αI [t1], αI [t2], . . . αI [tn]].

ThenI |= p(t1, t2, . . . tn) iff αI [p(αI [t1], αI [t2], . . . αI [tn]] = true.

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

(i) I |= (∀x) F if and only if for every v ∈ D, I ⊳ {x 7→ v} |= F .

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

(i) I |= (∀x) F if and only if for every v ∈ D, I ⊳ {x 7→ v} |= F .

(ii) I |= (∃x) F if and only if there exists some v ∈ D, I ⊳ {x 7→ v} |= F .

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

(i) I |= (∀x) F if and only if for every v ∈ D, I ⊳ {x 7→ v} |= F .

(ii) I |= (∃x) F if and only if there exists some v ∈ D, I ⊳ {x 7→ v} |= F .

Example

Consider the formula F : x + y > z → y > z − x .

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

(i) I |= (∀x) F if and only if for every v ∈ D, I ⊳ {x 7→ v} |= F .

(ii) I |= (∃x) F if and only if there exists some v ∈ D, I ⊳ {x 7→ v} |= F .

Example

Consider the formula F : x + y > z → y > z − x . Is F true

Subramani First Order Logic

MotivationSyntax

Semantics

Completing the induction

General unquantified FOL formulas

(i) I |= ¬F iff I 6|= F .

(ii) I |= F1 ∧ F2 iff I |= F1 and I |= F2.

(iii) I |= F1 ∨ F2 iff I |= F1 or I |= F2.

(iv) I |= F1 → F2 iff if I |= F1, then I |= F2.

Quantified Formulas

(i) I |= (∀x) F if and only if for every v ∈ D, I ⊳ {x 7→ v} |= F .

(ii) I |= (∃x) F if and only if there exists some v ∈ D, I ⊳ {x 7→ v} |= F .

Example

Consider the formula F : x + y > z → y > z − x . Is F true under the interpretationI : (Z, αI), where αI : {+ 7→ +Z,− 7→ −Z, > 7→ >Z, x 7→ 13Z, y 7→ 42Z, z 7→ 1Z}?

Subramani First Order Logic