AFTD Auto-Formalizing Theoretical Domains

op869_extend_color_prefix

theoremverified

Before the original vertex bound, padding leaves the set of colors in each prefix unchanged.

Statement

theorem op869_extend_color_prefix {n m : ℕ} (h : n ≤ m) (C : Fin n → Finset ℕ) (i : ℕ) (hi : i < n) :
    ((Finset.univ.filter (fun a : Fin m => a.val ≤ i)).biUnion (op869_extend_colors h C)) =
      (Finset.univ.filter (fun a : Fin n => a.val ≤ i)).biUnion C
Source
Padding and monotonicity for the finite adversary game of arXiv:2610.41516 Section 2.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • op869_extend_colorsExtend color histories to a larger vertex universe by assigning no colors to new vertices.
Used by 1
  • op869_bounded_vertex_paddingFor a positive colorability bound, a bounded adversary winning position remains winning after padding its entire graph and color history…

The proof, explained

The theorem establishes that extending a coloring from Fin n to Fin m (where n ≤ m) by assigning the empty set to all new vertices does not change the union of colors in any prefix of vertices up to i, provided i < n. By set extensionality, a color belongs to the extended prefix union if and only if it belongs to the original prefix union: any extended vertex with index at most i is strictly less than n, so its assigned color set is unchanged from C, and conversely any original vertex embeds into Fin m with the same index and same color set.

  1. To show the two sets of colors are equal, it suffices to show that a color c belongs to the prefix union under the extended coloring if and only if it belongs to the prefix union under the original coloring.

    By set extensionality (ext c), two finsets are equal if they contain the same elements. Expanding membership in a union over a filtered finset using Finset.mem_biUnion, Finset.mem_filter, and Finset.mem_univ simplifies membership in each union to the condition that there exists an index bounded by i whose color set contains c. We then split the equivalence into forward and backward implications.

    lines 5–8

    uses Finset.mem_biUnion, Finset.mem_filter, Finset.mem_univ, true_and

      classical
      ext c
      simp only [Finset.mem_biUnion, Finset.mem_filter, Finset.mem_univ, true_and]
      constructor
  2. Any color present in the prefix union up to i of the extended coloring is present in the prefix union of the original coloring.

    Suppose c belongs to the extended color set of some vertex a ∈ Fin m with a ≤ i. Since a ≤ i and i < n, transitivity (lt_of_le_of_lt) gives a < n. Thus a defines a valid vertex in Fin n with index at most i. Unfolding the definition of op869_extend_colors under the condition a < n shows that its extended color set is simply C(a), so c ∈ C(a).

    lines 9–12

    uses lt_of_le_of_lt, op869_extend_colors

      · rintro ⟨a, ha, hc⟩
        have ha' : a.val < n := lt_of_le_of_lt ha hi
        refine ⟨⟨a.val, ha'⟩, ha, ?_⟩
        simpa [op869_extend_colors, ha'] using hc
  3. Any color present in the prefix union up to i of the original coloring is present in the prefix union of the extended coloring.

    Suppose c ∈ C(a) for some vertex a ∈ Fin n with a ≤ i. Casting a to Fin m via Fin.castLE preserves its value, so it remains bounded by i. Since a < n holds by definition of Fin n, op869_extend_colors evaluates to C(a) on this vertex, which contains c.

    lines 13–15

    uses Fin.castLE, op869_extend_colors

      · rintro ⟨a, ha, hc⟩
        refine ⟨Fin.castLE h a, ha, ?_⟩
        simpa [op869_extend_colors, a.isLt] using hc
Finset.mem_biUnion
An element b belongs to a union of sets ⋃_{a ∈ s} t(a) if and only if b ∈ t(a) for some a ∈ s.
Finset.mem_filter
An element a belongs to {x ∈ s | p x} if and only if a ∈ s and p a holds.
Finset.mem_univ
Every element of a finite type belongs to its universal finset Finset.univ.
true_and
True ∧ p is equivalent to p.
lt_of_le_of_lt
If a ≤ b and b < c, then a < c in any preorder.
op869_extend_colors
Extends a color assignment on Fin n to Fin m (for n ≤ m) by assigning C(v) when v < n, and the empty set otherwise.
Fin.castLE
Embeds an element of Fin n into Fin m given a proof that n ≤ m, preserving the underlying natural number.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Before the original vertex bound, padding leaves the set of colors in each prefix unchanged. -/theorem op869_extend_color_prefix {n m : ℕ} (h : n ≤ m) (C : Fin n → Finset ℕ) (i : ℕ) (hi : i < n) :    ((Finset.univ.filter (fun a : Fin m => a.val ≤ i)).biUnion (op869_extend_colors h C)) =      (Finset.univ.filter (fun a : Fin n => a.val ≤ i)).biUnion C := by  classical  ext c  simp only [Finset.mem_biUnion, Finset.mem_filter, Finset.mem_univ, true_and]  constructor  · rintro ⟨a, ha, hc⟩    have ha' : a.val < n := lt_of_le_of_lt ha hi    refine ⟨⟨a.val, ha'⟩, ha, ?_⟩    simpa [op869_extend_colors, ha'] using hc  · rintro ⟨a, ha, hc⟩    refine ⟨Fin.castLE h a, ha, ?_⟩    simpa [op869_extend_colors, a.isLt] using hc
See it in the graphDiscuss this resultChallenge it