AFTD Auto-Formalizing Theoretical Domains

line_cubic_form

def

The line cubic form f_n on (ZMod 2)^n is the sum over i from 0 to n-3 of the product of adjacent triples x_i * x_{i+1} * x_{i+2}.

Statement

def line_cubic_form (n : ℕ) (x : Fin n → ZMod 2) : ZMod 2
Defined in
arXiv:2610.01024, Proposition 65
Verified
04 Oct 2026
Axioms
none listed

Read back from the Lean

Definition of line_cubic_form: Given a natural number n and a function x : Fin n → ZMod 2, line_cubic_form n x is the element of ZMod 2 defined as the sum over all i : Fin (n - 2) of the product x ⟨i.val, _⟩ * x ⟨i.val + 1, _⟩ * x ⟨i.val + 2, _⟩. Concretely, for n ≥ 3, this is ∑_{i=0}^{n-3} x_i * x_{i+1} * x_{i+2} in ZMod 2, and for n < 3, it is the empty sum (0).

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

Lean source view module on GitHub

/-- The line cubic form f_n(x) = ∑ x_i x_{i+1} x_{i+2} on (ZMod 2)^n. -/
def line_cubic_form (n : ℕ) (x : Fin n → ZMod 2) : ZMod 2 := ∑ i : Fin (n - 2),
    have h0 : i.val < n := by omega
    have h1 : i.val + 1 < n := by omega
    have h2 : i.val + 2 < n := by omega
    x ⟨i.val, h0⟩ * x ⟨i.val + 1, h1⟩ * x ⟨i.val + 2, h2⟩
See it in the graphDiscuss this resultChallenge it