AFTD Auto-Formalizing Theoretical Domains

complete_coloring_classical_value

def

The expected payoff of a pure classical strategy pair (a, b) in the complete-graph coloring game with n inputs and m colors at input-equality probability p.

Statement

noncomputable def complete_coloring_classical_value (n m : ℕ) (p : ℝ) (a b : Fin n → Fin m) : ℝ
Defined in
arXiv:2611.19002, Quantum Coloring Games on Complete Graphs, Section 3.1
Verified
18 Nov 2026
Axioms
none listed
Used by 1

Read back from the Lean

Given natural numbers n and m, a real number p, and functions a, b : Fin n → Fin m, complete_coloring_classical_value n m p a b is the real number defined by: p * (card {x : Fin n | a x = b x} / n) + (1 - p) * (card {(x, y) : Fin n × Fin n | x ≠ y ∧ a x ≠ b y} / (n * (n - 1)))

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 expected payoff of classical strategy pair (a, b) at equality probability p in the complete-graph coloring game. -/
noncomputable def complete_coloring_classical_value (n m : ℕ) (p : ℝ) (a b : Fin n → Fin m) : ℝ :=
  p * (((Finset.univ : Finset (Fin n)).filter (fun x => a x = b x)).card / (n : ℝ)) +
  (1 - p) * (((Finset.univ : Finset (Fin n × Fin n)).filter (fun xy => xy.1 ≠ xy.2 ∧ a xy.1 ≠ b xy.2)).card / ((n : ℝ) * (n - 1)))
See it in the graphDiscuss this resultChallenge it