AFTD Auto-Formalizing Theoretical Domains

even_quartets

def

Given a 2-coloring of triples represented by χ : Finset (Fin n) → ZMod 2, the even quartets are the 4-element subsets Q of Fin n such that the sum of χ over all triples in Q is 0.

Statement

def even_quartets (n : ℕ) (χ : Finset (Fin n) → ZMod 2) : Finset (Finset (Fin n))
Defined in
scout/2611-32833-even-quartets-and-the-maximum-density-of-a-simplical-3-cocy.md:108
Verified
25 Nov 2026
Axioms
none listed
Used by 2
  • min_even_quartets_countThe minimum number TC(n) of even quartets over all 2-colorings of triples on n vertices, where an even quartet has an even number of red…
  • min_even_quartet_densityThe minimum density m_n of even quartets among all 2-colorings of triples on n vertices, defined as TC(n) / binom(n, 4) for n ≥ 4 and 0…

Read back from the Lean

Given a natural number n and a function χ : Finset (Fin n) → ZMod 2, even_quartets n χ is the finite set of all 4-element subsets Q of Fin n such that the sum of χ(T) over all 3-element subsets T of Q is equal to 0 in ZMod 2.

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 set of even quartets (4-subsets with an even number of red triples) for a triple coloring χ. -/
def even_quartets (n : ℕ) (χ : Finset (Fin n) → ZMod 2) : Finset (Finset (Fin n)) := ((Finset.univ : Finset (Fin n)).powersetCard 4).filter
    (fun Q => ∑ T ∈ Q.powersetCard 3, χ T = 0)
See it in the graphDiscuss this resultChallenge it