Docsity

Understanding Function and Predicate Symbols in Predicate Logic, Exams of Logic

Toggle sidebar
bg1
Function and Predicate
Symbols
We next extend the language of propositional logic by
function and predicate symbols.
We use the letters f, g, h, . . . to denote function symbols,
and the letters P,Q,R,... to denote predicate symbols.
We also associate with each function and predicate sym-
bol a non-negative integer, called its arity.
Function symbols, as we shall see, denote functions over
a certain domain; predicate symbols, relations. The
arity indicates the number of arguments a function or
relation takes.
A (function or predicate) symbol of arity 0 is called a
constant. Sometimes we use superscripts to indicate
the arity of a symbol, e.g., we may write f2for a binary
function symbol.
Finally, we use the letters x, y, z, . . . to denote (individual)
variables, ranging over elements of a specified domain.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understanding Function and Predicate Symbols in Predicate Logic and more Exams Logic in PDF only on Docsity!

Function and Predicate

Symbols

We next extend the language of propositional logic by function and predicate symbols.

We use the letters f, g, h,... to denote function symbols, and the letters P, Q, R,... to denote predicate symbols.

We also associate with each function and predicate sym- bol a non-negative integer, called its arity.

Function symbols, as we shall see, denote functions over a certain domain; predicate symbols, relations. The arity indicates the number of arguments a function or relation takes.

A (function or predicate) symbol of arity 0 is called a constant. Sometimes we use superscripts to indicate the arity of a symbol, e.g., we may write f 2 for a binary function symbol.

Finally, we use the letters x, y, z,... to denote (individual) variables, ranging over elements of a specified domain.

Terms and Atoms

Let F and P be sets of function and predicate symbols, respectively, and X be a set of variables.

The set T (F, V) of terms (over F and X ) is defined inductively by:

  • every variable x in X is a term, and
  • if f is a function symbol in F of arity n, and t 1 ,... , tn are terms, then f (t 1 ,... , tn) is also a term.

For example, if f is a binary function symbol, a is a constant, and x is a variable, then a, f (a, x), and f (a, a) are all terms.

Similarly, we define:

  • if P is a predicate symbol in P of arity n, and t 1 ,... , tn are terms, then P (t 1 ,... , tn) is an atomic formula, or atom for short.

Thus, if P is a binary predicate symbol, then P (x, x) and P (a, f (x, a)) are atomic formulas.

Parentheses are not necessary, but increase the read- ability.

If a term or atom contains no variables, it is said to be variable-free or ground.

Syntax of Predicate Logic

In predicate logic there are two kinds of expressions: We have already given (recursive) definitions of the sets of terms and atomic formulas.

The definition of arbitrary formulas extends the defini- tion of propositional formulas:

〈formula〉 ::= ⊥ | > | 〈atom〉

| (¬〈formula〉)

| (〈formula〉 ∧ 〈formula〉)

| (〈formula〉 ∨ 〈formula〉)

| (〈formula〉 → 〈formula〉)

| (∀〈variable〉 〈formula〉)

| (∃〈variable〉 〈formula〉)

〈variable〉 ::= x | y | z |...

We usually use Greek letters, φ, ψ,... to denote predicate logic formulas.

If φ is a quantified formula ∀x ψ or ∃x ψ we say that the quantifier binds the variable x and called φ the scope of the quantifier expression ∀x or ∃x, respectively.

For example, in ∀x∃y P (x, y) the first quantifier binds x and the second binds y. The scope of the second quantifier is the formula ∃y P (x, y).

Substitution

Terms may be substituted for variables, but only for free occurrences of variables in a formula.

Definition.

If φ is a formula, t is a term, and x is a variable, then we denote by φ[t/x] the formula obtained by replacing each free occurrence of x in φ by t.

We also use the letters σ and τ to denote substitutions.

For example, if σ is the substitution [f (a)/x], then P (x, x)σ is P (f (a), f (a)) and (Q(x) ∨ ∃x ¬R(x))σ is Q(f (a)) ∨ ∃x ¬R(x).

In general, if φ contains only bound occurrences of x, then φ[t/x] is identical to φ.

Unfortunately, substitutions may have undesired side ef- fects, and hence their application needs to be constrained.

Definition.

We say that a term t is free for a variable x in a formula φ if no free occurrence of x is in the scope of a quantifier that binds a variable y occuring in t.

Is f (x, y) free for x in ∀x [P (x) ∧ Q(y)]?

Is f (x, y) free for y in ∀x [P (x) ∧ Q(y)]?

Semantics of Predicate Logic

Let F be a set of function symbols and P a set of predicate symbols.

A model M of (F, P) consists of the following set of data:

  1. a non-empty set A (the universe of concrete values)
  2. for each n-ary function symbol f ∈ F an n-ary func- tion f M^ : An^ → A
  3. for each n-ary predicate symbol P ∈ P an n-ary relation P M^ ⊆ An

For example, let F be the set { 0 , 1 , +, ∗, −} and P the set {=, ≤, <} We may take the set of real numbers as universe and define 0M^ as the real number 0, 1M^ as the real number 1, +M^ as addition, ∗M^ as multiplication, −M as subtraction, =M^ as the equality predicate, ≤M^ as the less-than-or-equal-to relation, and <M^ as the less-than relation.

Interpretation of Terms

Terms of a first-order language can be interpreted as denoting elements of the universe A. More specifically, a model M for (F, P) (over universe A) and an environ- ment l for V and A induce a mapping

tM l : T (F, V) → A

from the set of terms T (F, V) to the set A defined by:

tM l =

l(x) if t is a variable x f M((t 1 )M l ,... , (tk)M l ) if t = f (t 1 ,... , tk)

More generally, one may view a term t as inducing a mapping tM^ from environments to the given universe, by defining tM(l) as tM l.

Example.

Take the term t = x · (y + (x + 1) · z). If M is the model above and l(x) = 3, l(y) = 2, and l(z) = 1, then tM l = 18.

The Satisfaction Relation

Let M be a model for (F, P) over universe A and l be an environment for V and A.

We define a relation

M |=l φ

by structural induction on formulas φ over the first-order language defined by F, P, and V:

(i) If φ = P (t 1 ,... , tk), then M |=l φ holds iff (t 1 )M l ,... , (tn)M l ) ∈ P M. (ii) If φ = ¬ψ, then M |=l φ holds iff M |=l ψ does not hold. (iii) If φ = ψ 1 ∧ ψ 2 , then M |=l φ holds iff both M |=l ψ 1 and M |=l ψ 2 hold. (iv) If φ = ψ 1 ∨ ψ 2 , then M |=l φ holds iff at least one of M |=l ψ 1 and M |=l ψ 2 holds. (v) If φ = ∀xψ, then M |=l φ holds iff M |=l[x 7 →a] ψ holds for all elements a ∈ A. (vi) If φ = ∃xψ, then M |=l φ holds iff M |=l[x 7 →a] ψ holds for some element a ∈ A.

If φ is a sentence we often write

M |= φ

since the choice of an environment l is then irrelevant.