Darts in graphs #
A Dart
or half-edge or bond in a graph is an ordered pair of adjacent vertices, regarded as an
oriented edge. This file defines darts and proves some of their basic properties.
A Dart
is an oriented edge, implemented as an ordered pair of adjacent vertices.
This terminology comes from combinatorial maps, and they are also known as "half-edges"
or "bonds."
- fst : V
- snd : V
- is_adj : G.Adj self.toProd.1 self.toProd.2
Instances For
instance
SimpleGraph.instDecidableEqDart :
{V : Type u_2} → {G : SimpleGraph V} → [inst : DecidableEq V] → DecidableEq (SimpleGraph.Dart G)
Equations
- SimpleGraph.instDecidableEqDart = SimpleGraph.decEqDart✝
theorem
SimpleGraph.Dart.ext_iff
{V : Type u_1}
{G : SimpleGraph V}
(d₁ : SimpleGraph.Dart G)
(d₂ : SimpleGraph.Dart G)
:
theorem
SimpleGraph.Dart.ext
{V : Type u_1}
{G : SimpleGraph V}
(d₁ : SimpleGraph.Dart G)
(d₂ : SimpleGraph.Dart G)
(h : d₁.toProd = d₂.toProd)
:
d₁ = d₂
theorem
SimpleGraph.Dart.toProd_injective
{V : Type u_1}
{G : SimpleGraph V}
:
Function.Injective SimpleGraph.Dart.toProd
instance
SimpleGraph.Dart.fintype
{V : Type u_1}
{G : SimpleGraph V}
[Fintype V]
[DecidableRel G.Adj]
:
Equations
- One or more equations did not get rendered due to their size.
@[simp]
theorem
SimpleGraph.Dart.edge_mk
{V : Type u_1}
{G : SimpleGraph V}
{p : V × V}
(h : G.Adj p.1 p.2)
:
SimpleGraph.Dart.edge { toProd := p, is_adj := h } = Sym2.mk p
@[simp]
@[simp]
theorem
SimpleGraph.Dart.symm_toProd
{V : Type u_1}
{G : SimpleGraph V}
(d : SimpleGraph.Dart G)
:
(SimpleGraph.Dart.symm d).toProd = Prod.swap d.toProd
The dart with reversed orientation from a given dart.
Equations
- SimpleGraph.Dart.symm d = { toProd := Prod.swap d.toProd, is_adj := (_ : G.Adj (Prod.swap d.toProd).1 (Prod.swap d.toProd).2) }
Instances For
@[simp]
theorem
SimpleGraph.Dart.symm_mk
{V : Type u_1}
{G : SimpleGraph V}
{p : V × V}
(h : G.Adj p.1 p.2)
:
SimpleGraph.Dart.symm { toProd := p, is_adj := h } = { toProd := Prod.swap p, is_adj := (_ : G.Adj p.2 p.1) }
@[simp]
@[simp]
@[simp]
@[simp]
theorem
SimpleGraph.Dart.symm_involutive
{V : Type u_1}
{G : SimpleGraph V}
:
Function.Involutive SimpleGraph.Dart.symm
theorem
SimpleGraph.dart_edge_eq_iff
{V : Type u_1}
{G : SimpleGraph V}
(d₁ : SimpleGraph.Dart G)
(d₂ : SimpleGraph.Dart G)
:
SimpleGraph.Dart.edge d₁ = SimpleGraph.Dart.edge d₂ ↔ d₁ = d₂ ∨ d₁ = SimpleGraph.Dart.symm d₂
theorem
SimpleGraph.dart_edge_eq_mk'_iff
{V : Type u_1}
{G : SimpleGraph V}
{d : SimpleGraph.Dart G}
{p : V × V}
:
theorem
SimpleGraph.dart_edge_eq_mk'_iff'
{V : Type u_1}
{G : SimpleGraph V}
{d : SimpleGraph.Dart G}
{u : V}
{v : V}
:
def
SimpleGraph.DartAdj
{V : Type u_1}
(G : SimpleGraph V)
(d : SimpleGraph.Dart G)
(d' : SimpleGraph.Dart G)
:
Two darts are said to be adjacent if they could be consecutive darts in a walk -- that is, the first dart's second vertex is equal to the second dart's first vertex.
Equations
- SimpleGraph.DartAdj G d d' = (d.toProd.2 = d'.toProd.1)
Instances For
@[simp]
theorem
SimpleGraph.dartOfNeighborSet_toProd
{V : Type u_1}
(G : SimpleGraph V)
(v : V)
(w : ↑(SimpleGraph.neighborSet G v))
:
(SimpleGraph.dartOfNeighborSet G v w).toProd = (v, ↑w)
def
SimpleGraph.dartOfNeighborSet
{V : Type u_1}
(G : SimpleGraph V)
(v : V)
(w : ↑(SimpleGraph.neighborSet G v))
:
For a given vertex v
, this is the bijective map from the neighbor set at v
to the darts d
with d.fst = v
.
Equations
- SimpleGraph.dartOfNeighborSet G v w = { toProd := (v, ↑w), is_adj := (_ : ↑w ∈ SimpleGraph.neighborSet G v) }
Instances For
Equations
- (_ : Nonempty (SimpleGraph.Dart ⊤)) = (_ : Nonempty (SimpleGraph.Dart ⊤))