File: Mathlib/Combinatorics/SimpleGraph/Path.lean

full_name: SimpleGraph.Walk.IsTrail
code: /-- A *trail* is a walk with no repeating edges. -/
@[mk_iff isTrail_def]
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
  edges_nodup : p.edges.Nodup
goal: Prop

full_name: SimpleGraph.Walk.IsTrail.edges_nodup
code: /-- A *trail* is a walk with no repeating edges. -/
@[mk_iff isTrail_def]
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
  edges_nodup : p.edges.Nodup
goal: p.edges.Nodup

full_name: SimpleGraph.Walk.isTrail_def
code: /-- A *trail* is a walk with no repeating edges. -/
@[mk_iff isTrail_def]
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
  edges_nodup : p.edges.Nodup
goal: p.IsTrail ↔ p.edges.Nodup

full_name: SimpleGraph.Walk.IsPath
code: /-- A *path* is a walk with no repeating vertices.
Use `SimpleGraph.Walk.IsPath.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends IsTrail p : Prop where
  support_nodup : p.support.Nodup
goal: Prop

full_name: SimpleGraph.Walk.IsPath.support_nodup
code: /-- A *path* is a walk with no repeating vertices.
Use `SimpleGraph.Walk.IsPath.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends IsTrail p : Prop where
  support_nodup : p.support.Nodup
goal: p.support.Nodup

full_name: SimpleGraph.Walk.IsPath.isTrail
code: protected lemma IsPath.isTrail {p : Walk G u v}(h : IsPath p) : IsTrail p 
goal: p.IsTrail

full_name: SimpleGraph.Walk.isCircuit_def
code: /-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
@[mk_iff isCircuit_def]
structure IsCircuit {u : V} (p : G.Walk u u) extends IsTrail p : Prop where
  ne_nil : p ≠ nil
goal: p.IsCircuit ↔ p.IsTrail ∧ p ≠ SimpleGraph.Walk.nil

full_name: SimpleGraph.Walk.IsCircuit
code: /-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
@[mk_iff isCircuit_def]
structure IsCircuit {u : V} (p : G.Walk u u) extends IsTrail p : Prop where
  ne_nil : p ≠ nil
goal: Prop

full_name: SimpleGraph.Walk.IsCircuit.ne_nil
code: /-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
@[mk_iff isCircuit_def]
structure IsCircuit {u : V} (p : G.Walk u u) extends IsTrail p : Prop where
  ne_nil : p ≠ nil
goal: p ≠ SimpleGraph.Walk.nil

full_name: SimpleGraph.Walk.IsCircuit.isTrail
code: protected lemma IsCircuit.isTrail {p : Walk G u u} (h : IsCircuit p) : IsTrail p 
goal: p.IsTrail

full_name: SimpleGraph.Walk.IsCycle
code: /-- A *cycle* at `u : V` is a circuit at `u` whose only repeating vertex
is `u` (which appears exactly twice). -/
structure IsCycle {u : V} (p : G.Walk u u) extends IsCircuit p : Prop where
  support_nodup : p.support.tail.Nodup
goal: Prop

full_name: SimpleGraph.Walk.IsCycle.support_nodup
code: /-- A *cycle* at `u : V` is a circuit at `u` whose only repeating vertex
is `u` (which appears exactly twice). -/
structure IsCycle {u : V} (p : G.Walk u u) extends IsCircuit p : Prop where
  support_nodup : p.support.tail.Nodup
goal: p.support.tail.Nodup

full_name: SimpleGraph.Walk.IsCycle.isCircuit
code: protected lemma IsCycle.isCircuit {p : Walk G u u} (h : IsCycle p) : IsCircuit p 
goal: p.IsCircuit

full_name: SimpleGraph.Walk.isTrail_copy
code: @[simp]
theorem isTrail_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).IsTrail ↔ p.IsTrail 
goal: (p.copy hu hv).IsTrail ↔ p.IsTrail

full_name: SimpleGraph.Walk.IsPath.mk'
code: theorem IsPath.mk' {u v : V} {p : G.Walk u v} (h : p.support.Nodup) : p.IsPath 
goal: p.IsPath

full_name: SimpleGraph.Walk.isPath_def
code: theorem isPath_def {u v : V} (p : G.Walk u v) : p.IsPath ↔ p.support.Nodup 
goal: p.IsPath ↔ p.support.Nodup

full_name: SimpleGraph.Walk.isPath_copy
code: @[simp]
theorem isPath_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).IsPath ↔ p.IsPath 
goal: (p.copy hu hv).IsPath ↔ p.IsPath

full_name: SimpleGraph.Walk.isCircuit_copy
code: @[simp]
theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
    (p.copy hu hu).IsCircuit ↔ p.IsCircuit 
goal: (p.copy hu hu).IsCircuit ↔ p.IsCircuit

full_name: SimpleGraph.Walk.IsCircuit.not_nil
code: lemma IsCircuit.not_nil {p : G.Walk v v} (hp : IsCircuit p) : ¬ p.Nil 
goal: ¬p.Nil

full_name: SimpleGraph.Walk.isCycle_def
code: theorem isCycle_def {u : V} (p : G.Walk u u) :
    p.IsCycle ↔ p.IsTrail ∧ p ≠ nil ∧ p.support.tail.Nodup 
goal: p.IsCycle ↔ p.IsTrail ∧ p ≠ SimpleGraph.Walk.nil ∧ p.support.tail.Nodup

full_name: SimpleGraph.Walk.isCycle_copy
code: @[simp]
theorem isCycle_copy {u u'} (p : G.Walk u u) (hu : u = u') :
    (p.copy hu hu).IsCycle ↔ p.IsCycle 
goal: (p.copy hu hu).IsCycle ↔ p.IsCycle

full_name: SimpleGraph.Walk.IsCycle.not_nil
code: lemma IsCycle.not_nil {p : G.Walk v v} (hp : IsCycle p) : ¬ p.Nil 
goal: ¬p.Nil

full_name: SimpleGraph.Walk.IsTrail.nil
code: @[simp]
theorem IsTrail.nil {u : V} : (nil : G.Walk u u).IsTrail 
goal: SimpleGraph.Walk.nil.IsTrail

