AFTD Auto-Formalizing Theoretical Domains

plackett_luce_two_items_ranking_entropy_eq_winner_entropy

theoremverified

For any a ∈ (0, 1), the Plackett-Luce ranking entropy on two alternatives {0, 1} with weights a and 1 - a is equal to the winner entropy -a * log(a) - (1 - a) * log(1 - a).

Statement

theorem plackett_luce_two_items_ranking_entropy_eq_winner_entropy
    (a : ℝ) (ha_pos : 0 < a) (ha_lt : a < 1) :
    plackett_luce_entropy (fun i => if i = 0 then a else 1 - a) (Finset.range 2) =
      Real.negMulLog a + Real.negMulLog (1 - a)
Source
Preference Elicitation as Average-Case Sorting (AAAI 2021)
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
  • plackett_luce_entropyShannon entropy (natural logarithm) of the Plackett-Luce distribution over the rankings of S.
  • rankings_of_eq_biUnionFor nonempty S, the rankings of S are obtained by choosing a top alternative a in S and then a ranking of S minus a.
  • rankings_ofThe rankings of a finite set S of alternatives: all orderings of S as duplicate-free lists.
  • rankings_of_emptyThe empty set has exactly one ranking, the empty list.
  • plackett_luce_entropy_eqChain rule: the Plackett-Luce entropy on S equals the entropy of the first choice plus the expected Plackett-Luce entropy of the remaining…
  • plackett_luce_probPlackett-Luce probability of a ranking (best first): the product over positions of the weight of the alternative placed there divided by…

Read back from the Lean

