AFTD Auto-Formalizing Theoretical Domains

op874_dense_gadgets_switch_lower_bound

theoremverified

If m dense vertex sets must each acquire two colors that are initially absent, and each recoloring step adds at most one such set-color occurrence, then a strong completion requires at least 2m steps.

Statement

theorem op874_dense_gadgets_switch_lower_bound
    {V E : Type*} [DecidableEq V] [Fintype E]
    (ends : E → Sym2 V) (hloop : ∀ e, ¬ (ends e).IsDiag)
    (hcubic : ∀ v, Set.ncard {e | v ∈ ends e} = 3)
    (m n : ℕ) (S : Fin m → Finset V) (c : ℕ → V → E → Fin 6)
    (h : V → E → Fin 6) (seen : ℕ → Finset (Fin m × Fin 2))
    (hseen : ∀ t i j, (i,j) ∈ seen t ↔
      ∃ v ∈ S i, ∃ e, v ∈ ends e ∧ c t v e = (if j = 0 then 2 else 5))
    (h0 : seen 0 = ∅)
    (hstep : ∀ t < n, ((seen (t+1)) \ (seen t)).card ≤ 1)
    (hdense : ∀ i, (S i).card < (Finset.univ.filter fun e : E =>
      ∃ u ∈ S i, ∃ v ∈ S i, ends e = s(u,v)).card)
    (hc : ∀ v e f, v ∈ ends e → v ∈ ends f → c n v e = c n v f → e = f)
    (hh : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e = h v f → e = f)
    (hch : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e ≠ c n v f)
    (hs : truncation_local_states_define_strong_coloring ends (c n) h) :
    2*m ≤ n
Source
OP-874: dense gadget obstruction to bounded component-switch repair, experiments 38459 and 38467.
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2

The proof, explained

