AFTD Auto-Formalizing Theoretical Domains

op869_mem_extend_predecessors

theoremverified

Membership in a padded predecessor set is equivalent to original membership under the initial-segment embedding.

Statement

theorem op869_mem_extend_predecessors {n m : ℕ} (h : n ≤ m) (P : Fin n → Finset (Fin n)) (x y : Fin m) :
    x ∈ op869_extend_predecessors h P y ↔
    ∃ a b : Fin n, Fin.castLE h a = x ∧ Fin.castLE h b = y ∧ a ∈ P b
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_predecessorsExtend a predecessor presentation to a larger initial-segment universe, leaving added vertices isolated.
Used by 3

The proof, explained

The proof proceeds by case analysis on whether the target element y satisfies y < n. When y < n, the extended predecessor set is the image under the canonical embedding Fin.castLE of P(y), so membership is equivalent to the existence of original witnesses a ∈ P(b) with b = y. When y ≥ n, the extended predecessor set is empty and no element of Fin n can embed to y, so both sides are false.

  1. The equivalence reduces to two cases based on whether y < n.

    We unfold the definition of `op869_extend_predecessors`, which defines the extended predecessor set by cases: if the value of y is strictly less than n, it is the image of P(y) under the embedding from `Fin n` to `Fin m`; otherwise, it is the empty set. We split into these two cases, introducing the hypothesis `hy : y.val < n` in the first branch.

    lines 5–7

      classical
      unfold op869_extend_predecessors
      split_ifs with hy
  2. When y < n, membership in the extended predecessor set implies the existence of embedding witnesses.

    Using `Finset.mem_map`, membership of x in the mapped set means there is an element a ∈ P ⟨y.val, hy⟩ whose embedding equals x. Setting a as the first witness and b = ⟨y.val, hy⟩ ∈ Fin n as the second witness satisfies all required conditions: a maps to x, b maps to y (which holds by definition), and a ∈ P b.

    lines 8–11

    uses Finset.mem_map

      · simp only [Finset.mem_map]
        constructor
        · rintro ⟨a, ha, hax⟩
          exact ⟨a, ⟨y.val, hy⟩, hax, by ext; rfl, ha⟩
  3. When y < n, the existence of embedding witnesses implies membership in the extended predecessor set.

    Suppose there exist a, b : Fin n such that a embeds to x, b embeds to y, and a ∈ P b. Extracting values from the equality Fin.castLE h b = y via `congrArg` gives that b and ⟨y.val, hy⟩ have the same natural number value. By `Fin.ext`, they are equal as elements of Fin n. Substituting b = ⟨y.val, hy⟩ into a ∈ P b shows that a witnesses the membership of x in the mapped set.

    lines 12–17

    uses Fin.ext, congrArg

        · rintro ⟨a, b, hax, hby, hab⟩
          have hb : b = ⟨y.val, hy⟩ := by
            apply Fin.ext
            exact congrArg (fun z : Fin m => z.val) hby
          subst b
          exact ⟨a, hab, hax⟩
  4. When y ≥ n, neither side of the equivalence can hold.

    When y ≥ n, the predecessor set is empty, so x ∈ ∅ is false by `Finset.notMem_empty`. Via `false_iff`, the goal reduces to showing that no witnesses a, b can exist. If such witnesses existed, then Fin.castLE h b = y would imply that y.val = b.val < n (since b ∈ Fin n), directly contradicting the assumption y ≥ n (hy).

    lines 18–23

    uses Finset.notMem_empty, false_iff

      · simp only [Finset.notMem_empty, false_iff]
        rintro ⟨a, b, hax, hby, hab⟩
        have : y.val < n := by
          rw [← hby]
          exact b.isLt
        exact hy this
Finset.mem_map
An element belongs to the image of a set under an embedding if and only if it is the image of some element in the original set.
Fin.ext
Two elements of a finite type `Fin n` are equal if and only if their underlying natural number values are equal.
congrArg
Applying a function to equal arguments yields equal results: if a₁ = a₂, then f a₁ = f a₂.
Finset.notMem_empty
The empty set contains no elements.
false_iff
An equivalence False ↔ p is equivalent to ¬p.

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

/-- Membership in a padded predecessor set is equivalent to original membership under the initial-segment embedding. -/theorem op869_mem_extend_predecessors {n m : ℕ} (h : n ≤ m) (P : Fin n → Finset (Fin n)) (x y : Fin m) :    x ∈ op869_extend_predecessors h P y ↔    ∃ a b : Fin n, Fin.castLE h a = x ∧ Fin.castLE h b = y ∧ a ∈ P b := by  classical  unfold op869_extend_predecessors  split_ifs with hy  · simp only [Finset.mem_map]    constructor    · rintro ⟨a, ha, hax⟩      exact ⟨a, ⟨y.val, hy⟩, hax, by ext; rfl, ha⟩    · rintro ⟨a, b, hax, hby, hab⟩      have hb : b = ⟨y.val, hy⟩ := by        apply Fin.ext        exact congrArg (fun z : Fin m => z.val) hby      subst b      exact ⟨a, hab, hax⟩  · simp only [Finset.notMem_empty, false_iff]    rintro ⟨a, b, hax, hby, hab⟩    have : y.val < n := by      rw [← hby]      exact b.isLt    exact hy this
See it in the graphDiscuss this resultChallenge it