bmi_assoc_of_is_b_of_left_unit
Let $(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: $(xy)z = x(yz)$ for all $x, y, z \in A$.
Statement
theorem bmi_assoc_of_is_b_of_left_unit {A : Type*} [Mul A] (B : A) (hB : bmi_is_b_element B) (hB_unit : ∀ x : A, B * x = x) : ∀ x y z : A, (x * y) * z = x * (y * z)
- Formalizes
- arXiv:2610.37108 Proposition 3.1 -- Finite BM-algebras and fixed-point combinators
- Verified
- 28 Oct 2026
- Axioms
- none — Lean reports it depends on no axioms
- Built on 1
- 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$.
- Used by 3
- finite_bi_algebra_is_semigroup_with_left_unitsEvery finite BI-algebra is a semigroup with B and I as left units: let (A, ·) be a finite magma equipped with elements B, I in A such that…
- finite_bmi_algebra_is_idempotent_semigroup_with_left_unitsEvery finite BMI-algebra is an idempotent semigroup with B, M, and I as left units: let $(A, \cdot)$ be a finite magma equipped with…
- finite_bmi_algebra_has_y_elementEvery finite $\mathbf{BMI}$-algebra has a $Y$-element: let $(A, \cdot)$ be a finite magma equipped with elements $B, M, I \in A$ such that…
Read back from the Lean
For any type A equipped with a multiplication * and any element B : A, if B is a "B-element" (satisfies bmi_is_b_element B) and B is a left identity for multiplication (for all x : A, B * x = x), then multiplication on A is associative: for all x, y, z : A, (x * y) * z = x * (y * z).
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
To prove that multiplication is associative, we evaluate the defining property of the $B$-element, $((B \cdot x) \cdot y) \cdot z = x \cdot (y \cdot z)$, on arbitrary elements $x, y, z \in A$. Because $B$ is a left unit, $B \cdot x$ simplifies to $x$. This immediately reduces the equality to $(x \cdot y) \cdot z = x \cdot (y \cdot z)$, establishing associativity.
For arbitrary elements $x, y, z \in A$, we have $((B \cdot x) \cdot y) \cdot z = x \cdot (y \cdot z)$.
We introduce arbitrary elements $x, y, z \in A$ and instantiate the definition of a $B$-element (`bmi_is_b_element`), which states that $B \cdot u \cdot v \cdot w = u \cdot (v \cdot w)$ for all $u, v, w$ (with multiplication being left-associative).
intro x y z have h := hB x y z
$(x \cdot y) \cdot z = x \cdot (y \cdot z)$
Because $B$ is a left unit ($B \cdot x = x$ by `hB_unit`), we substitute $x$ for $B \cdot x$ in the established equality, transforming $((B \cdot x) \cdot y) \cdot z = x \cdot (y \cdot z)$ into $(x \cdot y) \cdot z = x \cdot (y \cdot z)$, which closes the goal.
rw [hB_unit x] at h exact h
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- If B is a B-element and also a left unit in a magma A, then multiplication on A is associative. -/theorem bmi_assoc_of_is_b_of_left_unit {A : Type*} [Mul A] (B : A) (hB : bmi_is_b_element B) (hB_unit : ∀ x : A, B * x = x) : ∀ x y z : A, (x * y) * z = x * (y * z) := by intro x y z have h := hB x y z rw [hB_unit x] at h exact h