The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Subgraph

289 declarations. Mathlib docs · Source

Subgraphs of a simple graph

A subgraph of a simple graph consists of subsets of the graph's vertices and edges such that the endpoints of each edge are present in the vertex subset. The edge subset is formalized as a sub-relation of the adjacency relation of the simple graph.

Main definitions

  • Subgraph G is the type of subgraphs of a G : SimpleGraph V.

  • Subgraph.neighborSet, Subgraph.incidenceSet, and Subgraph.degree are like their SimpleGraph counterparts, but they refer to vertices from G to avoid subtype coercions.

  • Subgraph.coe is the coercion from a G' : Subgraph G to a SimpleGraph G'.verts. (In Lean 3 this could not be a Coe instance since the destination type depends on G'.)

  • Subgraph.IsSpanning for whether a subgraph is a spanning subgraph and Subgraph.IsInduced for whether a subgraph is an induced subgraph.

  • Instances for DistribLattice G.Subgraph and BoundedOrder (Subgraph G).

  • SimpleGraph.toSubgraph: If a SimpleGraph is a subgraph of another, then you can turn it into a member of the larger graph's SimpleGraph.Subgraph type.

  • Graph homomorphisms from a subgraph to a graph (Subgraph.map_top) and between subgraphs (Subgraph.map).

Implementation notes

  • Recall that subgraphs are not determined by their vertex sets, so SetLike does not apply to this kind of subobject.

TODO

  • Images of graph homomorphisms as subgraphs.

Properties of singletonSubgraph and subgraphOfAdj

Subgraphs of subgraphs

Edge deletion

Induced subgraphs

def SimpleGraph.Subgraph.ctorIdx E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → ℕ

theorem SimpleGraph.Subgraph.mk.injEq E0 #

∀ {V : Type u} {G : SimpleGraph V} (verts : Set V) (Adj : V → V → Prop) (adj_sub : ∀ {v w : V}, Adj v w → G.Adj v w)
  (edge_vert : ∀ {v w : V}, Adj v w → v ∈ verts) (symm : autoParam (Std.Symm Adj) SimpleGraph.Subgraph.symm._autoParam)
  (verts_1 : Set V) (Adj_1 : V → V → Prop) (adj_sub_1 : ∀ {v w : V}, Adj_1 v w → G.Adj v w)
  (edge_vert_1 : ∀ {v w : V}, Adj_1 v w → v ∈ verts_1)
  (symm_1 : autoParam (Std.Symm Adj_1) SimpleGraph.Subgraph.symm._autoParam),
  ({ verts := verts, Adj := Adj, adj_sub := adj_sub, edge_vert := edge_vert, symm := symm } =
      { verts := verts_1, Adj := Adj_1, adj_sub := adj_sub_1, edge_vert := edge_vert_1, symm := symm_1 }) =
    (verts = verts_1 ∧ Adj = Adj_1)

theorem SimpleGraph.toSubgraph.congr_simp E1 #

∀ {V : Type u} {G : SimpleGraph V} (H H_1 : SimpleGraph V) (e_H : H = H_1) (h : H ≤ G),
  SimpleGraph.toSubgraph H h = SimpleGraph.toSubgraph H_1 ⋯

theorem SimpleGraph.Subgraph.mk.congr_simp E1 #

∀ {V : Type u} {G : SimpleGraph V} (verts verts_1 : Set V) (e_verts : verts = verts_1) (Adj Adj_1 : V → V → Prop)
  (e_Adj : Adj = Adj_1) (adj_sub : ∀ {v w : V}, Adj v w → G.Adj v w) (edge_vert : ∀ {v w : V}, Adj v w → v ∈ verts)
  (symm : Std.Symm Adj),
  { verts := verts, Adj := Adj, adj_sub := adj_sub, edge_vert := edge_vert, symm := symm } =
    { verts := verts_1, Adj := Adj_1, adj_sub := ⋯, edge_vert := ⋯, symm := ⋯ }

theorem SimpleGraph.Subgraph.mk.inj E1 #

∀ {V : Type u} {G : SimpleGraph V} {verts : Set V} {Adj : V → V → Prop} {adj_sub : ∀ {v w : V}, Adj v w → G.Adj v w}
  {edge_vert : ∀ {v w : V}, Adj v w → v ∈ verts} {symm : autoParam (Std.Symm Adj) SimpleGraph.Subgraph.symm._autoParam}
  {verts_1 : Set V} {Adj_1 : V → V → Prop} {adj_sub_1 : ∀ {v w : V}, Adj_1 v w → G.Adj v w}
  {edge_vert_1 : ∀ {v w : V}, Adj_1 v w → v ∈ verts_1}
  {symm_1 : autoParam (Std.Symm Adj_1) SimpleGraph.Subgraph.symm._autoParam},
  { verts := verts, Adj := Adj, adj_sub := adj_sub, edge_vert := edge_vert, symm := symm } =
      { verts := verts_1, Adj := Adj_1, adj_sub := adj_sub_1, edge_vert := edge_vert_1, symm := symm_1 } →
    verts = verts_1 ∧ Adj = Adj_1

theorem SimpleGraph.subgraphOfAdj.congr_simp E1 #

∀ {V : Type u} (G : SimpleGraph V) {v v_1 : V} (e_v : v = v_1) {w w_1 : V} (e_w : w = w_1) (hvw : G.Adj v w),
  G.subgraphOfAdj hvw = G.subgraphOfAdj ⋯

structure SimpleGraph.Subgraph E3 #

{V : Type u} → SimpleGraph V → Type u

A subgraph of a SimpleGraph is a subset of vertices along with a restriction of the adjacency relation that is symmetric and is supported by the vertex subset. They also form a bounded lattice.

Thinking of V → V → Prop as Set (V × V), a set of darts (i.e., half-edges), then Subgraph.adj_sub is that the darts of a subgraph are a subset of the darts of G.

theorem SimpleGraph.Subgraph.ext E1 #

∀ {V : Type u} {G : SimpleGraph V} {x y : G.Subgraph}, x.verts = y.verts → x.Adj = y.Adj → x = y

theorem SimpleGraph.Subgraph.ext_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {x y : G.Subgraph}, x = y ↔ x.verts = y.verts ∧ x.Adj = y.Adj

ctor SimpleGraph.Subgraph.mk E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    (verts : Set V) →
      (Adj : V → V → Prop) →
        (∀ {v w : V}, Adj v w → G.Adj v w) →
          (∀ {v w : V}, Adj v w → v ∈ verts) →
            autoParam (Std.Symm Adj) SimpleGraph.Subgraph.symm._autoParam → G.Subgraph

abbrev SimpleGraph.Subgraph.verts E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set V

Vertices of the subgraph

abbrev SimpleGraph.Subgraph.Adj E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → V → V → Prop

Edges of the subgraph

theorem SimpleGraph.Subgraph.adj_sub E1 #

∀ {V : Type u} {G : SimpleGraph V} (self : G.Subgraph) {v w : V}, self.Adj v w → G.Adj v w

theorem SimpleGraph.Subgraph.edge_vert E1 #

∀ {V : Type u} {G : SimpleGraph V} (self : G.Subgraph) {v w : V}, self.Adj v w → v ∈ self.verts

theorem SimpleGraph.Subgraph.symm E1 #

∀ {V : Type u} {G : SimpleGraph V} (self : G.Subgraph), Std.Symm self.Adj

def SimpleGraph.singletonSubgraph E1 #

{V : Type u} → (G : SimpleGraph V) → V → G.Subgraph

The one-vertex subgraph.

theorem SimpleGraph.singletonSubgraph_adj E0 #

∀ {V : Type u} (G : SimpleGraph V) (v a a_1 : V), (G.singletonSubgraph v).Adj a a_1 = ⊥ a a_1

theorem SimpleGraph.singletonSubgraph_verts E0 #

∀ {V : Type u} (G : SimpleGraph V) (v : V), (G.singletonSubgraph v).verts = {v}

def SimpleGraph.subgraphOfAdj E1 #

{V : Type u} → (G : SimpleGraph V) → {v w : V} → G.Adj v w → G.Subgraph

The one-edge subgraph.

theorem SimpleGraph.subgraphOfAdj_adj E0 #

∀ {V : Type u} (G : SimpleGraph V) {v w : V} (hvw : G.Adj v w) (a b : V),
  (G.subgraphOfAdj hvw).Adj a b = (s(v, w) = s(a, b))

theorem SimpleGraph.subgraphOfAdj_verts E0 #

∀ {V : Type u} (G : SimpleGraph V) {v w : V} (hvw : G.Adj v w), (G.subgraphOfAdj hvw).verts = {v, w}

theorem SimpleGraph.Subgraph.loopless E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), Std.Irrefl G'.Adj

