AFTD Auto-Formalizing Theoretical Domains

finite_bmi_algebra_is_idempotent_semigroup_with_left_units

theoremverifiedformalization

Every finite BMI-algebra is an idempotent semigroup with B, M, and I as left units: let $(A, \cdot)$ be a finite magma equipped with elements $B, M, I \in A$ such that $B$ is a $B$-element ($((Bx)y)z = x(yz)$ for all $x, y, z \in A$), $M$ is an $M$-element ($Mx = xx$ for all $x \in A$), and $I$ is an $I$-element ($Ix = x$ for all $x \in A$). Then the operation is associative ($(xy)z = x(yz)$ for all $x, y, z \in A$), every element is idempotent ($xx = x$ for all $x \in A$), and $B$, $M$, and $I$ are left units of $(A, \cdot)$ ($Bx = x$, $Mx = x$, and $Ix = x$ for all $x \in A$).

Statement

theorem finite_bmi_algebra_is_idempotent_semigroup_with_left_units
    {A : Type*} [Mul A] [Fintype A]
    (B M I : A) (hB : bmi_is_b_element B) (hM : bmi_is_m_element M) (hI : bmi_is_i_element I) :
    (∀ x y z : A, (x * y) * z = x * (y * z)) ∧
    (∀ x : A, x * x = x) ∧
    (∀ x : A, B * x = x) ∧
    (∀ x : A, M * x = x) ∧
    (∀ x : A, I * x = x)
