Algorithm Search⌘K

Proofs: Birkhoff completeness theorem

These are the human proofs of Birkhoff completeness theorem, at full length.

Proof of Birkhoff's completeness theorem with the term model full

This proof shows: statement.

Fix a signature Σ\Sigma, a set of variables VV and a set EE of equations between terms of T(Σ,V)T(\Sigma, V). Algebras have non-empty carriers. For a Σ\Sigma-algebra A\mathcal{A} with carrier AA and an assignment α:V→A\alpha : V \to A, the value [ ⁣[t] ⁣]α[\![t]\!]_\alpha of a term is defined by [ ⁣[x] ⁣]α=α(x)[\![x]\!]_\alpha = \alpha(x) and [ ⁣[f(t1,…,tn)] ⁣]α=fA([ ⁣[t1] ⁣]α,…,[ ⁣[tn] ⁣]α)[\![f(t_1, \ldots, t_n)]\!]_\alpha = f^{\mathcal{A}}([\![t_1]\!]_\alpha, \ldots, [\![t_n]\!]_\alpha). A\mathcal{A} satisfies s≈ts \approx t if [ ⁣[s] ⁣]α=[ ⁣[t] ⁣]α[\![s]\!]_\alpha = [\![t]\!]_\alpha for every α\alpha, and E⊨s≈tE \models s \approx t means that every algebra that satisfies all equations of EE satisfies s≈ts \approx t. The relation ≈E\approx_E is the least relation that contains EE and is closed under reflexivity, symmetry, transitivity, congruence and substitution; see equational theory, where it is also shown that ≈E\approx_E is the conversion ↔E∗\leftrightarrow_E^*.

Theorem. E⊨s≈tE \models s \approx t iff s≈Ets \approx_E t.

Substitution lemma

Lemma 1. For every algebra, assignment α\alpha, substitution σ\sigma and term tt: [ ⁣[tσ] ⁣]α=[ ⁣[t] ⁣]β[\![t\sigma]\!]_\alpha = [\![t]\!]_{\beta}, where β(x)=[ ⁣[xσ] ⁣]α\beta(x) = [\![x\sigma]\!]_\alpha.

Proof. Induction on tt. For a variable xx, both sides are [ ⁣[xσ] ⁣]α[\![x\sigma]\!]_\alpha. For t=f(t1,…,tn)t = f(t_1, \ldots, t_n), [ ⁣[tσ] ⁣]α=fA([ ⁣[t1σ] ⁣]α,…)=fA([ ⁣[t1] ⁣]β,…)=[ ⁣[t] ⁣]β[\![t\sigma]\!]_\alpha = f^{\mathcal{A}}([\![t_1\sigma]\!]_\alpha, \ldots) = f^{\mathcal{A}}([\![t_1]\!]_\beta, \ldots) = [\![t]\!]_\beta by the induction hypothesis. ■\blacksquare

Soundness

Lemma 2. If s≈Ets \approx_E t, then E⊨s≈tE \models s \approx t.

Proof. Let A\mathcal{A} satisfy EE. We show by induction on a derivation of s≈Ets \approx_E t that A\mathcal{A} satisfies s≈ts \approx t. Equations of EE hold by assumption. Reflexivity, symmetry and transitivity hold because equality of values is an equivalence relation, for each fixed α\alpha. For congruence, if [ ⁣[si] ⁣]α=[ ⁣[ti] ⁣]α[\![s_i]\!]_\alpha = [\![t_i]\!]_\alpha for all ii, then applying fAf^{\mathcal{A}} to both lists gives equal values. For substitution, assume A\mathcal{A} satisfies s≈ts \approx t, and let α\alpha be an assignment. With β(x)=[ ⁣[xσ] ⁣]α\beta(x) = [\![x\sigma]\!]_\alpha, Lemma 1 gives [ ⁣[sσ] ⁣]α=[ ⁣[s] ⁣]β=[ ⁣[t] ⁣]β=[ ⁣[tσ] ⁣]α[\![s\sigma]\!]_\alpha = [\![s]\!]_\beta = [\![t]\!]_\beta = [\![t\sigma]\!]_\alpha. ■\blacksquare

