AFTD Auto-Formalizing Theoretical Domains

binary_quadratic_polar_quartic_relation

theoremverified

If twice the binary lift of a quadratic form has zero fourth alternating difference on every four-direction cube, its polar bilinear form satisfies every four-index alternating relation.

Statement

theorem binary_quadratic_polar_quartic_relation {V : Type*}
    [AddCommGroup V] [Module (ZMod 2) V]
    (Q : QuadraticForm (ZMod 2) V)
    (hfour : ∀ u : Fin 4 → V,
      (∑ x : Fin 4 → ZMod 2,
        (-1 : ZMod 8) ^ (∑ i : Fin 4, (x i).val) *
          (2 * ((Q (∑ i : Fin 4, x i • u i)).val : ZMod 8))) = 0) :
    ∀ v w y z : V,
      Q.polarBilin v w * Q.polarBilin y z +
      Q.polarBilin v y * Q.polarBilin w z +
      Q.polarBilin v z * Q.polarBilin w y = 0
Source
Supporting algebra for OP-3, arXiv:2610.01024, Section E.1; developed in deep session IN-184. These helpers do not establish a lower bound for arbitrary circuit gate lists.
Verified
25 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
Used by 2

The proof, explained

To prove the polar quartic relation for four vectors v, w, y, z, we evaluate the hypothesis on the tuple u = (v, w, y, z). Expanding Q on linear combinations of u over (ℤ/2ℤ)⁴ expresses it as an affine quadratic polynomial whose quadratic coefficients are the pairwise polar bilinear pairings. By an algebraic identity for alternating fourth differences over (ℤ/2ℤ)⁴, this sum evaluates in ℤ/8ℤ to 4 times the polar quartic expression. Since the sum is assumed to vanish and multiplication by 4 is injective on the values of ℤ/2ℤ modulo 8, the polar quartic relation vanishes in ℤ/2ℤ.

  1. The alternating fourth difference of 2Q on the four-cube spanned by v, w, y, z vanishes in ℤ/8ℤ

    Given arbitrary vectors v, w, y, z ∈ V, we package them into the 4-tuple u = (v, w, y, z). Specializing the hypothesis hfour to u yields that the alternating sum of 2Q(∑ xᵢ uᵢ) over x ∈ (ℤ/2ℤ)⁴ is zero in ℤ/8ℤ.

    lines 12–14

      intro v w y z
      let u : Fin 4 → V := ![v,w,y,z]
      have hf := hfour u
  2. The fourth alternating difference of the algebraic polynomial with pairwise polar coefficients evaluates to four times the alternating polar quartic sum in ℤ/8ℤ

    Applying the general formula binary_affine_quadratic_fourth_difference to the six polar coefficients a = Q.polarBilin v w, b = Q.polarBilin v y, c = Q.polarBilin v z, d = Q.polarBilin w y, e = Q.polarBilin w z, and f = Q.polarBilin y z, with constant term 0 and linear terms l(i) = Q(u i), expresses the alternating sum of this quadratic polynomial over (ℤ/2ℤ)⁴ as 4(af + be + cd) in ℤ/8ℤ.

    lines 15–18

    uses binary_affine_quadratic_fourth_difference

      have he := binary_affine_quadratic_fourth_difference
        (Q.polarBilin v w) (Q.polarBilin v y) (Q.polarBilin v z)
        (Q.polarBilin w y) (Q.polarBilin w z) (Q.polarBilin y z)
        0 (fun i : Fin 4 => Q (u i))
  3. For any x ∈ (ℤ/2ℤ)⁴, Q(∑ xᵢ uᵢ) expands as the sum of the six polar bilinear cross-terms and the linear terms ∑ Q(uᵢ) xᵢ

    We apply binary_quadratic_four_cube_expansion to expand Q on the linear combination ∑ xᵢ uᵢ, unfold the definition of u = (v, w, y, z), and unpack the finite sum using Fin.sum_univ_succ. Ring arithmetic then verifies that this matches the affine quadratic form used in the fourth difference formula.

    lines 19–28

    uses binary_quadratic_four_cube_expansion, Fin.sum_univ_succ

      have hcube : ∀ x : Fin 4 → ZMod 2,
          Q (∑ i : Fin 4, x i • u i) =
            Q.polarBilin v w*x 0*x 1 + Q.polarBilin v y*x 0*x 2 +
            Q.polarBilin v z*x 0*x 3 + Q.polarBilin w y*x 1*x 2 +
            Q.polarBilin w z*x 1*x 3 + Q.polarBilin y z*x 2*x 3 +
            0 + ∑ i : Fin 4, Q (u i)*x i := by
        intro x
        rw [binary_quadratic_four_cube_expansion]
        simp [u, Fin.sum_univ_succ]
        ring
  4. 4 · (Q.polarBilin v w * Q.polarBilin y z + Q.polarBilin v y * Q.polarBilin w z + Q.polarBilin v z * Q.polarBilin w y) = 0 in ℤ/8ℤ

    Rewriting the vanishing alternating sum hf using the cube expansion hcube makes it match the left-hand side of he. Rewriting with he then replaces the entire sum by four times the polar quartic expression.

    lines 29–30

      simp_rw [hcube] at hf
      rw [he] at hf
  5. The polar quartic relation holds in ℤ/2ℤ

    For any r ∈ ℤ/2ℤ, 4 · r.val = 0 in ℤ/8ℤ implies r = 0, as can be verified by checking the two elements r = 0 (4 · 0 = 0) and r = 1 (4 · 1 = 4 ≠ 0). Applying this implication to the relation in hf proves the polar quartic relation in ℤ/2ℤ.

    lines 31–32

      have hzero : ∀ r : ZMod 2, 4 * (r.val : ZMod 8) = 0 → r = 0 := by decide
      exact hzero _ hf