theorem SimpleGraph.Subgraph.adj_comm E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v w : V), G'.Adj v w ↔ G'.Adj w v

theorem SimpleGraph.Subgraph.adj_symm E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) {u v : V}, G'.Adj u v → G'.Adj v u

theorem SimpleGraph.Subgraph.Adj.symm E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {u v : V}, G'.Adj u v → G'.Adj v u

theorem SimpleGraph.Subgraph.Adj.adj_sub E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v : V}, H.Adj u v → G.Adj u v

theorem SimpleGraph.Subgraph.Adj.fst_mem E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v : V}, H.Adj u v → u ∈ H.verts

theorem SimpleGraph.Subgraph.Adj.snd_mem E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v : V}, H.Adj u v → v ∈ H.verts

theorem SimpleGraph.Subgraph.Adj.ne E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v : V}, H.Adj u v → u ≠ v

theorem SimpleGraph.Subgraph.adj_congr_of_sym2 E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v w x : V}, s(u, v) = s(w, x) → (H.Adj u v ↔ H.Adj w x)

def SimpleGraph.Subgraph.coe E3 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → SimpleGraph ↑G'.verts

Coercion from G' : Subgraph G to a SimpleGraph G'.verts.

theorem SimpleGraph.Subgraph.coe_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v w : ↑G'.verts), G'.coe.Adj v w = G'.Adj ↑v ↑w

theorem SimpleGraph.Subgraph.Adj.adj_sub' E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (u v : ↑G'.verts), G'.Adj ↑u ↑v → G.Adj ↑u ↑v

theorem SimpleGraph.Subgraph.coe_adj_sub E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (u v : ↑G'.verts), G'.coe.Adj u v → G.Adj ↑u ↑v

theorem SimpleGraph.Subgraph.Adj.coe E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} {u v : V} (h : H.Adj u v), H.coe.Adj ⟨u, ⋯⟩ ⟨v, ⋯⟩

instance SimpleGraph.Subgraph.instDecidableRelElemVertsAdjCoeOfAdj E0 #

{V : Type u} → (G : SimpleGraph V) → (H : G.Subgraph) → [DecidableRel H.Adj] → DecidableRel H.coe.Adj

def SimpleGraph.Subgraph.IsSpanning E3 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Prop

A subgraph is called a spanning subgraph if it contains all the vertices of G.

theorem SimpleGraph.Subgraph.isSpanning_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.IsSpanning ↔ G'.verts = Set.univ

theorem SimpleGraph.Subgraph.IsSpanning.verts_eq_univ E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.IsSpanning → G'.verts = Set.univ

Alias of the forward direction of SimpleGraph.Subgraph.isSpanning_iff.

def SimpleGraph.Subgraph.spanningCoe E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → SimpleGraph V

Coercion from Subgraph G to SimpleGraph V. If G' is a spanning subgraph, then G'.spanningCoe yields an isomorphic graph. In general, this adds in all vertices from V as isolated vertices.

theorem SimpleGraph.Subgraph.spanningCoe_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (a a_1 : V), G'.spanningCoe.Adj a a_1 = G'.Adj a a_1

theorem SimpleGraph.Subgraph.spanningCoe_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G'.coe.spanningCoe = G'.spanningCoe

theorem SimpleGraph.Subgraph.Adj.of_spanningCoe E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {u v : ↑G'.verts}, G'.spanningCoe.Adj ↑u ↑v → G.Adj ↑u ↑v

theorem SimpleGraph.Subgraph.spanningCoe_le E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G'.spanningCoe ≤ G

theorem SimpleGraph.Subgraph.spanningCoe_inj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G₁ G₂ : G.Subgraph}, G₁.spanningCoe = G₂.spanningCoe ↔ G₁.Adj = G₂.Adj

theorem SimpleGraph.Subgraph.mem_of_adj_spanningCoe E0 #

∀ {V : Type u} {v w : V} {s : Set V} (G : SimpleGraph ↑s), G.spanningCoe.Adj v w → v ∈ s

theorem SimpleGraph.Subgraph.spanningCoe_subgraphOfAdj E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hadj : G.Adj v w),
  (G.subgraphOfAdj hadj).spanningCoe = SimpleGraph.fromEdgeSet {s(v, w)}

def SimpleGraph.Subgraph.coeEmbeddingSpanningCoe E1 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → G'.coe ↪g G'.spanningCoe

coe can be embedded in spanningCoe.

