Birkhoff’s HSP theorem, part 1
(As I had kind of expected, I abandoned this blog after working on it for a few days. Now, some months later, I've decided to take a different approach. Instead of writing polished wiki-style entries, I'm just going to write down my thoughts and working, stream-of-consciousness-style, while learning maths. Hopefully this will be something I can sustain for longer.)
I want to know how to prove Birkhoff's HSP theorem.
First: I want to formulate the theorem in my own words.
Theorem. For every type \(T\), a variety of \(T\)-algebras is just a class of \(T\)-algebras closed under homomorphic images, subalgebras and products.
Are there any terms here whose definition I'm not totally clear on?
What about “variety”? For every type \(T\), a variety of \(T\)-algebras is the class of the \(T\)-algebras satisfying all of the identities in some particular set of identities. But what is an identity exactly, and what does it mean for an algebra to satisfy it? Well, an identity is a piece of syntax of the form \(t = u\), where \(t\) and \(u\) are \(T\)-terms. (This is a \(T\)-relative concept, so we should really talk about \(T\)-identities.) We could think of that as the ordered pair \((t, u)\). What is a \(T\)-term? It's an element of a free \(T\)-algebra. Are we talking about the free \(T\)-algebra on some specific set? Well, the generating set corresponds to the set of parameters of the term. The terms \(t\) and \(u\) should have the same parameters, so they should be elements of the same free \(T\)-algebra. But it can be any free \(T\)-algebra, since they can have whatever set of parameters.
So: an identity is an ordered pair \((t, u)\) where \(t\) and \(u\) are elements of some free \(T\)-algebra \(T(X)\); we can say that \(X\) is the set of parameters of the identity. (Technically I guess we would have to equip the identity with \(X\) to make \(X\) determinable from it.) As for satisfaction: a \(T\)-algebra \(Y\) satisfies \(t = u\) iff for every assignment of elements of \(Y\) to each element of \(X\), i.e. every function \(f : X \to Y\), we have \(t(f) = u(f)\). Here \(t(f)\) and \(u(f)\) are the images of \(t\) and \(u\) respectively under the unique extension \(f^*\) of \(f\) to \(T(X\) given by the universal property of free algebras. Oh, by the way, I guess we can assume \(X\) is finite.
Another way of putting this would be that \(Y\) satisfies \(t = u\) iff the equalizer of \(t\) and \(u\), when they're thought of as a functions from \(Y^X\) to \(Y\), is the whole of \(Y^X\). (I did have to look up the Wikipedia page just to check my memory of what “equalizer” meant.)
There's also an equivalence relation here: say two \(T\)-terms \(t\) and \(u\) over \(X\) are equivalent iff \(t(f) = u(f)\). Here we are defining an equivalence relation for each function \(f : X \to Y\). It is actually an equivalence relation, because it's just the kernel of \(f^*\). So \(Y\) satisfies \(t = u\) iff \(t\) and \(u\) are equivalent in this sense for every function \(f : X \to Y\). Now, I believe the intersection of equivalence relations is also an equivalence relation…let me just check that…
Theorem. Any intersection of equivalence relations is also an equivalence relation.
Proof. Suppose \(X\) is a set and \(S\) is a set of equivalence relations on \(X\). Then:
For every \(x \in X\), we have \((x, x) \in R\) for every \(R \in S\), hence \((x, x) \in \bigcap S\).
For any two elements \(x\) and \(y\) of \(X\) such that \((x, y) \in \bigcap S\), we have \((x, y) \in R\) and hence \((y, x) \in R\) for every \(R \in S\), hence \((y, x) \in \bigcap S\).
For any three elements \(x\), \(y\) and \(z\) of \(X\) such that \((x, y) \in \bigcap S\) and \((y, z) \in \bigcap S\), we have \((x, y) \in R\) and \((y, z) \in R\) and hence \((x, z) \in R\) for every \(R \in S\), hence \((x, z) \in \bigcap S\).
(This is one of those automatic proofs—there should be a sense in which it is obvious. I'm not going to bother worrying about that for now though.)
OK, so now we can say that \(Y\) satisfies \(t = u\) iff \(t\) and \(u\) are equivalent according to the intersection of the kernels of \(f^*\) for every function \(f : X \to Y\). This is a reasonable definition of equivalence of \(T\)-terms, if you think about. (Of course it's all relative to \(Y\); it doesn't make sense in the free \(T\)-algebra alone.)
I guess this does require taking each identity in the set to be defined over the same free \(T\)-algebra. But we can do that by just unionning their variables and taking the free algebra over that union.
OK, that's enough on identities. Were there any other terms I wasn't clear on?
Oh yeah, “homomorphic images”. I guess this must mean… well, suppose I have a homomorphism \(f : X \to Y\) of \(T\)-algebras. Then \(f(X)\) is a subalgebra of \(Y\). I'm sure I've proved this before, but let's just recall the proof: suppose \(n \in \mathbb N\), \(\omega\) is an \(n\)-ary function symbol in \(T\) and \(y_1\), \(y_2\), … and \(y_n\) are elements of \(f(X)\). Then we have elements \(x_1\), \(x_2\), … and \(x_n\) of \(X\) such that \(y_1 = f(x_1)\), \(y_2 = f(x_2)\), … and \(y_n = f(x_n)\). Therefore \[\omega(y_1, y_2, \dotsc, y_n) = \omega(f(x_1), f(x_2), \dotsc, f(x_n)) = f(\omega(x_1, x_2, \dotsc, x_n))\] and hence \(\omega(y_1, y_2, \dotsc, y_n) \in f(X)\). There we go.
Now, if we have an arbitrary class \(\mathcal A\) of \(T\)-algebras, then we could have \(X \in \mathcal A\) but \(f(X) \not \in \mathcal A\). So \(\mathcal A\) would be closed under homomorphic images if this scenario is impossible.
For example, the class of the Abelian groups is closed under homomorphic images, because… well, because it's a variety, but to give a specific proof: for every group homomorphism \(f : X \to Y\) such that \(X\) is Abelian and any two elements \(y_1\) and \(y_2\) of \(f(X\), we have elements \(x_1\) and \(x_2\) of \(X\) such that \(y_1 = f(x_1)\) and \(y_2 = f(x_2)\), hence \[y_1 y_2 = f(x_1) f(x_2) = f(x_1 x_2) = f(x_2 x_1) = f(x_2) f(x_1) = y_2 y_1.\]
OK, now I think I understand everything about the statement. Now let's look at a proof. There's one on page 393 of An Invitation to General Algebra and Universal Constructions by George M. Bergman. It goes like:
Theorem 9.6.1 (Birkhoff's Theorem). Let \(\Omega\) be a type. Then a set of \(\Omega\)-algebras forms a variety if and only if it is closed under forming homomorphic images, subalgebras, and products (of small families).
In fact, if \(C\) is a set of \(\Omega\)-algebra, then any object of \(\mathbf{Var}(C)\) can be written as a homomorphic image of a subalgebra of a product of a small set of members of \(C\).
(I guess I didn't include the clarification about only taking products of small families in my statement of the theorem.)
What is \(\mathbf{Var}(C)\)? I'm guessing “the smallest variety of algebras including \(C\)”. For that to exist we need to be sure varieties of algebras are closed under intersections. Well, I guess they obviously are because varieties of algebras are just classes whose elements all satisfy a certain conjunction of identities, and intersecting varieties is just conjoining those conjunctions into a bigger conjunction.
OK *scrolls up* so Bergman is talking about a Galois connection between algebras and identities, and references section 6.5 of the book. I'm not sure exactly what this Galois connection would be…
Since it's now 2am, I will have to continue this tomorrow.