binary_affine_quadratic_fourth_difference
the fourth alternating difference over (ℤ/2ℤ)⁴ of twice an affine quadratic polynomial a x₀ x₁ + b x₀ x₂ + c x₀ x₃ + d x₁ x₂ + e x₁ x₃ + f x₂ x₃ + t + ∑ lᵢ xᵢ evaluates to 4(af + be + cd) in ℤ/8ℤ
binary_quadratic_four_cube_expansion
a quadratic form on a vector space over ℤ/2ℤ evaluated on a four-vector sum ∑ xᵢ uᵢ expands as the sum of linear terms ∑ xᵢ Q(uᵢ) and the six pairwise polar bilinear pairings Q.polarBilin(uᵢ, uⱼ) xᵢ xⱼ
Fin.sum_univ_succ
a sum over Fin (n + 1) splits into the term at 0 plus the sum of the remaining terms shifted by one

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

theorem binary_quadratic_polar_quartic_relation {V : Type*}    [AddCommGroup V] [Module (ZMod 2) V]    (Q : QuadraticForm (ZMod 2) V)    (hfour : ∀ u : Fin 4 → V,      (∑ x : Fin 4 → ZMod 2,        (-1 : ZMod 8) ^ (∑ i : Fin 4, (x i).val) *          (2 * ((Q (∑ i : Fin 4, x i • u i)).val : ZMod 8))) = 0) :    ∀ v w y z : V,      Q.polarBilin v w * Q.polarBilin y z +      Q.polarBilin v y * Q.polarBilin w z +      Q.polarBilin v z * Q.polarBilin w y = 0 := by  intro v w y z  let u : Fin 4 → V := ![v,w,y,z]  have hf := hfour u  have he := binary_affine_quadratic_fourth_difference    (Q.polarBilin v w) (Q.polarBilin v y) (Q.polarBilin v z)    (Q.polarBilin w y) (Q.polarBilin w z) (Q.polarBilin y z)    0 (fun i : Fin 4 => Q (u i))  have hcube : ∀ x : Fin 4 → ZMod 2,      Q (∑ i : Fin 4, x i • u i) =        Q.polarBilin v w*x 0*x 1 + Q.polarBilin v y*x 0*x 2 +        Q.polarBilin v z*x 0*x 3 + Q.polarBilin w y*x 1*x 2 +        Q.polarBilin w z*x 1*x 3 + Q.polarBilin y z*x 2*x 3 +        0 + ∑ i : Fin 4, Q (u i)*x i := by    intro x    rw [binary_quadratic_four_cube_expansion]    simp [u, Fin.sum_univ_succ]    ring  simp_rw [hcube] at hf  rw [he] at hf  have hzero : ∀ r : ZMod 2, 4 * (r.val : ZMod 8) = 0 → r = 0 := by decide  exact hzero _ hf
See it in the graphDiscuss this resultChallenge it