theorem SimpleGraph.Subgraph.coeEmbeddingSpanningCoe_apply E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (self : { x // x ∈ G'.verts }),
  G'.coeEmbeddingSpanningCoe self = ↑self

def SimpleGraph.Subgraph.spanningCoeEquivCoeOfSpanning E1 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → G'.IsSpanning → G'.spanningCoe ≃g G'.coe

spanningCoe is equivalent to coe for a subgraph that IsSpanning.

theorem SimpleGraph.Subgraph.spanningCoeEquivCoeOfSpanning_apply_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (h : G'.IsSpanning) (v : V),
  ↑((G'.spanningCoeEquivCoeOfSpanning h) v) = v

theorem SimpleGraph.Subgraph.spanningCoeEquivCoeOfSpanning_symm_apply E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (h : G'.IsSpanning) (v : ↑G'.verts),
  (RelIso.symm (G'.spanningCoeEquivCoeOfSpanning h)) v = ↑v

def SimpleGraph.Subgraph.IsInduced E3 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Prop

A subgraph is called an induced subgraph if vertices of G' are adjacent if they are adjacent in G.

theorem SimpleGraph.Subgraph.IsInduced.adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.IsInduced → ∀ {a b : ↑G'.verts}, G'.Adj ↑a ↑b ↔ G.Adj ↑a ↑b

def SimpleGraph.Subgraph.support E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set V

H.support is the set of vertices that form edges in the subgraph H.

theorem SimpleGraph.Subgraph.mem_support E0 #

∀ {V : Type u} {G : SimpleGraph V} (H : G.Subgraph) {v : V}, v ∈ H.support ↔ ∃ w, H.Adj v w

theorem SimpleGraph.Subgraph.support_subset_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} (H : G.Subgraph), H.support ⊆ H.verts

def SimpleGraph.Subgraph.neighborSet E3 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → V → Set V

G'.neighborSet v is the set of vertices adjacent to v in G'.

theorem SimpleGraph.Subgraph.neighborSet_subset E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V), G'.neighborSet v ⊆ G.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_subset_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V), G'.neighborSet v ⊆ G'.verts

theorem SimpleGraph.Subgraph.mem_neighborSet E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v w : V), w ∈ G'.neighborSet v ↔ G'.Adj v w

def SimpleGraph.Subgraph.coeNeighborSetEquiv E1 #

{V : Type u} →
  {G : SimpleGraph V} → {G' : G.Subgraph} → (v : ↑G'.verts) → ↑(G'.coe.neighborSet v) ≃ ↑(G'.neighborSet ↑v)

A subgraph as a graph has equivalent neighbor sets.

theorem SimpleGraph.Subgraph.image_neighborSet_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (v : ↑G'.verts),
  Subtype.val '' G'.coe.neighborSet v = G'.neighborSet ↑v

theorem SimpleGraph.Subgraph.neighborSet_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (v : ↑G'.verts),
  G'.coe.neighborSet v = Subtype.val ⁻¹' G'.neighborSet ↑v

theorem SimpleGraph.Subgraph.neighborSet_spanningCoe E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V), G'.spanningCoe.neighborSet v = G'.neighborSet v

def SimpleGraph.Subgraph.edgeSet E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set (Sym2 V)

The edge set of G' consists of a subset of edges of G.

theorem SimpleGraph.Subgraph.edgeSet_subset E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G'.edgeSet ⊆ G.edgeSet

theorem SimpleGraph.Subgraph.disjoint_edgeSet_diagSet E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), Disjoint G'.edgeSet Sym2.diagSet

theorem SimpleGraph.Subgraph.mem_edgeSet E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v w : V}, s(v, w) ∈ G'.edgeSet ↔ G'.Adj v w

theorem SimpleGraph.Subgraph.edgeSet_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.coe.edgeSet = Sym2.map Subtype.val ⁻¹' G'.edgeSet

theorem SimpleGraph.Subgraph.image_coe_edgeSet_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), Sym2.map Subtype.val '' G'.coe.edgeSet = G'.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_spanningCoe E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G'.spanningCoe.edgeSet = G'.edgeSet

theorem SimpleGraph.Subgraph.fromEdgeSet_edgeSet E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), SimpleGraph.fromEdgeSet G'.edgeSet = G'.spanningCoe

theorem SimpleGraph.Subgraph.mem_verts_of_mem_edge E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {e : Sym2 V} {v : V}, e ∈ G'.edgeSet → v ∈ e → v ∈ G'.verts

def SimpleGraph.Subgraph.incidenceSet E3 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → V → Set (Sym2 V)

The incidenceSet is the set of edges incident to a given vertex.

theorem SimpleGraph.Subgraph.incidenceSet_subset_incidenceSet E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V), G'.incidenceSet v ⊆ G.incidenceSet v

theorem SimpleGraph.Subgraph.incidenceSet_subset E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V), G'.incidenceSet v ⊆ G'.edgeSet

abbrev SimpleGraph.Subgraph.vert E1 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → (v : V) → v ∈ G'.verts → ↑G'.verts

Give a vertex as an element of the subgraph's vertex type.

def SimpleGraph.Subgraph.copy E1 #

{V : Type u} →
  {G : SimpleGraph V} →
    (G' : G.Subgraph) → (V'' : Set V) → V'' = G'.verts → (adj' : V → V → Prop) → adj' = G'.Adj → G.Subgraph

Create an equal copy of a subgraph (see copy_eq) with possibly different definitional equalities. See Note [range copy pattern].

theorem SimpleGraph.Subgraph.copy_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (V'' : Set V) (hV : V'' = G'.verts) (adj' : V → V → Prop)
  (hadj : adj' = G'.Adj), G'.copy V'' hV adj' hadj = G'

instance SimpleGraph.Subgraph.instMax E0 #

{V : Type u} → {G : SimpleGraph V} → Max G.Subgraph

The union of two subgraphs.

instance SimpleGraph.Subgraph.instMin E0 #

{V : Type u} → {G : SimpleGraph V} → Min G.Subgraph

The intersection of two subgraphs.

instance SimpleGraph.Subgraph.instTop E0 #

{V : Type u} → {G : SimpleGraph V} → Top G.Subgraph

The top subgraph is G as a subgraph of itself.

instance SimpleGraph.Subgraph.instBot E0 #

{V : Type u} → {G : SimpleGraph V} → Bot G.Subgraph

The bot subgraph is the subgraph with no vertices or edges.

instance SimpleGraph.Subgraph.instSupSet E0 #

{V : Type u} → {G : SimpleGraph V} → SupSet G.Subgraph

instance SimpleGraph.Subgraph.instInfSet E0 #

{V : Type u} → {G : SimpleGraph V} → InfSet G.Subgraph

theorem SimpleGraph.Subgraph.sup_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {G₁ G₂ : G.Subgraph} {a b : V}, (G₁ ⊔ G₂).Adj a b ↔ G₁.Adj a b ∨ G₂.Adj a b

theorem SimpleGraph.Subgraph.inf_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {G₁ G₂ : G.Subgraph} {a b : V}, (G₁ ⊓ G₂).Adj a b ↔ G₁.Adj a b ∧ G₂.Adj a b

theorem SimpleGraph.Subgraph.top_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {a b : V}, ⊤.Adj a b ↔ G.Adj a b

theorem SimpleGraph.Subgraph.not_bot_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {a b : V}, ¬⊥.Adj a b

theorem SimpleGraph.Subgraph.verts_sup E0 #

∀ {V : Type u} {G : SimpleGraph V} (G₁ G₂ : G.Subgraph), (G₁ ⊔ G₂).verts = G₁.verts ∪ G₂.verts

theorem SimpleGraph.Subgraph.verts_inf E0 #

∀ {V : Type u} {G : SimpleGraph V} (G₁ G₂ : G.Subgraph), (G₁ ⊓ G₂).verts = G₁.verts ∩ G₂.verts

theorem SimpleGraph.Subgraph.verts_top E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊤.verts = Set.univ

theorem SimpleGraph.Subgraph.verts_bot E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊥.verts = ∅

theorem SimpleGraph.Subgraph.ne_bot_iff_nonempty_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G' ≠ ⊥ ↔ G'.verts.Nonempty

theorem SimpleGraph.Subgraph.sSup_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {a b : V} {s : Set G.Subgraph}, (sSup s).Adj a b ↔ ∃ G_1 ∈ s, G_1.Adj a b

theorem SimpleGraph.Subgraph.sInf_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {a b : V} {s : Set G.Subgraph}, (sInf s).Adj a b ↔ (∀ G' ∈ s, G'.Adj a b) ∧ G.Adj a b

theorem SimpleGraph.Subgraph.iSup_adj E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} {a b : V} {f : ι → G.Subgraph},
  (⨆ i, f i).Adj a b ↔ ∃ i, (f i).Adj a b

theorem SimpleGraph.Subgraph.iInf_adj E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} {a b : V} {f : ι → G.Subgraph},
  (⨅ i, f i).Adj a b ↔ (∀ (i : ι), (f i).Adj a b) ∧ G.Adj a b

theorem SimpleGraph.Subgraph.sInf_adj_of_nonempty E1 #

∀ {V : Type u} {G : SimpleGraph V} {a b : V} {s : Set G.Subgraph},
  s.Nonempty → ((sInf s).Adj a b ↔ ∀ G' ∈ s, G'.Adj a b)

theorem SimpleGraph.Subgraph.iInf_adj_of_nonempty E1 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} {a b : V} [Nonempty ι] {f : ι → G.Subgraph},
  (⨅ i, f i).Adj a b ↔ ∀ (i : ι), (f i).Adj a b

theorem SimpleGraph.Subgraph.verts_sSup E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph), (sSup s).verts = ⋃ G' ∈ s, G'.verts

theorem SimpleGraph.Subgraph.verts_sInf E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph), (sInf s).verts = ⋂ G' ∈ s, G'.verts

theorem SimpleGraph.Subgraph.verts_iSup E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} {f : ι → G.Subgraph}, (⨆ i, f i).verts = ⋃ i, (f i).verts

