AFTD Auto-Formalizing Theoretical Domains

booleanTopForm

def

Given a type V with an additive commutative group structure [AddCommGroup V], a natural number d, a function p : V → ZMod 2, and a tuple h : Fin d → V, booleanTopForm d p h is defined as the sum in ZMod 2 over all subsets S : Finset (Fin d) of p (∑ i ∈ S, h i).

Statement

open scoped BigOperators in
def booleanTopForm {V : Type*} [AddCommGroup V] (d : ℕ)
    (p : V → ZMod 2) (h : Fin d → V) : ZMod 2
Defined in
arXiv:2611.03452, Lemma 2.7
Verified
05 Nov 2026
Axioms
none listed
Used by 2

Read back from the Lean

Given an additive abelian group V, a natural number d, a function p : V → ZMod 2, and a map h : Fin d → V, booleanTopForm d p h is defined to be the sum in ZMod 2, over all subsets S of Fin d (all S : Finset (Fin d)), of p applied to the sum of h i over all i in S: ∑ S : Finset (Fin d), p (∑ i ∈ S, h i).

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

open scoped BigOperators in
/-- The top form Delta^d p of p : V -> ZMod 2 evaluated at directions h_0, ..., h_{d-1}. -/
def booleanTopForm {V : Type*} [AddCommGroup V] (d : ℕ)
    (p : V → ZMod 2) (h : Fin d → V) : ZMod 2 := ∑ S : Finset (Fin d), p (∑ i ∈ S, h i)
See it in the graphDiscuss this resultChallenge it