AFTD Auto-Formalizing Theoretical Domains

CatchUpOutcome.best

def

Given 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).

Statement

def CatchUpOutcome.best (os : List CatchUpOutcome) : CatchUpOutcome
Defined in
google-deepmind/formal-conjectures, FormalConjectures/Paper/CatchUpConjecture.lean (definitions copied verbatim, renamed to top-level AFTD names)
Verified
01 Oct 2026
Axioms
none listed
Built on 1
  • CatchUpOutcomeThe three possible outcomes of a game of Catch-Up, from the point of view of a fixed player: win, loss, draw.
Used by 13
  • catch_up_outcome_best_eq_iteThe 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.
  • catch_up_value_aux_first_move_eq_of_eq_scoresIn a Catch-Up position where player scores are equal, every pick ends the mover's turn, so the game value with isFirstMove = true equals…
  • catch_up_best_map_eq_win_iffThe best outcome over a mapped list is a win if and only if some element maps to a win.
  • 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…
  • 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…
  • catch_up_value_aux_zero_zeroFor any nonempty set S of pieces, the auxiliary Catch-Up value from scores (0, 0) is the best outcome among all opening moves x ∈ S.
  • catch_up_best_map_ne_loss_iffThe best outcome over a mapped list is not a loss if and only if some element maps to something other than a loss.
  • catch_up_value_aux_singletonIn a Catch-Up position with a single remaining piece x, current score s_me, and opponent score s_opp, the game value for the mover is win…
  • catch_up_eval_listA computable mirror of catch_up_value_aux: the same Catch-Up recursion on a list of the remaining numbers, by structural recursion on a…
  • 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_value_auxThe game value of a Catch-Up position for the player about to move. If nothing remains, compare scores. If even all remaining numbers…
  • 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_value_aux_add_scoresIn Catch-Up, adding a constant c to both the mover's and the opponent's score leaves the game value unchanged, because only score…

Lean source view module on GitHub

/-- The best outcome in a list for the player choosing among them, ordering win > draw > loss; `loss` for the empty list. -/
def CatchUpOutcome.best (os : List CatchUpOutcome) : CatchUpOutcome :=
  os.foldl (fun
    | .win,  _     => .win
    | _,     .win  => .win
    | .draw, _     => .draw
    | _,     .draw => .draw
    | _,     _     => .loss) .loss
See it in the graphDiscuss this resultChallenge it