theorem SimpleGraph.Subgraph.verts_iInf E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} {f : ι → G.Subgraph}, (⨅ i, f i).verts = ⋂ i, (f i).verts

theorem SimpleGraph.Subgraph.coe_bot E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊥.coe = ⊥

theorem SimpleGraph.Subgraph.IsInduced.top E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊤.IsInduced

def SimpleGraph.Subgraph.topIso E1 #

{V : Type u} → {G : SimpleGraph V} → ⊤.coe ≃g G

The graph isomorphism between the top element of G.subgraph and G.

theorem SimpleGraph.Subgraph.verts_spanningCoe_injective E1 #

∀ {V : Type u} {G : SimpleGraph V}, Function.Injective fun G' ↦ (G'.verts, G'.spanningCoe)

instance SimpleGraph.Subgraph.instPartialOrder E0 #

{V : Type u} → {G : SimpleGraph V} → PartialOrder G.Subgraph

For subgraphs G₁, G₂, G₁ ≤ G₂ iff G₁.verts ⊆ G₂.verts and ∀ a b, G₁.adj a b → G₂.adj a b.

instance SimpleGraph.Subgraph.distribLattice E0 #

{V : Type u} → {G : SimpleGraph V} → DistribLattice G.Subgraph

instance SimpleGraph.Subgraph.instBoundedOrder E0 #

{V : Type u} → {G : SimpleGraph V} → BoundedOrder G.Subgraph

instance SimpleGraph.Subgraph.instCompleteLattice E0 #

{V : Type u} → {G : SimpleGraph V} → CompleteLattice G.Subgraph

instance SimpleGraph.Subgraph.instCompletelyDistribLattice E0 #

{V : Type u} → {G : SimpleGraph V} → CompletelyDistribLattice G.Subgraph

Note that subgraphs do not form a Boolean algebra, because of verts.

theorem SimpleGraph.Subgraph.verts_mono E1 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph}, H ≤ H' → H.verts ⊆ H'.verts

theorem SimpleGraph.Subgraph.verts_monotone E1 #

∀ {V : Type u} {G : SimpleGraph V}, Monotone SimpleGraph.Subgraph.verts

instance SimpleGraph.Subgraph.subgraphInhabited E0 #

{V : Type u} → {G : SimpleGraph V} → Inhabited G.Subgraph

theorem SimpleGraph.Subgraph.subgraphInhabited_default E0 #

∀ {V : Type u} {G : SimpleGraph V}, default = ⊥

theorem SimpleGraph.Subgraph.neighborSet_sup E0 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph} (v : V),
  (H ⊔ H').neighborSet v = H.neighborSet v ∪ H'.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_inf E0 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph} (v : V),
  (H ⊓ H').neighborSet v = H.neighborSet v ∩ H'.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_top E0 #

∀ {V : Type u} {G : SimpleGraph V} (v : V), ⊤.neighborSet v = G.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_bot E0 #

∀ {V : Type u} {G : SimpleGraph V} (v : V), ⊥.neighborSet v = ∅

theorem SimpleGraph.Subgraph.neighborSet_sSup E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph) (v : V), (sSup s).neighborSet v = ⋃ G' ∈ s, G'.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_sInf E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph) (v : V),
  (sInf s).neighborSet v = (⋂ G' ∈ s, G'.neighborSet v) ∩ G.neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_iSup E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (f : ι → G.Subgraph) (v : V),
  (⨆ i, f i).neighborSet v = ⋃ i, (f i).neighborSet v

theorem SimpleGraph.Subgraph.neighborSet_iInf E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (f : ι → G.Subgraph) (v : V),
  (⨅ i, f i).neighborSet v = (⋂ i, (f i).neighborSet v) ∩ G.neighborSet v

theorem SimpleGraph.Subgraph.edgeSet_top E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊤.edgeSet = G.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_bot E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊥.edgeSet = ∅

theorem SimpleGraph.Subgraph.edgeSet_inf E0 #

∀ {V : Type u} {G : SimpleGraph V} {H₁ H₂ : G.Subgraph}, (H₁ ⊓ H₂).edgeSet = H₁.edgeSet ∩ H₂.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_sup E0 #

∀ {V : Type u} {G : SimpleGraph V} {H₁ H₂ : G.Subgraph}, (H₁ ⊔ H₂).edgeSet = H₁.edgeSet ∪ H₂.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_sSup E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph), (sSup s).edgeSet = ⋃ G' ∈ s, G'.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_sInf E0 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set G.Subgraph), (sInf s).edgeSet = (⋂ G' ∈ s, G'.edgeSet) ∩ G.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_iSup E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (f : ι → G.Subgraph), (⨆ i, f i).edgeSet = ⋃ i, (f i).edgeSet

theorem SimpleGraph.Subgraph.edgeSet_iInf E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (f : ι → G.Subgraph),
  (⨅ i, f i).edgeSet = (⋂ i, (f i).edgeSet) ∩ G.edgeSet

theorem SimpleGraph.Subgraph.spanningCoe_top E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊤.spanningCoe = G

theorem SimpleGraph.Subgraph.spanningCoe_bot E0 #

∀ {V : Type u} {G : SimpleGraph V}, ⊥.spanningCoe = ⊥

def SimpleGraph.toSubgraph E3 #

{V : Type u} → {G : SimpleGraph V} → (H : SimpleGraph V) → H ≤ G → G.Subgraph

Turn a subgraph of a SimpleGraph into a member of its subgraph type.

theorem SimpleGraph.toSubgraph_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} (H : SimpleGraph V) (h : H ≤ G) (a a_1 : V),
  (SimpleGraph.toSubgraph H h).Adj a a_1 = H.Adj a a_1

theorem SimpleGraph.toSubgraph_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} (H : SimpleGraph V) (h : H ≤ G), (SimpleGraph.toSubgraph H h).verts = Set.univ

theorem SimpleGraph.Subgraph.support_mono E1 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph}, H ≤ H' → H.support ⊆ H'.support

theorem SimpleGraph.toSubgraph.isSpanning E1 #

∀ {V : Type u} {G : SimpleGraph V} (H : SimpleGraph V) (h : H ≤ G), (SimpleGraph.toSubgraph H h).IsSpanning

theorem SimpleGraph.Subgraph.spanningCoe_le_of_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph}, H ≤ H' → H.spanningCoe ≤ H'.spanningCoe

theorem SimpleGraph.Subgraph.sup_spanningCoe E0 #

∀ {V : Type u} {G : SimpleGraph V} (H H' : G.Subgraph), (H ⊔ H').spanningCoe = H.spanningCoe ⊔ H'.spanningCoe

def SimpleGraph.Subgraph.botIso E1 #

{V : Type u} → {G : SimpleGraph V} → ⊥.coe ≃g SimpleGraph.emptyGraph Empty

The bottom of the Subgraph G lattice is isomorphic to the empty graph on the empty vertex type.

theorem SimpleGraph.Subgraph.edgeSet_mono E1 #

∀ {V : Type u} {G : SimpleGraph V} {H₁ H₂ : G.Subgraph}, H₁ ≤ H₂ → H₁.edgeSet ⊆ H₂.edgeSet

theorem SimpleGraph.Subgraph.edgeSet_monotone E1 #

∀ {V : Type u} {G : SimpleGraph V}, Monotone SimpleGraph.Subgraph.edgeSet

theorem Disjoint.edgeSet E1 #

∀ {V : Type u} {G : SimpleGraph V} {H₁ H₂ : G.Subgraph}, Disjoint H₁ H₂ → Disjoint H₁.edgeSet H₂.edgeSet

theorem SimpleGraph.Subgraph.disjoint_verts_iff_disjoint E0 #