full_name: SimpleGraph.Walk.IsTrail.of_cons
code: theorem IsTrail.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
    (cons h p).IsTrail → p.IsTrail 
goal: (SimpleGraph.Walk.cons h p).IsTrail → p.IsTrail

full_name: SimpleGraph.Walk.cons_isTrail_iff
code: @[simp]
theorem cons_isTrail_iff {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h p).IsTrail ↔ p.IsTrail ∧ s(u, v) ∉ p.edges 
goal: (SimpleGraph.Walk.cons h p).IsTrail ↔ p.IsTrail ∧ s(u, v) ∉ p.edges

full_name: SimpleGraph.Walk.IsTrail.reverse
code: theorem IsTrail.reverse {u v : V} (p : G.Walk u v) (h : p.IsTrail) : p.reverse.IsTrail 
goal: p.reverse.IsTrail

full_name: SimpleGraph.Walk.reverse_isTrail_iff
code: @[simp]
theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p.IsTrail 
goal: p.reverse.IsTrail ↔ p.IsTrail

full_name: SimpleGraph.Walk.IsTrail.of_append_left
code: theorem IsTrail.of_append_left {u v w : V} {p : G.Walk u v} {q : G.Walk v w}
    (h : (p.append q).IsTrail) : p.IsTrail 
goal: p.IsTrail

full_name: SimpleGraph.Walk.IsTrail.of_append_right
code: theorem IsTrail.of_append_right {u v w : V} {p : G.Walk u v} {q : G.Walk v w}
    (h : (p.append q).IsTrail) : q.IsTrail 
goal: q.IsTrail

full_name: SimpleGraph.Walk.IsTrail.count_edges_le_one
code: theorem IsTrail.count_edges_le_one [DecidableEq V] {u v : V} {p : G.Walk u v} (h : p.IsTrail)
    (e : Sym2 V) : p.edges.count e ≤ 1 
goal: List.count e p.edges ≤ 1

full_name: SimpleGraph.Walk.IsTrail.count_edges_eq_one
code: theorem IsTrail.count_edges_eq_one [DecidableEq V] {u v : V} {p : G.Walk u v} (h : p.IsTrail)
    {e : Sym2 V} (he : e ∈ p.edges) : p.edges.count e = 1 
goal: List.count e p.edges = 1

full_name: SimpleGraph.Walk.IsPath.nil
code: theorem IsPath.nil {u : V} : (nil : G.Walk u u).IsPath 
goal: SimpleGraph.Walk.nil.IsPath

full_name: SimpleGraph.Walk.IsPath.of_cons
code: theorem IsPath.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
    (cons h p).IsPath → p.IsPath 
goal: (SimpleGraph.Walk.cons h p).IsPath → p.IsPath

full_name: SimpleGraph.Walk.cons_isPath_iff
code: @[simp]
theorem cons_isPath_iff {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h p).IsPath ↔ p.IsPath ∧ u ∉ p.support 
goal: (SimpleGraph.Walk.cons h p).IsPath ↔ p.IsPath ∧ u ∉ p.support

full_name: SimpleGraph.Walk.IsPath.cons
code: protected lemma IsPath.cons {p : Walk G v w} (hp : p.IsPath) (hu : u ∉ p.support) {h : G.Adj u v} :
    (cons h p).IsPath 
goal: (SimpleGraph.Walk.cons h p).IsPath

full_name: SimpleGraph.Walk.isPath_iff_eq_nil
code: @[simp]
theorem isPath_iff_eq_nil {u : V} (p : G.Walk u u) : p.IsPath ↔ p = nil 
goal: p.IsPath ↔ p = SimpleGraph.Walk.nil

full_name: SimpleGraph.Walk.IsPath.reverse
code: theorem IsPath.reverse {u v : V} {p : G.Walk u v} (h : p.IsPath) : p.reverse.IsPath 
goal: p.reverse.IsPath

full_name: SimpleGraph.Walk.isPath_reverse_iff
code: @[simp]
theorem isPath_reverse_iff {u v : V} (p : G.Walk u v) : p.reverse.IsPath ↔ p.IsPath 
goal: p.reverse.IsPath ↔ p.IsPath

full_name: SimpleGraph.Walk.IsPath.of_append_left
code: theorem IsPath.of_append_left {u v w : V} {p : G.Walk u v} {q : G.Walk v w} :
    (p.append q).IsPath → p.IsPath 
goal: (p.append q).IsPath → p.IsPath

full_name: SimpleGraph.Walk.IsPath.of_append_right
code: theorem IsPath.of_append_right {u v w : V} {p : G.Walk u v} {q : G.Walk v w}
    (h : (p.append q).IsPath) : q.IsPath 
goal: q.IsPath

full_name: SimpleGraph.Walk.IsCycle.not_of_nil
code: @[simp]
theorem IsCycle.not_of_nil {u : V} : ¬(nil : G.Walk u u).IsCycle 
goal: ¬SimpleGraph.Walk.nil.IsCycle

full_name: SimpleGraph.Walk.IsCycle.ne_bot
code: lemma IsCycle.ne_bot : ∀ {p : G.Walk u u}, p.IsCycle → G ≠ ⊥
  
goal: p.IsCycle → G ≠ ⊥

full_name: SimpleGraph.Walk.IsCycle.three_le_length
code: lemma IsCycle.three_le_length {v : V} {p : G.Walk v v} (hp : p.IsCycle) : 3 ≤ p.length 
goal: 3 ≤ p.length

