Subgraphs of multigraphs #
This file develops the basic theory of subgraphs for multigraphs Graph α β:
the subgraph relation, standard classes of subgraphs (spanning, induced, closed),
and components.
Main definitions #
H ≤ G: the subgraph relation as a partial order on graphs. This is the preferred spelling overH.IsSubgraph Gwhich it is definitionally equal to.H ≤s G(Graph.IsSpanningSubgraph):Hhas the same vertex set asG.H ≤i G(Graph.IsInducedSubgraph):Hcontains every ambient link between its vertices.H ≤c G(Graph.IsClosedSubgraph):His a union of components ofG.
Implementation notes #
Following the overall design of Graph, subgraphs are terms of the same type Graph α β
rather than a separate Subgraph structure. This allows us to reuse notation and lemmas
uniformly and to express the subgraph order directly as a partial order on Graph α β.
G ≤ H is the canonical spelling for "G is a subgraph of H". This is definitionally equal to
G.IsSubgraph H which exists only for implementation reasons.
The explicit IsSubgraph structure is defined so that stronger subgraph notions
(such as IsSpanningSubgraph, IsInducedSubgraph, and IsClosedSubgraph) can extend it.
This allows them to inherit fundamental fields and lemmas like vertexSet_mono and edgeSet_mono
without lemma duplication. However, in statements and proofs, users use G ≤ H instead.
The relation ≤ is the simp normal form, and the API is developed entirely in terms of it.
Tags #
graphs, subgraph, induced subgraph, spanning subgraph, closed subgraph
IsSubgraph H G is NOT the preferred spelling for the subgraph relation. Please use
H ≤ G instead.
Instances For
H ≤ G means H is a subgraph of G. It is defined as V(H) ⊆ V(G) and every link of H
being a link of G.
Equations
- Graph.instPartialOrder = { le := Graph.IsSubgraph, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
Two subgraphs of the same graph are compatible.
Spanning Subgraphs #
H ≤s G (Graph.IsSpanningSubgraph) is a subgraph of G with the same vertex set.
Instances For
H ≤s G (Graph.IsSpanningSubgraph) is a subgraph of G with the same vertex set.
Equations
- Graph.«term_≤s_» = Lean.ParserDescr.trailingNode `Graph.«term_≤s_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≤s ") (Lean.ParserDescr.cat `term 51))
Instances For
Alias of Graph.IsSpanningSubgraph.toIsSubgraph.
Induced Subgraphs #
H ≤i G (Graph.IsInducedSubgraph) is a subgraph of G such that every link of G
involving two vertices of H is also a link of H.
Instances For
H ≤i G (Graph.IsInducedSubgraph) is a subgraph of G such that every link of G
involving two vertices of H is also a link of H.
Equations
- Graph.«term_≤i_» = Lean.ParserDescr.trailingNode `Graph.«term_≤i_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≤i ") (Lean.ParserDescr.cat `term 51))
Instances For
Alias of Graph.IsInducedSubgraph.toIsSubgraph.
Closed Subgraphs #
H ≤c G (Graph.IsClosedSubgraph) is a union of components of G.
Instances For
H ≤c G (Graph.IsClosedSubgraph) is a union of components of G.
Equations
- Graph.«term_≤c_» = Lean.ParserDescr.trailingNode `Graph.«term_≤c_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≤c ") (Lean.ParserDescr.cat `term 51))