∀ {V : Type u} {G : SimpleGraph V} {H H' : G.Subgraph}, Disjoint H.verts H'.verts ↔ Disjoint H H'

def SimpleGraph.Subgraph.map E3 #

{V : Type u} → {W : Type v} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G →g G' → G.Subgraph → G'.Subgraph

Graph homomorphisms induce a covariant function on subgraphs.

theorem SimpleGraph.Subgraph.map_verts E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph),
  (SimpleGraph.Subgraph.map f H).verts = ⇑f '' H.verts

theorem SimpleGraph.Subgraph.map_adj E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) (a a_1 : W),
  (SimpleGraph.Subgraph.map f H).Adj a a_1 = Relation.Map H.Adj (⇑f) (⇑f) a a_1

theorem SimpleGraph.Subgraph.map_id E0 #

∀ {V : Type u} {G : SimpleGraph V} (H : G.Subgraph), SimpleGraph.Subgraph.map SimpleGraph.Hom.id H = H

theorem SimpleGraph.Subgraph.map_comp E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} {U : Type u_2} {G'' : SimpleGraph U}
  (H : G.Subgraph) (f : G →g G') (g : G' →g G''),
  SimpleGraph.Subgraph.map (g.comp f) H = SimpleGraph.Subgraph.map g (SimpleGraph.Subgraph.map f H)

theorem SimpleGraph.Subgraph.map_mono E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} {f : G →g G'} {H₁ H₂ : G.Subgraph},
  H₁ ≤ H₂ → SimpleGraph.Subgraph.map f H₁ ≤ SimpleGraph.Subgraph.map f H₂

theorem SimpleGraph.Subgraph.map_monotone E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} {f : G →g G'},
  Monotone (SimpleGraph.Subgraph.map f)

theorem SimpleGraph.Subgraph.map_sup E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H₁ H₂ : G.Subgraph),
  SimpleGraph.Subgraph.map f (H₁ ⊔ H₂) = SimpleGraph.Subgraph.map f H₁ ⊔ SimpleGraph.Subgraph.map f H₂

theorem SimpleGraph.Subgraph.map_iso_top E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H), SimpleGraph.Subgraph.map e.toHom ⊤ = ⊤

theorem SimpleGraph.Subgraph.edgeSet_map E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph),
  (SimpleGraph.Subgraph.map f H).edgeSet = Sym2.map ⇑f '' H.edgeSet

