Accumulating a list gives the prefix union
ProvedAPFPaper1.Ranks.extension_unionFor any type with decidable equality, finite prefix S, and list ds, sequential insertion yields S union the finite set of list entries.
import Definitions.Def_APFPaper1_Ranks import Mathlib.Tactic.Linarith import Mathlib.Tactic.Push open Classical set_option autoImplicit false open Classical
namespace APFPaper1.Ranks
open Foundation
theorem extension_union {D : Type*} [DecidableEq D] (S : Finset D) (ds : List D) :
extend S ds = S ∪ ds.toFinset := by sorry
end APFPaper1.RanksRead-back
What the Lean code literally says, in plain math · Codex (GPT-6)
For every type equipped with decidable equality, every finite set of elements of , and every finite ordered list of elements of , successively inserting the entries of into produces exactly . Here successive insertion is defined recursively: an empty list leaves unchanged, and for a list with first entry and remaining list , first insert into and then apply the same procedure to . The set of entries of discards their order and repetitions. No nonemptiness or distinctness is assumed: or may be empty, may be empty, entries may repeat, and entries may already belong to .