Syntax of FOL Definition 1 A contains the following symbols: 1. v 0 , - - PowerPoint PPT Presentation

syntax of fol
SMART_READER_LITE
LIVE PREVIEW

Syntax of FOL Definition 1 A contains the following symbols: 1. v 0 , - - PowerPoint PPT Presentation

Computational Logic, Spring 2006 Pete Manolios Syntax of FOL Definition 1 A contains the following symbols: 1. v 0 , v 1 , v 2 , . . . (variables); 2. , , , , (boolean connectives); 3. , (quantifiers); 4. (equality


slide-1
SLIDE 1

Computational Logic, Spring 2006 Pete Manolios

Syntax of FOL

Definition 1 A contains the following symbols:

  • 1. v0, v1, v2, . . . (variables);
  • 2. ¬, ∧, ∨, ⇒, ↔ (boolean connectives);
  • 3. ∀, ∃ (quantifiers);
  • 4. ≡ (equality symbol);
  • 5. ), ( (parenthesis);

Georgia Tech Lecture 1, Page 0

slide-2
SLIDE 2

Computational Logic, Spring 2006 Pete Manolios

There may also be other symbols in a FOL, e.g., in set theory we have ∈, a 2-ary relation symbol. Definition 2 The symbol set S of a FOL contains

  • 1. for every n ≥ 1 a (possibly empty) set of n-ary relation symbols.
  • 2. for every n ≥ 1 a (possibly empty) set of n-ary function symbols.
  • 3. a (possibly empty) set of constant symbols.

AS := A ∪ S is the alphabet of this language. We use P, Q, R, . . . for relation symbols, f, g, h, . . . for function symbols, c, c0, c1, . . . for constants, and x, y, z, . . . for variables.

Georgia Tech Lecture 1, Page 1

slide-3
SLIDE 3

Computational Logic, Spring 2006 Pete Manolios

Terms

Definition 3 The set of S-terms, denoted T S is the least set closed under the following rules.

  • 1. Every variable is an S-term.
  • 2. Every constant in S is an S-term.
  • 3. If t1, . . . , tn are S-terms and f is an n-ary function symbol in S, then

ft1 . . . tn is an S-term. Note that T S ⊆ A∗

S.

Here is an analogy with English. Bill, the father of John, etc. all denote elements in our universe. Similarly, x, c, fxy, etc. denote elements of the universe of a first-order theory.

Georgia Tech Lecture 1, Page 2

slide-4
SLIDE 4

Computational Logic, Spring 2006 Pete Manolios

Formulas

Terms name objects in our domain, whereas formulas correspond to statements about our domain. Statements such as “Bob has three siblings” are statements about the

  • universe. They are either true or false. That is the role played by formulas.

Definition 4 An atomic formula of S is either of the form t1 ≡ t2 or Rt1 . . . tn, where t1, t2, . . . , tn are S-terms and R is an n-ary relation symbol in S. Definition 5 The set of S-formulas is the least set closed under the following rules.

  • 1. Every atomic formula is an S-formula.
  • 2. If ϕ, ψ are S-formulas and x is a variable, then ¬ϕ, (ϕ

∨ ψ), (ϕ ∧ ψ), (ϕ → ψ), (ϕ ↔ ψ), ∃xϕ, and ∀xϕ are S-formulas.

Georgia Tech Lecture 1, Page 3

slide-5
SLIDE 5

Computational Logic, Spring 2006 Pete Manolios

LS denotes the set of S-formulas. Are the following in LSgr?

  • ∀v0 ◦ ev0 ≡ e
  • ∀v1 ◦ ev0 ≡ e
  • ∀v1 ◦ ev0 ≡ e

∧ ∀v1 ◦ ev0 ≡ e

  • ∀v1∃v1 ◦ v1v1 ≡ v1
  • ∀v1∃v1(◦v1v1 → v1)

Is there a string that is both a formula and a term? Can you think of a formula that can be parsed in more than one way? Lemma 1 If |S| ≤ ω, then |T S| = |LS| = ω.

Georgia Tech Lecture 1, Page 4

slide-6
SLIDE 6

Computational Logic, Spring 2006 Pete Manolios

Definitions on terms and formulas

Define a function that given an S-term returns the set of variables occuring in it. Formulas without free variables are called sentences. Define a function that given an S-formula returns the set of free variables occuring in it.

Georgia Tech Lecture 1, Page 5

slide-7
SLIDE 7

Computational Logic, Spring 2006 Pete Manolios

Semantics of FOL

We will now go beyond the grammatical, syntactic aspects of FOL to discuss what terms and formulas mean. Notions such as free, term, formula are purely syntactic. Here is an example of something that isn’t syntactic: what does ∀v0Rv0v1 mean? Well, it depends on what R means, i.e., what relation is it and over what domain? and what v1 means, i.e., what element of the domain is it? Say that R is < on

N and v1 is 0, then the statement is false. If R is ≥,

then it is true.

Georgia Tech Lecture 1, Page 6

slide-8
SLIDE 8

Computational Logic, Spring 2006 Pete Manolios

Structures

Definition 6 An S-structure is a pair U = A, a, where A is a non-empty set, the domain or universe, and a is a function with domain S such that:

  • 1. If c ∈ S is a constant symbol, then a.c ∈ A .
  • 2. If f ∈ S is an n-ary function symbol, then a.f : An → A .
  • 3. If R ∈ S is an n-ary relation symbol, then a.R ⊆ An .

Instead of a.R, a.f, and a.c we often write RU, f U, and cU or even RA, f A, and cA. Instead of denoting a structure U as a pair A, a, we often replace a by a list of its values, e.g., we would write an {f, R, c}-structure as A, f U, RU, cU.

Georgia Tech Lecture 1, Page 7

slide-9
SLIDE 9

Computational Logic, Spring 2006 Pete Manolios

Here are some examples. The symbol sets Sar := {+, ·, 0, 1} and S<

ar := {+, ·, 0, 1, <}

play an important role, and we use N to denote the Sar-structure N, +

N, · N, 0 N, 1 N and N < to denote the S<

ar-structure

N, +

N, · N, 0 N, 1 N, < N.

Similarly, we use R to denote the Sar-structure

R, + R, · R, 0 R, 1 R and R<

to denote the S<

ar-structure R, +

R, · R, 0 R, 1 R, < R.

Notice that +

R and + N are very different objects. Even so, we will drop the

subscripts when (we think) no ambiguity will arise.

Georgia Tech Lecture 1, Page 8