An equational class is a variety
ProvedUAVariety.Mod_isVariety is a signature without relation symbols ([L.IsAlgebraic]); an algebra is an -structure (Alg L bundles one). The term algebra is L.Term X with the operations building terms; t.realize v is the value of the term in an algebra under the assignment of the variables. (Satisfies A (p, q)) means for every assignment . A congruence (Congruence M) is an equivalence relation on compatible with the operations, and φ.Quot is the quotient algebra (Mathlib's quotient structure, Quotient.mk φ.toSetoid a ). Id K is the set of identities over the variables true in all of , and Mod E the class of algebras satisfying all identities in .
Claim. For every set of identities over , the class of algebras satisfying is closed under homomorphic images, subalgebras and direct products, i.e. it is a variety.
import Definitions.Def_UAVariety_defs universe u v w open FirstOrder FirstOrder.Language
namespace UAVariety
variable {L : FirstOrder.Language.{u, v}} [L.IsAlgebraic]
/-- B&S Thm 11.8 direction: the class `Mod E` of models of a set of identities is a variety (closed under `H`, `S`, `P`), by Lemma 11.3. -/
theorem Mod_isVariety (E : Set (L.Term ℕ × L.Term ℕ)) : IsVariety (Mod E) := by sorry
end UAVariety