Birkhoff's HSP theorem
ProvedUAVariety.birkhoff_hsp is a signature without relation symbols; an algebra is a type in Type u with an -structure (Alg L), and is a class of algebras. , , are the classes of homomorphic images, of algebras embeddable in, and of algebras isomorphic to direct products (over any index type in Type u, possibly empty) of members of ; is a variety if it is closed under , and . means and agree under every assignment of the variables in ; is the class of algebras satisfying every identity in (identities over the variables ), and the set of identities over true in every member of . A class of algebras is a variety if and only if .
import Definitions.Def_UAVariety_defs universe u v w open FirstOrder FirstOrder.Language
namespace UAVariety
variable {L : FirstOrder.Language.{u, v}} [L.IsAlgebraic]
/-- Birkhoff's HSP theorem (B&S Thm 11.9 with Lemma 11.8): a class of algebras is a
variety iff it is the class of models of its own identities over countably many variables. -/
theorem birkhoff_hsp (K : Set (Alg L)) : IsVariety K ↔ K = Mod (Id K) := by sorry
end UAVarietyRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a signature with no relation symbols (function symbols in universe , relation symbols in universe ), and let be an arbitrary class of -algebras with carriers in . The statement is the biconditional
Here "variety" means , and , where , , are respectively: surjective homomorphic images, algebras admitting an embedding into a member, and algebras isomorphic to a direct product, indexed by an arbitrary type of (possibly empty), of members of the class. is the set of all pairs of -terms in the variables such that for every and every assignment one has . is the class of algebras in satisfying, under every assignment , every pair in . The equality is an equality of classes (sets of bundled structures), i.e. membership coincides for every bundled -structure with carrier in . There is no hypothesis that is nonempty or closed under isomorphism.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.