theorem SimpleGraph.Subgraph.IsInduced.map E1 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} {H : G.Subgraph},
  H.IsInduced → ∀ (e : G ↪g G'), (SimpleGraph.Subgraph.map e.toHom H).IsInduced

theorem SimpleGraph.Subgraph.isInduced_map_iso E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (e : G ≃g G') {H : G.Subgraph},
  (SimpleGraph.Subgraph.map e.toHom H).IsInduced ↔ H.IsInduced

def SimpleGraph.Subgraph.comap E1 #

{V : Type u} → {W : Type v} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G →g G' → G'.Subgraph → G.Subgraph

Graph homomorphisms induce a contravariant function on subgraphs.

theorem SimpleGraph.Subgraph.comap_verts E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G'.Subgraph),
  (SimpleGraph.Subgraph.comap f H).verts = ⇑f ⁻¹' H.verts

theorem SimpleGraph.Subgraph.comap_adj E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G'.Subgraph) (u v : V),
  (SimpleGraph.Subgraph.comap f H).Adj u v = (G.Adj u v ∧ H.Adj (f u) (f v))

theorem SimpleGraph.Subgraph.comap_monotone E1 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'),
  Monotone (SimpleGraph.Subgraph.comap f)

theorem SimpleGraph.Subgraph.comap_equiv_top E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {H : SimpleGraph W} (f : G →g H), SimpleGraph.Subgraph.comap f ⊤ = ⊤

theorem SimpleGraph.Subgraph.map_le_iff_le_comap E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) (H' : G'.Subgraph),
  SimpleGraph.Subgraph.map f H ≤ H' ↔ H ≤ SimpleGraph.Subgraph.comap f H'

instance SimpleGraph.Subgraph.instFintypeOfDecidableEqOfDecidableRelAdj E0 #

{V : Type u} → {G : SimpleGraph V} → [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → Fintype G.Subgraph

instance SimpleGraph.Subgraph.instFinite E0 #

∀ {V : Type u} {G : SimpleGraph V} [Finite V], Finite G.Subgraph

def SimpleGraph.Subgraph.inclusion E1 #

{V : Type u} → {G : SimpleGraph V} → {x y : G.Subgraph} → x ≤ y → x.coe →g y.coe

Given two subgraphs, one a subgraph of the other, there is an induced injective homomorphism of the subgraphs as graphs.

theorem SimpleGraph.Subgraph.inclusion_apply_coe E0 #

∀ {V : Type u} {G : SimpleGraph V} {x y : G.Subgraph} (h : x ≤ y) (v : ↑x.verts),
  ↑((SimpleGraph.Subgraph.inclusion h) v) = ↑v

theorem SimpleGraph.Subgraph.inclusion.injective E1 #

∀ {V : Type u} {G : SimpleGraph V} {x y : G.Subgraph} (h : x ≤ y),
  Function.Injective ⇑(SimpleGraph.Subgraph.inclusion h)

def SimpleGraph.Subgraph.hom E1 #

{V : Type u} → {G : SimpleGraph V} → (x : G.Subgraph) → x.coe →g G

There is an induced injective homomorphism of a subgraph of G into G.

theorem SimpleGraph.Subgraph.hom_apply E0 #

∀ {V : Type u} {G : SimpleGraph V} (x : G.Subgraph) (v : ↑x.verts), x.hom v = ↑v

theorem SimpleGraph.Subgraph.coe_hom E0 #

∀ {V : Type u} {G : SimpleGraph V} (x : G.Subgraph), ⇑x.hom = fun v ↦ ↑v

theorem SimpleGraph.Subgraph.hom_injective E1 #

∀ {V : Type u} {G : SimpleGraph V} {x : G.Subgraph}, Function.Injective ⇑x.hom

theorem SimpleGraph.Subgraph.map_hom_top E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), SimpleGraph.Subgraph.map G'.hom ⊤ = G'

def SimpleGraph.Subgraph.spanningHom E1 #

{V : Type u} → {G : SimpleGraph V} → (x : G.Subgraph) → x.spanningCoe →g G

There is an induced injective homomorphism of a subgraph of G as a spanning subgraph into G.

theorem SimpleGraph.Subgraph.spanningHom_apply E0 #

∀ {V : Type u} {G : SimpleGraph V} (x : G.Subgraph) (a : V), x.spanningHom a = id a

theorem SimpleGraph.Subgraph.spanningHom_injective E1 #

∀ {V : Type u} {G : SimpleGraph V} {x : G.Subgraph}, Function.Injective ⇑x.spanningHom

theorem SimpleGraph.Subgraph.neighborSet_subset_of_subgraph E1 #

∀ {V : Type u} {G : SimpleGraph V} {x y : G.Subgraph}, x ≤ y → ∀ (v : V), x.neighborSet v ⊆ y.neighborSet v

instance SimpleGraph.Subgraph.neighborSet.decidablePred E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    (G' : G.Subgraph) → [h : DecidableRel G'.Adj] → (v : V) → DecidablePred fun x ↦ x ∈ G'.neighborSet v

instance SimpleGraph.Subgraph.finiteAt E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' : G.Subgraph} →
      (v : ↑G'.verts) → [DecidableRel G'.Adj] → [Fintype ↑(G.neighborSet ↑v)] → Fintype ↑(G'.neighborSet ↑v)

If a graph is locally finite at a vertex, then so is a subgraph of that graph.

def SimpleGraph.Subgraph.finiteAtOfSubgraph E1 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' G'' : G.Subgraph} →
      [DecidableRel G'.Adj] →
        G' ≤ G'' → (v : ↑G'.verts) → [Fintype ↑(G''.neighborSet ↑v)] → Fintype ↑(G'.neighborSet ↑v)

If a subgraph is locally finite at a vertex, then so are subgraphs of that subgraph.

This is not an instance because G'' cannot be inferred.

instance SimpleGraph.Subgraph.instFintypeElemNeighborSetOfVertsOfDecidablePredMemSet E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    (G' : G.Subgraph) →
      [Fintype ↑G'.verts] → (v : V) → [DecidablePred fun x ↦ x ∈ G'.neighborSet v] → Fintype ↑(G'.neighborSet v)

instance SimpleGraph.Subgraph.coeFiniteAt E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' : G.Subgraph} → (v : ↑G'.verts) → [Fintype ↑(G'.neighborSet ↑v)] → Fintype ↑(G'.coe.neighborSet v)

theorem SimpleGraph.Subgraph.IsSpanning.card_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} [inst : Fintype V] {G' : G.Subgraph} [inst_1 : Fintype ↑G'.verts],
  G'.IsSpanning → G'.verts.toFinset.card = Fintype.card V

def SimpleGraph.Subgraph.degree E3 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → (v : V) → [Fintype ↑(G'.neighborSet v)] → ℕ

The degree of a vertex in a subgraph. It's zero for vertices outside the subgraph.

theorem SimpleGraph.Subgraph.finset_card_neighborSet_eq_degree E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v : V} [inst : Fintype ↑(G'.neighborSet v)],
  (G'.neighborSet v).toFinset.card = G'.degree v

theorem SimpleGraph.Subgraph.degree_of_notMem_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v : V} [inst : Fintype ↑(G'.neighborSet v)],
  v ∉ G'.verts → G'.degree v = 0

theorem SimpleGraph.Subgraph.degree_le E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V) [inst : Fintype ↑(G'.neighborSet v)]
  [inst_1 : Fintype ↑(G.neighborSet v)], G'.degree v ≤ G.degree v

theorem SimpleGraph.Subgraph.degree_le' E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' G'' : G.Subgraph),
  G' ≤ G'' →
    ∀ (v : V) [inst : Fintype ↑(G'.neighborSet v)] [inst_1 : Fintype ↑(G''.neighborSet v)], G'.degree v ≤ G''.degree v

theorem SimpleGraph.Subgraph.coe_degree E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : ↑G'.verts) [inst : Fintype ↑(G'.coe.neighborSet v)]
  [inst_1 : Fintype ↑(G'.neighborSet ↑v)], G'.coe.degree v = G'.degree ↑v

theorem SimpleGraph.Subgraph.degree_spanningCoe E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (v : V) [inst : Fintype ↑(G'.neighborSet v)]
  [inst_1 : Fintype ↑(G'.spanningCoe.neighborSet v)], G'.spanningCoe.degree v = G'.degree v

theorem SimpleGraph.Subgraph.degree_pos_iff_exists_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v : V} [inst : Fintype ↑(G'.neighborSet v)],
  0 < G'.degree v ↔ ∃ w, G'.Adj v w

theorem SimpleGraph.Subgraph.degree_eq_zero_of_subsingleton E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (v : V) [inst : Fintype ↑(G'.neighborSet v)],
  G'.verts.Subsingleton → G'.degree v = 0

theorem SimpleGraph.Subgraph.degree_eq_one_iff_existsUnique_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v : V} [inst : Fintype ↑(G'.neighborSet v)],
  G'.degree v = 1 ↔ ∃! w, G'.Adj v w

theorem SimpleGraph.Subgraph.nontrivial_verts_of_degree_ne_zero E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {v : V} [inst : Fintype ↑(G'.neighborSet v)],
  G'.degree v ≠ 0 → Nontrivial ↑G'.verts

theorem SimpleGraph.Subgraph.neighborSet_eq_of_equiv E1 #

∀ {V : Type u} {G : SimpleGraph V} {v : V} {H : G.Subgraph} (h : ↑(G.neighborSet v) ≃ ↑(H.neighborSet v)),
  (G.neighborSet v).Finite → H.neighborSet v = G.neighborSet v

theorem SimpleGraph.Subgraph.adj_iff_of_neighborSet_equiv E1 #

∀ {V : Type u} {G : SimpleGraph V} {v : V} {H : G.Subgraph} (h : ↑(G.neighborSet v) ≃ ↑(H.neighborSet v)),
  (G.neighborSet v).Finite → ∀ {w : V}, H.Adj v w ↔ G.Adj v w

def SimpleGraph.Embedding.ofIsInduced E1 #

{V : Type u} → {G : SimpleGraph V} → (G' : G.Subgraph) → G'.IsInduced → G'.coe ↪g G

The canonical embedding of an induced subgraph into the ambient graph. Unlike Subgraph.hom, this is an embedding rather than a homomorphism, since induced subgraphs reflect adjacency.

theorem SimpleGraph.Embedding.toHom_ofIsInduced E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (hG' : G'.IsInduced),
  (SimpleGraph.Embedding.ofIsInduced G' hG').toHom = G'.hom

theorem SimpleGraph.Embedding.coe_ofIsInduced E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (hG' : G'.IsInduced),
  ⇑(SimpleGraph.Embedding.ofIsInduced G' hG') = Subtype.val

theorem SimpleGraph.Embedding.toEmbedding_ofIsInduced E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (hG' : G'.IsInduced),
  (SimpleGraph.Embedding.ofIsInduced G' hG').toEmbedding = Function.Embedding.subtype fun x ↦ x ∈ G'.verts

theorem SimpleGraph.card_neighborSet_toSubgraph E1 #

∀ {V : Type u} (G H : SimpleGraph V) (h : H ≤ G) (v : V) [inst : Fintype ↑((SimpleGraph.toSubgraph H h).neighborSet v)]
  [inst_1 : Fintype ↑(H.neighborSet v)], Fintype.card ↑((SimpleGraph.toSubgraph H h).neighborSet v) = H.degree v

theorem SimpleGraph.degree_toSubgraph E0 #

∀ {V : Type u} (G H : SimpleGraph V) (h : H ≤ G) {v : V} [inst : Fintype ↑((SimpleGraph.toSubgraph H h).neighborSet v)]
  [inst_1 : Fintype ↑(H.neighborSet v)], (SimpleGraph.toSubgraph H h).degree v = H.degree v

instance SimpleGraph.instUniqueElemVertsSingletonSubgraph E0 #

{V : Type u} → {G : SimpleGraph V} → (v : V) → Unique ↑(G.singletonSubgraph v).verts

theorem SimpleGraph.singletonSubgraph_le_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} (v : V) (H : G.Subgraph), G.singletonSubgraph v ≤ H ↔ v ∈ H.verts

theorem SimpleGraph.map_singletonSubgraph E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {v : V},
  SimpleGraph.Subgraph.map f (G.singletonSubgraph v) = G'.singletonSubgraph (f v)

theorem SimpleGraph.neighborSet_singletonSubgraph E0 #

∀ {V : Type u} {G : SimpleGraph V} (v w : V), (G.singletonSubgraph v).neighborSet w = ∅

theorem SimpleGraph.edgeSet_singletonSubgraph E0 #

∀ {V : Type u} {G : SimpleGraph V} (v : V), (G.singletonSubgraph v).edgeSet = ∅

instance SimpleGraph.nonempty_subgraphOfAdj_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), Nonempty ↑(G.subgraphOfAdj hvw).verts

theorem SimpleGraph.subgraphOfAdj_adj_self E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v), (G.subgraphOfAdj h).Adj u v

theorem SimpleGraph.edgeSet_subgraphOfAdj E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), (G.subgraphOfAdj hvw).edgeSet = {s(v, w)}

theorem SimpleGraph.subgraphOfAdj_le_of_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (H : G.Subgraph) (h : H.Adj v w), G.subgraphOfAdj ⋯ ≤ H

theorem SimpleGraph.subgraphOfAdj_le_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v) (H : G.Subgraph), G.subgraphOfAdj h ≤ H ↔ H.Adj u v

theorem SimpleGraph.subgraphOfAdj_symm E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), G.subgraphOfAdj ⋯ = G.subgraphOfAdj hvw

theorem SimpleGraph.map_subgraphOfAdj E0 #

∀ {V : Type u} {W : Type v} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {v w : V} (hvw : G.Adj v w),
  SimpleGraph.Subgraph.map f (G.subgraphOfAdj hvw) = G'.subgraphOfAdj ⋯

theorem SimpleGraph.neighborSet_subgraphOfAdj_subset E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (hvw : G.Adj v w), (G.subgraphOfAdj hvw).neighborSet u ⊆ {v, w}

theorem SimpleGraph.neighborSet_fst_subgraphOfAdj E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), (G.subgraphOfAdj hvw).neighborSet v = {w}

theorem SimpleGraph.neighborSet_snd_subgraphOfAdj E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), (G.subgraphOfAdj hvw).neighborSet w = {v}

theorem SimpleGraph.neighborSet_subgraphOfAdj_of_ne_of_ne E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (hvw : G.Adj v w),
  u ≠ v → u ≠ w → (G.subgraphOfAdj hvw).neighborSet u = ∅

theorem SimpleGraph.neighborSet_subgraphOfAdj E1 #

∀ {V : Type u} {G : SimpleGraph V} [inst : DecidableEq V] {u v w : V} (hvw : G.Adj v w),
  (G.subgraphOfAdj hvw).neighborSet u = (if u = v then {w} else ∅) ∪ if u = w then {v} else ∅

theorem SimpleGraph.singletonSubgraph_fst_le_subgraphOfAdj E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {h : G.Adj u v}, G.singletonSubgraph u ≤ G.subgraphOfAdj h

theorem SimpleGraph.singletonSubgraph_snd_le_subgraphOfAdj E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {h : G.Adj u v}, G.singletonSubgraph v ≤ G.subgraphOfAdj h

theorem SimpleGraph.support_subgraphOfAdj E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v), (G.subgraphOfAdj h).support = {u, v}

abbrev SimpleGraph.Subgraph.coeSubgraph E1 #

{V : Type u} → {G : SimpleGraph V} → {G' : G.Subgraph} → G'.coe.Subgraph → G.Subgraph

Given a subgraph of a subgraph of G, construct a subgraph of G.

abbrev SimpleGraph.Subgraph.restrict E1 #

{V : Type u} → {G : SimpleGraph V} → {G' : G.Subgraph} → G.Subgraph → G'.coe.Subgraph

Given a subgraph of G, restrict it to being a subgraph of another subgraph G' by taking the portion of G that intersects G'.

theorem SimpleGraph.Subgraph.verts_coeSubgraph E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (G'' : G'.coe.Subgraph),
  (SimpleGraph.Subgraph.coeSubgraph G'').verts = Subtype.val '' G''.verts

theorem SimpleGraph.Subgraph.coeSubgraph_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (G'' : G'.coe.Subgraph) (v w : V),
  (SimpleGraph.Subgraph.coeSubgraph G'').Adj v w ↔ ∃ (hv : v ∈ G'.verts) (hw : w ∈ G'.verts), G''.Adj ⟨v, hv⟩ ⟨w, hw⟩

theorem SimpleGraph.Subgraph.restrict_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' G'' : G.Subgraph} (v w : ↑G'.verts),
  (SimpleGraph.Subgraph.restrict G'').Adj v w ↔ G'.Adj ↑v ↑w ∧ G''.Adj ↑v ↑w

theorem SimpleGraph.Subgraph.restrict_coeSubgraph E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (G'' : G'.coe.Subgraph),
  SimpleGraph.Subgraph.restrict (SimpleGraph.Subgraph.coeSubgraph G'') = G''

theorem SimpleGraph.Subgraph.coeSubgraph_injective E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), Function.Injective SimpleGraph.Subgraph.coeSubgraph

theorem SimpleGraph.Subgraph.coeSubgraph_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} (H' : H.coe.Subgraph), SimpleGraph.Subgraph.coeSubgraph H' ≤ H

theorem SimpleGraph.Subgraph.coeSubgraph_restrict_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {H : G.Subgraph} (H' : G.Subgraph),
  SimpleGraph.Subgraph.coeSubgraph (SimpleGraph.Subgraph.restrict H') = H ⊓ H'

def SimpleGraph.Subgraph.deleteEdges E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set (Sym2 V) → G.Subgraph

Given a subgraph G' and a set of vertex pairs, remove all of the corresponding edges from its edge set, if present.

See also: SimpleGraph.deleteEdges.

theorem SimpleGraph.Subgraph.deleteEdges_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)), (G'.deleteEdges s).verts = G'.verts

theorem SimpleGraph.Subgraph.deleteEdges_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)) (v w : V),
  (G'.deleteEdges s).Adj v w ↔ G'.Adj v w ∧ s(v, w) ∉ s

theorem SimpleGraph.Subgraph.deleteEdges_deleteEdges E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s s' : Set (Sym2 V)),
  (G'.deleteEdges s).deleteEdges s' = G'.deleteEdges (s ∪ s')

theorem SimpleGraph.Subgraph.deleteEdges_empty_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.deleteEdges ∅ = G'

theorem SimpleGraph.Subgraph.deleteEdges_spanningCoe_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)),
  G'.spanningCoe.deleteEdges s = (G'.deleteEdges s).spanningCoe

theorem SimpleGraph.Subgraph.deleteEdges_coe_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 ↑G'.verts)),
  G'.coe.deleteEdges s = (G'.deleteEdges (Sym2.map Subtype.val '' s)).coe

theorem SimpleGraph.Subgraph.coe_deleteEdges_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)),
  (G'.deleteEdges s).coe = G'.coe.deleteEdges (Sym2.map Subtype.val ⁻¹' s)

theorem SimpleGraph.Subgraph.deleteEdges_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)), G'.deleteEdges s ≤ G'

theorem SimpleGraph.Subgraph.deleteEdges_le_of_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set (Sym2 V)},
  s ⊆ s' → G'.deleteEdges s' ≤ G'.deleteEdges s

theorem SimpleGraph.Subgraph.deleteEdges_inter_edgeSet_left_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)),
  G'.deleteEdges (G'.edgeSet ∩ s) = G'.deleteEdges s

theorem SimpleGraph.Subgraph.deleteEdges_inter_edgeSet_right_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)),
  G'.deleteEdges (s ∩ G'.edgeSet) = G'.deleteEdges s

theorem SimpleGraph.Subgraph.coe_deleteEdges_le E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s : Set (Sym2 V)), (G'.deleteEdges s).coe ≤ G'.coe

theorem SimpleGraph.Subgraph.spanningCoe_deleteEdges_le E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (s : Set (Sym2 V)), (G'.deleteEdges s).spanningCoe ≤ G'.spanningCoe

def SimpleGraph.Subgraph.induce E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set V → G.Subgraph

The induced subgraph of a subgraph. The expectation is that s ⊆ G'.verts for the usual notion of an induced subgraph, but, in general, s is taken to be the new vertex set and edges are induced from the subgraph G'.

theorem SimpleGraph.Subgraph.induce_adj E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (s : Set V) (u v : V),
  (G'.induce s).Adj u v = (u ∈ s ∧ v ∈ s ∧ G'.Adj u v)

theorem SimpleGraph.Subgraph.induce_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (s : Set V), (G'.induce s).verts = s

theorem SimpleGraph.induce_eq_coe_induce_top E1 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set V), SimpleGraph.induce s G = (⊤.induce s).coe

theorem SimpleGraph.spanningCoe_induce_top E1 #

∀ {V : Type u} {G : SimpleGraph V} (s : Set V), (⊤.induce s).spanningCoe = (SimpleGraph.induce s G).spanningCoe

theorem SimpleGraph.Subgraph.IsInduced.induce_top_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.IsInduced → ⊤.induce G'.verts = G'

theorem SimpleGraph.Subgraph.isInduced_iff_exists_eq_induce_top E1 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph), G'.IsInduced ↔ ∃ s, G' = ⊤.induce s

theorem SimpleGraph.Subgraph.induce_mono E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' G'' : G.Subgraph} {s s' : Set V}, G' ≤ G'' → s ⊆ s' → G'.induce s ≤ G''.induce s'

theorem SimpleGraph.Subgraph.induce_mono_left E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' G'' : G.Subgraph} {s : Set V}, G' ≤ G'' → G'.induce s ≤ G''.induce s

theorem SimpleGraph.Subgraph.induce_mono_right E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set V}, s ⊆ s' → G'.induce s ≤ G'.induce s'

theorem SimpleGraph.Subgraph.induce_empty E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.induce ∅ = ⊥

theorem SimpleGraph.Subgraph.induce_self_verts E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.induce G'.verts = G'

theorem SimpleGraph.Subgraph.le_induce_top_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G' ≤ ⊤.induce G'.verts

theorem SimpleGraph.Subgraph.le_induce_union E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set V}, G'.induce s ⊔ G'.induce s' ≤ G'.induce (s ∪ s')

theorem SimpleGraph.Subgraph.le_induce_union_left E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set V}, G'.induce s ≤ G'.induce (s ∪ s')

theorem SimpleGraph.Subgraph.le_induce_union_right E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set V}, G'.induce s' ≤ G'.induce (s ∪ s')