Formalizes
arXiv:2610.37108 Theorem 3.3
Verified
29 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 7
  • bmi_is_b_elementAn element $B$ in a magma $(A, \cdot)$ is a $B$-element if $((Bx)y)z = x(yz)$ for all $x, y, z \in A$.
  • bmi_is_m_elementAn element $M$ in a magma $(A, \cdot)$ is an $M$-element if $Mx = xx$ for all $x \in A$ .
  • bmi_is_i_elementAn element $I$ in a magma $(A, \cdot)$ is an $I$-element (a left unit) if $Ix = x$ for all $x \in A$.
  • bmi_is_left_unit_bLet $(A, \cdot)$ be a finite magma equipped with a $B$-element $B$ and an $I$-element $I$. Then $B$ is a left unit: $Bx = x$ for all…
  • bmi_assoc_of_is_b_of_left_unitLet $(A, \cdot)$ be a magma with a $B$-element $B$. If $B$ is a left unit ($Bx = x$ for all $x$), then the operation is associative:…
  • bmi_idempotent_of_assoc_of_is_m_of_is_iLet $(A, \cdot)$ be an associative magma with an $M$-element $M$ and an $I$-element $I$. Then every element $x \in A$ is idempotent:…
  • bmi_is_left_unit_m_of_is_m_of_idempotentLet $(A, \cdot)$ be an idempotent magma (satisfying $x \cdot x = x$ for all $x \in A$) equipped with an $M$-element $M$ (satisfying…

Read back from the Lean

Let $A$ be a finite type equipped with a multiplication operation (*). Let $B, M, I \in A$ be elements satisfying: - $hB$: $B$ is a B-element (bmi_is_b_element B), - $hM$: $M$ is an M-element (bmi_is_m_element M), and - $hI$: $I$ is an I-element (bmi_is_i_element I). Then all of the following hold: 1. Multiplication is associative: for all $x, y, z \in A$, $(x * y) * z = x * (y * z)$; 2. Multiplication is idempotent: for all $x \in A$, $x * x = x$; 3. $B$ is a left identity: for all $x \in A$, $B * x = x$; 4. $M$ is a left identity: for all $x \in A$, $M * x = x$; 5. $I$ is a left identity: for all $x \in A$, $I * x = x$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The theorem is proved by a sequence of lemma applications. First, finiteness together with the definitions of B and I implies that B is a left unit. The left-unit property of B simplifies the B-combinator identity into general associativity. Associativity in the presence of M and I then forces all elements to be idempotent, which in turn makes M a left unit.

  1. B is a left unit: B * x = x for all x ∈ A

    By lemma bmi_is_left_unit_b, the finiteness of A together with B being a B-element and I being an I-element implies that B is a left unit.

    line 10

    uses bmi_is_left_unit_b

      have hBu : ∀ x : A, B * x = x := bmi_is_left_unit_b B I hB hI
  2. Multiplication is associative: (x * y) * z = x * (y * z) for all x, y, z ∈ A

    Since B is a B-element (((Bx)y)z = x(yz)) and B is a left unit (Bx = x), lemma bmi_assoc_of_is_b_of_left_unit deduces associativity ((xy)z = x(yz)).

    lines 11–12

    uses bmi_assoc_of_is_b_of_left_unit

      have hassoc : ∀ x y z : A, (x * y) * z = x * (y * z) :=
        bmi_assoc_of_is_b_of_left_unit B hB hBu
  3. Every element is idempotent: x * x = x for all x ∈ A

    By lemma bmi_idempotent_of_assoc_of_is_m_of_is_i, in any associative magma with an M-element and an I-element, every element satisfies x * x = x.

    lines 13–14

    uses bmi_idempotent_of_assoc_of_is_m_of_is_i

      have hidem : ∀ x : A, x * x = x :=
        bmi_idempotent_of_assoc_of_is_m_of_is_i hassoc M I hM hI
  4. M is a left unit: M * x = x for all x ∈ A

    Because M is an M-element (Mx = xx) and every element is idempotent (xx = x), lemma bmi_is_left_unit_m_of_is_m_of_idempotent establishes that M is a left unit (Mx = x).

    lines 15–16

    uses bmi_is_left_unit_m_of_is_m_of_idempotent

      have hMu : ∀ x : A, M * x = x :=
        bmi_is_left_unit_m_of_is_m_of_idempotent M hM hidem
  5. The five properties hold simultaneously

    Combine the established properties—associativity, idempotence, B being a left unit, M being a left unit, and the hypothesis that I is a left unit—into the five-part conjunction.

    line 17

      exact ⟨hassoc, hidem, hBu, hMu, hI⟩
bmi_is_left_unit_b
In a finite magma with a B-element and an I-element, B is a left unit (Bx = x for all x).
bmi_assoc_of_is_b_of_left_unit
If B is a B-element and also a left unit, then multiplication is associative ((xy)z = x(yz) for all x, y, z).
bmi_idempotent_of_assoc_of_is_m_of_is_i
In an associative magma with an M-element and an I-element, every element is idempotent (xx = x for all x).
bmi_is_left_unit_m_of_is_m_of_idempotent
If M is an M-element and every element is idempotent, then M is a left unit (Mx = x for all x).

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Every finite BMI-algebra is an idempotent semigroup with left units B, M, and I (arXiv:2610.37108 Theorem 3.3). -/theorem finite_bmi_algebra_is_idempotent_semigroup_with_left_units    {A : Type*} [Mul A] [Fintype A]    (B M I : A) (hB : bmi_is_b_element B) (hM : bmi_is_m_element M) (hI : bmi_is_i_element I) :    (∀ x y z : A, (x * y) * z = x * (y * z)) ∧    (∀ x : A, x * x = x) ∧    (∀ x : A, B * x = x) ∧    (∀ x : A, M * x = x) ∧    (∀ x : A, I * x = x) := by  have hBu : ∀ x : A, B * x = x := bmi_is_left_unit_b B I hB hI  have hassoc : ∀ x y z : A, (x * y) * z = x * (y * z) :=    bmi_assoc_of_is_b_of_left_unit B hB hBu  have hidem : ∀ x : A, x * x = x :=    bmi_idempotent_of_assoc_of_is_m_of_is_i hassoc M I hM hI  have hMu : ∀ x : A, M * x = x :=    bmi_is_left_unit_m_of_is_m_of_idempotent M hM hidem  exact ⟨hassoc, hidem, hBu, hMu, hI⟩
See it in the graphDiscuss this resultChallenge it