For any real number $a$ satisfying $0 < a$ and $a < 1$, the Plackett-Luce entropy of the weight function $w : \mathbb{N} \to \mathbb{R}$ given by $w(i) = a$ if $i = 0$ and $w(i) = 1 - a$ otherwise, evaluated on the set of items $\{0, 1\}$ (represented as Finset.range 2), equals $\text{negMulLog}(a) + \text{negMulLog}(1 - a)$ (i.e., $-a \ln a - (1-a) \ln(1-a)$).

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 uses the recursive decomposition of Plackett-Luce entropy, which expresses the ranking entropy on a set of alternatives as the winner choice entropy plus the expected residual ranking entropy on the remaining alternatives. On two alternatives {0, 1} with normalized weights a and 1 - a summing to 1, the winner choice entropy is directly -a * log(a) - (1 - a) * log(1 - a). Removing the winning alternative always leaves a singleton set, which admits only one ranking and therefore has zero entropy. Consequently, the expected residual entropy term vanishes, leaving the ranking entropy equal to the binary winner entropy.

  1. The Plackett-Luce probability of the single-element ranking [b] is 1, provided w(b) ≠ 0.

    Unfolding the definition of `plackett_luce_prob` on the singleton list [b] gives (w(b) / (w(b) + 0)) * 1. Since w(b) ≠ 0, simplifying the fraction w(b) / w(b) yields 1.

    lines 4–5

      dsimp [plackett_luce_prob]
      simp [hb]
  2. The set of all rankings of a singleton set {b} is {[b]}.

    Since {b} is nonempty by `singleton_nonempty`, we expand its rankings via `rankings_of_eq_biUnion` into the union over the top item of prepending that item to rankings of the remaining set. The only choice is b, and removing b leaves the empty set ∅, whose sole ranking is [] by `rankings_of_empty`. Prepending b produces {[b]}.

    lines 10–12

    uses singleton_nonempty, rankings_of_eq_biUnion, rankings_of_empty

      have hS : ({b} : Finset ℕ).Nonempty := singleton_nonempty b
      rw [rankings_of_eq_biUnion {b} hS]
      simp [rankings_of_empty]
  3. The Plackett-Luce ranking entropy of a singleton set {b} is 0, provided w(b) ≠ 0.

    By definition, the entropy is the sum of -P(l) * log(P(l)) over all full rankings l of {b}. Rewriting the set of rankings as {[b]} and using the fact that P([b]) = 1, the sum simplifies to -1 * log(1) = 0.

    lines 17–19

    uses plackett_luce_two_items_ranking_entropy_eq_winner_entropy_rankings_singleton, plackett_luce_two_items_ranking_entropy_eq_winner_entropy_prob_singleton

      dsimp [plackett_luce_entropy]
      rw [plackett_luce_two_items_ranking_entropy_eq_winner_entropy_rankings_singleton b]
      simp [plackett_luce_two_items_ranking_entropy_eq_winner_entropy_prob_singleton w b hb]
  4. The weights w(0) = a and w(1) = 1 - a are strictly positive for all elements of {0, 1} = Finset.range 2.

    We define w(i) to be a if i = 0 and 1 - a otherwise. Evaluating at 0 and 1 via `if_pos` and `if_neg` yields w(0) = a and w(1) = 1 - a. Since 0 < a < 1, both weights are strictly positive. Checking the two elements of Finset.range 2 confirms that w(b) > 0 for all b ∈ Finset.range 2.

    lines 26–37

    uses if_pos, if_neg, Finset.mem_range

      open Finset in
      let w : ℕ → ℝ := fun i => if i = 0 then a else 1 - a
      have hw0 : w 0 = a := if_pos rfl
      have hw1 : w 1 = 1 - a := if_neg (by decide)
      have hw0_pos : 0 < w 0 := by rw [hw0]; exact ha_pos
      have hw1_pos : 0 < w 1 := by rw [hw1]; linarith
      have hw_pos : ∀ b ∈ Finset.range 2, 0 < w b := by
        intro b hb
        simp only [Finset.mem_range] at hb
        interval_cases b
        · exact hw0_pos
        · exact hw1_pos
  5. The set of alternatives Finset.range 2 is nonempty, equals {0, 1}, and the sum of weights over it is 1.

    Finset.range 2 is nonempty because 2 ≠ 0, and equals {0, 1} by decidable equality. Expanding the sum of weights over {0, 1} gives w(0) + w(1) = a + (1 - a), which equals 1 by ring arithmetic.

    lines 38–45

    uses Finset.nonempty_range_iff, Finset.sum_insert, Finset.sum_singleton

      have hS : (Finset.range 2 : Finset ℕ).Nonempty := by
        rw [Finset.nonempty_range_iff]
        omega
      have h_range : (Finset.range 2 : Finset ℕ) = {0, 1} := by decide
      have h_sum : ∑ b ∈ Finset.range 2, w b = 1 := by
        rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]
        dsimp [w]
        ring
  6. The Plackett-Luce entropy decomposes into the winner choice entropy plus the expected residual entropy on the remaining sets.

    Applying the recursive decomposition lemma `plackett_luce_entropy_eq` to the nonempty set Finset.range 2 with positive weights expresses the total entropy as ∑_b negMulLog(w(b) / ∑ w) + ∑_b (w(b) / ∑ w) * H(Finset.range 2 \ {b}). Since the sum of weights ∑ w is 1, the denominators simplify to 1.

    lines 46–47

    uses plackett_luce_entropy_eq

      rw [plackett_luce_entropy_eq w (Finset.range 2) hS hw_pos]
      rw [h_sum]
  7. Removing either 0 or 1 from {0, 1} leaves a singleton set whose Plackett-Luce entropy is 0.

    Decidable equality shows {0, 1} \ {0} = {1} and {0, 1} \ {1} = {0}. Since w(1) > 0 and w(0) > 0, the singleton entropy lemma `plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton` applies to each, showing H({1}) = 0 and H({0}) = 0.

    lines 48–55

    uses plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton, ne_of_gt

      have h_erase0 : ({0, 1} : Finset ℕ).erase 0 = {1} := by decide
      have h_erase1 : ({0, 1} : Finset ℕ).erase 1 = {0} := by decide
      have h_ent1 : plackett_luce_entropy w (({0, 1} : Finset ℕ).erase 0) = 0 := by
        rw [h_erase0]
        exact plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton w 1 (ne_of_gt hw1_pos)
      have h_ent0 : plackett_luce_entropy w (({0, 1} : Finset ℕ).erase 1) = 0 := by
        rw [h_erase1]
        exact plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton w 0 (ne_of_gt hw0_pos)
  8. The expected residual entropy term ∑_b (w(b) / 1) * H({0, 1} \ {b}) evaluates to 0.

    Expanding the sum over {0, 1} gives w(0) * H({1}) + w(1) * H({0}). Substituting the singleton entropy values H({1}) = 0 and H({0}) = 0 reduces this to w(0) * 0 + w(1) * 0 = 0.

    lines 56–59

    uses Finset.sum_insert, Finset.sum_singleton

      have h_term2 : ∑ a ∈ Finset.range 2, w a / 1 * plackett_luce_entropy w ((Finset.range 2).erase a) = 0 := by
        rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]
        rw [h_ent1, h_ent0]
        ring
  9. The winner choice entropy term ∑_b negMulLog(w(b) / 1) equals negMulLog(a) + negMulLog(1 - a).

    Expanding the sum over {0, 1} gives negMulLog(w(0) / 1) + negMulLog(w(1) / 1). Simplifying division by 1 using `div_one` and substituting w(0) = a and w(1) = 1 - a produces negMulLog(a) + negMulLog(1 - a).

    lines 60–63

    uses Finset.sum_insert, Finset.sum_singleton, div_one

      have h_term1 : ∑ a_1 ∈ Finset.range 2, Real.negMulLog (w a_1 / 1) = Real.negMulLog a + Real.negMulLog (1 - a) := by
        rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]
        simp only [div_one]
        rw [hw0, hw1]
  10. The Plackett-Luce ranking entropy on two items equals negMulLog(a) + negMulLog(1 - a).

    Substituting the evaluated winner entropy term and the vanishing residual entropy term into the decomposed expression gives (negMulLog(a) + negMulLog(1 - a)) + 0, which simplifies to negMulLog(a) + negMulLog(1 - a) via `add_zero`.

    line 64

    uses add_zero

      rw [h_term1, h_term2, add_zero]
