Many-Sorted First-Order Model Theory Lecture 5 2 nd July, 2020 1 / - - PowerPoint PPT Presentation

many sorted first order model theory
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 1

Many-Sorted First-Order Model Theory

Lecture 5 2nd July, 2020

1 / 56

slide-2
SLIDE 2

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. ◮ 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

slide-3
SLIDE 3

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. ◮ 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

slide-4
SLIDE 4

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. ◮ 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

slide-5
SLIDE 5

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. ◮ 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

slide-6
SLIDE 6

Applications of compactness

6 / 56

slide-7
SLIDE 7

Applications of compactness

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

slide-8
SLIDE 8

Applications of compactness

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

slide-9
SLIDE 9

Applications of compactness

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

slide-10
SLIDE 10

Infinity is not finitely axiomatisable

Definition 3

A class C of models is an elementary class, if C = ModΦ for some set Φ of

  • sentences. Then we say that C is axiomatised by Φ. If C is axiomatised by

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

slide-11
SLIDE 11

Infinity is not finitely axiomatisable

Definition 3

A class C of models is an elementary class, if C = ModΦ for some set Φ of

  • sentences. Then we say that C is axiomatised by Φ. If C is axiomatised by

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

slide-12
SLIDE 12

Infinity is not finitely axiomatisable

Definition 3

A class C of models is an elementary class, if C = ModΦ for some set Φ of

  • sentences. Then we say that C is axiomatised by Φ. If C is axiomatised by

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

slide-13
SLIDE 13

Infinity is not finitely axiomatisable

Definition 3

A class C of models is an elementary class, if C = ModΦ for some set Φ of

  • sentences. Then we say that C is axiomatised by Φ. If C is axiomatised by

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

slide-14
SLIDE 14

Robinson’s principle

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

  • p times

= 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

slide-15
SLIDE 15

Robinson’s principle

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

  • p times

= 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

slide-16
SLIDE 16

Torsion-free groups

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

slide-17
SLIDE 17

Torsion-free groups

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

slide-18
SLIDE 18

Torsion-free groups

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

slide-19
SLIDE 19

A classic: nonstandard models of arithmetic

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

  • n times

< x : n ∈ N}, with xM = c.

Proof.

◮ Expand the signature by adding a new constant c. ◮ Let T ′ = T ∪ {1 + · · · + 1

  • n times

< 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

slide-20
SLIDE 20

A classic: nonstandard models of arithmetic

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

  • n times

< x : n ∈ N}, with xM = c.

Proof.

◮ Expand the signature by adding a new constant c. ◮ Let T ′ = T ∪ {1 + · · · + 1

  • n times

< 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

slide-21
SLIDE 21

Very easy exercises

◮ 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

slide-22
SLIDE 22

Exercises

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

slide-23
SLIDE 23

Diagrams: adding constants

23 / 56

slide-24
SLIDE 24

Intuitions

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

slide-25
SLIDE 25

Intuitions

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

slide-26
SLIDE 26

Intuitions

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

slide-27
SLIDE 27

Intuitions

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

slide-28
SLIDE 28

Intuitions

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

slide-29
SLIDE 29

Adding constants: notation

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

slide-30
SLIDE 30

Diagrams

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

slide-31
SLIDE 31

Properties of diagrams

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

slide-32
SLIDE 32

Properties of diagrams

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

slide-33
SLIDE 33

Proof of diagram lemma: (1) ⇔ (2)

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

slide-34
SLIDE 34

Proof of diagram lemma: sketch of (3) ⇔ (4)

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

slide-35
SLIDE 35

Proof of diagram lemma: sketch of (3) ⇔ (4)

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

slide-36
SLIDE 36

Proof of diagram lemma: sketch of (3) ⇔ (4)

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

slide-37
SLIDE 37

Preservation theorems

37 / 56

slide-38
SLIDE 38

Normal forms

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

slide-39
SLIDE 39

Normal forms

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

slide-40
SLIDE 40

Normal forms

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

slide-41
SLIDE 41

Stratification of formulae

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

slide-42
SLIDE 42

Digression: prenex disjunctive normal form as a matrix

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

slide-43
SLIDE 43

Digression: prenex disjunctive normal form as a matrix

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

slide-44
SLIDE 44

Easy halves of preservation theorems: substructures

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

  • formulas. An induction on the length of this disjunction completes the proof of (1).

44 / 56

slide-45
SLIDE 45

Easy halves of preservation theorems: substructures

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

  • formulas. An induction on the length of this disjunction completes the proof of (1).

45 / 56

slide-46
SLIDE 46

Easy halves of preservation theorems: homomorphisms

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:

  • 1. If ϕ is positive, then A |

= ϕ(a) implies B | = ϕ(f (a)).

  • 2. If f is onto, then 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

slide-47
SLIDE 47

Easy halves of preservation theorems: homomorphisms

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:

  • 1. If ϕ is positive, then A |

= ϕ(a) implies B | = ϕ(f (a)).

  • 2. If f is onto, then 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

slide-48
SLIDE 48

Easy halves of preservation theorems: homomorphisms

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:

  • 1. If ϕ is positive, then A |

= ϕ(a) implies B | = ϕ(f (a)).

  • 2. If f is onto, then 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

slide-49
SLIDE 49

Easy halves: Horn clauses and direct products

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

slide-50
SLIDE 50

Easy halves: Horn clauses and direct products

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

slide-51
SLIDE 51

Easy halves: Horn clauses and direct products

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

slide-52
SLIDE 52

Easy halves: Birkhoff’s HSP theorem

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

slide-53
SLIDE 53

Easy halves: Birkhoff’s HSP theorem

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

slide-54
SLIDE 54

Easy halves: Birkhoff’s HSP theorem

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

slide-55
SLIDE 55

Easy halves: unions of chains

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

slide-56
SLIDE 56

Easy halves: unions of chains

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