AFTD Auto-Formalizing Theoretical Domains

min_even_quartet_density

def

The 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 for n < 4, where an even quartet has sum 0 in ZMod 2.

Statement

noncomputable def min_even_quartet_density (n : ℕ) : ℝ
Defined in
scout/2611-32833-even-quartets-and-the-maximum-density-of-a-simplical-3-cocy.md:110
Verified
25 Nov 2026
Axioms
none listed
Built on 1
  • even_quartetsGiven 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…

Read back from the Lean

min_even_quartet_density n defines a real number for each natural number n: - If n < 4, it evaluates to 0. - If n ≥ 4, it evaluates to the minimum (infimum over the finite non-empty set), taken over all 3-uniform hypergraphs $H \subseteq \binom{\{0, \dots, n-1\}}{3}$, of the fraction of 4-element subsets $Q \subseteq \{0, \dots, n-1\}$ that contain an even number of hyperedges of $H$ (i.e., where $|\{T \in \binom{Q}{3} : T \in H\}|$ is even), divided by $\binom{n}{4}$.

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 minimum density m_n of even quartets among all 2-colorings of triples on n vertices. -/
noncomputable def min_even_quartet_density (n : ℕ) : ℝ := if n < 4 then 0 else
  (((((Finset.univ : Finset (Fin n)).powersetCard 3).powerset).image
    (fun H (s : Finset (Fin n)) => if s ∈ H then (1 : ZMod 2) else (0 : ZMod 2))).inf'
    ⟨(fun (s : Finset (Fin n)) => if s ∈ (∅ : Finset (Finset (Fin n))) then (1 : ZMod 2) else (0 : ZMod 2)),
      Finset.mem_image_of_mem _ (Finset.mem_powerset.mpr (Finset.empty_subset _))⟩
    (fun χ => ((even_quartets n χ).card : ℝ))) / (n.choose 4 : ℝ)
See it in the graphDiscuss this resultChallenge it