AFTD Auto-Formalizing Theoretical Domains

catch_up_toFinset_erase

theoremverified

For a list l of natural numbers without duplicates, erasing a from the finset of l is the finset of l with a erased.

Statement

theorem catch_up_toFinset_erase {l : List ℕ} (hl : l.Nodup) (a : ℕ) :
    l.toFinset.erase a = (l.erase a).toFinset
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
Classical.choiceQuot.soundpropext
Used by 1
  • catch_up_value_aux_eq_eval_listFor every fuel n, every duplicate-free list l of length at most n, and all scores and opening flags, the Catch-Up value of the finset of l…

Lean source view module on GitHub

/-- Erasing commutes with `toFinset` on a duplicate-free list. -/theorem catch_up_toFinset_erase {l : List ℕ} (hl : l.Nodup) (a : ℕ) :    l.toFinset.erase a = (l.erase a).toFinset := by  ext x  simp only [Finset.mem_erase, List.mem_toFinset, hl.mem_erase_iff]
See it in the graphDiscuss this resultChallenge it