AFTD Auto-Formalizing Theoretical Domains

wild_joint_invalid_count

def

I(σ): the number of colours i that invalidate a triple block, i.e. there exist distinct x,y in a single σ-block with A x y = i and i in that same block. Each colour can invalidate at most one block (the block containing i), so I = sum over blocks b of mu(block_b).

Statement

noncomputable def wild_joint_invalid_count (q : ℕ) (A : Fin (3*q) → Fin (3*q) → Fin (3*q)) (σ : Equiv.Perm (Fin (3*q))) : ℕ
Source
step towards wild_one_bad_color_mixed_moment_formula_with_context
Verified
29 Oct 2026
Axioms
none listed
Built on 1
  • wild_joint_block_setThe b-th block as a vertex set = {σ (3b), σ (3b+1), σ (3b+2)}. Note wild_joint_block_set q σ 0 = wild_joint_first_block q σ.
Used by 4
  • wild_joint_first_block_mixed_reductionFor q>=3 and a normalized array, summing I times the whole-bad count D over all permutations equals q times the sum of first-block witness…
  • wild_joint_expected_ID_eq_alpha_sumCore reduction: E[I*D] = q/C(n,3) * sum over 3-sets T of mu(T) * sum_i alpha_of_color_type(T,i), where alpha_of_color_type is the alpha of…
  • wild_joint_invalid_count_eq_sum_multiplicityFor every vertex permutation σ, the invalid-colour count I(σ) equals the sum, over the q blocks, of the witness-support multiplicity mu of…
  • wild_joint_expected_IDE[I*D]: the expectation of I(σ)*D(σ) over the uniform distribution on all vertex permutations σ of Fin (3q), i.e. (1/n!) * sum over σ of…

Lean source view module on GitHub

/-- I(σ): number of colours invalidating a triple block. -/
noncomputable def wild_joint_invalid_count (q : ℕ) (A : Fin (3*q) → Fin (3*q) → Fin (3*q)) (σ : Equiv.Perm (Fin (3*q))) : ℕ := by classical exact (Finset.univ.filter (fun i : Fin (3*q) => ∃ b : Fin q, i ∈ wild_joint_block_set q σ b ∧ ∃ x ∈ wild_joint_block_set q σ b, ∃ y ∈ wild_joint_block_set q σ b, x ≠ y ∧ A x y = i)).card
See it in the graphDiscuss this resultChallenge it