AFTD Auto-Formalizing Theoretical Domains

persistent_randomized_dictatorship_distortion_bound

theoremverifiedformalization

For any finite voter type V with at least 3 voters, any candidate type C, and any family of pseudometrics d on V ⊕ C indexed by V such that the distance between any two voters is identical under all d i, if each voter i chooses a candidate x i minimizing the distance to i under d i, and y_star i is a candidate minimizing the social cost under d i, then the sum over i in V of the social cost of x i under d i is at most (5 * |V| - 2) / (|V| + 2) times the sum over i in V of the social cost of y_star i under d i.

Statement

theorem persistent_randomized_dictatorship_distortion_bound
    {V C : Type*} [Fintype V] [DecidableEq V]
    (hn : 3 ≤ Fintype.card V)
    (d : V → PseudoMetricSpace (V ⊕ C))
    (h_voter : ∀ (i i' : V) (u v : V),
      (letI := d i; dist (Sum.inl u : V ⊕ C) (Sum.inl v : V ⊕ C)) =
      (letI := d i'; dist (Sum.inl u : V ⊕ C) (Sum.inl v : V ⊕ C)))
    (x : V → C)
    (hx : ∀ (i : V) (c : C),
      (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr (x i))) ≤
      (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr c)))
    (y_star : V → C)
    (hy_star : ∀ (i : V) (c : C),
      (letI := d i; candidate_metric_social_cost V (y_star i)) ≤
      (letI := d i; candidate_metric_social_cost V c)) :
    (∑ i : V, (letI := d i; candidate_metric_social_cost V (x i))) ≤
      ((5 * (Fintype.card V : ℝ) - 2) / ((Fintype.card V : ℝ) + 2)) *
        (∑ i : V, (letI := d i; candidate_metric_social_cost V (y_star i)))
Formalizes
arXiv:2611.30683 Theorem 3.10 -- Stay or Switch? Metric Distortion with Online Candidate Arrivals
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 1

Read back from the Lean

Let V and C be types, where V is finite with decidable equality. Assume: 1. |V| ≥ 3 (the number of voters is at least 3). 2. d : V → PseudoMetricSpace (V ⊕ C) assigns to each voter i ∈ V a pseudometric space structure on the disjoint union V ⊕ C. 3. For all i, i', u, v ∈ V, the distance between u and v (embedded via Sum.inl) is the same under pseudometric d(i) as under d(i'). 4. x : V → C is a function such that for each voter i ∈ V and every candidate c ∈ C, under pseudometric d(i), the distance between voter i (Sum.inl i) and candidate x(i) (Sum.inr (x(i))) is at most the distance between voter i and candidate c (Sum.inr c) (i.e., x(i) is a nearest/favorite candidate of voter i under metric d(i)). 5. y_star : V → C is a function such that for each voter i ∈ V and every candidate c ∈ C, under pseudometric d(i), the candidate metric social cost of y_star(i) is at most that of c (i.e., y_star(i) minimizes candidate metric social cost under metric d(i)). Then: The sum over all i ∈ V of the candidate metric social cost of x(i) under pseudometric d(i) is at most ((5 * |V| - 2) / (|V| + 2)) times the sum over all i ∈ V of the candidate metric social cost of y_star(i) under pseudometric d(i).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The proof decomposes the social cost into distances from the dictator to its optimal candidate (S₀) and from other voters to that candidate (S₁). It uses metric properties and consistency of voter distances to bound total pairwise voter distances by 2 * S₁ and deduce (n - 1) * S₀ ≤ 3 * S₁. Finally, an algebraic inequality combines the numerator bound n * S₀ + 2 * S₁ and the denominator decomposition S₀ + S₁ to establish the metric distortion bound (5n - 2) / (n + 2).

  1. Define notation: voter count n = |V|, diagonal distance sum S₀, off-diagonal distance sum S₁, and total pairwise voter distance Vdist.

    We introduce convenient abbreviations for the quantities appearing in the distortion bound: n is the number of voters, S₀ = ∑_i d_i(i, y*(i)) is the sum of distances from each dictator i to its optimal candidate y*(i), S₁ = ∑_i ∑_{j ≠ i} d_i(j, y*(i)) is the sum of distances from other voters j to y*(i), and Vdist = ∑_i ∑_{j ≠ i} d_i(j, i) is the sum of all directed voter-to-voter distances.

    lines 20–27

      have _ := hy_star
      let n : ℝ := (Fintype.card V : ℝ)
      let S₀ : ℝ := ∑ i : V, (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr (y_star i)))
      let S₁ : ℝ := ∑ i : V, ∑ j ∈ Finset.univ.erase i,
        (letI := d i; dist (Sum.inl j : V ⊕ C) (Sum.inr (y_star i)))
      let Vdist : ℝ := ∑ i : V, ∑ j ∈ Finset.univ.erase i,
        (letI := d i; dist (Sum.inl j : V ⊕ C) (Sum.inl i : V ⊕ C))
    
  2. The total voter distance is bounded by twice the off-diagonal distances: Vdist ≤ 2 * S₁.

    By persistent_dictatorship_voter_distances_bound, because there are at least 3 voters and all voters agree on pairwise voter distances across metrics, the sum of directed voter distances Vdist is at most 2 * S₁.

    lines 28–30

    uses persistent_dictatorship_voter_distances_bound

      have h_vdist : Vdist ≤ 2 * S₁ :=
        persistent_dictatorship_voter_distances_bound hn d h_voter y_star
    
  3. The sum of reversed pairwise voter distances ∑_i ∑_{j ≠ i} d_i(i, j) equals Vdist.

    Using Finset.sum_congr to equate the summands term by term, the symmetry of pseudometrics (dist_comm) shows d_i(i, j) = d_i(j, i) for all voters i and j, so the reversed sum equals Vdist.

    lines 31–39

    uses Finset.sum_congr, dist_comm

      have h_comm : (∑ i : V, ∑ j ∈ Finset.univ.erase i,
          (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inl j : V ⊕ C))) = Vdist := by
        apply Finset.sum_congr rfl
        intro i _
        apply Finset.sum_congr rfl
        intro j _
        let _ := d i
        exact dist_comm (Sum.inl i) (Sum.inl j)
    
  4. (n - 1) * S₀ ≤ 3 * S₁.

    The lemma persistent_dictatorship_s0_bound establishes that (n - 1) * S₀ ≤ (∑_i ∑_{j ≠ i} d_i(i, j)) + S₁. Replacing the first term by Vdist and using Vdist ≤ 2 * S₁, linear arithmetic concludes that (n - 1) * S₀ ≤ 2 * S₁ + S₁ = 3 * S₁.

    lines 40–44

    uses persistent_dictatorship_s0_bound

      have h_s0 : (n - 1) * S₀ ≤ 3 * S₁ := by
        have h1 := persistent_dictatorship_s0_bound d y_star
        rw [h_comm] at h1
        linarith
    
  5. 2 ≤ n.

    From the assumption hn : 3 ≤ |V|, casting to the reals via Nat.cast_le.mpr gives 3 ≤ n, which implies 2 ≤ n.

    lines 45–48

    uses Nat.cast_le.mpr

      have hn2 : 2 ≤ n := by
        have : (3 : ℝ) ≤ n := Nat.cast_le.mpr hn
        linarith
    
  6. n * S₀ + 2 * S₁ ≤ ((5n - 2) / (n + 2)) * (S₀ + S₁).

    The algebraic lemma persistent_dictatorship_algebra_mult directly applies to n, S₀, and S₁ because 2 ≤ n and (n - 1) * S₀ ≤ 3 * S₁.

    lines 49–50

    uses persistent_dictatorship_algebra_mult

      have h_alg := persistent_dictatorship_algebra_mult n S₀ S₁ hn2 h_s0
    
  7. The total social cost of the chosen candidates is bounded by Vdist + n * S₀, and the optimal social cost decomposes into S₀ + S₁.

    Because each voter i picks x_i minimizing distance to i, persistent_dictatorship_numerator_bound bounds the sum of social costs ∑_i cost(x_i) by Vdist + n * S₀. Meanwhile, persistent_dictatorship_denominator_eq splits the sum of optimal social costs ∑_i cost(y*(i)) into S₀ + S₁.

    lines 51–53

    uses persistent_dictatorship_numerator_bound, persistent_dictatorship_denominator_eq

      have h_num := persistent_dictatorship_numerator_bound d x y_star (fun i => hx i (y_star i))
      have h_den := persistent_dictatorship_denominator_eq d y_star
    
  8. The sum of social costs of x_i is at most (5n - 2) / (n + 2) times the sum of social costs of y*(i).

    Rewriting the right-hand sum with the denominator identity S₀ + S₁, linear arithmetic finishes the argument: ∑_i cost(x_i) ≤ Vdist + n * S₀ ≤ n * S₀ + 2 * S₁ ≤ ((5n - 2) / (n + 2)) * (S₀ + S₁).

    lines 54–55

      rw [h_den]
      linarith