add_zero
Adding zero to any element leaves it unchanged (a + 0 = a).
div_one
Dividing any element by 1 leaves it unchanged (a / 1 = a).
Finset.mem_range
A natural number m belongs to Finset.range n if and only if m < n.
Finset.nonempty_range_iff
The set Finset.range n is nonempty if and only if n ≠ 0.
Finset.sum_insert
If a ∉ s, the sum of f over {a} ∪ s equals f(a) plus the sum of f over s.
Finset.sum_singleton
The sum of a function over a singleton set {a} is simply the function evaluated at a.
if_neg
If condition c is false, then `if c then t else e` reduces to e.
if_pos
If condition c is true, then `if c then t else e` reduces to t.
ne_of_gt
If b < a in a preorder, then a ≠ b.
plackett_luce_entropy_eq
The Plackett-Luce entropy on a nonempty set S with strictly positive weights decomposes into the winner choice entropy plus the expected residual Plackett-Luce entropy of the remaining alternatives S \ {a}.
plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton
If item b has nonzero weight, the Plackett-Luce entropy of the singleton set {b} is 0.
plackett_luce_two_items_ranking_entropy_eq_winner_entropy_prob_singleton
If item b has nonzero weight, the Plackett-Luce probability of the singleton ranking [b] is 1.
plackett_luce_two_items_ranking_entropy_eq_winner_entropy_rankings_singleton
The only full ranking of a singleton set {b} is the singleton list [b].
rankings_of_empty
The only ranking of the empty set of alternatives is the empty list [].
rankings_of_eq_biUnion
For any nonempty finite set S, the set of full rankings of S equals the union over each choice of top item a ∈ S of lists formed by prepending a to the rankings of S \ {a}.
singleton_nonempty
A singleton set {a} is nonempty.

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

