File: Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

full_name: SimpleGraph.Subgraph.Preconnected
code: /-- A subgraph is preconnected if it is preconnected when coerced to be a simple graph.

Note: This is a structure to make it so one can be precise about how dot notation resolves. -/
protected structure Preconnected (H : G.Subgraph) : Prop where
  protected coe : H.coe.Preconnected
goal: Prop

full_name: SimpleGraph.Subgraph.Preconnected.coe
code: /-- A subgraph is preconnected if it is preconnected when coerced to be a simple graph.

Note: This is a structure to make it so one can be precise about how dot notation resolves. -/
protected structure Preconnected (H : G.Subgraph) : Prop where
  protected coe : H.coe.Preconnected
goal: H.coe.Preconnected

full_name: SimpleGraph.Subgraph.instCoePreconnectedPreconnectedElemVertsCoe
code: instance {H : G.Subgraph} : Coe H.Preconnected H.coe.Preconnected 
goal: Coe H.Preconnected H.coe.Preconnected

full_name: SimpleGraph.Subgraph.instCoeFunPreconnectedForallForallReachableElemVertsCoe
code: instance {H : G.Subgraph} : CoeFun H.Preconnected (fun _ => ∀ u v : H.verts, H.coe.Reachable u v) 
goal: CoeFun H.Preconnected fun x => ∀ (u v : ↑H.verts), H.coe.Reachable u v

full_name: SimpleGraph.Subgraph.preconnected_iff
code: protected lemma preconnected_iff {H : G.Subgraph} :
    H.Preconnected ↔ H.coe.Preconnected 
goal: H.Preconnected ↔ H.coe.Preconnected

full_name: SimpleGraph.Subgraph.Connected
code: /-- A subgraph is connected if it is connected when coerced to be a simple graph.

Note: This is a structure to make it so one can be precise about how dot notation resolves. -/
protected structure Connected (H : G.Subgraph) : Prop where
  protected coe : H.coe.Connected
goal: Prop

full_name: SimpleGraph.Subgraph.Connected.coe
code: /-- A subgraph is connected if it is connected when coerced to be a simple graph.

Note: This is a structure to make it so one can be precise about how dot notation resolves. -/
protected structure Connected (H : G.Subgraph) : Prop where
  protected coe : H.coe.Connected
goal: H.coe.Connected

full_name: SimpleGraph.Subgraph.instCoeConnectedConnectedElemVertsCoe
code: instance {H : G.Subgraph} : Coe H.Connected H.coe.Connected 
goal: Coe H.Connected H.coe.Connected

full_name: SimpleGraph.Subgraph.instCoeFunConnectedForallForallReachableElemVertsCoe
code: instance {H : G.Subgraph} : CoeFun H.Connected (fun _ => ∀ u v : H.verts, H.coe.Reachable u v) 
goal: CoeFun H.Connected fun x => ∀ (u v : ↑H.verts), H.coe.Reachable u v

full_name: SimpleGraph.Subgraph.connected_iff'
code: protected lemma connected_iff' {H : G.Subgraph} :
    H.Connected ↔ H.coe.Connected 
goal: H.Connected ↔ H.coe.Connected

full_name: SimpleGraph.Subgraph.connected_iff
code: protected lemma connected_iff {H : G.Subgraph} :
    H.Connected ↔ H.Preconnected ∧ H.verts.Nonempty 
goal: H.Connected ↔ H.Preconnected ∧ H.verts.Nonempty

full_name: SimpleGraph.Subgraph.Connected.preconnected
code: protected lemma Connected.preconnected {H : G.Subgraph} (h : H.Connected) : H.Preconnected 
goal: H.Preconnected

full_name: SimpleGraph.Subgraph.Connected.nonempty
code: protected lemma Connected.nonempty {H : G.Subgraph} (h : H.Connected) : H.verts.Nonempty 
goal: H.verts.Nonempty

full_name: SimpleGraph.Subgraph.singletonSubgraph_connected
code: theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected 
goal: (G.singletonSubgraph v).Connected

