Simple graphs #
This file defines two type classes for graphs Graph α β: Loopless and Simple.
Main definitions #
Loopless: a graph is loopless if it has no loopsSimple: a graph is simple if it has no multiple edges between the same pair of verticestoSimpleGraph: a function that constructs aSimpleGraph V(G)from a GraphGofSimpleGraph: a function that constructs aGraph α (Sym2 α)from aSimpleGraph α
TODO: Show ofSimpleGraph (toSimpleGraph G) is isomorphic to G when isomorphism on Graph is
defined.
@[simp]
theorem
Graph.Inc.isNonloopAt
{α : Type u_1}
{β : Type u_2}
{G : Graph α β}
{u : α}
{e : β}
[G.Loopless]
(h : G.Inc e u)
:
G.IsNonloopAt e u
Construct a simple graph from a graph.
Equations
Instances For
Construct a graph from a simple graph. It has every element of the vertex type as a vertex.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
The isomorphism between toSimpleGraph (ofSimpleGraph G) and G.
Equations
- Graph.toSimpleGraphOfSimpleGraphIso G = { toEquiv := Equiv.Set.univ α, map_rel_iff' := ⋯ }