AFTD Auto-Formalizing Theoretical Domains

catch_up_outcome_best_eq_ite

theoremverified

The best outcome of a list depends only on which outcomes occur in it: win if a win occurs, otherwise draw if a draw occurs, otherwise loss.

Statement

theorem catch_up_outcome_best_eq_ite (os : List CatchUpOutcome) :
    CatchUpOutcome.best os =
      if CatchUpOutcome.win ∈ os then .win
      else if CatchUpOutcome.draw ∈ os then .draw else .loss
Source
step towards the kernel checks catch_up_value_icc_four/seven/eight/eleven (Catch-Up: A Game in Which the Lead Alternates (Game & Puzzle Design 1(2), 2015), Table 2; computable mirror and pruned search of catch_up_value_aux)
Verified
06 Oct 2026
Axioms
propext
Built on 5
  • CatchUpOutcomeThe three possible outcomes of a game of Catch-Up, from the point of view of a fixed player: win, loss, draw.
  • CatchUpOutcome.bestGiven a list of outcomes, the best one for the player who chooses, under the order win > draw > loss (and loss if the list is empty).
  • catch_up_outcome_best_eq_winUnder Catch-Up's best-outcome aggregation on a list of outcomes, the aggregated outcome is a win if and only if a win appears in the list.
  • catch_up_outcome_best_eq_drawUnder Catch-Up's best-outcome aggregation on a list of outcomes, the aggregated outcome is a draw if and only if no win appears in the…
  • catch_up_outcome_best_eq_lossUnder Catch-Up's best-outcome aggregation on a list of outcomes, the aggregated outcome is a loss if and only if every outcome in the list…
Used by 1
  • catch_up_best_attach_map_congrIf F and G agree on every element of a list l of natural numbers, then the best outcome of F over the attached elements of l's finset…

Lean source view module on GitHub

/-- `best` is win if a win occurs, else draw if a draw occurs, else loss. -/theorem catch_up_outcome_best_eq_ite (os : List CatchUpOutcome) :    CatchUpOutcome.best os =      if CatchUpOutcome.win ∈ os then .win      else if CatchUpOutcome.draw ∈ os then .draw else .loss := by  by_cases hw : CatchUpOutcome.win ∈ os  · rw [if_pos hw]; exact (catch_up_outcome_best_eq_win os).2 hw  · rw [if_neg hw]    by_cases hd : CatchUpOutcome.draw ∈ os    · rw [if_pos hd]; exact (catch_up_outcome_best_eq_draw os).2 ⟨hw, hd⟩    · rw [if_neg hd]      refine (catch_up_outcome_best_eq_loss os).2 ?_      intro o ho      cases o      · exact absurd ho hw      · rfl      · exact absurd ho hd
See it in the graphDiscuss this resultChallenge it