AFTD Auto-Formalizing Theoretical Domains

dichotomic_sum_diff_anticommute

theoremverified

For any two elements B_0, B_1 in a ring R satisfying B_0^2 = 1 and B_1^2 = 1, the sum B_0 + B_1 and the difference B_0 - B_1 anticommute: (B_0 + B_1)(B_0 - B_1) + (B_0 - B_1)(B_0 + B_1) = 0.

Statement

theorem dichotomic_sum_diff_anticommute {R : Type*} [Ring R] (B₀ B₁ : R)
    (h₀ : B₀ ^ 2 = 1) (h₁ : B₁ ^ 2 = 1) :
    (B₀ + B₁) * (B₀ - B₁) + (B₀ - B₁) * (B₀ + B₁) = 0
Source
arXiv:2610.35838 Appendix E
Verified
17 Nov 2026
Axioms
Quot.soundpropext

Read back from the Lean

For any ring $R$ and any elements $B₀, B₁ \in R$, if $B₀^2 = 1$ and $B₁^2 = 1$, then $(B₀ + B₁)(B₀ - B₁) + (B₀ - B₁)(B₀ + B₁) = 0$.

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 show that $B_0 + B_1$ and $B_0 - B_1$ anticommute, we expand the sum of products $(B_0 + B_1)(B_0 - B_1) + (B_0 - B_1)(B_0 + B_1)$ using ring distributivity. The cross terms cancel pairwise even though the ring may be noncommutative, simplifying the expression to $2(B_0^2) - 2(B_1^2)$. Substituting the hypotheses $B_0^2 = 1$ and $B_1^2 = 1$ reduces this to $2(1) - 2(1) = 0$.

  1. The hypotheses $B_0^2 = 1$ and $B_1^2 = 1$ are expressed as self-multiplications $B_0 * B_0 = 1$ and $B_1 * B_1 = 1$.

    Rewrite the square powers in assumptions $h_0$ and $h_1$ into products using the lemma `sq`.

    line 5

    uses sq

      rw [sq] at h₀ h₁
  2. $(B_0 + B_1)(B_0 - B_1) + (B_0 - B_1)(B_0 + B_1) = 2 • (B_0 * B_0) + (-2) • (B_1 * B_1)$. automation

    Expand both products using the distributive law for rings. In $(B_0 + B_1)(B_0 - B_1) = B_0^2 - B_0 B_1 + B_1 B_0 - B_1^2$ and $(B_0 - B_1)(B_0 + B_1) = B_0^2 + B_0 B_1 - B_1 B_0 - B_1^2$, the non-commuting cross terms $-B_0 B_1$ and $+B_0 B_1$ cancel, as do $+B_1 B_0$ and $-B_1 B_0$, leaving $2 • (B_0 * B_0) + (-2) • (B_1 * B_1)$. The `noncomm_ring` tactic handles this noncommutative polynomial expansion and cancellation automatically.

    lines 6–8

      calc
        (B₀ + B₁) * (B₀ - B₁) + (B₀ - B₁) * (B₀ + B₁)
          = 2 • (B₀ * B₀) + -2 • (B₁ * B₁) := by noncomm_ring
  3. $2 • (B_0 * B_0) + (-2) • (B_1 * B_1) = 2 • 1 + (-2) • 1$.

    Substitute $B_0 * B_0 = 1$ and $B_1 * B_1 = 1$ into the expression using hypotheses $h_0$ and $h_1$.

    line 9

        _ = 2 • (1 : R) + -2 • (1 : R) := by rw [h₀, h₁]
  4. $2 • 1 + (-2) • 1 = 0$. automation

    The terms $2 • 1$ and $(-2) • 1$ are additive inverses in the abelian group of the ring, so their sum is $0$. The `abel` tactic closes the goal by abelian group arithmetic.

    line 10

        _ = 0 := by abel
sq
In any monoid, the square of an element is its product with itself: $a^2 = a * a$.

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

/-- For any two operators squaring to 1 in a ring, their sum and difference anticommute. -/theorem dichotomic_sum_diff_anticommute {R : Type*} [Ring R] (B₀ B₁ : R)    (h₀ : B₀ ^ 2 = 1) (h₁ : B₁ ^ 2 = 1) :    (B₀ + B₁) * (B₀ - B₁) + (B₀ - B₁) * (B₀ + B₁) = 0 := by  rw [sq] at h₀ h₁  calc    (B₀ + B₁) * (B₀ - B₁) + (B₀ - B₁) * (B₀ + B₁)      = 2 • (B₀ * B₀) + -2 • (B₁ * B₁) := by noncomm_ring    _ = 2 • (1 : R) + -2 • (1 : R) := by rw [h₀, h₁]    _ = 0 := by abel
See it in the graphDiscuss this resultChallenge it