open Finset inlemma plackett_luce_two_items_ranking_entropy_eq_winner_entropy_prob_singleton (w : ℕ → ℝ) (b : ℕ) (hb : w b ≠ 0) :    plackett_luce_prob w [b] = 1 := by  dsimp [plackett_luce_prob]  simp [hb]open Finset inlemma plackett_luce_two_items_ranking_entropy_eq_winner_entropy_rankings_singleton (b : ℕ) :    rankings_of {b} = {[b]} := by  have hS : ({b} : Finset ℕ).Nonempty := singleton_nonempty b  rw [rankings_of_eq_biUnion {b} hS]  simp [rankings_of_empty]open Finset inlemma plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton (w : ℕ → ℝ) (b : ℕ) (hb : w b ≠ 0) :    plackett_luce_entropy w {b} = 0 := by  dsimp [plackett_luce_entropy]  rw [plackett_luce_two_items_ranking_entropy_eq_winner_entropy_rankings_singleton b]  simp [plackett_luce_two_items_ranking_entropy_eq_winner_entropy_prob_singleton w b hb]/-- On two alternatives, the Plackett-Luce ranking entropy equals the binary winner entropy. -/theorem plackett_luce_two_items_ranking_entropy_eq_winner_entropy    (a : ℝ) (ha_pos : 0 < a) (ha_lt : a < 1) :    plackett_luce_entropy (fun i => if i = 0 then a else 1 - a) (Finset.range 2) =      Real.negMulLog a + Real.negMulLog (1 - a) := by  open Finset in  let w : ℕ → ℝ := fun i => if i = 0 then a else 1 - a  have hw0 : w 0 = a := if_pos rfl  have hw1 : w 1 = 1 - a := if_neg (by decide)  have hw0_pos : 0 < w 0 := by rw [hw0]; exact ha_pos  have hw1_pos : 0 < w 1 := by rw [hw1]; linarith  have hw_pos : ∀ b ∈ Finset.range 2, 0 < w b := by    intro b hb    simp only [Finset.mem_range] at hb    interval_cases b    · exact hw0_pos    · exact hw1_pos  have hS : (Finset.range 2 : Finset ℕ).Nonempty := by    rw [Finset.nonempty_range_iff]    omega  have h_range : (Finset.range 2 : Finset ℕ) = {0, 1} := by decide  have h_sum : ∑ b ∈ Finset.range 2, w b = 1 := by    rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]    dsimp [w]    ring  rw [plackett_luce_entropy_eq w (Finset.range 2) hS hw_pos]  rw [h_sum]  have h_erase0 : ({0, 1} : Finset ℕ).erase 0 = {1} := by decide  have h_erase1 : ({0, 1} : Finset ℕ).erase 1 = {0} := by decide  have h_ent1 : plackett_luce_entropy w (({0, 1} : Finset ℕ).erase 0) = 0 := by    rw [h_erase0]    exact plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton w 1 (ne_of_gt hw1_pos)  have h_ent0 : plackett_luce_entropy w (({0, 1} : Finset ℕ).erase 1) = 0 := by    rw [h_erase1]    exact plackett_luce_two_items_ranking_entropy_eq_winner_entropy_entropy_singleton w 0 (ne_of_gt hw0_pos)  have h_term2 : ∑ a ∈ Finset.range 2, w a / 1 * plackett_luce_entropy w ((Finset.range 2).erase a) = 0 := by    rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]    rw [h_ent1, h_ent0]    ring  have h_term1 : ∑ a_1 ∈ Finset.range 2, Real.negMulLog (w a_1 / 1) = Real.negMulLog a + Real.negMulLog (1 - a) := by    rw [h_range, Finset.sum_insert (by decide), Finset.sum_singleton]    simp only [div_one]    rw [hw0, hw1]  rw [h_term1, h_term2, add_zero]
See it in the graphDiscuss this resultChallenge it