persistent_dictatorship_voter_distances_bound
For at least 3 voters under consistent pairwise voter distances across metrics, the sum over all directed voter pairs of d_i(j, i) is at most twice the sum of distances d_i(j, y*(i)) over j ≠ i.
Finset.sum_congr
Two finite sums are equal if their index sets are equal and their summands agree on every element of the index set.
dist_comm
In any pseudometric space, distance is symmetric: d(x, y) = d(y, x).
persistent_dictatorship_s0_bound
(n - 1) * S₀ is at most the sum of d_i(i, j) over all pairs of distinct voters plus S₁.
Nat.cast_le.mpr
An inequality a ≤ b between natural numbers implies the corresponding inequality a ≤ b between their real-number casts.
persistent_dictatorship_algebra_mult
For real numbers n, S₀, and S₁ with 2 ≤ n and (n - 1) * S₀ ≤ 3 * S₁, the linear combination n * S₀ + 2 * S₁ is at most ((5n - 2) / (n + 2)) * (S₀ + S₁).
persistent_dictatorship_numerator_bound
When each voter i selects candidate x_i minimizing distance to i, the sum over i of the social cost of x_i is at most the sum of pairwise voter distances plus n * S₀.
persistent_dictatorship_denominator_eq
The sum over voters i of the social cost of y*(i) decomposes exactly into the sum of diagonal distances S₀ and non-diagonal distances S₁.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Persistent randomized dictatorship achieves metric distortion at most (5n-2)/(n+2) against adaptive adversaries. -/theorem persistent_randomized_dictatorship_distortion_bound    {V C : Type*} [Fintype V] [DecidableEq V]    (hn : 3 ≤ Fintype.card V)    (d : V → PseudoMetricSpace (V ⊕ C))    (h_voter : ∀ (i i' : V) (u v : V),      (letI := d i; dist (Sum.inl u : V ⊕ C) (Sum.inl v : V ⊕ C)) =      (letI := d i'; dist (Sum.inl u : V ⊕ C) (Sum.inl v : V ⊕ C)))    (x : V → C)    (hx : ∀ (i : V) (c : C),      (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr (x i))) ≤      (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr c)))    (y_star : V → C)    (hy_star : ∀ (i : V) (c : C),      (letI := d i; candidate_metric_social_cost V (y_star i)) ≤      (letI := d i; candidate_metric_social_cost V c)) :    (∑ i : V, (letI := d i; candidate_metric_social_cost V (x i))) ≤      ((5 * (Fintype.card V : ℝ) - 2) / ((Fintype.card V : ℝ) + 2)) *        (∑ i : V, (letI := d i; candidate_metric_social_cost V (y_star i))) := by  have _ := hy_star  let n : ℝ := (Fintype.card V : ℝ)  let S₀ : ℝ := ∑ i : V, (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inr (y_star i)))  let S₁ : ℝ := ∑ i : V, ∑ j ∈ Finset.univ.erase i,    (letI := d i; dist (Sum.inl j : V ⊕ C) (Sum.inr (y_star i)))  let Vdist : ℝ := ∑ i : V, ∑ j ∈ Finset.univ.erase i,    (letI := d i; dist (Sum.inl j : V ⊕ C) (Sum.inl i : V ⊕ C))  have h_vdist : Vdist ≤ 2 * S₁ :=    persistent_dictatorship_voter_distances_bound hn d h_voter y_star  have h_comm : (∑ i : V, ∑ j ∈ Finset.univ.erase i,      (letI := d i; dist (Sum.inl i : V ⊕ C) (Sum.inl j : V ⊕ C))) = Vdist := by    apply Finset.sum_congr rfl    intro i _    apply Finset.sum_congr rfl    intro j _    let _ := d i    exact dist_comm (Sum.inl i) (Sum.inl j)  have h_s0 : (n - 1) * S₀ ≤ 3 * S₁ := by    have h1 := persistent_dictatorship_s0_bound d y_star    rw [h_comm] at h1    linarith  have hn2 : 2 ≤ n := by    have : (3 : ℝ) ≤ n := Nat.cast_le.mpr hn    linarith  have h_alg := persistent_dictatorship_algebra_mult n S₀ S₁ hn2 h_s0  have h_num := persistent_dictatorship_numerator_bound d x y_star (fun i => hx i (y_star i))  have h_den := persistent_dictatorship_denominator_eq d y_star  rw [h_den]  linarith
See it in the graphDiscuss this resultChallenge it