full_name: SimpleGraph.Walk.cons_isCycle_iff
code: theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
    (Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬s(u, v) ∈ p.edges 
goal: (SimpleGraph.Walk.cons h p).IsCycle ↔ p.IsPath ∧ s(u, v) ∉ p.edges

full_name: SimpleGraph.Walk.IsPath.tail
code: lemma IsPath.tail {p : G.Walk u v} (hp : p.IsPath) (hp' : ¬ p.Nil) : (p.tail hp').IsPath 
goal: (p.tail hp').IsPath

full_name: SimpleGraph.Walk.instDecidableIsPathOfDecidableEq
code: instance [DecidableEq V] {u v : V} (p : G.Walk u v) : Decidable p.IsPath 
goal: Decidable p.IsPath

full_name: SimpleGraph.Walk.IsPath.length_lt
code: theorem IsPath.length_lt [Fintype V] {u v : V} {p : G.Walk u v} (hp : p.IsPath) :
    p.length < Fintype.card V 
goal: p.length < Fintype.card V

full_name: SimpleGraph.Walk.IsTrail.takeUntil
code: protected theorem IsTrail.takeUntil {u v w : V} {p : G.Walk v w} (hc : p.IsTrail)
    (h : u ∈ p.support) : (p.takeUntil u h).IsTrail 
goal: (p.takeUntil u h).IsTrail

full_name: SimpleGraph.Walk.IsTrail.dropUntil
code: protected theorem IsTrail.dropUntil {u v w : V} {p : G.Walk v w} (hc : p.IsTrail)
    (h : u ∈ p.support) : (p.dropUntil u h).IsTrail 
goal: (p.dropUntil u h).IsTrail

full_name: SimpleGraph.Walk.IsPath.takeUntil
code: protected theorem IsPath.takeUntil {u v w : V} {p : G.Walk v w} (hc : p.IsPath)
    (h : u ∈ p.support) : (p.takeUntil u h).IsPath 
goal: (p.takeUntil u h).IsPath

full_name: SimpleGraph.Walk.IsPath.dropUntil
code: protected theorem IsPath.dropUntil {u v w : V} {p : G.Walk v w} (hc : p.IsPath)
    (h : u ∈ p.support) : (p.dropUntil u h).IsPath 
goal: (p.dropUntil u h).IsPath

full_name: SimpleGraph.Walk.IsTrail.rotate
code: protected theorem IsTrail.rotate {u v : V} {c : G.Walk v v} (hc : c.IsTrail) (h : u ∈ c.support) :
    (c.rotate h).IsTrail 
goal: (c.rotate h).IsTrail

full_name: SimpleGraph.Walk.IsCircuit.rotate
code: protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
    (h : u ∈ c.support) : (c.rotate h).IsCircuit 
goal: (c.rotate h).IsCircuit

full_name: SimpleGraph.Walk.IsCycle.rotate
code: protected theorem IsCycle.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCycle) (h : u ∈ c.support) :
    (c.rotate h).IsCycle 
goal: (c.rotate h).IsCycle

full_name: SimpleGraph.Path
code: /-- The type for paths between two vertices. -/
abbrev Path (u v : V) 
goal: Type u

full_name: SimpleGraph.Path.isPath
code: @[simp]
protected theorem isPath {u v : V} (p : G.Path u v) : (p : G.Walk u v).IsPath 
goal: (↑p).IsPath

full_name: SimpleGraph.Path.isTrail
code: @[simp]
protected theorem isTrail {u v : V} (p : G.Path u v) : (p : G.Walk u v).IsTrail 
goal: (↑p).IsTrail

full_name: SimpleGraph.Path.nil
code: /-- The length-0 path at a vertex. -/
@[refl, simps]
protected def nil {u : V} : G.Path u u 
goal: G.Path u u

full_name: SimpleGraph.Path.nil_coe
code: /-- The length-0 path at a vertex. -/
@[refl, simps]
protected def nil {u : V} : G.Path u u 
goal: ↑SimpleGraph.Path.nil = SimpleGraph.Walk.nil

full_name: SimpleGraph.Path.singleton
code: /-- The length-1 path between a pair of adjacent vertices. -/
@[simps]
def singleton {u v : V} (h : G.Adj u v) : G.Path u v 
goal: G.Path u v

full_name: SimpleGraph.Path.singleton_coe
code: /-- The length-1 path between a pair of adjacent vertices. -/
@[simps]
def singleton {u v : V} (h : G.Adj u v) : G.Path u v 
goal: ↑(SimpleGraph.Path.singleton h) = SimpleGraph.Walk.cons h SimpleGraph.Walk.nil

full_name: SimpleGraph.Path.mk'_mem_edges_singleton
code: theorem mk'_mem_edges_singleton {u v : V} (h : G.Adj u v) :
    s(u, v) ∈ (singleton h : G.Walk u v).edges 
goal: s(u, v) ∈ (↑(SimpleGraph.Path.singleton h)).edges

full_name: SimpleGraph.Path.reverse
code: /-- The reverse of a path is another path.  See also `SimpleGraph.Walk.reverse`. -/
@[symm, simps]
def reverse {u v : V} (p : G.Path u v) : G.Path v u 
goal: G.Path v u

full_name: SimpleGraph.Path.reverse_coe
code: /-- The reverse of a path is another path.  See also `SimpleGraph.Walk.reverse`. -/
@[symm, simps]
def reverse {u v : V} (p : G.Path u v) : G.Path v u 
goal: ↑p.reverse = (↑p).reverse

full_name: SimpleGraph.Path.count_support_eq_one
code: theorem count_support_eq_one [DecidableEq V] {u v w : V} {p : G.Path u v}
    (hw : w ∈ (p : G.Walk u v).support) : (p : G.Walk u v).support.count w = 1 
goal: List.count w (↑p).support = 1

full_name: SimpleGraph.Path.count_edges_eq_one
code: theorem count_edges_eq_one [DecidableEq V] {u v : V} {p : G.Path u v} (e : Sym2 V)
    (hw : e ∈ (p : G.Walk u v).edges) : (p : G.Walk u v).edges.count e = 1 
goal: List.count e (↑p).edges = 1

full_name: SimpleGraph.Path.nodup_support
code: @[simp]
theorem nodup_support {u v : V} (p : G.Path u v) : (p : G.Walk u v).support.Nodup 
goal: (↑p).support.Nodup

full_name: SimpleGraph.Path.loop_eq
code: theorem loop_eq {v : V} (p : G.Path v v) : p = Path.nil 
goal: p = SimpleGraph.Path.nil

full_name: SimpleGraph.Path.not_mem_edges_of_loop
code: theorem not_mem_edges_of_loop {v : V} {e : Sym2 V} {p : G.Path v v} :
    ¬e ∈ (p : G.Walk v v).edges 
goal: e ∉ (↑p).edges

full_name: SimpleGraph.Path.cons_isCycle
code: theorem cons_isCycle {u v : V} (p : G.Path v u) (h : G.Adj u v)
    (he : ¬s(u, v) ∈ (p : G.Walk v u).edges) : (Walk.cons h ↑p).IsCycle 
goal: (SimpleGraph.Walk.cons h ↑p).IsCycle

full_name: SimpleGraph.Walk.bypass
code: /-- Given a walk, produces a walk from it by bypassing subwalks between repeated vertices.
The result is a path, as shown in `SimpleGraph.Walk.bypass_isPath`.
This is packaged up in `SimpleGraph.Walk.toPath`. -/
def bypass {u v : V} : G.Walk u v → G.Walk u v
  
goal: G.Walk u v → G.Walk u v

full_name: SimpleGraph.Walk.bypass_copy
code: @[simp]
theorem bypass_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).bypass = p.bypass.copy hu hv 
goal: (p.copy hu hv).bypass = p.bypass.copy hu hv