Completeness

Write ∼\sim for ≈E\approx_E and [t][t] for the class of tt in T(Σ,V)/∼T(\Sigma, V)/{\sim}.

The term model. Let Q\mathcal{Q} have carrier T(Σ,V)/∼T(\Sigma, V)/{\sim} and operations fQ([t1],…,[tn])=[f(t1,…,tn)]f^{\mathcal{Q}}([t_1], \ldots, [t_n]) = [f(t_1, \ldots, t_n)]. This is well-defined: if ti∼ti′t_i \sim t_i' for all ii, then f(t1,…,tn)∼f(t1′,…,tn′)f(t_1, \ldots, t_n) \sim f(t_1', \ldots, t_n') by congruence. The carrier is not empty when VV is not empty or Σ\Sigma has a constant; we assume one of these, which holds whenever ss and tt exist.

Lemma 3. Let α\alpha be an assignment into Q\mathcal{Q} and let σ\sigma be a substitution with [xσ]=α(x)[x\sigma] = \alpha(x) for every variable xx of a term tt. Then [ ⁣[t] ⁣]α=[tσ][\![t]\!]_\alpha = [t\sigma].

Proof. Induction on tt. For a variable xx, [ ⁣[x] ⁣]α=α(x)=[xσ][\![x]\!]_\alpha = \alpha(x) = [x\sigma]. For t=f(t1,…,tn)t = f(t_1, \ldots, t_n), [ ⁣[t] ⁣]α=fQ([t1σ],…,[tnσ])=[f(t1σ,…,tnσ)]=[tσ][\![t]\!]_\alpha = f^{\mathcal{Q}}([t_1\sigma], \ldots, [t_n\sigma]) = [f(t_1\sigma, \ldots, t_n\sigma)] = [t\sigma]. ■\blacksquare

Lemma 4. Q\mathcal{Q} satisfies every equation of EE.

Proof. Let l≈r∈El \approx r \in E and let α\alpha be an assignment into Q\mathcal{Q}. Pick a representative xσ∈α(x)x\sigma \in \alpha(x) for each of the finitely many variables of ll and rr, and xσ=xx\sigma = x elsewhere. By Lemma 3, [ ⁣[l] ⁣]α=[lσ][\![l]\!]_\alpha = [l\sigma] and [ ⁣[r] ⁣]α=[rσ][\![r]\!]_\alpha = [r\sigma]. Since l∼rl \sim r, the substitution rule gives lσ∼rσl\sigma \sim r\sigma, so the two values are equal. ■\blacksquare

Lemma 5. If E⊨s≈tE \models s \approx t, then s≈Ets \approx_E t.

Proof. By Lemma 4, Q\mathcal{Q} is a model of EE, so it satisfies s≈ts \approx t. Take the assignment α(x)=[x]\alpha(x) = [x] and the identity substitution, which satisfies the condition of Lemma 3. Then [s]=[ ⁣[s] ⁣]α=[ ⁣[t] ⁣]α=[t][s] = [\![s]\!]_\alpha = [\![t]\!]_\alpha = [t], that is, s∼ts \sim t. ■\blacksquare

Lemmas 2 and 5 prove the theorem. ■\blacksquare

Remarks. The proof shows more: Q\mathcal{Q} alone decides all consequences of EE, since E⊨s≈tE \models s \approx t iff Q\mathcal{Q} satisfies s≈ts \approx t under the assignment x↦[x]x \mapsto [x]. Q\mathcal{Q} is the free algebra of the class of models of EE over the generators VV. The substitution rule was used in Lemma 4 to make Q\mathcal{Q} a model of EE; a relation closed only under the first four rules gives a quotient in which the equations of EE may fail for some assignments. In many-sorted equational logic, where a sort may have no elements, transitivity through a middle term with a variable of an empty sort is unsound, so there the rules must record the variables in use.

Back to Birkhoff completeness theorem