AFTD Auto-Formalizing Theoretical Domains

wild_joint_bad_color_count

def

D(σ): the number of colours i that are whole-bad, i.e. some proper union of σ-blocks has no colour-i edge crossing it (block graph of the colour-i matching is disconnected).

Statement

noncomputable def wild_joint_bad_color_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 2
  • wild_joint_bad_relationA symmetric relation R is whole-bad for the block map p if some nonempty proper union of blocks (a nonempty proper set of block indices B,…
  • wild_joint_blockBlock (index of the consecutive triple) containing vertex v under the permutation σ, where σ p is the vertex at position p; blocks are…
Used by 3
  • 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_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

/-- D(σ): number of whole-bad colours. -/
noncomputable def wild_joint_bad_color_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) => wild_joint_bad_relation q (wild_joint_block q σ) (fun x y => x ≠ y ∧ A x y = i))).card
See it in the graphDiscuss this resultChallenge it