full_name: SimpleGraph.Walk.bypass_isPath
code: theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath 
goal: p.bypass.IsPath

full_name: SimpleGraph.Walk.length_bypass_le
code: theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length 
goal: p.bypass.length ≤ p.length

full_name: SimpleGraph.Walk.bypass_eq_self_of_length_le
code: lemma bypass_eq_self_of_length_le {u v : V} (p : G.Walk u v) (h : p.length ≤ p.bypass.length) :
    p.bypass = p 
goal: p.bypass = p

full_name: SimpleGraph.Walk.toPath
code: /-- Given a walk, produces a path with the same endpoints using `SimpleGraph.Walk.bypass`. -/
def toPath {u v : V} (p : G.Walk u v) : G.Path u v 
goal: G.Path u v

full_name: SimpleGraph.Walk.support_bypass_subset
code: theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support 
goal: p.bypass.support ⊆ p.support

full_name: SimpleGraph.Walk.support_toPath_subset
code: theorem support_toPath_subset {u v : V} (p : G.Walk u v) :
    (p.toPath : G.Walk u v).support ⊆ p.support 
goal: (↑p.toPath).support ⊆ p.support

full_name: SimpleGraph.Walk.darts_bypass_subset
code: theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts 
goal: p.bypass.darts ⊆ p.darts

full_name: SimpleGraph.Walk.edges_bypass_subset
code: theorem edges_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.edges ⊆ p.edges 
goal: p.bypass.edges ⊆ p.edges

full_name: SimpleGraph.Walk.darts_toPath_subset
code: theorem darts_toPath_subset {u v : V} (p : G.Walk u v) : (p.toPath : G.Walk u v).darts ⊆ p.darts 
goal: (↑p.toPath).darts ⊆ p.darts

full_name: SimpleGraph.Walk.edges_toPath_subset
code: theorem edges_toPath_subset {u v : V} (p : G.Walk u v) : (p.toPath : G.Walk u v).edges ⊆ p.edges 
goal: (↑p.toPath).edges ⊆ p.edges

full_name: SimpleGraph.Walk.map_isPath_of_injective
code: theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
    (p.map f).IsPath 
goal: (SimpleGraph.Walk.map f p).IsPath

full_name: SimpleGraph.Walk.IsPath.of_map
code: protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPath 
goal: p.IsPath

full_name: SimpleGraph.Walk.map_isPath_iff_of_injective
code: theorem map_isPath_iff_of_injective (hinj : Function.Injective f) : (p.map f).IsPath ↔ p.IsPath 
goal: (SimpleGraph.Walk.map f p).IsPath ↔ p.IsPath

full_name: SimpleGraph.Walk.map_isTrail_iff_of_injective
code: theorem map_isTrail_iff_of_injective (hinj : Function.Injective f) :
    (p.map f).IsTrail ↔ p.IsTrail 
goal: (SimpleGraph.Walk.map f p).IsTrail ↔ p.IsTrail

full_name: SimpleGraph.Walk.map_isCycle_iff_of_injective
code: theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective f) :
    (p.map f).IsCycle ↔ p.IsCycle 
goal: (SimpleGraph.Walk.map f p).IsCycle ↔ p.IsCycle

full_name: SimpleGraph.Walk.mapLe_isTrail
code: @[simp]
theorem mapLe_isTrail {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Walk u v} :
    (p.mapLe h).IsTrail ↔ p.IsTrail 
goal: (SimpleGraph.Walk.mapLe h p).IsTrail ↔ p.IsTrail

full_name: SimpleGraph.Walk.mapLe_isPath
code: @[simp]
theorem mapLe_isPath {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Walk u v} :
    (p.mapLe h).IsPath ↔ p.IsPath 
goal: (SimpleGraph.Walk.mapLe h p).IsPath ↔ p.IsPath

full_name: SimpleGraph.Walk.mapLe_isCycle
code: @[simp]
theorem mapLe_isCycle {G G' : SimpleGraph V} (h : G ≤ G') {u : V} {p : G.Walk u u} :
    (p.mapLe h).IsCycle ↔ p.IsCycle 
goal: (SimpleGraph.Walk.mapLe h p).IsCycle ↔ p.IsCycle

