AFTD Auto-Formalizing Theoretical Domains

induced_component_ambient_vertex_properties

theoremverified

Components of an induced graph map injectively to disjoint, anticomplete ambient vertex sets with preserved cardinalities.

Statement

theorem induced_component_ambient_vertex_properties
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (R : Set V)
    (c d : (G.induce R).ConnectedComponent) :
    (in1206_component_vertices G R c : Set V) ⊆ R ∧
    (in1206_component_vertices G R c).card = c.supp.ncard ∧
    (c ≠ d → Disjoint (in1206_component_vertices G R c)
      (in1206_component_vertices G R d)) ∧
    (∀ u ∈ in1206_component_vertices G R c, ∀ v ∈ R,
      v ∉ in1206_component_vertices G R c → ¬ G.Adj u v)
Source
Component transfer for OP-1957; https://arxiv.org/abs/2611.22690.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • suppThe support $\mathrm{supp}(v) \subseteq \mathrm{Fin}\,n$ consists of coordinates where either component of $v$ is nonzero; the…
Used by 11

The proof, explained

The definition `in1206_component_vertices` embeds the vertices of a connected component of an induced subgraph $G[R]$ into the ambient vertex type $V$ via the canonical subtype inclusion. The theorem establishes that this embedding preserves essential component properties: ambient vertices lie in $R$; cardinality is preserved because the subtype inclusion is injective; distinct components map to disjoint subsets of $V$; and no edge exists in $G$ between a vertex in a component and an outside vertex of $R$, since any such edge would lie in $G[R]$ and force both endpoints into the same connected component.

  1. Construct `in1206_component_vertices G R c` as the finite set of ambient vertices representing component $c$.

    The support of component $c$ in the induced subgraph $G[R]$ is a set of subtype vertices $\{x : V \mid x \in R\}$. We convert this support into a `Finset` and push it forward into the ambient vertex type $V$ via the subtype inclusion `Subtype.val`, which is bundled with its injectivity proof (`Subtype.val_injective`).

    lines 4–5

    uses Subtype.val_injective

      classical
      exact c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩
  2. Every vertex in the ambient representation of a component $c$ of $G[R]$ belongs to $R$.

    We set $H = G[R]$ and split off the first conjunct. By definition, an ambient vertex $v$ in the image of component $c$ is the underlying value of some subtype element $u \in c.\text{supp}$ (unpacked using `Finset.mem_map.mp`). Because $u$ belongs to the subtype $\{x : V \mid x \in R\}$, its defining property ensures that $v = u.\text{val} \in R$.

    lines 16–22

    uses Finset.mem_map.mp

      classical
      let H := G.induce R
      constructor
      · intro v hv
        change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hv
        obtain ⟨u,_,rfl⟩ := Finset.mem_map.mp hv
        exact u.property
  3. The number of ambient vertices in component $c$ equals its cardinality in the induced subgraph.

    The ambient vertex set is obtained by mapping the component's support `c.supp.toFinset` under the subtype inclusion map `Subtype.val`. Because the inclusion is injective, `Finset.card_map` shows that mapping preserves the finite set's cardinality. Rewriting with `Set.ncard_eq_toFinset_card'` translates the cardinality of `c.supp.toFinset` to the set cardinality `c.supp.ncard`.

    lines 23–25

    uses Finset.card_map, Set.ncard_eq_toFinset_card'

      constructor
      · change (c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩).card = c.supp.ncard
        rw [Finset.card_map, ← Set.ncard_eq_toFinset_card']
  4. Distinct connected components of $G[R]$ map to disjoint subsets of ambient vertices.

    Assuming $c \neq d$, we establish disjointness using `Finset.disjoint_left.mpr` by showing no ambient vertex $v$ can belong to both sets. If $v$ belonged to both, it would be the image of some $u \in c.\text{supp}$ and some $w \in d.\text{supp}$ by `Finset.mem_map.mp`. Since both subtype elements have the same value $v$, they are identical ($u = w$) by subtype extensionality (`Subtype.ext`). Thus $u$ would lie in both $c.\text{supp}$ and $d.\text{supp}$ (via `Set.mem_toFinset.mp`), contradicting the fact that distinct connected components of $H = G[R]$ have disjoint supports (`SimpleGraph.pairwise_disjoint_supp_connectedComponent` via `Set.disjoint_left.mp`).

    lines 26–38

    uses Finset.disjoint_left.mpr, Finset.mem_map.mp, Subtype.ext, Set.mem_toFinset.mp, Set.disjoint_left.mp, SimpleGraph.pairwise_disjoint_supp_connectedComponent

      constructor
      · intro hcd
        apply Finset.disjoint_left.mpr
        intro v hvc hvd
        change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hvc
        change v ∈ d.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hvd
        obtain ⟨u,hu,huv⟩ := Finset.mem_map.mp hvc
        obtain ⟨w,hw,hwv⟩ := Finset.mem_map.mp hvd
        have huw : u = w := Subtype.ext (huv.trans hwv.symm)
        have huc : u ∈ c.supp := Set.mem_toFinset.mp hu
        have hwd : w ∈ d.supp := Set.mem_toFinset.mp hw
        exact Set.disjoint_left.mp (SimpleGraph.pairwise_disjoint_supp_connectedComponent H hcd)
          (huw ▸ huc) hwd
  5. There are no edges in $G$ between a vertex in component $c$ and any vertex in $R$ outside component $c$.

    Let $u$ be in the ambient vertex set of $c$ and $v \in R$ with $v$ not in the ambient set of $c$. Suppose for contradiction that $u$ and $v$ are adjacent in $G$. The vertex $u$ is the image of some $u' \in c.\text{supp}$ (via `Finset.mem_map.mp` and `Set.mem_toFinset.mp`). Viewing $v \in R$ as a subtype vertex $v' = \langle v, hv \rangle$, the edge $G.\text{Adj}\ u\ v$ between vertices in $R$ is by definition an adjacency in the induced subgraph $G[R]$. By `c.mem_supp_congr_adj`, adjacency in $G[R]$ implies that $v'$ belongs to $c.\text{supp}$ because $u'$ does. Mapping $v'$ back into the ambient graph via `Finset.mem_map.mpr` and `Set.mem_toFinset.mpr` places $v$ in the ambient vertex set of $c$, contradicting the assumption that $v$ was not in that set.

    lines 39–48

    uses Finset.mem_map.mp, Set.mem_toFinset.mp, c.mem_supp_congr_adj, Finset.mem_map.mpr, Set.mem_toFinset.mpr

      · intro u hu v hv hvnot huv
        change u ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hu
        obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu
        let v' : R := ⟨v,hv⟩
        have huC : u' ∈ c.supp := Set.mem_toFinset.mp hu'
        have hadj : (G.induce R).Adj u' v' := huv
        have hvC : v' ∈ c.supp := (c.mem_supp_congr_adj hadj).mp huC
        apply hvnot
        change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩
        exact Finset.mem_map.mpr ⟨v',Set.mem_toFinset.mpr hvC,rfl⟩
Subtype.val_injective
the canonical projection from a subtype to the ambient type is injective
Finset.mem_map.mp
an element is in the image of a finite set under an embedding if and only if it is the image of some element in the domain set
Finset.card_map
mapping a finite set under an injective function preserves its cardinality
Set.ncard_eq_toFinset_card'
the set cardinality (ncard) of a set with a finite instance equals the cardinality of its finset representation
Finset.disjoint_left.mpr
two finite sets are disjoint if no element of the first belongs to the second
Subtype.ext
two elements of a subtype are equal if their underlying values are equal
Set.mem_toFinset.mp
an element belongs to a set if it belongs to that set's finset representation
Set.disjoint_left.mp
if two sets are disjoint, an element of the first set cannot belong to the second set
SimpleGraph.pairwise_disjoint_supp_connectedComponent
the vertex supports of distinct connected components of a graph are pairwise disjoint
c.mem_supp_congr_adj
if two vertices in a graph are adjacent, one belongs to a connected component if and only if the other does
Finset.mem_map.mpr
the image of an element of a finite set under an embedding belongs to the mapped finite set
Set.mem_toFinset.mpr
an element belongs to the finset representation of a set if it belongs to the set

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

noncomputable def in1206_component_vertices    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (R : Set V)    (c : (G.induce R).ConnectedComponent) : Finset V := by  classical  exact c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩theorem induced_component_ambient_vertex_properties    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (R : Set V)    (c d : (G.induce R).ConnectedComponent) :    (in1206_component_vertices G R c : Set V) ⊆ R ∧    (in1206_component_vertices G R c).card = c.supp.ncard ∧    (c ≠ d → Disjoint (in1206_component_vertices G R c)      (in1206_component_vertices G R d)) ∧    (∀ u ∈ in1206_component_vertices G R c, ∀ v ∈ R,      v ∉ in1206_component_vertices G R c → ¬ G.Adj u v) := by  classical  let H := G.induce R  constructor  · intro v hv    change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hv    obtain ⟨u,_,rfl⟩ := Finset.mem_map.mp hv    exact u.property  constructor  · change (c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩).card = c.supp.ncard    rw [Finset.card_map, ← Set.ncard_eq_toFinset_card']  constructor  · intro hcd    apply Finset.disjoint_left.mpr    intro v hvc hvd    change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hvc    change v ∈ d.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hvd    obtain ⟨u,hu,huv⟩ := Finset.mem_map.mp hvc    obtain ⟨w,hw,hwv⟩ := Finset.mem_map.mp hvd    have huw : u = w := Subtype.ext (huv.trans hwv.symm)    have huc : u ∈ c.supp := Set.mem_toFinset.mp hu    have hwd : w ∈ d.supp := Set.mem_toFinset.mp hw    exact Set.disjoint_left.mp (SimpleGraph.pairwise_disjoint_supp_connectedComponent H hcd)      (huw ▸ huc) hwd  · intro u hu v hv hvnot huv    change u ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩ at hu    obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu    let v' : R := ⟨v,hv⟩    have huC : u' ∈ c.supp := Set.mem_toFinset.mp hu'    have hadj : (G.induce R).Adj u' v' := huv    have hvC : v' ∈ c.supp := (c.mem_supp_congr_adj hadj).mp huC    apply hvnot    change v ∈ c.supp.toFinset.map ⟨Subtype.val, Subtype.val_injective⟩    exact Finset.mem_map.mpr ⟨v',Set.mem_toFinset.mpr hvC,rfl⟩
See it in the graphDiscuss this resultChallenge it