theorem SimpleGraph.Subgraph.le_induce_iUnion E1 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) (s : ι → Set V),
  ⨆ i, G'.induce (s i) ≤ G'.induce (⋃ i, s i)

theorem SimpleGraph.Subgraph.induce_inter E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) {s s' : Set V}, G'.induce (s ∩ s') = G'.induce s ⊓ G'.induce s'

theorem SimpleGraph.Subgraph.induce_iInter E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (G' : G.Subgraph) [Nonempty ι] (s : ι → Set V),
  G'.induce (⋂ i, s i) = ⨅ i, G'.induce (s i)

theorem SimpleGraph.Subgraph.induce_sup E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' G'' : G.Subgraph) (s : Set V), (G' ⊔ G'').induce s = G'.induce s ⊔ G''.induce s

theorem SimpleGraph.Subgraph.induce_iSup E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (s : Set V) [Nonempty ι] (G' : ι → G.Subgraph),
  (⨆ i, G' i).induce s = ⨆ i, (G' i).induce s

theorem SimpleGraph.Subgraph.induce_inf E0 #

∀ {V : Type u} {G : SimpleGraph V} (G' G'' : G.Subgraph) (s : Set V), (G' ⊓ G'').induce s = G'.induce s ⊓ G''.induce s

theorem SimpleGraph.Subgraph.induce_iInf E0 #

∀ {ι : Sort u_1} {V : Type u} {G : SimpleGraph V} (s : Set V) [Nonempty ι] (G' : ι → G.Subgraph),
  (⨅ i, G' i).induce s = ⨅ i, (G' i).induce s

theorem SimpleGraph.Subgraph.induce_eq_inf_of_subset_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V}, s ⊆ G'.verts → G'.induce s = G' ⊓ ⊤.induce s

theorem SimpleGraph.Subgraph.singletonSubgraph_eq_induce E1 #

∀ {V : Type u} {G : SimpleGraph V} {v : V}, G.singletonSubgraph v = ⊤.induce {v}

theorem SimpleGraph.Subgraph.subgraphOfAdj_eq_induce E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} (hvw : G.Adj v w), G.subgraphOfAdj hvw = ⊤.induce {v, w}

instance SimpleGraph.Subgraph.instDecidableRel_induce_adj E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' : G.Subgraph} →
      (s : Set V) → [(a : V) → Decidable (a ∈ s)] → [DecidableRel G'.Adj] → DecidableRel (G'.induce s).Adj

def SimpleGraph.Subgraph.coeInduceIso E1 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' : G.Subgraph} → (s : Set V) → s ⊆ G'.verts → (G'.induce s).coe ≃g SimpleGraph.induce {v | ↑v ∈ s} G'.coe

Equivalence between an induced subgraph and its corresponding simple graph.

abbrev SimpleGraph.Subgraph.deleteVerts E1 #

{V : Type u} → {G : SimpleGraph V} → G.Subgraph → Set V → G.Subgraph

Given a subgraph and a set of vertices, delete all the vertices from the subgraph, if present. Any edges incident to the deleted vertices are deleted as well.

theorem SimpleGraph.Subgraph.deleteVerts_verts E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V}, (G'.deleteVerts s).verts = G'.verts \ s

theorem SimpleGraph.Subgraph.deleteVerts_adj E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V} {u v : V},
  (G'.deleteVerts s).Adj u v ↔ u ∈ G'.verts ∧ u ∉ s ∧ v ∈ G'.verts ∧ v ∉ s ∧ G'.Adj u v

theorem SimpleGraph.Subgraph.deleteVerts_deleteVerts E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} (s s' : Set V),
  (G'.deleteVerts s).deleteVerts s' = G'.deleteVerts (s ∪ s')

theorem SimpleGraph.Subgraph.deleteVerts_empty E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph}, G'.deleteVerts ∅ = G'

theorem SimpleGraph.Subgraph.deleteVerts_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V}, G'.deleteVerts s ≤ G'

theorem SimpleGraph.Subgraph.deleteVerts_mono E1 #

∀ {V : Type u} {G : SimpleGraph V} {s : Set V} {G' G'' : G.Subgraph}, G' ≤ G'' → G'.deleteVerts s ≤ G''.deleteVerts s

theorem SimpleGraph.Subgraph.deleteVerts_mono' E1 #

∀ {V : Type u} {G G' : SimpleGraph V} (u : Set V), G ≤ G' → (⊤.deleteVerts u).coe ≤ (⊤.deleteVerts u).coe

theorem SimpleGraph.Subgraph.deleteVerts_anti E1 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s s' : Set V}, s ⊆ s' → G'.deleteVerts s' ≤ G'.deleteVerts s

theorem SimpleGraph.Subgraph.deleteVerts_inter_verts_left_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V}, G'.deleteVerts (G'.verts ∩ s) = G'.deleteVerts s

theorem SimpleGraph.Subgraph.deleteVerts_inter_verts_set_right_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {G' : G.Subgraph} {s : Set V}, G'.deleteVerts (s ∩ G'.verts) = G'.deleteVerts s

instance SimpleGraph.Subgraph.instDecidableRel_deleteVerts_adj E0 #

{V : Type u} → {G : SimpleGraph V} → (u : Set V) → [r : DecidableRel G.Adj] → DecidableRel (⊤.deleteVerts u).coe.Adj

def SimpleGraph.Subgraph.coeDeleteVertsIso E1 #

{V : Type u} →
  {G : SimpleGraph V} →
    {G' : G.Subgraph} → (s : Set V) → (G'.deleteVerts s).coe ≃g SimpleGraph.induce {v | ↑v ∉ s} G'.coe

Equivalence between a subgraph with deleted vertices and its corresponding simple graph.