first-order logic: ingredients
There is a domain of interpretation, and
I variables: x, y, z,... ranging over the domain
I constant symbols (names): 0 1 π e Albert Einstein
I function symbols: + ∗ − / sin(−) exp(−) I predicates: = > 6 male(−) parent(−, −) I propositional connectives: ∧ ∨ q −→ ←→ O ↑ ↓ I quantifiers: ∀ ∃.
Tibor Beke first order syntax False.
sentences
Let the domain of interpretation be the set of real numbers.
∀a ∀b ∀c ∃x(ax2 + bx + c = 0)
This formula is an example of a sentence from first-order logic. It has no free variables: every one of the variables a, b, c, x is in the scope of a quantifier.
A sentence has a well-defined truth value that can be discovered (at least, in principle). The sentence above (interpreted over the real numbers) is
Tibor Beke first order syntax sentences
Let the domain of interpretation be the set of real numbers.
∀a ∀b ∀c ∃x(ax2 + bx + c = 0)
This formula is an example of a sentence from first-order logic. It has no free variables: every one of the variables a, b, c, x is in the scope of a quantifier.
A sentence has a well-defined truth value that can be discovered (at least, in principle). The sentence above (interpreted over the real numbers) is False.
Tibor Beke first order syntax “Every woman has two children ”
but is, in fact, logically equivalent to every woman having at least one child. That child could play the role of both y and z.
sentences
Let the domain of discourse be a set of people, let F (x) mean “x is female” and let P(x, y) mean “x is a parent of y”. ∀x F (x) −→ ∃y∃z P(x, y) ∧ P(x, z)
This sentence seems to be saying
Tibor Beke first order syntax sentences
Let the domain of discourse be a set of people, let F (x) mean “x is female” and let P(x, y) mean “x is a parent of y”. ∀x F (x) −→ ∃y∃z P(x, y) ∧ P(x, z)
This sentence seems to be saying
“Every woman has two children ”
but is, in fact, logically equivalent to every woman having at least one child. That child could play the role of both y and z.
Tibor Beke first order syntax Suppose the domain of discourse is the natural numbers 0, 1, 2, 3,... . What is the meaning of the following formula? ∀p∀q pq = n −→ (p = 1 O q = 1) “n is a prime number”
open formulas
A first-order formula that contains free variables is said to be open. You cannot associate a truth value to it unless the free variables are specialized to some element of the domain: ∀x f (x) 6 f (x0) An open formula can be thought of as defining a property (“predicate”) of its free variable(s).
Tibor Beke first order syntax “n is a prime number”
open formulas
A first-order formula that contains free variables is said to be open. You cannot associate a truth value to it unless the free variables are specialized to some element of the domain: ∀x f (x) 6 f (x0) An open formula can be thought of as defining a property (“predicate”) of its free variable(s).
Suppose the domain of discourse is the natural numbers 0, 1, 2, 3,... . What is the meaning of the following formula? ∀p∀q pq = n −→ (p = 1 O q = 1)
Tibor Beke first order syntax open formulas
A first-order formula that contains free variables is said to be open. You cannot associate a truth value to it unless the free variables are specialized to some element of the domain: ∀x f (x) 6 f (x0) An open formula can be thought of as defining a property (“predicate”) of its free variable(s).
Suppose the domain of discourse is the natural numbers 0, 1, 2, 3,... . What is the meaning of the following formula? ∀p∀q pq = n −→ (p = 1 O q = 1) “n is a prime number”
Tibor Beke first order syntax “ x is a grandparent of y ”
∃w∃z∃u P(w, z) ∧ P(z, x) ∧ P(w, u) ∧ P(u, y)
“ x and y are cousins (or siblings, or the same people!) ”
open formulas
F (x): x is female M(x): x is male P(x, y): x is a parent of y
∃z P(x, z) ∧ P(z, y)
Tibor Beke first order syntax ∃w∃z∃u P(w, z) ∧ P(z, x) ∧ P(w, u) ∧ P(u, y)
“ x and y are cousins (or siblings, or the same people!) ”
open formulas
F (x): x is female M(x): x is male P(x, y): x is a parent of y
∃z P(x, z) ∧ P(z, y)
“ x is a grandparent of y ”
Tibor Beke first order syntax “ x and y are cousins (or siblings, or the same people!) ”
open formulas
F (x): x is female M(x): x is male P(x, y): x is a parent of y
∃z P(x, z) ∧ P(z, y)
“ x is a grandparent of y ”
∃w∃z∃u P(w, z) ∧ P(z, x) ∧ P(w, u) ∧ P(u, y)
Tibor Beke first order syntax open formulas
F (x): x is female M(x): x is male P(x, y): x is a parent of y
∃z P(x, z) ∧ P(z, y)
“ x is a grandparent of y ”
∃w∃z∃u P(w, z) ∧ P(z, x) ∧ P(w, u) ∧ P(u, y)
“ x and y are cousins (or siblings, or the same people!) ”
Tibor Beke first order syntax first-order logic: syntax
We will define the notion of well-formed formula. The definition will be “step-by-step” (inductive).
• A term is a composite of function symbols, variables and constants. Terms denote elements of the domain — specific or unspecified elements. Examples of terms x π Pope Francis 23 · 24 sin2(kx) + 23 a · x2 + b · x + c
Tibor Beke first order syntax first-order logic: atomic formulas
• Suppose t1, t2,..., tn are terms, and R(−, −,..., −) is an n-ary relation symbol. The expression
R(t1, t2,..., tn)
is called an atomic formula.
Atomic formulas contain neither propositional connectives nor quantifiers. They are the simplest types of expressions that can be evaluated to True or False — if their free variables are specialized to some element of the domain, that is. They are the same, essentially, as the “atomic propositions” of propositional logic.
Tibor Beke first order syntax examples of atomic formulas
π > e x = y friends(Big Bird, Cookie Monster) spouse(Pope Francis, x) collinear(p, q, r) x2 + 1 > sin(z) + 23
Tibor Beke first order syntax first-order logic: well-formed formulas
We will define well-formed formulas the following way:
I Any atomic formula is well-formed.
I If α and β are well-formed and ? is any binary propositional connective, then (α ? β)
is well-formed. (‘?’ could be any of ∧ ∨ −→ O ←→ ↑ ↓ .) I If α is well-formed, so is qα. I If α is well-formed and x is any variable then the expressions
∀xα
∃xα are both well-formed.
Tibor Beke first order syntax not well-formed (if we’re sticklers!)
wff
not wff
not wff
wff
wff
wff (strange but true!)
which of the following is a well-formed formula?
P(x) ∧ Q(y) ∧ R(z)
∃x P(x, y) ∧ Q(x) ∨ R(y)