Many-Sorted First-Order Model Theory
Lecture 5 2nd July, 2020
1 / 56
Many-Sorted First-Order Model Theory Lecture 5 2 nd July, 2020 1 / - - PowerPoint PPT Presentation
Many-Sorted First-Order Model Theory Lecture 5 2 nd July, 2020 1 / 56 A few comments on terminology and notation Our official terminology and notation is very useful for analysing properties of logics (note the plural!) in an abstract form.
Lecture 5 2nd July, 2020
1 / 56
◮ Our official terminology and notation is very useful for analysing properties of logics (note the plural!) in an abstract form. ◮ It is however quite cumbersome to use in practice, especially when the background logic is fixed. And it is non-standard! ◮ From now on I will use the standard terminology and notation. Officially, they will be treated as useful shorthands. ◮ Below is a dictionary to translate between the two.
Our official Standard (our shorthand) sentence formula sentence with no variables sentence sentence in signature Σ[x] formula in signature Σ with free variables x expansion of A to signature Σ[x] valuation of x into A A | =Σ[x] ϕ with xA = a A | = ϕ(a) σA (a function symbol) f A πA (a relation symbol) RA category theory common sense
2 / 56
◮ Our official terminology and notation is very useful for analysing properties of logics (note the plural!) in an abstract form. ◮ It is however quite cumbersome to use in practice, especially when the background logic is fixed. And it is non-standard! ◮ From now on I will use the standard terminology and notation. Officially, they will be treated as useful shorthands. ◮ Below is a dictionary to translate between the two.
Our official Standard (our shorthand) sentence formula sentence with no variables sentence sentence in signature Σ[x] formula in signature Σ with free variables x expansion of A to signature Σ[x] valuation of x into A A | =Σ[x] ϕ with xA = a A | = ϕ(a) σA (a function symbol) f A πA (a relation symbol) RA category theory common sense
3 / 56
◮ Our official terminology and notation is very useful for analysing properties of logics (note the plural!) in an abstract form. ◮ It is however quite cumbersome to use in practice, especially when the background logic is fixed. And it is non-standard! ◮ From now on I will use the standard terminology and notation. Officially, they will be treated as useful shorthands. ◮ Below is a dictionary to translate between the two.
Our official Standard (our shorthand) sentence formula sentence with no variables sentence sentence in signature Σ[x] formula in signature Σ with free variables x expansion of A to signature Σ[x] valuation of x into A A | =Σ[x] ϕ with xA = a A | = ϕ(a) σA (a function symbol) f A πA (a relation symbol) RA category theory common sense
4 / 56
◮ Our official terminology and notation is very useful for analysing properties of logics (note the plural!) in an abstract form. ◮ It is however quite cumbersome to use in practice, especially when the background logic is fixed. And it is non-standard! ◮ From now on I will use the standard terminology and notation. Officially, they will be treated as useful shorthands. ◮ Below is a dictionary to translate between the two.
Our official Standard (our shorthand) sentence formula sentence with no variables sentence sentence in signature Σ[x] formula in signature Σ with free variables x expansion of A to signature Σ[x] valuation of x into A A | =Σ[x] ϕ with xA = a A | = ϕ(a) σA (a function symbol) f A πA (a relation symbol) RA category theory common sense
5 / 56
6 / 56
Theorem 1 (Compactness)
A theory T has a model iff every finite subset of T has a model.
Theorem 2 (It takes infinity to recognise infinity)
Let ψ be a sentence in the pure equality language (no function symbols, no relation symbols except =). If ψ holds in all infinite models, then there is an n ∈ N such that ψ holds in all models S with card(S) > n.
Proof.
◮ Let Tn = {¬ψ, ¬ϕ1, . . . , ¬ϕn}, where ϕn are the sentences saying that there are precisely n elements. (Exercise: write such sentences.) ◮ Suppose each Tn has a model Sn. Then card(Sn) ≥ n + 1. ◮ Put T =
n∈N Tn. By compactness, T has a model, say, S.
◮ For each n ∈ N we have that S has strictly more elements than n, so S is infinite. ◮ Yet, S | = ¬ψ. Contradiction.
7 / 56
Theorem 1 (Compactness)
A theory T has a model iff every finite subset of T has a model.
Theorem 2 (It takes infinity to recognise infinity)
Let ψ be a sentence in the pure equality language (no function symbols, no relation symbols except =). If ψ holds in all infinite models, then there is an n ∈ N such that ψ holds in all models S with card(S) > n.
Proof.
◮ Let Tn = {¬ψ, ¬ϕ1, . . . , ¬ϕn}, where ϕn are the sentences saying that there are precisely n elements. (Exercise: write such sentences.) ◮ Suppose each Tn has a model Sn. Then card(Sn) ≥ n + 1. ◮ Put T =
n∈N Tn. By compactness, T has a model, say, S.
◮ For each n ∈ N we have that S has strictly more elements than n, so S is infinite. ◮ Yet, S | = ¬ψ. Contradiction.
8 / 56
Theorem 1 (Compactness)
A theory T has a model iff every finite subset of T has a model.
Theorem 2 (It takes infinity to recognise infinity)
Let ψ be a sentence in the pure equality language (no function symbols, no relation symbols except =). If ψ holds in all infinite models, then there is an n ∈ N such that ψ holds in all models S with card(S) > n.
Proof.
◮ Let Tn = {¬ψ, ¬ϕ1, . . . , ¬ϕn}, where ϕn are the sentences saying that there are precisely n elements. (Exercise: write such sentences.) ◮ Suppose each Tn has a model Sn. Then card(Sn) ≥ n + 1. ◮ Put T =
n∈N Tn. By compactness, T has a model, say, S.
◮ For each n ∈ N we have that S has strictly more elements than n, so S is infinite. ◮ Yet, S | = ¬ψ. Contradiction.
9 / 56
Definition 3
A class C of models is an elementary class, if C = ModΦ for some set Φ of
some finite Φ, then it is said to be finitely axiomatisable.
Theorem 4
The class INF of infinite pure equality structures is not finitely axiomatisable.
Proof.
◮ Suppose INF is axiomatised by a finite set Φ. ◮ Then ψ = Φ has the properties from Theorem 2. ◮ Thus, ψ holds in some finite models. Contradiction.
◮ But INF is an elementary class. It is axiomatised by {¬ϕn : n ∈ N}.
10 / 56
Definition 3
A class C of models is an elementary class, if C = ModΦ for some set Φ of
some finite Φ, then it is said to be finitely axiomatisable.
Theorem 4
The class INF of infinite pure equality structures is not finitely axiomatisable.
Proof.
◮ Suppose INF is axiomatised by a finite set Φ. ◮ Then ψ = Φ has the properties from Theorem 2. ◮ Thus, ψ holds in some finite models. Contradiction.
◮ But INF is an elementary class. It is axiomatised by {¬ϕn : n ∈ N}.
11 / 56
Definition 3
A class C of models is an elementary class, if C = ModΦ for some set Φ of
some finite Φ, then it is said to be finitely axiomatisable.
Theorem 4
The class INF of infinite pure equality structures is not finitely axiomatisable.
Proof.
◮ Suppose INF is axiomatised by a finite set Φ. ◮ Then ψ = Φ has the properties from Theorem 2. ◮ Thus, ψ holds in some finite models. Contradiction.
◮ But INF is an elementary class. It is axiomatised by {¬ϕn : n ∈ N}.
12 / 56
Definition 3
A class C of models is an elementary class, if C = ModΦ for some set Φ of
some finite Φ, then it is said to be finitely axiomatisable.
Theorem 4
The class INF of infinite pure equality structures is not finitely axiomatisable.
Proof.
◮ Suppose INF is axiomatised by a finite set Φ. ◮ Then ψ = Φ has the properties from Theorem 2. ◮ Thus, ψ holds in some finite models. Contradiction.
◮ But INF is an elementary class. It is axiomatised by {¬ϕn : n ∈ N}.
13 / 56
Theorem 5 (Robinson’s principle)
Let ϕ be a first-order sentence in the language of fields. If ϕ holds in all fields of characteristic 0, then there is a prime p such that ϕ holds in all fields of characteristic ≥ p.
Proof.
◮ Let Φ be some first-order rendering of field axioms, and for each prime p let χp be the sentence 1 + 1 + · · · + 1
= 0. ◮ Let ∆p = {¬χq : q ≤ p} (∆p says: characteristic is greater than p). ◮ Now, suppose there is an infinite sequence of primes (pi)i∈I , such that each set Σi = {¬ϕ} ∪ ∆pi ∪ Φ, has a model. ◮ So, for each prime p there is a field of characteristic greater than p in which ϕ fails. ◮ By compactness, Σ =
i∈I Σi has a model, say, K.
◮ Then, K is a field of characteristic 0, and K | = ¬ϕ. ◮ But K | = ϕ by assumption. Contradiction.
14 / 56
Theorem 5 (Robinson’s principle)
Let ϕ be a first-order sentence in the language of fields. If ϕ holds in all fields of characteristic 0, then there is a prime p such that ϕ holds in all fields of characteristic ≥ p.
Proof.
◮ Let Φ be some first-order rendering of field axioms, and for each prime p let χp be the sentence 1 + 1 + · · · + 1
= 0. ◮ Let ∆p = {¬χq : q ≤ p} (∆p says: characteristic is greater than p). ◮ Now, suppose there is an infinite sequence of primes (pi)i∈I , such that each set Σi = {¬ϕ} ∪ ∆pi ∪ Φ, has a model. ◮ So, for each prime p there is a field of characteristic greater than p in which ϕ fails. ◮ By compactness, Σ =
i∈I Σi has a model, say, K.
◮ Then, K is a field of characteristic 0, and K | = ¬ϕ. ◮ But K | = ϕ by assumption. Contradiction.
15 / 56
Definition 6
A group G is a torsion group, if for every g ∈ G we have gn = e for some n > 0. A group G is a torsion free group, if for every g ∈ G \ {e} we have gn = e for every n > 0.
Theorem 7
The class TF of all torsion-free groups is not finitely axiomatisable.
Proof.
◮ Let δn be the sentence xn = e → x = e. Let ∆n = {δi : 1 ≤ i ≤ n} and ∆ = {δn : n ∈ N}. ◮ We have that G is torsion-free iff G | = ∆. (This shows, btw, that TF is elementary.) ◮ Now suppose that Φ is a finite set axiomatising TF. Let ϕ = Φ. ◮ Then, ∆ | = ϕ, so ∆ ∪ {¬ϕ} has no model. ◮ By compactness, for some m ∈ N, the set ∆m ∪ {¬ϕ} has no model. (This holds because ∆ =
n∈N ∆n.)
◮ Take Zp for a prime p > m. Then, Zp | = ∆m, and Zp is not torsion-free. ◮ Thus, Zp | = ∆m ∪ {¬ϕ}. Contradiction.
16 / 56
Definition 6
A group G is a torsion group, if for every g ∈ G we have gn = e for some n > 0. A group G is a torsion free group, if for every g ∈ G \ {e} we have gn = e for every n > 0.
Theorem 7
The class TF of all torsion-free groups is not finitely axiomatisable.
Proof.
◮ Let δn be the sentence xn = e → x = e. Let ∆n = {δi : 1 ≤ i ≤ n} and ∆ = {δn : n ∈ N}. ◮ We have that G is torsion-free iff G | = ∆. (This shows, btw, that TF is elementary.) ◮ Now suppose that Φ is a finite set axiomatising TF. Let ϕ = Φ. ◮ Then, ∆ | = ϕ, so ∆ ∪ {¬ϕ} has no model. ◮ By compactness, for some m ∈ N, the set ∆m ∪ {¬ϕ} has no model. (This holds because ∆ =
n∈N ∆n.)
◮ Take Zp for a prime p > m. Then, Zp | = ∆m, and Zp is not torsion-free. ◮ Thus, Zp | = ∆m ∪ {¬ϕ}. Contradiction.
17 / 56
Definition 6
A group G is a torsion group, if for every g ∈ G we have gn = e for some n > 0. A group G is a torsion free group, if for every g ∈ G \ {e} we have gn = e for every n > 0.
Theorem 7
The class TF of all torsion-free groups is not finitely axiomatisable.
Proof.
◮ Let δn be the sentence xn = e → x = e. Let ∆n = {δi : 1 ≤ i ≤ n} and ∆ = {δn : n ∈ N}. ◮ We have that G is torsion-free iff G | = ∆. (This shows, btw, that TF is elementary.) ◮ Now suppose that Φ is a finite set axiomatising TF. Let ϕ = Φ. ◮ Then, ∆ | = ϕ, so ∆ ∪ {¬ϕ} has no model. ◮ By compactness, for some m ∈ N, the set ∆m ∪ {¬ϕ} has no model. (This holds because ∆ =
n∈N ∆n.)
◮ Take Zp for a prime p > m. Then, Zp | = ∆m, and Zp is not torsion-free. ◮ Thus, Zp | = ∆m ∪ {¬ϕ}. Contradiction.
18 / 56
Theorem 8
Let T be the set of sentences true in the model N = (N; <, +, ·, 0, 1). There exists a model M and an element c ∈ |M| such that M | = T and M | = {1 + · · · + 1
< x : n ∈ N}, with xM = c.
Proof.
◮ Expand the signature by adding a new constant c. ◮ Let T ′ = T ∪ {1 + · · · + 1
< c : n ∈ N}. ◮ Every finite subset Tf of T has a model: just take N and interpret c as a big enough natural number. ◮ Then, T ′ has a model, say M′. ◮ Put c = cM′. (Note the abuse of notation: c is the element of |M′| that interprets the constant c. This is a standard convention. Constants name themselves.) ◮ Let M be the reduct of M′ to the signature without c. ◮ M is the model we want.
19 / 56
Theorem 8
Let T be the set of sentences true in the model N = (N; <, +, ·, 0, 1). There exists a model M and an element c ∈ |M| such that M | = T and M | = {1 + · · · + 1
< x : n ∈ N}, with xM = c.
Proof.
◮ Expand the signature by adding a new constant c. ◮ Let T ′ = T ∪ {1 + · · · + 1
< c : n ∈ N}. ◮ Every finite subset Tf of T has a model: just take N and interpret c as a big enough natural number. ◮ Then, T ′ has a model, say M′. ◮ Put c = cM′. (Note the abuse of notation: c is the element of |M′| that interprets the constant c. This is a standard convention. Constants name themselves.) ◮ Let M be the reduct of M′ to the signature without c. ◮ M is the model we want.
20 / 56
◮ For any model M, we will write Th(M) for {ϕ ∈ Sen : M | = ϕ}. We call Th(M) the theory of M.
Exercise 1
Show that Th(M) is complete in the following sense. ◮ For every sentence ϕ, we have ϕ ∈ Th(M) or ¬ϕ ∈ Th(M).
Exercise 2
Write explicitly a sentence ϕn in the signature of pure equality, such that S | = ϕn if and only if card(S) = n.
Exercise 3
Show that the class of all fields of characteristic 0 is not finitely axiomatisable.
21 / 56
Exercise 4
Consider the set S of sentences given below (< is a binary relation). ◮ ∀x · ∃y · x < y. ◮ ∀x · ∀y · x < y → ¬(y < x). ◮ ∀x · ∀y · x < y → ∃z · (x < z ∧ z < y). It is easy to see that (Q; <Q), interpreting < as the natural strict order, is a model of S. Find a finite model of S. (Hint: it has to have at least 7 elements.)
Exercise 5
Use compactness and the existence of Galois fields GF(pn) to show that for any prime p there exists an infinite field of characteristic p.
22 / 56
23 / 56
Example 9
Consider a graph G, and the language of one binary relation E to speak about it. ◮ How do I describe G to you, without showing the picture? ◮ First I say: there are three vertices, let’s call them a, b, c. ◮ Then I say: there are edges aEb and aEc, and no other edges. ◮ Aha, you say, here we go. a b c ◮ We do something very similar when we say: let p(x) = anxn + . . . a1x + a0 be a real polynomial with integer coefficients. ◮ We want to do it in full generality.
24 / 56
Example 9
Consider a graph G, and the language of one binary relation E to speak about it. ◮ How do I describe G to you, without showing the picture? ◮ First I say: there are three vertices, let’s call them a, b, c. ◮ Then I say: there are edges aEb and aEc, and no other edges. ◮ Aha, you say, here we go. a b c ◮ We do something very similar when we say: let p(x) = anxn + . . . a1x + a0 be a real polynomial with integer coefficients. ◮ We want to do it in full generality.
25 / 56
Example 9
Consider a graph G, and the language of one binary relation E to speak about it. ◮ How do I describe G to you, without showing the picture? ◮ First I say: there are three vertices, let’s call them a, b, c. ◮ Then I say: there are edges aEb and aEc, and no other edges. ◮ Aha, you say, here we go. a b c ◮ We do something very similar when we say: let p(x) = anxn + . . . a1x + a0 be a real polynomial with integer coefficients. ◮ We want to do it in full generality.
26 / 56
Example 9
Consider a graph G, and the language of one binary relation E to speak about it. ◮ How do I describe G to you, without showing the picture? ◮ First I say: there are three vertices, let’s call them a, b, c. ◮ Then I say: there are edges aEb and aEc, and no other edges. ◮ Aha, you say, here we go. a b c ◮ We do something very similar when we say: let p(x) = anxn + . . . a1x + a0 be a real polynomial with integer coefficients. ◮ We want to do it in full generality.
27 / 56
Example 9
Consider a graph G, and the language of one binary relation E to speak about it. ◮ How do I describe G to you, without showing the picture? ◮ First I say: there are three vertices, let’s call them a, b, c. ◮ Then I say: there are edges aEb and aEc, and no other edges. ◮ Aha, you say, here we go. a b c ◮ We do something very similar when we say: let p(x) = anxn + . . . a1x + a0 be a real polynomial with integer coefficients. ◮ We want to do it in full generality.
28 / 56
Notation
Let A be a Σ-structure, a be a sequence of elements of |A|. ◮ We write (A, a) for the structure with the same universe, relations and functions, but with the signature expanded by a sequence of constants c, such that c(A,a)
i
= ai. ◮ If the original signature is Σ, we write Σ[a] for the new signature. (This is formally incorrect! But very natural. Just be careful.) ◮ Very often, we interested in the substructure of (A, a) generated by a, which we denote by aA with the subscript dropped if A is clear from context. ◮ Thus, aA is the smallest reachable model containing a. ◮ For a formula with free variables x (i.e., a sentence in the signature Σ[x]), we write A | = ϕ(a) to mean (A, a) | = ϕ(x).
29 / 56
Lemma 10 (trivial, and used silently)
Let A, B be Σ-structures, and (A, a), (B, b) be Σ[c]-structures. Then, a homomorphism (embedding) f : (A, a) → (B, b) is the same thing as a homomorphism (embedding) f : A → B with f (a) = b.
Definition 11
Let A be a Σ-structure and let a generate A, that is, aA = A. ◮ A diagram of A, written diag(A), is the set of all atomic sentences and their negations true in (A, a). ◮ A positive diagram of A, written diag+(A), is the set of all atomic sentences true in (A, a). ◮ An elementary diagram of A, written eldiag(A), is the set of all sentences true in (A, a).
30 / 56
Lemma 12 (Diagram lemma)
Let A and B be Σ-structures, c a sequence of constants, and (A, a), (B, b) be Σ[c]-structures. The following are equivalent. (1) For every atomic sentence ϕ, if (A, a) | = ϕ, then (B, b) | = ϕ. (2) There is a homomorphism f : aA → (B, b), such that f (a) = b. If it exists, the homomorphism f is unique. Moreover, t.f.a.e. (3) For every atomic sentence ϕ, (A, a) | = ϕ ⇔ (B, b) | = ϕ. (4) The homomorphism f is an embedding.
Corollary 13
Assume a generates A. Then the following hold: ◮ B | = diag+(A) iff there is a homomorphism f : A → B. ◮ B | = diag(A) iff there is an embedding f : A → B.
31 / 56
Lemma 12 (Diagram lemma)
Let A and B be Σ-structures, c a sequence of constants, and (A, a), (B, b) be Σ[c]-structures. The following are equivalent. (1) For every atomic sentence ϕ, if (A, a) | = ϕ, then (B, b) | = ϕ. (2) There is a homomorphism f : aA → (B, b), such that f (a) = b. If it exists, the homomorphism f is unique. Moreover, t.f.a.e. (3) For every atomic sentence ϕ, (A, a) | = ϕ ⇔ (B, b) | = ϕ. (4) The homomorphism f is an embedding.
Corollary 13
Assume a generates A. Then the following hold: ◮ B | = diag+(A) iff there is a homomorphism f : A → B. ◮ B | = diag(A) iff there is an embedding f : A → B.
32 / 56
Proof.
◮ Note that for an atomic sentence ϕ we have (A, a) | = ϕ iff aA | = ϕ. ◮ Now assume (1). We define a map f : aA → B putting f (t(A,a)
i
) = t(B,b)
i
, choosing some representative term for each element of aA. ◮ It does not depend on the choice of representatives, because t(A,a) = s(A,a) implies (A, a) | = t = s, and so, by (1), (B, b) | = t = s; hence t(B,b) = s(B,b). ◮ Therefore f (a) = b. ◮ Let σ be an operation, say binary, and let σ(t1(a), t2(a)) = t(a), where t1, t2 and t are the representatives of the elements t1(a), t2(a) and t(a). ◮ So, σ(f (t1(a)), f (t2(a))) = σ(t1(b), t2(b)), and f (t(a)) = t(b) by definition of f . ◮ Since σ(t1(a), t2(a)) = t(a), it follows by (1) that σ(t1(b), t2(b)) = t(b). ◮ Thus, f (σ(t1(a), t2(a))) = f (t(a)) = t(b) = σ(t1(b), t2(b)) = σ(f (t1(a)), f (t2(a))). ◮ The case of a relation is analogous. ◮ For converse, assume (2). Let ϕ be an atomic sentence, say, π(t1, t2), such that (A, a) | = ϕ. Thus, πA(t1(a), t2(a)) holds. ◮ As f is a homomorphism, and f (a) = b, we have that πB(f (t1(a), f (t2(a))) holds, that is, πB(t1(b), t2(b)) holds. ◮ Thus, (B, b) | = ϕ. The case of a function is analogous.
33 / 56
Proof.
◮ To prove (3) implies (4) we only need to show that the homomorphism f is injective. ◮ If tA = sA and tB = sB, then the atomic sentence t = s holds in (A, a), but fails in (B, b), contradicting (3). ◮ To prove (4) implies (3) we only need to show that negated atomic sentences are preserved from (A, a) to (B, b). ◮ This is equivalent to preserving atomic sentences from (B, b) to (A, a). ◮ Use the fact that f −1 is a homomorphism from bB to (A, a), with f −1(b) = a.
Exercise 6
Give a detailed proof of the diagram lemma and its two corollaries.
Corollary 14
For any structures A and B of the same signature, t.f.a.e. ◮ A is isomorphic to B ◮ B | = diag(A) and A | = diag(B)
34 / 56
Proof.
◮ To prove (3) implies (4) we only need to show that the homomorphism f is injective. ◮ If tA = sA and tB = sB, then the atomic sentence t = s holds in (A, a), but fails in (B, b), contradicting (3). ◮ To prove (4) implies (3) we only need to show that negated atomic sentences are preserved from (A, a) to (B, b). ◮ This is equivalent to preserving atomic sentences from (B, b) to (A, a). ◮ Use the fact that f −1 is a homomorphism from bB to (A, a), with f −1(b) = a.
Exercise 6
Give a detailed proof of the diagram lemma and its two corollaries.
Corollary 14
For any structures A and B of the same signature, t.f.a.e. ◮ A is isomorphic to B ◮ B | = diag(A) and A | = diag(B)
35 / 56
Proof.
◮ To prove (3) implies (4) we only need to show that the homomorphism f is injective. ◮ If tA = sA and tB = sB, then the atomic sentence t = s holds in (A, a), but fails in (B, b), contradicting (3). ◮ To prove (4) implies (3) we only need to show that negated atomic sentences are preserved from (A, a) to (B, b). ◮ This is equivalent to preserving atomic sentences from (B, b) to (A, a). ◮ Use the fact that f −1 is a homomorphism from bB to (A, a), with f −1(b) = a.
Exercise 6
Give a detailed proof of the diagram lemma and its two corollaries.
Corollary 14
For any structures A and B of the same signature, t.f.a.e. ◮ A is isomorphic to B ◮ B | = diag(A) and A | = diag(B)
36 / 56
37 / 56
Definition 15
◮ A quantifier-free formula ϕ is is in disjunctive normal form if it is a disjunction of conjunctions of atomic or negated atomic formulae. ◮ A formula ϕ is in prenex form if it is of the form Q1 . . . Qnψ, where Q1 . . . Qn is a string of quantifiers and ψ is quantifier-free.
Example 16
◮ x = y → (P(x, z) → x = y) is not in disjunctive normal form; ¬(x = y) ∨ ¬P(x, z) ∨ x = y is its disjunctive normal form. ◮ ∀x · P(x) → ∃x · R(x, y) is not in prenex form; ∀x · ∃z · P(x) → R(z, y) is one of its prenex forms; ∀x · ∃z · ¬P(x) ∨ R(z, y) is its prenex disjunctive normal form.
Lemma 17 (prenex disjunctive normal form)
Every first-order formula is equivalent to one in prenex disjunctive normal form.
38 / 56
Definition 15
◮ A quantifier-free formula ϕ is is in disjunctive normal form if it is a disjunction of conjunctions of atomic or negated atomic formulae. ◮ A formula ϕ is in prenex form if it is of the form Q1 . . . Qnψ, where Q1 . . . Qn is a string of quantifiers and ψ is quantifier-free.
Example 16
◮ x = y → (P(x, z) → x = y) is not in disjunctive normal form; ¬(x = y) ∨ ¬P(x, z) ∨ x = y is its disjunctive normal form. ◮ ∀x · P(x) → ∃x · R(x, y) is not in prenex form; ∀x · ∃z · P(x) → R(z, y) is one of its prenex forms; ∀x · ∃z · ¬P(x) ∨ R(z, y) is its prenex disjunctive normal form.
Lemma 17 (prenex disjunctive normal form)
Every first-order formula is equivalent to one in prenex disjunctive normal form.
39 / 56
Definition 15
◮ A quantifier-free formula ϕ is is in disjunctive normal form if it is a disjunction of conjunctions of atomic or negated atomic formulae. ◮ A formula ϕ is in prenex form if it is of the form Q1 . . . Qnψ, where Q1 . . . Qn is a string of quantifiers and ψ is quantifier-free.
Example 16
◮ x = y → (P(x, z) → x = y) is not in disjunctive normal form; ¬(x = y) ∨ ¬P(x, z) ∨ x = y is its disjunctive normal form. ◮ ∀x · P(x) → ∃x · R(x, y) is not in prenex form; ∀x · ∃z · P(x) → R(z, y) is one of its prenex forms; ∀x · ∃z · ¬P(x) ∨ R(z, y) is its prenex disjunctive normal form.
Lemma 17 (prenex disjunctive normal form)
Every first-order formula is equivalent to one in prenex disjunctive normal form.
40 / 56
Definition 18
Assume ϕ is in prenex disjunctive normal form. ◮ ϕ is positive if it does not contain negated atomic subformulas. ◮ ϕ is universal if it is of the form ∀x · ψ, and ψ is quantifier-free. ◮ ϕ is existential if it is of the form ∃x · ψ, and ψ is quantifier-free.
Definition 19 (Arithmetical hierarchy)
◮ ϕ ∈ Π0 = Σ0, if ϕ is quantifier-free. ◮ ϕ ∈ Πn+1, if ϕ is of the form ∀x · ψ, and ψ ∈ Σn. ◮ ϕ ∈ Σn+1, if ϕ is of the form ∃x · ψ, and ψ ∈ Πn. Whenever we say that a formula ϕ is Πk (Σk) we mean that ϕ is logically equivalent to an Πk (Σk) formula.
41 / 56
A formula ϕ(x) in prenex disjunctive normal form can be visualised as something resembling a (ragged) matrix prefix of quantifiers ±α1
1(x)
±α1
2(x)
. . . ±α2
1(x)
±α2
2(x)
. . . · · · . . . ±αn
1(x)
±αn
2(x)
. . . with rows not neccessarily of the same length. Each αi
j(x) is atomic, in variables
from the list x (but not neccessarily all of them occurring in αi
j). The ± sign in
front means that each αi
j is either negated or not negated. Rows are
conjunctions, and the whole “matrix” is the disjunction of its rows. The conjunctive normal form is the dual: rows are disjunctions and the whole thing is the conjunction of rows. The two forms are equivalent (by Boolean algebra).
42 / 56
A formula ϕ(x) in prenex disjunctive normal form can be visualised as something resembling a (ragged) matrix prefix of quantifiers ±α1
1(x)
±α1
2(x)
. . . ±α2
1(x)
±α2
2(x)
. . . · · · . . . ±αn
1(x)
±αn
2(x)
. . . with rows not neccessarily of the same length. Each αi
j(x) is atomic, in variables
from the list x (but not neccessarily all of them occurring in αi
j). The ± sign in
front means that each αi
j is either negated or not negated. Rows are
conjunctions, and the whole “matrix” is the disjunction of its rows. The conjunctive normal form is the dual: rows are disjunctions and the whole thing is the conjunction of rows. The two forms are equivalent (by Boolean algebra).
43 / 56
Theorem 20 (substructures)
Let A be a substructure of B (in symbols: A ≤ B). (1) If ϕ(x) is a universal formula and a is a tuple of elements of A, then B | = ϕ(a) implies A | = ϕ(a). (2) If ϕ(x) is an existential formula and a is a tuple of elements of A, then A | = ϕ(a) implies B | = ϕ(a).
Proof.
◮ The formula ϕ(x) is of the form ∀y · ψ(y, x), where ψ(y, x) is quantifier-free. ◮ By definition of satisfaction, B | = ∀y · ψ(y, a), if for all b from B, we have B | = ψ(b, a). ◮ Now, take any c from A. It is also a tuple from B, because |A| ⊆ |B|. So, clearly, B | = ψ(c, a). ◮ What remains is to show that A | = ψ(c, a). But, as A is a substructure of B, for any relation R and function f in the signature we have RA = RB|A and f A = f B|A. ◮ Thus, the claim holds for atomic sentences. Similarly, it holds for negated atomic sentences. ◮ Since ψ is quantifier free, it is equivalent to a disjunction of atomic and negated atomic
44 / 56
Theorem 20 (substructures)
Let A be a substructure of B (in symbols: A ≤ B). (1) If ϕ(x) is a universal formula and a is a tuple of elements of A, then B | = ϕ(a) implies A | = ϕ(a). (2) If ϕ(x) is an existential formula and a is a tuple of elements of A, then A | = ϕ(a) implies B | = ϕ(a).
Proof.
◮ The formula ϕ(x) is of the form ∀y · ψ(y, x), where ψ(y, x) is quantifier-free. ◮ By definition of satisfaction, B | = ∀y · ψ(y, a), if for all b from B, we have B | = ψ(b, a). ◮ Now, take any c from A. It is also a tuple from B, because |A| ⊆ |B|. So, clearly, B | = ψ(c, a). ◮ What remains is to show that A | = ψ(c, a). But, as A is a substructure of B, for any relation R and function f in the signature we have RA = RB|A and f A = f B|A. ◮ Thus, the claim holds for atomic sentences. Similarly, it holds for negated atomic sentences. ◮ Since ψ is quantifier free, it is equivalent to a disjunction of atomic and negated atomic
45 / 56
Theorem 21 (homomorphisms)
Let A and B be structures and f : A → B a homomorphism. Let ϕ be a positive formula and a is a tuple of elements of A. The following hold:
= ϕ(a) implies B | = ϕ(f (a)).
= ϕ(a) implies B | = ϕ(f (a)).
Proof.
◮ Wlog, ϕ is ∃y · ψ(y, a), so A | = ϕ(a) iff for some b from A, we have A | = ψ(b, a). ◮ Now, ψ is quantifier-free in normal form, and it is positive, so there are no negated atomic formulae in its “matrix”. ◮ Take an atomic αi
j(b, a). Then, A |
= αi
j(b, a) implies B |
= αi
j(f (b), f (a)). The rest
follows. ◮ Part (2) is left as an exercise.
◮ Positiveness cannot be relaxed. Map 2 × 2 to 4 (as ordered sets). The first one satisfies ∃x, y · (x ≤ y) ∧ (y ≤ x), the second does not.
46 / 56
Theorem 21 (homomorphisms)
Let A and B be structures and f : A → B a homomorphism. Let ϕ be a positive formula and a is a tuple of elements of A. The following hold:
= ϕ(a) implies B | = ϕ(f (a)).
= ϕ(a) implies B | = ϕ(f (a)).
Proof.
◮ Wlog, ϕ is ∃y · ψ(y, a), so A | = ϕ(a) iff for some b from A, we have A | = ψ(b, a). ◮ Now, ψ is quantifier-free in normal form, and it is positive, so there are no negated atomic formulae in its “matrix”. ◮ Take an atomic αi
j(b, a). Then, A |
= αi
j(b, a) implies B |
= αi
j(f (b), f (a)). The rest
follows. ◮ Part (2) is left as an exercise.
◮ Positiveness cannot be relaxed. Map 2 × 2 to 4 (as ordered sets). The first one satisfies ∃x, y · (x ≤ y) ∧ (y ≤ x), the second does not.
47 / 56
Theorem 21 (homomorphisms)
Let A and B be structures and f : A → B a homomorphism. Let ϕ be a positive formula and a is a tuple of elements of A. The following hold:
= ϕ(a) implies B | = ϕ(f (a)).
= ϕ(a) implies B | = ϕ(f (a)).
Proof.
◮ Wlog, ϕ is ∃y · ψ(y, a), so A | = ϕ(a) iff for some b from A, we have A | = ψ(b, a). ◮ Now, ψ is quantifier-free in normal form, and it is positive, so there are no negated atomic formulae in its “matrix”. ◮ Take an atomic αi
j(b, a). Then, A |
= αi
j(b, a) implies B |
= αi
j(f (b), f (a)). The rest
follows. ◮ Part (2) is left as an exercise.
◮ Positiveness cannot be relaxed. Map 2 × 2 to 4 (as ordered sets). The first one satisfies ∃x, y · (x ≤ y) ∧ (y ≤ x), the second does not.
48 / 56
Definition 22
A universally quantified disjunction ϕ = ∀x · (ψ1 ∨ · · · ∨ ψn), such that each ψi is either atomic or negated atomic, and at most one of them is positive, is called a Horn clause. A Horn formula is a conjunction of Horns clauses.
Theorem 23 (direct products)
Let (Ai)i∈I be a family of similar structures, and A =
i∈I Ai. Let ϕ be a
Horn clause. If Ai | = ϕ for every i ∈ I, then A | = ϕ. The same holds for Horn formulae.
Proof.
◮ Wlog, ϕ is α1 ∨ ¬α2 ∨ · · · ∨ ¬αn. We have two cases. ◮ Case (1): α1 holds at every coordinate i ∈ I. Then, α1 holds in the product. ◮ Case (2): α1 fails at some coordinate i0. Then, some ¬αk holds at coordinate i0, and so αk fails at i0. ◮ Thus, αk fails in the product, that is, ¬αk holds in the product. ◮ In either case ϕ holds in the product.
49 / 56
Definition 22
A universally quantified disjunction ϕ = ∀x · (ψ1 ∨ · · · ∨ ψn), such that each ψi is either atomic or negated atomic, and at most one of them is positive, is called a Horn clause. A Horn formula is a conjunction of Horns clauses.
Theorem 23 (direct products)
Let (Ai)i∈I be a family of similar structures, and A =
i∈I Ai. Let ϕ be a
Horn clause. If Ai | = ϕ for every i ∈ I, then A | = ϕ. The same holds for Horn formulae.
Proof.
◮ Wlog, ϕ is α1 ∨ ¬α2 ∨ · · · ∨ ¬αn. We have two cases. ◮ Case (1): α1 holds at every coordinate i ∈ I. Then, α1 holds in the product. ◮ Case (2): α1 fails at some coordinate i0. Then, some ¬αk holds at coordinate i0, and so αk fails at i0. ◮ Thus, αk fails in the product, that is, ¬αk holds in the product. ◮ In either case ϕ holds in the product.
50 / 56
Definition 22
A universally quantified disjunction ϕ = ∀x · (ψ1 ∨ · · · ∨ ψn), such that each ψi is either atomic or negated atomic, and at most one of them is positive, is called a Horn clause. A Horn formula is a conjunction of Horns clauses.
Theorem 23 (direct products)
Let (Ai)i∈I be a family of similar structures, and A =
i∈I Ai. Let ϕ be a
Horn clause. If Ai | = ϕ for every i ∈ I, then A | = ϕ. The same holds for Horn formulae.
Proof.
◮ Wlog, ϕ is α1 ∨ ¬α2 ∨ · · · ∨ ¬αn. We have two cases. ◮ Case (1): α1 holds at every coordinate i ∈ I. Then, α1 holds in the product. ◮ Case (2): α1 fails at some coordinate i0. Then, some ¬αk holds at coordinate i0, and so αk fails at i0. ◮ Thus, αk fails in the product, that is, ¬αk holds in the product. ◮ In either case ϕ holds in the product.
51 / 56
Theorem 24 (Birkhoff: easy direction)
Let Σ be an algebraic signature, and let E be a set of Σ-equations. Then E is preserved by Homomorphic images, Subalgebras and direct Products. Hence, Mod(E) is closed under HSP, in short, HSP(Mod(E)) ⊆ Mod(E).
Proof.
◮ An equation is a universally quantified atomic formula, hence universal, positive (not negated), and a Horn clause (a single atomic disjunct). ◮ So it is preserved by H (homomorphic images), S (subalgebras) and P (direct products).
The converse is also true. If a class C of algebras is closed under HSP, then C = Mod(E) for some set E of equations. This is the difficult part of Birkhoff’s Theorem, and a foundation stone of universal algebra.
52 / 56
Theorem 24 (Birkhoff: easy direction)
Let Σ be an algebraic signature, and let E be a set of Σ-equations. Then E is preserved by Homomorphic images, Subalgebras and direct Products. Hence, Mod(E) is closed under HSP, in short, HSP(Mod(E)) ⊆ Mod(E).
Proof.
◮ An equation is a universally quantified atomic formula, hence universal, positive (not negated), and a Horn clause (a single atomic disjunct). ◮ So it is preserved by H (homomorphic images), S (subalgebras) and P (direct products).
The converse is also true. If a class C of algebras is closed under HSP, then C = Mod(E) for some set E of equations. This is the difficult part of Birkhoff’s Theorem, and a foundation stone of universal algebra.
53 / 56
Theorem 24 (Birkhoff: easy direction)
Let Σ be an algebraic signature, and let E be a set of Σ-equations. Then E is preserved by Homomorphic images, Subalgebras and direct Products. Hence, Mod(E) is closed under HSP, in short, HSP(Mod(E)) ⊆ Mod(E).
Proof.
◮ An equation is a universally quantified atomic formula, hence universal, positive (not negated), and a Horn clause (a single atomic disjunct). ◮ So it is preserved by H (homomorphic images), S (subalgebras) and P (direct products).
The converse is also true. If a class C of algebras is closed under HSP, then C = Mod(E) for some set E of equations. This is the difficult part of Birkhoff’s Theorem, and a foundation stone of universal algebra.
54 / 56
Theorem 25 (Chang- Lo´ s-Suszko: easy direction)
Let (Ai)i∈γ be a family of structures that form a chain under embedding. That is, the index set γ is an ordinal and i ≤ j implies Ai ≤ Aj. Put A =
i∈γ Ai. Let ϕ(x) be a Π2 formula, and a a tuple from A0. If
Ai | = ϕ(a) for every i ∈ γ, then A | = ϕ(a).
Proof.
◮ Write ϕ explicitly, as ∀y · ∃z · ψ(x, y, z). ◮ Take any tuple b from A. Since b is finite it belongs to some Ai. ◮ Since Ai | = ϕ(a) by assumption, we have Ai | = ∃z · ψ(a, b, z). ◮ This is an existential formula with parameters from Ai, and Ai ≤ A. ◮ By Theorem 20 (on substructures), we have A | = ∃z : ψ(a, b, z), proving the claim.
55 / 56
Theorem 25 (Chang- Lo´ s-Suszko: easy direction)
Let (Ai)i∈γ be a family of structures that form a chain under embedding. That is, the index set γ is an ordinal and i ≤ j implies Ai ≤ Aj. Put A =
i∈γ Ai. Let ϕ(x) be a Π2 formula, and a a tuple from A0. If
Ai | = ϕ(a) for every i ∈ γ, then A | = ϕ(a).
Proof.
◮ Write ϕ explicitly, as ∀y · ∃z · ψ(x, y, z). ◮ Take any tuple b from A. Since b is finite it belongs to some Ai. ◮ Since Ai | = ϕ(a) by assumption, we have Ai | = ∃z · ψ(a, b, z). ◮ This is an existential formula with parameters from Ai, and Ai ≤ A. ◮ By Theorem 20 (on substructures), we have A | = ∃z : ψ(a, b, z), proving the claim.
56 / 56