AFTD Auto-Formalizing Theoretical Domains

induced_subgraph_barrier_lift

theoremverified

A barrier in an induced graph maps to an ambient barrier of the same size, preserving the odd-component count after deletion.

Statement

theorem induced_subgraph_barrier_lift
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (R : Finset V)
    (Y : Finset {v : V | v ∈ R}) :
    ∃ X : Finset V, X ⊆ R ∧ X.card = Y.card ∧
      ((G.induce {v | v ∈ R}).induce {v | v ∉ Y}).oddComponents.ncard =
        (G.induce {v | v ∈ R ∧ v ∉ X}).oddComponents.ncard
Source
Balanced-cut k=7 reduction for OP-1957; https://arxiv.org/abs/2611.22690.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

The proof, explained

To lift a subset $Y$ of vertices from the induced subgraph $G[R]$ to the ambient graph $G$, we define $X$ as the image of $Y$ under the canonical inclusion of $R$ into $V$. The injectivity of the inclusion guarantees that $X \subseteq R$ and $|X| = |Y|$. We then construct an explicit graph isomorphism between the twice-induced graph $(G[R])[R \setminus Y]$ and $G[R \setminus X]$, which preserves the number of odd connected components.

  1. Define the ambient set $X$ as the image of $Y$ in $V$, and show that $X \subseteq R$ and $|X| = |Y|$.

    We define $X \subseteq V$ to be the set of underlying vertices of $Y$ under the canonical inclusion `Subtype.val`. For every $v \in X$, there is some $w \in Y$ whose underlying vertex is $v$ (`Finset.mem_image.mp`), and since $w \in R$, we have $v \in R$, so $X \subseteq R$. Because `Subtype.val` is injective (`Subtype.val_injective`), the cardinality of the image $X$ equals $|Y|$ (`Finset.card_image_of_injective`).

    lines 7–14

    uses Finset.mem_image.mp, Finset.card_image_of_injective, Subtype.val_injective

      set_option maxHeartbeats 4000000 in
        classical
        let X : Finset V := Y.image Subtype.val
        have hXsub : X ⊆ R := by
          intro v hv
          obtain ⟨w,hw,rfl⟩ := Finset.mem_image.mp hv
          exact w.property
        have hXcard : X.card = Y.card := Finset.card_image_of_injective _ Subtype.val_injective
  2. A vertex in $R$ belongs to $Y$ if and only if its underlying vertex in $V$ belongs to $X$.

    For any vertex $z \in R$, if $z \in Y$, then by definition its underlying value lies in the image $X$ (`Finset.mem_image.mpr`). Conversely, if the underlying value of $z$ lies in $X$, it must be the value of some $w \in Y$ (`Finset.mem_image.mp`). By subtype extensionality (`Subtype.ext`), $w = z$, hence $z \in Y$.

    lines 15–23

    uses Finset.mem_image.mpr, Finset.mem_image.mp, Subtype.ext

        have hmem : ∀ z : {v : V | v ∈ R}, z ∈ Y ↔ z.val ∈ X := by
          intro z
          constructor
          · intro hz
            exact Finset.mem_image.mpr ⟨z,hz,rfl⟩
          · intro hz
            obtain ⟨w,hw,he⟩ := Finset.mem_image.mp hz
            have he' : w=z := Subtype.ext he
            simpa [he'] using hw
  3. The twice-induced subgraph $(G[R])[R \setminus Y]$ is isomorphic to the induced subgraph $G[R \setminus X]$.

    We construct a graph isomorphism $e$. A vertex in $(G[R])[R \setminus Y]$ consists of a vertex $v \in V$ with proofs that $v \in R$ and $v \notin Y$; by the previous membership equivalence, this is equivalent to $v \in R$ and $v \notin X$, which is the vertex type of $G[R \setminus X]$. The forward and inverse maps unpack and repack these conditions, and both composites are the identity by subtype extensionality (`Subtype.ext`). Adjacency is preserved definitionally because in both induced subgraphs, adjacency is inherited directly from $G$.

    lines 24–30

    uses Subtype.ext

        let e : ((G.induce {v | v ∈ R}).induce {v | v ∉ Y}) ≃g
            (G.induce {v | v ∈ R ∧ v ∉ X}) := {
          toFun := fun z => ⟨z.val.val,⟨z.val.property,fun hx => z.property ((hmem z.val).2 hx)⟩⟩
          invFun := fun z => ⟨⟨z.val,z.property.1⟩,fun hy => z.property.2 ((hmem ⟨z.val,z.property.1⟩).1 hy)⟩
          left_inv := by intro z; apply Subtype.ext; apply Subtype.ext; rfl
          right_inv := by intro z; apply Subtype.ext; rfl
          map_rel_iff' := by intro u v; rfl }
  4. The set $X$ satisfies all conditions of the theorem.

    We provide $X$ as the witness. The conditions $X \subseteq R$ and $|X| = |Y|$ were proved in the first step. The equality of the odd-component counts of $(G[R])[R \setminus Y]$ and $G[R \setminus X]$ follows from the graph isomorphism $e$ via `graph_iso_odd_components_card`.

    line 31

    uses graph_iso_odd_components_card

        exact ⟨X,hXsub,hXcard,graph_iso_odd_components_card _ _ e⟩
Finset.card_image_of_injective
The image of a finite set under an injective function has the same cardinality as the original set.
Finset.mem_image.mp
If an element belongs to the image of a finset under a function, then it is the image of some element in that finset.
Finset.mem_image.mpr
If an element is the image of some element of a finset, then it belongs to the image of that finset.
graph_iso_odd_components_card
An isomorphism between two finite graphs preserves the number of odd connected components.
Subtype.ext
Two elements of a subtype are equal if and only if their underlying values in the ambient type are equal.
Subtype.val_injective
The canonical projection from a subtype to its ambient type is injective.

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 induced_subgraph_barrier_lift    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (R : Finset V)    (Y : Finset {v : V | v ∈ R}) :    ∃ X : Finset V, X ⊆ R ∧ X.card = Y.card ∧      ((G.induce {v | v ∈ R}).induce {v | v ∉ Y}).oddComponents.ncard =        (G.induce {v | v ∈ R ∧ v ∉ X}).oddComponents.ncard := by  set_option maxHeartbeats 4000000 in    classical    let X : Finset V := Y.image Subtype.val    have hXsub : X ⊆ R := by      intro v hv      obtain ⟨w,hw,rfl⟩ := Finset.mem_image.mp hv      exact w.property    have hXcard : X.card = Y.card := Finset.card_image_of_injective _ Subtype.val_injective    have hmem : ∀ z : {v : V | v ∈ R}, z ∈ Y ↔ z.val ∈ X := by      intro z      constructor      · intro hz        exact Finset.mem_image.mpr ⟨z,hz,rfl⟩      · intro hz        obtain ⟨w,hw,he⟩ := Finset.mem_image.mp hz        have he' : w=z := Subtype.ext he        simpa [he'] using hw    let e : ((G.induce {v | v ∈ R}).induce {v | v ∉ Y}) ≃g        (G.induce {v | v ∈ R ∧ v ∉ X}) := {      toFun := fun z => ⟨z.val.val,⟨z.val.property,fun hx => z.property ((hmem z.val).2 hx)⟩⟩      invFun := fun z => ⟨⟨z.val,z.property.1⟩,fun hy => z.property.2 ((hmem ⟨z.val,z.property.1⟩).1 hy)⟩      left_inv := by intro z; apply Subtype.ext; apply Subtype.ext; rfl      right_inv := by intro z; apply Subtype.ext; rfl      map_rel_iff' := by intro u v; rfl }    exact ⟨X,hXsub,hXcard,graph_iso_odd_components_card _ _ e⟩
See it in the graphDiscuss this resultChallenge it