To show that reaching a strong coloring on the truncation requires at least 2m steps, we track the set of pairs (i, j) in Fin m × Fin 2 where gadget S(i) has seen color 2 (if j = 0) or color 5 (if j = 1). Since this tracking set starts empty and gains at most one element per recoloring step, reaching all 2m pairs requires at least 2m steps. Finally, in any valid strong coloring of the cubic multigraph truncation, an edge-counting bound implies that each dense gadget must see all six colors on its incident edges, so all 2m targets are indeed acquired by the final step.

  1. By induction on n, any sequence of finite sets starting empty and gaining at most one element per step satisfies |S(n)| ≤ n.

    For the base case n = 0, S(0) is empty, so its cardinality is 0 ≤ 0. For the inductive step, the induction hypothesis gives |S(n)| ≤ n, and by assumption at most one element is added from step n to n + 1, so |S(n+1) \ S(n)| ≤ 1. Using Finset.card_le_card_sdiff_add_card, the size of S(n+1) is at most |S(n+1) \ S(n)| + |S(n)| ≤ 1 + n = n + 1, which closes by linear arithmetic.

    lines 5–11

    uses Finset.card_le_card_sdiff_add_card

      induction n with
      | zero => simp [h0]
      | succ n ih =>
        have hi : (S n).card ≤ n := ih (fun i hi => hstep i (by omega))
        have hs := hstep n (by omega)
        have hc := Finset.card_le_card_sdiff_add_card (s := S (n+1)) (t := S n)
        omega
  2. Reaching all 2m elements of Fin m × Fin 2 from an empty set with unit-step growth requires at least 2m steps.

    Applying op874ds_progress_card_le shows that |S(n)| ≤ n. Since S(n) is the entire universe Fin m × Fin 2, its cardinality is m * 2 = 2 * m by Fintype.card_prod and commutativity of multiplication (Nat.mul_comm), yielding 2 * m ≤ n.

    lines 18–20

    uses op874ds_progress_card_le, Fintype.card_prod, Nat.mul_comm

      have h := op874ds_progress_card_le S n h0 hstep
      rw [hfinal] at h
      simpa [Fintype.card_prod, Nat.mul_comm] using h
  3. In any valid strong truncation coloring, every dense vertex set S must see every color a on some incident edge.

    Assume for contradiction that no vertex in S sees color a on an incident edge. Then every edge incident to S has color distinct from a. By strong_truncation_missing_color_edge_bound, the number of internal edges spanned by S is at most |S|. However, the density hypothesis hdense states that S contains strictly more internal edges than vertices. By Nat.not_lt_of_ge, these two inequalities contradict each other.

    lines 37–45

    uses strong_truncation_missing_color_edge_bound, Nat.not_lt_of_ge

      classical
      by_contra hn
      have hS : ∀ v ∈ S, ∀ e, v ∈ ends e → c v e ≠ a := by
        intro v hv e he heq
        exact hn ⟨v,hv,e,he,heq⟩
      have bound := strong_truncation_missing_color_edge_bound
        hΩ ends hloop hcubic c h hc hh hch hs a S hS
      apply (Nat.not_lt_of_ge bound)
      convert hdense using 1 <;> congr 1 <;> ext x <;> simp
  4. To establish the lower bound 2 * m ≤ n, it suffices to show that every target pair is seen by step n, so seen(n) = Finset.univ.

    The set sequence seen starts empty at step 0 and adds at most one pair at each recoloring step. By op874ds_two_targets, if seen(n) contains all pairs in Fin m × Fin 2, then 2 * m ≤ n follows immediately.

    lines 64–65

    uses op874ds_two_targets

      classical
      apply op874ds_two_targets m n seen h0 hstep
  5. Every target pair (i, j) belongs to seen(n), completing the proof.

    By Finset.eq_univ_iff_forall.mpr, seen(n) = Finset.univ provided every pair (i, j) is in seen(n). By the characterization of seen, (i, j) ∈ seen(n) means gadget S(i) sees color 2 (if j = 0) or color 5 (if j = 1) at step n. Since the coloring at step n defines a strong truncation coloring and each S(i) is dense, op874ds_dense_sees_color guarantees the existence of an incident edge with the required color.

    lines 66–71

    uses Finset.eq_univ_iff_forall.mpr, op874ds_dense_sees_color

      apply Finset.eq_univ_iff_forall.mpr
      rintro ⟨i,j⟩
      apply (hseen n i j).2
      exact op874ds_dense_sees_color
        (by decide : Fintype.card (Fin 6)=6) ends hloop hcubic (c n) h hc hh hch hs
        (if j=0 then 2 else 5) (S i) (hdense i)
Finset.card_le_card_sdiff_add_card
For any finite sets s and t, the cardinality of s is at most the cardinality of the difference s \ t plus the cardinality of t.
op874ds_progress_card_le
If a sequence of finite sets starts empty and grows by at most one element at each step, then after n steps its cardinality is at most n.
Fintype.card_prod
The cardinality of the Cartesian product of two finite types is the product of their cardinalities.
Nat.mul_comm
Multiplication of natural numbers is commutative: n * m = m * n.
strong_truncation_missing_color_edge_bound
In a cubic loopless multigraph with a strong truncation coloring using 6 colors, if color a is absent from all edges incident to a vertex set S, then the number of induced edges within S is at most |S|.
Nat.not_lt_of_ge
If b ≥ a, then b is not strictly less than a.
op874ds_two_targets
If a sequence of subsets of Fin m × Fin 2 starts empty, increases in cardinality by at most 1 at each step, and equals the full universe at step n, then 2 * m ≤ n.
Finset.eq_univ_iff_forall.mpr
A subset of a finite type is the universal set if and only if every element belongs to it.
op874ds_dense_sees_color
In a cubic loopless multigraph with a strong truncation coloring using 6 colors, every dense vertex set S (having strictly more internal edges than vertices) must see every color on at least one incident edge.

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

