AFTD Auto-Formalizing Theoretical Domains

op874_two_targets_per_gadget_need_two_switches

theoremverified

If two targets per gadget must be achieved and each step adds at most one new target, at least twice as many steps as gadgets are necessary.

Statement

theorem op874_two_targets_per_gadget_need_two_switches
    (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
Source
OP-874: dense gadget obstruction to bounded component-switch repair, experiment 38459.
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • op874_finset_progress_card_leA process that starts with an empty finite set and adds at most one element at each step has at most n elements after n steps.

The proof, explained

The proof bounds the total number of steps by comparing the number of required targets with the maximum progress achievable per step. A progress lemma shows that starting from the empty set and adding at most one element per step yields at most n elements after n steps. Since the target set at step n is the full product Fin(m) × Fin(2) of cardinality 2m, it follows that 2m ≤ n.

  1. |S(n)| ≤ n

    By `op874_finset_progress_card_le`, since the sequence starts empty (S(0) = ∅) and each step adds at most one new element, the cardinality of S(n) after n steps is at most n.

    line 6

    uses op874_finset_progress_card_le

      have h := op874_finset_progress_card_le S n h0 hstep
  2. 2 * m ≤ n

    Substituting the hypothesis hfinal (S(n) = Finset.univ) into the bound gives |Finset.univ| ≤ n. The universe of Fin(m) × Fin(2) has size |Fin(m)| * |Fin(2)| = m * 2 by `Fintype.card_prod`. Using commutativity of multiplication (`Nat.mul_comm`), this simplifies to 2 * m ≤ n, completing the proof.

    lines 7–8

    uses Fintype.card_prod, Nat.mul_comm

      rw [hfinal] at h
      simpa [Fintype.card_prod, Nat.mul_comm] using h
op874_finset_progress_card_le
If a sequence of finite sets starts empty and each step adds at most one new element, then after n steps the set contains at most n elements.
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.

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

theorem op874_two_targets_per_gadget_need_two_switches    (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 := op874_finset_progress_card_le S n h0 hstep  rw [hfinal] at h  simpa [Fintype.card_prod, Nat.mul_comm] using h
See it in the graphDiscuss this resultChallenge it