full_name: SimpleGraph.Path.map
code: /-- Given an injective graph homomorphism, map paths to paths. -/
@[simps]
protected def map (f : G →g G') (hinj : Function.Injective f) {u v : V} (p : G.Path u v) :
    G'.Path (f u) (f v) 
goal: G'.Path (f u) (f v)

full_name: SimpleGraph.Path.map_coe
code: /-- Given an injective graph homomorphism, map paths to paths. -/
@[simps]
protected def map (f : G →g G') (hinj : Function.Injective f) {u v : V} (p : G.Path u v) :
    G'.Path (f u) (f v) 
goal: ↑(SimpleGraph.Path.map f hinj p) = SimpleGraph.Walk.map f ↑p

full_name: SimpleGraph.Path.map_injective
code: theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
    Function.Injective (Path.map f hinj : G.Path u v → G'.Path (f u) (f v)) 
goal: Function.Injective (SimpleGraph.Path.map f hinj)

full_name: SimpleGraph.Path.mapEmbedding_coe
code: /-- Given a graph embedding, map paths to paths. -/
@[simps!]
protected def mapEmbedding (f : G ↪g G') {u v : V} (p : G.Path u v) : G'.Path (f u) (f v) 
goal: ↑(SimpleGraph.Path.mapEmbedding f p) = SimpleGraph.Walk.map f.toHom ↑p

full_name: SimpleGraph.Path.mapEmbedding
code: /-- Given a graph embedding, map paths to paths. -/
@[simps!]
protected def mapEmbedding (f : G ↪g G') {u v : V} (p : G.Path u v) : G'.Path (f u) (f v) 
goal: G'.Path (f u) (f v)

full_name: SimpleGraph.Path.mapEmbedding_injective
code: theorem mapEmbedding_injective (f : G ↪g G') (u v : V) :
    Function.Injective (Path.mapEmbedding f : G.Path u v → G'.Path (f u) (f v)) 
goal: Function.Injective (SimpleGraph.Path.mapEmbedding f)

full_name: SimpleGraph.Walk.IsPath.transfer
code: protected theorem IsPath.transfer (hp) (pp : p.IsPath) :
    (p.transfer H hp).IsPath 
goal: (p.transfer H hp).IsPath

full_name: SimpleGraph.Walk.IsCycle.transfer
code: protected theorem IsCycle.transfer {q : G.Walk u u} (qc : q.IsCycle) (hq) :
    (q.transfer H hq).IsCycle 
goal: (q.transfer H hq).IsCycle

full_name: SimpleGraph.Walk.IsPath.toDeleteEdges
code: protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V))
    {p : G.Walk v w} (h : p.IsPath) (hp) : (p.toDeleteEdges s hp).IsPath 
goal: (SimpleGraph.Walk.toDeleteEdges s p hp).IsPath

full_name: SimpleGraph.Walk.IsCycle.toDeleteEdges
code: protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V))
    {p : G.Walk v v} (h : p.IsCycle) (hp) : (p.toDeleteEdges s hp).IsCycle 
goal: (SimpleGraph.Walk.toDeleteEdges s p hp).IsCycle

full_name: SimpleGraph.Walk.toDeleteEdges_copy
code: @[simp]
theorem toDeleteEdges_copy {v u u' v' : V} (s : Set (Sym2 V))
    (p : G.Walk u v) (hu : u = u') (hv : v = v') (h) :
    (p.copy hu hv).toDeleteEdges s h =
      (p.toDeleteEdges s (by subst_vars; exact h)).copy hu hv 
goal: SimpleGraph.Walk.toDeleteEdges s (p.copy hu hv) h = (SimpleGraph.Walk.toDeleteEdges s p ⋯).copy hu hv

full_name: SimpleGraph.Reachable
code: /-- Two vertices are *reachable* if there is a walk between them.
This is equivalent to `Relation.ReflTransGen` of `G.Adj`.
See `SimpleGraph.reachable_iff_reflTransGen`. -/
def Reachable (u v : V) : Prop 
goal: Prop

full_name: SimpleGraph.reachable_iff_nonempty_univ
code: theorem reachable_iff_nonempty_univ {u v : V} :
    G.Reachable u v ↔ (Set.univ : Set (G.Walk u v)).Nonempty 
goal: G.Reachable u v ↔ Set.univ.Nonempty

full_name: SimpleGraph.not_reachable_iff_isEmpty_walk
code: lemma not_reachable_iff_isEmpty_walk {u v : V} : ¬G.Reachable u v ↔ IsEmpty (G.Walk u v) 
goal: ¬G.Reachable u v ↔ IsEmpty (G.Walk u v)

full_name: SimpleGraph.Reachable.elim
code: protected theorem Reachable.elim {p : Prop} {u v : V} (h : G.Reachable u v)
    (hp : G.Walk u v → p) : p 
goal: p

full_name: SimpleGraph.Reachable.elim_path
code: protected theorem Reachable.elim_path {p : Prop} {u v : V} (h : G.Reachable u v)
    (hp : G.Path u v → p) : p 
goal: p

full_name: SimpleGraph.Walk.reachable
code: protected theorem Walk.reachable {G : SimpleGraph V} {u v : V} (p : G.Walk u v) : G.Reachable u v 
goal: G.Reachable u v

full_name: SimpleGraph.Adj.reachable
code: protected theorem Adj.reachable {u v : V} (h : G.Adj u v) : G.Reachable u v 
goal: G.Reachable u v

full_name: SimpleGraph.Reachable.refl
code: @[refl]
protected theorem Reachable.refl (u : V) : G.Reachable u u 
goal: G.Reachable u u

full_name: SimpleGraph.Reachable.rfl
code: protected theorem Reachable.rfl {u : V} : G.Reachable u u 
goal: G.Reachable u u

full_name: SimpleGraph.Reachable.symm
code: @[symm]
protected theorem Reachable.symm {u v : V} (huv : G.Reachable u v) : G.Reachable v u 
goal: G.Reachable v u

full_name: SimpleGraph.reachable_comm
code: theorem reachable_comm {u v : V} : G.Reachable u v ↔ G.Reachable v u 
goal: G.Reachable u v ↔ G.Reachable v u

full_name: SimpleGraph.Reachable.trans
code: @[trans]
protected theorem Reachable.trans {u v w : V} (huv : G.Reachable u v) (hvw : G.Reachable v w) :
    G.Reachable u w 
goal: G.Reachable u w

full_name: SimpleGraph.reachable_iff_reflTransGen
code: theorem reachable_iff_reflTransGen (u v : V) :
    G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v 
goal: G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v

full_name: SimpleGraph.Reachable.map
code: protected theorem Reachable.map {u v : V} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G')
    (h : G.Reachable u v) : G'.Reachable (f u) (f v) 
goal: G'.Reachable (f u) (f v)

full_name: SimpleGraph.Reachable.mono
code: @[mono]
protected lemma Reachable.mono {u v : V} {G G' : SimpleGraph V}
    (h : G ≤ G') (Guv : G.Reachable u v) : G'.Reachable u v 
goal: G'.Reachable u v

full_name: SimpleGraph.Iso.reachable_iff
code: theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
    G'.Reachable (φ u) (φ v) ↔ G.Reachable u v 
goal: G'.Reachable (φ u) (φ v) ↔ G.Reachable u v

full_name: SimpleGraph.Iso.symm_apply_reachable
code: theorem Iso.symm_apply_reachable {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u : V}
    {v : V'} : G.Reachable (φ.symm v) u ↔ G'.Reachable v (φ u) 
goal: G.Reachable (φ.symm v) u ↔ G'.Reachable v (φ u)

full_name: SimpleGraph.reachable_is_equivalence
code: theorem reachable_is_equivalence : Equivalence G.Reachable 
goal: Equivalence G.Reachable

full_name: SimpleGraph.reachableSetoid
code: /-- The equivalence relation on vertices given by `SimpleGraph.Reachable`. -/
def reachableSetoid : Setoid V 
goal: Setoid V

full_name: SimpleGraph.Preconnected
code: /-- A graph is preconnected if every pair of vertices is reachable from one another. -/
def Preconnected : Prop 
goal: Prop

full_name: SimpleGraph.Preconnected.map
code: theorem Preconnected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
    (hG : G.Preconnected) : H.Preconnected 
goal: H.Preconnected

full_name: SimpleGraph.Preconnected.mono
code: @[mono]
protected lemma Preconnected.mono  {G G' : SimpleGraph V} (h : G ≤ G') (hG : G.Preconnected) :
    G'.Preconnected 
goal: G'.Preconnected

full_name: SimpleGraph.top_preconnected
code: lemma top_preconnected : (⊤ : SimpleGraph V).Preconnected 
goal: ⊤.Preconnected

full_name: SimpleGraph.Iso.preconnected_iff
code: theorem Iso.preconnected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
    G.Preconnected ↔ H.Preconnected 
goal: G.Preconnected ↔ H.Preconnected

full_name: SimpleGraph.Connected.preconnected
code: /-- A graph is connected if it's preconnected and contains at least one vertex.
This follows the convention observed by mathlib that something is connected iff it has
exactly one connected component.

There is a `CoeFun` instance so that `h u v` can be used instead of `h.Preconnected u v`. -/
@[mk_iff]
structure Connected : Prop where
  protected preconnected : G.Preconnected
  protected [nonempty : Nonempty V]
goal: G.Preconnected

full_name: SimpleGraph.Connected
code: /-- A graph is connected if it's preconnected and contains at least one vertex.
This follows the convention observed by mathlib that something is connected iff it has
exactly one connected component.

There is a `CoeFun` instance so that `h u v` can be used instead of `h.Preconnected u v`. -/
@[mk_iff]
structure Connected : Prop where
  protected preconnected : G.Preconnected
  protected [nonempty : Nonempty V]
goal: Prop

full_name: SimpleGraph.connected_iff
code: /-- A graph is connected if it's preconnected and contains at least one vertex.
This follows the convention observed by mathlib that something is connected iff it has
exactly one connected component.

There is a `CoeFun` instance so that `h u v` can be used instead of `h.Preconnected u v`. -/
@[mk_iff]
structure Connected : Prop where
  protected preconnected : G.Preconnected
  protected [nonempty : Nonempty V]
goal: G.Connected ↔ G.Preconnected ∧ Nonempty V

full_name: SimpleGraph.Connected.nonempty
code: /-- A graph is connected if it's preconnected and contains at least one vertex.
This follows the convention observed by mathlib that something is connected iff it has
exactly one connected component.

There is a `CoeFun` instance so that `h u v` can be used instead of `h.Preconnected u v`. -/
@[mk_iff]
structure Connected : Prop where
  protected preconnected : G.Preconnected
  protected [nonempty : Nonempty V]
goal: Nonempty V

full_name: SimpleGraph.connected_iff_exists_forall_reachable
code: lemma connected_iff_exists_forall_reachable : G.Connected ↔ ∃ v, ∀ w, G.Reachable v w 
goal: G.Connected ↔ ∃ v, ∀ (w : V), G.Reachable v w

full_name: SimpleGraph.instCoeFunConnectedForallForallReachable
code: instance : CoeFun G.Connected fun _ => ∀ u v : V, G.Reachable u v 
goal: CoeFun G.Connected fun x => ∀ (u v : V), G.Reachable u v

full_name: SimpleGraph.Connected.map
code: theorem Connected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
    (hG : G.Connected) : H.Connected 
goal: H.Connected

full_name: SimpleGraph.Connected.mono
code: @[mono]
protected lemma Connected.mono {G G' : SimpleGraph V} (h : G ≤ G')
    (hG : G.Connected) : G'.Connected 
goal: G'.Connected

full_name: SimpleGraph.top_connected
code: lemma top_connected [Nonempty V] : (⊤ : SimpleGraph V).Connected 
goal: ⊤.Connected

full_name: SimpleGraph.Iso.connected_iff
code: theorem Iso.connected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
    G.Connected ↔ H.Connected 
goal: G.Connected ↔ H.Connected

full_name: SimpleGraph.ConnectedComponent
code: /-- The quotient of `V` by the `SimpleGraph.Reachable` relation gives the connected
components of a graph. -/
def ConnectedComponent 
goal: Type u

full_name: SimpleGraph.connectedComponentMk
code: /-- Gives the connected component containing a particular vertex. -/
def connectedComponentMk (v : V) : G.ConnectedComponent 
goal: G.ConnectedComponent

full_name: SimpleGraph.ConnectedComponent.inhabited_default
code: @[simps]
instance inhabited [Inhabited V] : Inhabited G.ConnectedComponent 
goal: default = G.connectedComponentMk default

full_name: SimpleGraph.ConnectedComponent.inhabited
code: @[simps]
instance inhabited [Inhabited V] : Inhabited G.ConnectedComponent 
goal: Inhabited G.ConnectedComponent

full_name: SimpleGraph.ConnectedComponent.ind
code: @[elab_as_elim]
protected theorem ind {β : G.ConnectedComponent → Prop}
    (h : ∀ v : V, β (G.connectedComponentMk v)) (c : G.ConnectedComponent) : β c 
goal: β c

full_name: SimpleGraph.ConnectedComponent.ind₂
code: @[elab_as_elim]
protected theorem ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
    (h : ∀ v w : V, β (G.connectedComponentMk v) (G.connectedComponentMk w))
    (c d : G.ConnectedComponent) : β c d 
goal: β c d

full_name: SimpleGraph.ConnectedComponent.sound
code: protected theorem sound {v w : V} :
    G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w 
goal: G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w

full_name: SimpleGraph.ConnectedComponent.exact
code: protected theorem exact {v w : V} :
    G.connectedComponentMk v = G.connectedComponentMk w → G.Reachable v w 
goal: G.connectedComponentMk v = G.connectedComponentMk w → G.Reachable v w

full_name: SimpleGraph.ConnectedComponent.eq
code: @[simp]
protected theorem eq {v w : V} :
    G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w 
goal: G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w

full_name: SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj
code: theorem connectedComponentMk_eq_of_adj {v w : V} (a : G.Adj v w) :
    G.connectedComponentMk v = G.connectedComponentMk w 
goal: G.connectedComponentMk v = G.connectedComponentMk w

full_name: SimpleGraph.ConnectedComponent.lift
code: /-- The `ConnectedComponent` specialization of `Quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
protected def lift {β : Sort*} (f : V → β)
    (h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w) : G.ConnectedComponent → β 
goal: G.ConnectedComponent → β

full_name: SimpleGraph.ConnectedComponent.lift_mk
code: @[simp]
protected theorem lift_mk {β : Sort*} {f : V → β}
    {h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w} {v : V} :
    ConnectedComponent.lift f h (G.connectedComponentMk v) = f v 
goal: SimpleGraph.ConnectedComponent.lift f h (G.connectedComponentMk v) = f v

full_name: SimpleGraph.ConnectedComponent.exists
code: protected theorem «exists» {p : G.ConnectedComponent → Prop} :
    (∃ c : G.ConnectedComponent, p c) ↔ ∃ v, p (G.connectedComponentMk v) 
goal: (∃ c, p c) ↔ ∃ v, p (G.connectedComponentMk v)

full_name: SimpleGraph.ConnectedComponent.forall
code: protected theorem «forall» {p : G.ConnectedComponent → Prop} :
    (∀ c : G.ConnectedComponent, p c) ↔ ∀ v, p (G.connectedComponentMk v) 
goal: (∀ (c : G.ConnectedComponent), p c) ↔ ∀ (v : V), p (G.connectedComponentMk v)

full_name: SimpleGraph.Preconnected.subsingleton_connectedComponent
code: theorem _root_.SimpleGraph.Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
    Subsingleton G.ConnectedComponent 
goal: Subsingleton G.ConnectedComponent

full_name: SimpleGraph.ConnectedComponent.recOn
code: /-- This is `Quot.recOn` specialized to connected components.
For convenience, it strengthens the assumptions in the hypothesis
to provide a path between the vertices. -/
@[elab_as_elim]
def recOn
    {motive : G.ConnectedComponent → Sort*}
    (c : G.ConnectedComponent)
    (f : (v : V) → motive (G.connectedComponentMk v))
    (h : ∀ (u v : V) (p : G.Walk u v) (_ : p.IsPath),
      ConnectedComponent.sound p.reachable ▸ f u = f v) :
    motive c 
goal: motive c

full_name: SimpleGraph.ConnectedComponent.map
code: /-- The map on connected components induced by a graph homomorphism. -/
def map (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent 
goal: G'.ConnectedComponent

full_name: SimpleGraph.ConnectedComponent.map_mk
code: @[simp]
theorem map_mk (φ : G →g G') (v : V) :
    (G.connectedComponentMk v).map φ = G'.connectedComponentMk (φ v) 
goal: SimpleGraph.ConnectedComponent.map φ (G.connectedComponentMk v) = G'.connectedComponentMk (φ v)

full_name: SimpleGraph.ConnectedComponent.map_id
code: @[simp]
theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C 
goal: SimpleGraph.ConnectedComponent.map SimpleGraph.Hom.id C = C

full_name: SimpleGraph.ConnectedComponent.map_comp
code: @[simp]
theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
    (C.map φ).map ψ = C.map (ψ.comp φ) 
goal: SimpleGraph.ConnectedComponent.map ψ (SimpleGraph.ConnectedComponent.map φ C) =
  SimpleGraph.ConnectedComponent.map (ψ.comp φ) C

full_name: SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
code: @[simp]
theorem iso_image_comp_eq_map_iff_eq_comp {C : G.ConnectedComponent} :
    G'.connectedComponentMk (φ v) = C.map ↑(↑φ : G ↪g G') ↔ G.connectedComponentMk v = C 
goal: G'.connectedComponentMk (φ v) = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ).toRelHom C ↔
  G.connectedComponentMk v = C

full_name: SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map
code: @[simp]
theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
    G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ 
goal: G.connectedComponentMk (φ.symm v') = C ↔
  G'.connectedComponentMk v' = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ).toRelHom C

full_name: SimpleGraph.Iso.connectedComponentEquiv_symm_apply
code: /-- An isomorphism of graphs induces a bijection of connected components. -/
@[simps]
def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent 
goal: φ.connectedComponentEquiv.symm C = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ.symm).toRelHom C

full_name: SimpleGraph.Iso.connectedComponentEquiv_apply
code: /-- An isomorphism of graphs induces a bijection of connected components. -/
@[simps]
def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent 
goal: φ.connectedComponentEquiv C = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ).toRelHom C

full_name: SimpleGraph.Iso.connectedComponentEquiv
code: /-- An isomorphism of graphs induces a bijection of connected components. -/
@[simps]
def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent 
goal: G.ConnectedComponent ≃ G'.ConnectedComponent

full_name: SimpleGraph.Iso.connectedComponentEquiv_refl
code: @[simp]
theorem connectedComponentEquiv_refl :
    (Iso.refl : G ≃g G).connectedComponentEquiv = Equiv.refl _ 
goal: SimpleGraph.Iso.refl.connectedComponentEquiv = Equiv.refl G.ConnectedComponent

full_name: SimpleGraph.Iso.connectedComponentEquiv_symm
code: @[simp]
theorem connectedComponentEquiv_symm (φ : G ≃g G') :
    φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm 
goal: φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm

full_name: SimpleGraph.Iso.connectedComponentEquiv_trans
code: @[simp]
theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
    connectedComponentEquiv (φ.trans φ') =
    φ.connectedComponentEquiv.trans φ'.connectedComponentEquiv 
goal: SimpleGraph.Iso.connectedComponentEquiv (RelIso.trans φ φ') = φ.connectedComponentEquiv.trans φ'.connectedComponentEquiv

full_name: SimpleGraph.ConnectedComponent.supp
code: /-- The set of vertices in a connected component of a graph. -/
def supp (C : G.ConnectedComponent) 
goal: Set V

full_name: SimpleGraph.ConnectedComponent.supp_injective
code: @[ext]
theorem supp_injective :
    Function.Injective (ConnectedComponent.supp : G.ConnectedComponent → Set V) 
goal: Function.Injective SimpleGraph.ConnectedComponent.supp

full_name: SimpleGraph.ConnectedComponent.supp_inj
code: @[simp]
theorem supp_inj {C D : G.ConnectedComponent} : C.supp = D.supp ↔ C = D 
goal: C.supp = D.supp ↔ C = D

full_name: SimpleGraph.ConnectedComponent.instSetLike
code: instance : SetLike G.ConnectedComponent V 
goal: SetLike G.ConnectedComponent V

full_name: SimpleGraph.ConnectedComponent.mem_supp_iff
code: @[simp]
theorem mem_supp_iff (C : G.ConnectedComponent) (v : V) :
    v ∈ C.supp ↔ G.connectedComponentMk v = C 
goal: v ∈ C.supp ↔ G.connectedComponentMk v = C

full_name: SimpleGraph.ConnectedComponent.connectedComponentMk_mem
code: theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v 
goal: v ∈ G.connectedComponentMk v

full_name: SimpleGraph.ConnectedComponent.isoEquivSupp
code: /-- The equivalence between connected components, induced by an isomorphism of graphs,
itself defines an equivalence on the supports of each connected component.
-/
def isoEquivSupp (φ : G ≃g G') (C : G.ConnectedComponent) :
    C.supp ≃ (φ.connectedComponentEquiv C).supp 
goal: ↑C.supp ≃ ↑(φ.connectedComponentEquiv C).supp

full_name: SimpleGraph.ConnectedComponent.mem_coe_supp_of_adj
code: lemma mem_coe_supp_of_adj {v w : V} {H : Subgraph G} {c : ConnectedComponent H.coe}
    (hv : v ∈ (↑) '' (c : Set H.verts)) (hw : w ∈ H.verts)
    (hadj : H.Adj v w) : w ∈ (↑) '' (c : Set H.verts)
goal: w ∈ Subtype.val '' ↑c

full_name: SimpleGraph.pairwise_disjoint_supp_connectedComponent
code: lemma pairwise_disjoint_supp_connectedComponent (G : SimpleGraph V) :
    Pairwise fun c c' : ConnectedComponent G ↦ Disjoint c.supp c'.supp 
goal: Pairwise fun c c' => Disjoint c.supp c'.supp

full_name: SimpleGraph.iUnion_connectedComponentSupp
code: lemma iUnion_connectedComponentSupp (G : SimpleGraph V) :
    ⋃ c : G.ConnectedComponent, c.supp = Set.univ 
goal: ⋃ c, c.supp = Set.univ

full_name: SimpleGraph.Preconnected.set_univ_walk_nonempty
code: theorem Preconnected.set_univ_walk_nonempty (hconn : G.Preconnected) (u v : V) :
    (Set.univ : Set (G.Walk u v)).Nonempty 
goal: Set.univ.Nonempty

full_name: SimpleGraph.Connected.set_univ_walk_nonempty
code: theorem Connected.set_univ_walk_nonempty (hconn : G.Connected) (u v : V) :
    (Set.univ : Set (G.Walk u v)).Nonempty 
goal: Set.univ.Nonempty

full_name: SimpleGraph.IsBridge
code: /-- An edge of a graph is a *bridge* if, after removing it, its incident vertices
are no longer reachable from one another. -/
def IsBridge (G : SimpleGraph V) (e : Sym2 V) : Prop 
goal: Prop

full_name: SimpleGraph.isBridge_iff
code: theorem isBridge_iff {u v : V} :
    G.IsBridge s(u, v) ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {s(u, v)}).Reachable u v 
goal: G.IsBridge s(u, v) ↔ G.Adj u v ∧ ¬(G \ SimpleGraph.fromEdgeSet {s(u, v)}).Reachable u v

full_name: SimpleGraph.reachable_delete_edges_iff_exists_walk
code: theorem reachable_delete_edges_iff_exists_walk {v w : V} :
    (G \ fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ p : G.Walk v w, ¬s(v, w) ∈ p.edges 
goal: (G \ SimpleGraph.fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ p, s(v, w) ∉ p.edges

full_name: SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges
code: theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
    G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ p : G.Walk v w, s(v, w) ∈ p.edges 
goal: G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ (p : G.Walk v w), s(v, w) ∈ p.edges

full_name: SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
code: theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
    (hb : ∀ p : G.Walk v w, s(v, w) ∈ p.edges) (c : G.Walk u u) (hc : c.IsTrail)
    (he : s(v, w) ∈ c.edges)
    (hw : w ∈ (c.takeUntil v (c.fst_mem_support_of_mem_edges he)).support) : False 
goal: False

full_name: SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
code: theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
    G.Adj v w ∧ (G \ fromEdgeSet {s(v, w)}).Reachable v w ↔
      ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ s(v, w) ∈ p.edges 
goal: G.Adj v w ∧ (G \ SimpleGraph.fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ u p, p.IsCycle ∧ s(v, w) ∈ p.edges

full_name: SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem
code: theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} : G.IsBridge s(v, w) ↔
    G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges 
goal: G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges

full_name: SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem
code: theorem isBridge_iff_mem_and_forall_cycle_not_mem {e : Sym2 V} :
    G.IsBridge e ↔ e ∈ G.edgeSet ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges 
goal: G.IsBridge e ↔ e ∈ G.edgeSet ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges