Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Identities of K are the identities of the free algebra

Proved
UAVariety.free_identities

by Alien60 · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

equational-logicfree-algebrasmodel-theoryuniversal-algebravarieties

LLL is a signature without relation symbols; an algebra is a type in Type u with an LLL-structure (Alg L), and KKK is a class of algebras. A⊨p≈qA\models p\approx qA⊨p≈q means ppp and qqq agree under every assignment of the variables in AAA; Mod(E)\mathrm{Mod}(E)Mod(E) is the class of algebras satisfying every identity in EEE (identities over the variables N\mathbb NN), and Id(K)\mathrm{Id}(K)Id(K) the set of identities over N\mathbb NN true in every member of KKK. FK(Xˉ)=T(X)/θK(X)F_K(\bar X)=T(X)/\theta_K(X)FK​(Xˉ)=T(X)/θK​(X), where T(X)T(X)T(X) is the term algebra over XXX and θK(X)\theta_K(X)θK​(X) is the intersection of all congruences φ\varphiφ on T(X)T(X)T(X) with T(X)/φ∈S(K)T(X)/\varphi\in S(K)T(X)/φ∈S(K); xˉ\bar xxˉ and pˉ\bar ppˉ​ are the classes of a variable and of a term. For every type XXX in Type u and terms p,qp,qp,q over XXX: K⊨p≈qK\models p\approx qK⊨p≈q iff FK(Xˉ)⊨p≈qF_K(\bar X)\models p\approx qFK​(Xˉ)⊨p≈q, iff pˉ=qˉ\bar p=\bar qpˉ​=qˉ​ in FK(Xˉ)F_K(\bar X)FK​(Xˉ), iff (p,q)∈θK(X)(p,q)\in\theta_K(X)(p,q)∈θK​(X).

Preamble
import Definitions.Def_UAVariety_defs

universe u v w

open FirstOrder FirstOrder.Language
Formal statement
namespace UAVariety

variable {L : FirstOrder.Language.{u, v}} [L.IsAlgebraic]

/-- B&S Thm 11.4: for terms `p, q` over `X`, `K ⊨ p ≈ q` iff `F_K(X̄) ⊨ p ≈ q` iff
`p̄ = q̄` in `F_K(X̄)` iff `(p, q) ∈ θ_K(X)`. -/
theorem free_identities (K : Set (Alg L)) (X : Type u) (p q : L.Term X) :
    ((∀ A ∈ K, Satisfies A (p, q)) ↔ Satisfies (freeAlg K X) (p, q)) ∧
      (Satisfies (freeAlg K X) (p, q) ↔ freeMk K X p = freeMk K X q) ∧
      (freeMk K X p = freeMk K X q ↔ (freeCong K X).r p q) := by sorry

end UAVariety
Source
S. Burris, H. P. Sankappanavar, A Course in Universal Algebra, Millennium Edition (2012), https://www.math.uwaterloo.ca/~snburris/htdocs/ualg.html, Ch. II, Theorem 11.4
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let LLL be a signature with no relation symbols, KKK an arbitrary class of algebras (carriers in Type u\mathrm{Type}\ uType u), XXX an arbitrary type in Type u\mathrm{Type}\ uType u, and p,qp,qp,q arbitrary LLL-terms over the variables XXX. Let θ=θK(X)\theta=\theta_K(X)θ=θK​(X) be the relation on T(X)T(X)T(X) given by: pθqp\mathrel{\theta}qpθq iff pφqp\mathrel{\varphi}qpφq for every congruence φ\varphiφ of the term algebra with T(X)/φT(X)/\varphiT(X)/φ embeddable in a member of KKK. Let F=T(X)/θF=T(X)/\thetaF=T(X)/θ (quotient structure) and pˉ,qˉ\bar p,\bar qpˉ​,qˉ​ the classes of p,qp,qp,q. The statement is the conjunction of three biconditionals:

  1. Every A∈KA\in KA∈K satisfies p≈qp\approx qp≈q (i.e. pA[v]=qA[v]p^A[v]=q^A[v]pA[v]=qA[v] for all v:X→Av:X\to Av:X→A) iff FFF satisfies p≈qp\approx qp≈q (i.e. pF[w]=qF[w]p^F[w]=q^F[w]pF[w]=qF[w] for all w:X→Fw:X\to Fw:X→F).
  2. FFF satisfies p≈qp\approx qp≈q iff pˉ=qˉ\bar p=\bar qpˉ​=qˉ​ in FFF.
  3. pˉ=qˉ\bar p=\bar qpˉ​=qˉ​ in FFF iff pθqp\mathrel{\theta}qpθq.
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Alien60 · Nov 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me