full_name: SimpleGraph.Subgraph.subgraphOfAdj_connected
code: @[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected 
goal: (G.subgraphOfAdj hvw).Connected

full_name: SimpleGraph.Subgraph.top_induce_pair_connected_of_adj
code: lemma top_induce_pair_connected_of_adj {u v : V} (huv : G.Adj u v) :
    ((⊤ : G.Subgraph).induce {u, v}).Connected 
goal: (⊤.induce {u, v}).Connected

full_name: SimpleGraph.Subgraph.Connected.mono
code: @[mono]
protected lemma Connected.mono {H H' : G.Subgraph} (hle : H ≤ H') (hv : H.verts = H'.verts)
    (h : H.Connected) : H'.Connected 
goal: H'.Connected

full_name: SimpleGraph.Subgraph.Connected.mono'
code: protected lemma Connected.mono' {H H' : G.Subgraph}
    (hle : ∀ v w, H.Adj v w → H'.Adj v w) (hv : H.verts = H'.verts)
    (h : H.Connected) : H'.Connected 
goal: H'.Connected

full_name: SimpleGraph.Subgraph.Connected.sup
code: protected lemma Connected.sup {H K : G.Subgraph}
    (hH : H.Connected) (hK : K.Connected) (hn : (H ⊓ K).verts.Nonempty) :
    (H ⊔ K).Connected 
goal: (H ⊔ K).Connected

full_name: SimpleGraph.Walk.toSubgraph
code: /-- The subgraph consisting of the vertices and edges of the walk. -/
@[simp]
protected def toSubgraph {u v : V} : G.Walk u v → G.Subgraph
  
goal: G.Walk u v → G.Subgraph

full_name: SimpleGraph.Walk.toSubgraph_cons_nil_eq_subgraphOfAdj
code: theorem toSubgraph_cons_nil_eq_subgraphOfAdj (h : G.Adj u v) :
    (cons h nil).toSubgraph = G.subgraphOfAdj h 
goal: (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).toSubgraph = G.subgraphOfAdj h

full_name: SimpleGraph.Walk.mem_verts_toSubgraph
code: theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w ∈ p.support 
goal: w ∈ p.toSubgraph.verts ↔ w ∈ p.support

full_name: SimpleGraph.Walk.start_mem_verts_toSubgraph
code: lemma start_mem_verts_toSubgraph (p : G.Walk u v) : u ∈ p.toSubgraph.verts 
goal: u ∈ p.toSubgraph.verts

full_name: SimpleGraph.Walk.end_mem_verts_toSubgraph
code: lemma end_mem_verts_toSubgraph (p : G.Walk u v) : v ∈ p.toSubgraph.verts 
goal: v ∈ p.toSubgraph.verts

full_name: SimpleGraph.Walk.verts_toSubgraph
code: @[simp]
theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = { w | w ∈ p.support } 
goal: p.toSubgraph.verts = {w | w ∈ p.support}

full_name: SimpleGraph.Walk.mem_edges_toSubgraph
code: theorem mem_edges_toSubgraph (p : G.Walk u v) {e : Sym2 V} :
    e ∈ p.toSubgraph.edgeSet ↔ e ∈ p.edges 
goal: e ∈ p.toSubgraph.edgeSet ↔ e ∈ p.edges

full_name: SimpleGraph.Walk.edgeSet_toSubgraph
code: @[simp]
theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSet = { e | e ∈ p.edges } 
goal: p.toSubgraph.edgeSet = {e | e ∈ p.edges}

full_name: SimpleGraph.Walk.toSubgraph_append
code: @[simp]
theorem toSubgraph_append (p : G.Walk u v) (q : G.Walk v w) :
    (p.append q).toSubgraph = p.toSubgraph ⊔ q.toSubgraph 
goal: (p.append q).toSubgraph = p.toSubgraph ⊔ q.toSubgraph

full_name: SimpleGraph.Walk.toSubgraph_reverse
code: @[simp]
theorem toSubgraph_reverse (p : G.Walk u v) : p.reverse.toSubgraph = p.toSubgraph 
goal: p.reverse.toSubgraph = p.toSubgraph

full_name: SimpleGraph.Walk.toSubgraph_rotate
code: @[simp]
theorem toSubgraph_rotate [DecidableEq V] (c : G.Walk v v) (h : u ∈ c.support) :
    (c.rotate h).toSubgraph = c.toSubgraph 
goal: (c.rotate h).toSubgraph = c.toSubgraph

full_name: SimpleGraph.Walk.toSubgraph_map
code: @[simp]
theorem toSubgraph_map (f : G →g G') (p : G.Walk u v) :
    (p.map f).toSubgraph = p.toSubgraph.map f 
goal: (SimpleGraph.Walk.map f p).toSubgraph = SimpleGraph.Subgraph.map f p.toSubgraph

full_name: SimpleGraph.Walk.finite_neighborSet_toSubgraph
code: @[simp]
theorem finite_neighborSet_toSubgraph (p : G.Walk u v) : (p.toSubgraph.neighborSet w).Finite 
goal: (p.toSubgraph.neighborSet w).Finite

full_name: SimpleGraph.Walk.toSubgraph_le_induce_support
code: lemma toSubgraph_le_induce_support (p : G.Walk u v) :
    p.toSubgraph ≤ (⊤ : G.Subgraph).induce {v | v ∈ p.support} 
goal: p.toSubgraph ≤ ⊤.induce {v_1 | v_1 ∈ p.support}

full_name: SimpleGraph.Walk.toSubgraph_adj_getVert
code: theorem toSubgraph_adj_getVert {u v} (w : G.Walk u v) {i : ℕ} (hi : i < w.length) :
    w.toSubgraph.Adj (w.getVert i) (w.getVert (i + 1)) 
goal: w.toSubgraph.Adj (w.getVert i) (w.getVert (i + 1))

full_name: SimpleGraph.Walk.toSubgraph_adj_iff
code: theorem toSubgraph_adj_iff {u v u' v'} (w : G.Walk u v) :
    w.toSubgraph.Adj u' v' ↔ ∃ i, s(w.getVert i, w.getVert (i + 1)) =
      s(u', v') ∧ i < w.length 
goal: w.toSubgraph.Adj u' v' ↔ ∃ i, s(w.getVert i, w.getVert (i + 1)) = s(u', v') ∧ i < w.length

full_name: SimpleGraph.Walk.toSubgraph_connected
code: lemma _root_.SimpleGraph.Walk.toSubgraph_connected {u v : V} (p : G.Walk u v) :
    p.toSubgraph.Connected 
goal: p.toSubgraph.Connected

full_name: SimpleGraph.Subgraph.induce_union_connected
code: lemma induce_union_connected {H : G.Subgraph} {s t : Set V}
    (sconn : (H.induce s).Connected) (tconn : (H.induce t).Connected)
    (sintert : (s ⊓ t).Nonempty) :
    (H.induce (s ∪ t)).Connected 
goal: (H.induce (s ∪ t)).Connected

full_name: SimpleGraph.Subgraph.Connected.adj_union
code: lemma Connected.adj_union {H K : G.Subgraph}
    (Hconn : H.Connected) (Kconn : K.Connected) {u v : V} (uH : u ∈ H.verts) (vK : v ∈ K.verts)
    (huv : G.Adj u v) :
    ((⊤ : G.Subgraph).induce {u, v} ⊔ H ⊔ K).Connected 
goal: (⊤.induce {u, v} ⊔ H ⊔ K).Connected

full_name: SimpleGraph.Subgraph.preconnected_iff_forall_exists_walk_subgraph
code: lemma preconnected_iff_forall_exists_walk_subgraph (H : G.Subgraph) :
    H.Preconnected ↔ ∀ {u v}, u ∈ H.verts → v ∈ H.verts → ∃ p : G.Walk u v, p.toSubgraph ≤ H 
goal: H.Preconnected ↔ ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, p.toSubgraph ≤ H

full_name: SimpleGraph.Subgraph.connected_iff_forall_exists_walk_subgraph
code: lemma connected_iff_forall_exists_walk_subgraph (H : G.Subgraph) :
    H.Connected ↔
      H.verts.Nonempty ∧
        ∀ {u v}, u ∈ H.verts → v ∈ H.verts → ∃ p : G.Walk u v, p.toSubgraph ≤ H 
goal: H.Connected ↔ H.verts.Nonempty ∧ ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, p.toSubgraph ≤ H

full_name: SimpleGraph.connected_induce_iff
code: lemma connected_induce_iff {s : Set V} :
    (G.induce s).Connected ↔ ((⊤ : G.Subgraph).induce s).Connected 
goal: (SimpleGraph.induce s G).Connected ↔ (⊤.induce s).Connected

full_name: SimpleGraph.induce_union_connected
code: lemma induce_union_connected {s t : Set V}
    (sconn : (G.induce s).Connected) (tconn : (G.induce t).Connected)
    (sintert : (s ∩ t).Nonempty) :
    (G.induce (s ∪ t)).Connected 
goal: (SimpleGraph.induce (s ∪ t) G).Connected

full_name: SimpleGraph.induce_pair_connected_of_adj
code: lemma induce_pair_connected_of_adj {u v : V} (huv : G.Adj u v) :
    (G.induce {u, v}).Connected 
goal: (SimpleGraph.induce {u, v} G).Connected

full_name: SimpleGraph.Subgraph.Connected.induce_verts
code: lemma Subgraph.Connected.induce_verts {H : G.Subgraph} (h : H.Connected) :
    (G.induce H.verts).Connected 
goal: (SimpleGraph.induce H.verts G).Connected

full_name: SimpleGraph.Walk.connected_induce_support
code: lemma Walk.connected_induce_support {u v : V} (p : G.Walk u v) :
    (G.induce {v | v ∈ p.support}).Connected 
goal: (SimpleGraph.induce {v_1 | v_1 ∈ p.support} G).Connected

full_name: SimpleGraph.induce_connected_adj_union
code: lemma induce_connected_adj_union {v w : V} {s t : Set V}
    (sconn : (G.induce s).Connected) (tconn : (G.induce t).Connected)
    (hv : v ∈ s) (hw : w ∈ t) (ha : G.Adj v w) :
    (G.induce (s ∪ t)).Connected 
goal: (SimpleGraph.induce (s ∪ t) G).Connected

full_name: SimpleGraph.induce_connected_of_patches
code: lemma induce_connected_of_patches {s : Set V} (u : V) (hu : u ∈ s)
    (patches : ∀ {v}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'),
                  (G.induce s').Reachable ⟨u, hu'⟩ ⟨v, hv'⟩) : (G.induce s).Connected 
goal: (SimpleGraph.induce s G).Connected

full_name: SimpleGraph.induce_sUnion_connected_of_pairwise_not_disjoint
code: lemma induce_sUnion_connected_of_pairwise_not_disjoint {S : Set (Set V)} (Sn : S.Nonempty)
    (Snd : ∀ {s t}, s ∈ S → t ∈ S → (s ∩ t).Nonempty)
    (Sc : ∀ {s}, s ∈ S → (G.induce s).Connected) :
    (G.induce (⋃₀ S)).Connected 
goal: (SimpleGraph.induce (⋃₀ S) G).Connected

full_name: SimpleGraph.extend_finset_to_connected
code: lemma extend_finset_to_connected (Gpc : G.Preconnected) {t : Finset V} (tn : t.Nonempty) :
    ∃ (t' : Finset V), t ⊆ t' ∧ (G.induce (t' : Set V)).Connected 
goal: ∃ t', t ⊆ t' ∧ (SimpleGraph.induce (↑t') G).Connected