Case 878
The runoff eliminated the one everyone could accept
the_runoff_eliminated_the_one_everyone_could_accept.eml - An instant-runoff election counts every ballot exactly and applies its elimination rule to the letter, and a winner emerges with 65 percent in the final round. Which candidate would have beaten every other one head-to-head is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-16
EML
eml# Self-authored for the EML case corpus (no external origin). An instant-runoff
# election counts every ballot exactly and applies its elimination rule to the
# letter, and a winner emerges with 65 percent in the final round. Which
# candidate would have beaten every other one head-to-head is computed below.
#
# The count is careful. It reads every real ranked ballot; it eliminates the
# candidate with the fewest first choices, exactly as the rule says; it transfers
# each eliminated ballot to its next choice; and the intent is exactly 'the
# candidate the electorate prefers'.
#
# The centre candidate is almost nobody's first choice and almost everybody's
# second, so the rule eliminates first the one candidate who beats each of the
# other two in a head-to-head vote.
40 => ballots_left_then_centre_then_right
35 => ballots_right_then_centre_then_left
25 => ballots_centre_then_left_then_right
ballots_left_then_centre_then_right + ballots_right_then_centre_then_left + ballots_centre_then_left_then_right => voters
ballots_left_then_centre_then_right => first_choices_left
ballots_right_then_centre_then_left => first_choices_right
ballots_centre_then_left_then_right => first_choices_centre
first_choices_left + ballots_centre_then_left_then_right => final_round_left
first_choices_right => final_round_right
ballots_right_then_centre_then_left + ballots_centre_then_left_then_right => centre_vs_left_for_centre
first_choices_left => centre_vs_left_for_left
ballots_left_then_centre_then_right + ballots_centre_then_left_then_right => centre_vs_right_for_centre
first_choices_right => centre_vs_right_for_right
int(centre_vs_left_for_centre * 10000 / voters) => centre_majority_over_the_winner_per_myriad
"voters : " + str(voters) ^0
"first choices, left : " + str(first_choices_left) ^0
"first choices, right : " + str(first_choices_right) ^0
"first choices, centre : " + str(first_choices_centre) ^0
"eliminated in round one : centre, fewest first choices" ^0
"" ^0
"final round, left : " + str(final_round_left) ^0
"final round, right : " + str(final_round_right) ^0
"winner : left" ^0
"" ^0
"head-to-head, centre vs left : " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left) ^0
"head-to-head, centre vs right : " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right) ^0
"centre's majority over the winner : " + str(centre_majority_over_the_winner_per_myriad) + " per ten thousand" ^0
"" ^0
# ---- what the count verified ----
"the instant-runoff count" ^0
" reads : every real ranked ballot" ^0
" eliminates : the fewest-first-choices candidate, per rule" ^0
" transfers : each eliminated ballot to its next choice" ^0
" intent : the candidate the electorate prefers" ^0
" ballots miscounted : 0" ^0
" verdict : LEFT WINS THE FINAL ROUND 65 TO 35" ^0
"" ^0
" applying the elimination and transfer rule exactly to" ^0
" every ballot is the part done right here, and it is why" ^0
" the 65 to 35 is a true count of the final round" ^0
"" ^0
# ---- who beats whom head-to-head ----
"the pairwise votes" ^0
" centre against left : the right voters and the centre" ^0
" voters both prefer centre, " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left) ^0
" centre against right : the left voters and the centre" ^0
" voters both prefer centre, " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right) ^0
" so centre : beats each of the other two" ^0
" and centre's fate in the runoff : eliminated first, for" ^0
" having only " + str(first_choices_centre) + " first choices" ^0
"" ^0
# ---- what the electorate got ----
"the outcome" ^0
" elected : left, whom " + str(centre_vs_left_for_centre) + " of " + str(voters) + " voters rank below centre" ^0
" the candidate a majority prefers to either finalist :" ^0
" centre, eliminated" ^0
" is the runoff count wrong : no; it is exact" ^0
" does fewest-first-choices mean least-preferred : no; it" ^0
" means fewest-favourite, and the consensus choice is" ^0
" everyone's second" ^0
"" ^0
# ---- null control ----
# The same ballots, tallied pairwise (each candidate against each other), so a
# candidate who beats everyone head-to-head is the winner.
0 => nc_centre_wins_under_instant_runoff
1 => nc_centre_wins_under_pairwise_tally
2 => nc_pairwise_contests_centre_wins_of_two
"null control - tally the ballots pairwise" ^0
" centre wins under instant runoff : " + str(nc_centre_wins_under_instant_runoff) ^0
" centre wins under a pairwise tally : " + str(nc_centre_wins_under_pairwise_tally) ^0
" pairwise contests centre wins : " + str(nc_pairwise_contests_centre_wins_of_two) + " of 2" ^0
" no ballot changed; the rule stopped discarding a" ^0
" candidate for being a second choice" ^0
"" ^0
# ---- the rule ----
"what an instant-runoff count guarantees" ^0
" the winner has a majority of the ballots remaining in the" ^0
" final round : exactly, every ballot counted, the rule to" ^0
" the letter" ^0
" the winner is preferred by the electorate : not addressed;" ^0
" the centre candidate beats left " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left) + " and right " + str(centre_vs_right_for_centre) ^0
" to " + str(centre_vs_right_for_right) + " head-to-head, and the rule eliminated it first for" ^0
" having the fewest first choices" ^0
"" ^0
"a rule that eliminates by first choices reads the ballots for favourites and" ^0
"discards second choices unread until it is too late; the candidate acceptable to" ^0
"all is the favourite of few, and is gone before the second choices are counted" ^0
"" ^0
"It counts every ranked ballot and applies the runoff rule exactly - left wins the" ^0
"final round " + str(final_round_left) + " to " + str(final_round_right) + ". But the eliminated centre candidate beats left " + str(centre_vs_left_for_centre) + " to" ^0
"" + str(centre_vs_left_for_left) + " and right " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right) + " head-to-head, a " + str(centre_majority_over_the_winner_per_myriad) + "-per-ten-thousand majority over the" ^0
"winner, discarded in round one for having only " + str(first_choices_centre) + " first choices." ^0Python (deterministic transpilation)
pythonballots_left_then_centre_then_right = 40
ballots_right_then_centre_then_left = 35
ballots_centre_then_left_then_right = 25
voters = ballots_left_then_centre_then_right + ballots_right_then_centre_then_left + ballots_centre_then_left_then_right
first_choices_left = ballots_left_then_centre_then_right
first_choices_right = ballots_right_then_centre_then_left
first_choices_centre = ballots_centre_then_left_then_right
final_round_left = first_choices_left + ballots_centre_then_left_then_right
final_round_right = first_choices_right
centre_vs_left_for_centre = ballots_right_then_centre_then_left + ballots_centre_then_left_then_right
centre_vs_left_for_left = first_choices_left
centre_vs_right_for_centre = ballots_left_then_centre_then_right + ballots_centre_then_left_then_right
centre_vs_right_for_right = first_choices_right
centre_majority_over_the_winner_per_myriad = int(centre_vs_left_for_centre * 10000 / voters)
print("voters : " + str(voters))
print("first choices, left : " + str(first_choices_left))
print("first choices, right : " + str(first_choices_right))
print("first choices, centre : " + str(first_choices_centre))
print("eliminated in round one : centre, fewest first choices")
print("")
print("final round, left : " + str(final_round_left))
print("final round, right : " + str(final_round_right))
print("winner : left")
print("")
print("head-to-head, centre vs left : " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left))
print("head-to-head, centre vs right : " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right))
print("centre's majority over the winner : " + str(centre_majority_over_the_winner_per_myriad) + " per ten thousand")
print("")
print("the instant-runoff count")
print(" reads : every real ranked ballot")
print(" eliminates : the fewest-first-choices candidate, per rule")
print(" transfers : each eliminated ballot to its next choice")
print(" intent : the candidate the electorate prefers")
print(" ballots miscounted : 0")
print(" verdict : LEFT WINS THE FINAL ROUND 65 TO 35")
print("")
print(" applying the elimination and transfer rule exactly to")
print(" every ballot is the part done right here, and it is why")
print(" the 65 to 35 is a true count of the final round")
print("")
print("the pairwise votes")
print(" centre against left : the right voters and the centre")
print(" voters both prefer centre, " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left))
print(" centre against right : the left voters and the centre")
print(" voters both prefer centre, " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right))
print(" so centre : beats each of the other two")
print(" and centre's fate in the runoff : eliminated first, for")
print(" having only " + str(first_choices_centre) + " first choices")
print("")
print("the outcome")
print(" elected : left, whom " + str(centre_vs_left_for_centre) + " of " + str(voters) + " voters rank below centre")
print(" the candidate a majority prefers to either finalist :")
print(" centre, eliminated")
print(" is the runoff count wrong : no; it is exact")
print(" does fewest-first-choices mean least-preferred : no; it")
print(" means fewest-favourite, and the consensus choice is")
print(" everyone's second")
print("")
nc_centre_wins_under_instant_runoff = 0
nc_centre_wins_under_pairwise_tally = 1
nc_pairwise_contests_centre_wins_of_two = 2
print("null control - tally the ballots pairwise")
print(" centre wins under instant runoff : " + str(nc_centre_wins_under_instant_runoff))
print(" centre wins under a pairwise tally : " + str(nc_centre_wins_under_pairwise_tally))
print(" pairwise contests centre wins : " + str(nc_pairwise_contests_centre_wins_of_two) + " of 2")
print(" no ballot changed; the rule stopped discarding a")
print(" candidate for being a second choice")
print("")
print("what an instant-runoff count guarantees")
print(" the winner has a majority of the ballots remaining in the")
print(" final round : exactly, every ballot counted, the rule to")
print(" the letter")
print(" the winner is preferred by the electorate : not addressed;")
print(" the centre candidate beats left " + str(centre_vs_left_for_centre) + " to " + str(centre_vs_left_for_left) + " and right " + str(centre_vs_right_for_centre))
print(" to " + str(centre_vs_right_for_right) + " head-to-head, and the rule eliminated it first for")
print(" having the fewest first choices")
print("")
print("a rule that eliminates by first choices reads the ballots for favourites and")
print("discards second choices unread until it is too late; the candidate acceptable to")
print("all is the favourite of few, and is gone before the second choices are counted")
print("")
print("It counts every ranked ballot and applies the runoff rule exactly - left wins the")
print("final round " + str(final_round_left) + " to " + str(final_round_right) + ". But the eliminated centre candidate beats left " + str(centre_vs_left_for_centre) + " to")
print("" + str(centre_vs_left_for_left) + " and right " + str(centre_vs_right_for_centre) + " to " + str(centre_vs_right_for_right) + " head-to-head, a " + str(centre_majority_over_the_winner_per_myriad) + "-per-ten-thousand majority over the")
print("winner, discarded in round one for having only " + str(first_choices_centre) + " first choices.")stdout (executed)
textvoters : 100
first choices, left : 40
first choices, right : 35
first choices, centre : 25
eliminated in round one : centre, fewest first choices
final round, left : 65
final round, right : 35
winner : left
head-to-head, centre vs left : 60 to 40
head-to-head, centre vs right : 65 to 35
centre's majority over the winner : 6000 per ten thousand
the instant-runoff count
reads : every real ranked ballot
eliminates : the fewest-first-choices candidate, per rule
transfers : each eliminated ballot to its next choice
intent : the candidate the electorate prefers
ballots miscounted : 0
verdict : LEFT WINS THE FINAL ROUND 65 TO 35
applying the elimination and transfer rule exactly to
every ballot is the part done right here, and it is why
the 65 to 35 is a true count of the final round
the pairwise votes
centre against left : the right voters and the centre
voters both prefer centre, 60 to 40
centre against right : the left voters and the centre
voters both prefer centre, 65 to 35
so centre : beats each of the other two
and centre's fate in the runoff : eliminated first, for
having only 25 first choices
the outcome
elected : left, whom 60 of 100 voters rank below centre
the candidate a majority prefers to either finalist :
centre, eliminated
is the runoff count wrong : no; it is exact
does fewest-first-choices mean least-preferred : no; it
means fewest-favourite, and the consensus choice is
everyone's second
null control - tally the ballots pairwise
centre wins under instant runoff : 0
centre wins under a pairwise tally : 1
pairwise contests centre wins : 2 of 2
no ballot changed; the rule stopped discarding a
candidate for being a second choice
what an instant-runoff count guarantees
the winner has a majority of the ballots remaining in the
final round : exactly, every ballot counted, the rule to
the letter
the winner is preferred by the electorate : not addressed;
the centre candidate beats left 60 to 40 and right 65
to 35 head-to-head, and the rule eliminated it first for
having the fewest first choices
a rule that eliminates by first choices reads the ballots for favourites and
discards second choices unread until it is too late; the candidate acceptable to
all is the favourite of few, and is gone before the second choices are counted
It counts every ranked ballot and applies the runoff rule exactly - left wins the
final round 65 to 35. But the eliminated centre candidate beats left 60 to
40 and right 65 to 35 head-to-head, a 6000-per-ten-thousand majority over the
winner, discarded in round one for having only 25 first choices.Trace event types
eml:run:starteml:assigneml:outputeml:run:done