AFTD Auto-Formalizing Theoretical Domains

candidate_metric_social_cost

def

The social cost of candidate c under a pseudometric space on V ⊕ C is the sum over all voters v in V of the distance between v and c.

Statement

noncomputable def candidate_metric_social_cost (V : Type*) [Fintype V]
    {C : Type*} [PseudoMetricSpace (V ⊕ C)] (c : C) : ℝ
Defined in
arXiv:2610.26535 Section 2.1
Verified
24 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

Given a type V with a Fintype V instance (so V is finite), an implicit type C, a PseudoMetricSpace instance on the sum type V ⊕ C, and an element c : C, candidate_metric_social_cost V c is defined as the real number ∑ v : V, dist (Sum.inl v) (Sum.inr c), which is the sum over all v in V of the pseudometric distance between Sum.inl v and Sum.inr c.

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 social cost of candidate c under a pseudometric space on V ⊕ C. -/
noncomputable def candidate_metric_social_cost (V : Type*) [Fintype V]
    {C : Type*} [PseudoMetricSpace (V ⊕ C)] (c : C) : ℝ :=
  ∑ v : V, dist (Sum.inl v) (Sum.inr c)
See it in the graphDiscuss this resultChallenge it