private theorem op874ds_progress_card_le {α : Type*} [DecidableEq α]    (S : ℕ → Finset α) (n : ℕ) (h0 : S 0 = ∅)    (hstep : ∀ i < n, ((S (i+1)) \ (S i)).card ≤ 1) :    (S n).card ≤ n := by  induction n with  | zero => simp [h0]  | succ n ih =>    have hi : (S n).card ≤ n := ih (fun i hi => hstep i (by omega))    have hs := hstep n (by omega)    have hc := Finset.card_le_card_sdiff_add_card (s := S (n+1)) (t := S n)    omegaprivate theorem op874ds_two_targets    (m n : ℕ) (S : ℕ → Finset (Fin m × Fin 2))    (h0 : S 0 = ∅)    (hstep : ∀ i < n, ((S (i+1)) \ (S i)).card ≤ 1)    (hfinal : S n = Finset.univ) : 2*m ≤ n := by  have h := op874ds_progress_card_le S n h0 hstep  rw [hfinal] at h  simpa [Fintype.card_prod, Nat.mul_comm] using hprivate theorem op874ds_dense_sees_color    {V E Ω : Type*} [DecidableEq V] [Fintype E] [Fintype Ω]    (hΩ : Fintype.card Ω = 6) (ends : E → Sym2 V)    (hloop : ∀ e, ¬ (ends e).IsDiag)    (hcubic : ∀ v, Set.ncard {e | v ∈ ends e} = 3)    (c h : V → E → Ω)    (hc : ∀ v e f, v ∈ ends e → v ∈ ends f → c v e = c v f → e = f)    (hh : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e = h v f → e = f)    (hch : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e ≠ c v f)    (hs : truncation_local_states_define_strong_coloring ends c h)    (a : Ω) (S : Finset V)    (hdense : S.card < (Finset.univ.filter fun e : E =>      ∃ u ∈ S, ∃ v ∈ S, ends e = s(u,v)).card) :    ∃ v ∈ S, ∃ e, v ∈ ends e ∧ c v e = a := by  classical  by_contra hn  have hS : ∀ v ∈ S, ∀ e, v ∈ ends e → c v e ≠ a := by    intro v hv e he heq    exact hn ⟨v,hv,e,he,heq⟩  have bound := strong_truncation_missing_color_edge_bound    hΩ ends hloop hcubic c h hc hh hch hs a S hS  apply (Nat.not_lt_of_ge bound)  convert hdense using 1 <;> congr 1 <;> ext x <;> simptheorem op874_dense_gadgets_switch_lower_bound    {V E : Type*} [DecidableEq V] [Fintype E]    (ends : E → Sym2 V) (hloop : ∀ e, ¬ (ends e).IsDiag)    (hcubic : ∀ v, Set.ncard {e | v ∈ ends e} = 3)    (m n : ℕ) (S : Fin m → Finset V) (c : ℕ → V → E → Fin 6)    (h : V → E → Fin 6) (seen : ℕ → Finset (Fin m × Fin 2))    (hseen : ∀ t i j, (i,j) ∈ seen t ↔      ∃ v ∈ S i, ∃ e, v ∈ ends e ∧ c t v e = (if j = 0 then 2 else 5))    (h0 : seen 0 = ∅)    (hstep : ∀ t < n, ((seen (t+1)) \ (seen t)).card ≤ 1)    (hdense : ∀ i, (S i).card < (Finset.univ.filter fun e : E =>      ∃ u ∈ S i, ∃ v ∈ S i, ends e = s(u,v)).card)    (hc : ∀ v e f, v ∈ ends e → v ∈ ends f → c n v e = c n v f → e = f)    (hh : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e = h v f → e = f)    (hch : ∀ v e f, v ∈ ends e → v ∈ ends f → h v e ≠ c n v f)    (hs : truncation_local_states_define_strong_coloring ends (c n) h) :    2*m ≤ n := by  classical  apply op874ds_two_targets m n seen h0 hstep  apply Finset.eq_univ_iff_forall.mpr  rintro ⟨i,j⟩  apply (hseen n i j).2  exact op874ds_dense_sees_color    (by decide : Fintype.card (Fin 6)=6) ends hloop hcubic (c n) h hc hh hch hs    (if j=0 then 2 else 5) (S i) (hdense i)
See it in the graphDiscuss this resultChallenge it