combinatorics.simple_graph.connectivity
⟷
Mathlib.Combinatorics.SimpleGraph.Connectivity
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -1526,6 +1526,14 @@ protected lemma reachable.map {G : simple_graph V} {G' : simple_graph V'}
(f : G →g G') {u v : V} (h : G.reachable u v) : G'.reachable (f u) (f v) :=
h.elim (λ p, ⟨p.map f⟩)
+lemma iso.reachable_iff {G : simple_graph V} {G' : simple_graph V'}
+ {φ : G ≃g G'} {u v : V} : G'.reachable (φ u) (φ v) ↔ G.reachable u v :=
+⟨λ r, (φ.left_inv u) ▸ (φ.left_inv v) ▸ (r.map φ.symm.to_hom), reachable.map φ.to_hom⟩
+
+lemma iso.symm_apply_reachable {G : simple_graph V} {G' : simple_graph V'}
+ {φ : G ≃g G'} {u : V} {v : V'} : G.reachable (φ.symm v) u ↔ G'.reachable v (φ u) :=
+by rw [← iso.reachable_iff, rel_iso.apply_symm_apply]
+
variables (G)
lemma reachable_is_equivalence : equivalence G.reachable :=
@@ -1605,6 +1613,10 @@ protected lemma exact {v w : V} :
G.connected_component_mk v = G.connected_component_mk w ↔ G.reachable v w :=
@quotient.eq _ G.reachable_setoid _ _
+lemma connected_component_mk_eq_of_adj {v w : V} (a : G.adj v w) :
+ G.connected_component_mk v = G.connected_component_mk w :=
+connected_component.sound a.reachable
+
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
protected def lift {β : Sort*} (f : V → β)
@@ -1642,6 +1654,96 @@ by { refine C.ind _, exact (λ _, rfl) }
(φ : G →g G') (ψ : G' →g G'') : (C.map φ).map ψ = C.map (ψ.comp φ) :=
by { refine C.ind _, exact (λ _, rfl), }
+
+variables {φ : G ≃g G'} {v : V} {v' : V'}
+
+@[simp] lemma iso_image_comp_eq_map_iff_eq_comp
+ {C : G.connected_component} :
+ G'.connected_component_mk (φ v) = C.map (↑(↑φ : G ↪g G')) ↔ (G.connected_component_mk v) = C :=
+begin
+ refine C.ind (λ u, _),
+ simp only [iso.reachable_iff, connected_component.map_mk,
+ rel_embedding.coe_coe_fn, rel_iso.coe_coe_fn, connected_component.eq],
+end
+
+@[simp] lemma iso_inv_image_comp_eq_iff_eq_map
+ {C : G.connected_component} :
+ G.connected_component_mk (φ.symm v') = C ↔
+ G'.connected_component_mk v' = C.map φ :=
+begin
+ refine C.ind (λ u, _),
+ simp only [iso.symm_apply_reachable, connected_component.eq, coe_coe,
+ connected_component.map_mk, rel_embedding.coe_coe_fn, rel_iso.coe_coe_fn],
+end
+
+end connected_component
+
+namespace iso
+
+/-- An isomorphism of graphs induces a bijection of connected components. -/
+@[simps]
+def connected_component_equiv (φ : G ≃g G') : G.connected_component ≃ G'.connected_component :=
+{ to_fun := connected_component.map φ,
+ inv_fun := connected_component.map φ.symm,
+ left_inv := λ C, connected_component.ind
+ (λ v, congr_arg (G.connected_component_mk) (equiv.left_inv φ.to_equiv v)) C,
+ right_inv := λ C, connected_component.ind
+ (λ v, congr_arg (G'.connected_component_mk) (equiv.right_inv φ.to_equiv v)) C }
+
+@[simp] lemma connected_component_equiv_refl :
+ (iso.refl : G ≃g G).connected_component_equiv = equiv.refl _ :=
+by { ext ⟨v⟩, refl, }
+
+@[simp] lemma connected_component_equiv_symm (φ : G ≃g G') :
+ φ.symm.connected_component_equiv = φ.connected_component_equiv.symm := by { ext ⟨_⟩, refl, }
+
+@[simp] lemma connected_component_equiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
+ connected_component_equiv (φ.trans φ') =
+ φ.connected_component_equiv.trans φ'.connected_component_equiv := by { ext ⟨_⟩, refl, }
+
+end iso
+
+namespace connected_component
+
+/-- The set of vertices in a connected component of a graph. -/
+def supp (C : G.connected_component) :=
+ { v | G.connected_component_mk v = C }
+
+@[ext] lemma supp_injective :
+ function.injective (connected_component.supp : G.connected_component → set V) :=
+begin
+ refine connected_component.ind₂ _,
+ intros v w,
+ simp only [connected_component.supp, set.ext_iff, connected_component.eq, set.mem_set_of_eq],
+ intro h,
+ rw [reachable_comm, h],
+end
+
+@[simp]
+lemma supp_inj {C D : G.connected_component} : C.supp = D.supp ↔ C = D :=
+connected_component.supp_injective.eq_iff
+
+instance : set_like G.connected_component V :=
+{ coe := connected_component.supp,
+ coe_injective' := connected_component.supp_injective, }
+
+@[simp] lemma mem_supp_iff (C : G.connected_component) (v : V) :
+ v ∈ C.supp ↔ G.connected_component_mk v = C := iff.rfl
+
+lemma connected_component_mk_mem {v : V} :
+ v ∈ G.connected_component_mk v := by exact rfl
+
+/--
+The equivalence between connected components, induced by an isomorphism of graphs,
+itself defines an equivalence on the supports of each connected component.
+-/
+def iso_equiv_supp (φ : G ≃g G') (C : G.connected_component) :
+ C.supp ≃ (φ.connected_component_equiv C).supp :=
+{ to_fun := λ v, ⟨φ v, connected_component.iso_image_comp_eq_map_iff_eq_comp.mpr v.prop⟩,
+ inv_fun := λ v', ⟨φ.symm v', connected_component.iso_inv_image_comp_eq_iff_eq_map.mpr v'.prop⟩,
+ left_inv := λ v, subtype.ext_val (φ.to_equiv.left_inv ↑v),
+ right_inv := λ v, subtype.ext_val (φ.to_equiv.right_inv ↑v), }
+
end connected_component
/-- A subgraph is connected if it is connected as a simple graph. -/
@@ -1994,3 +2096,4 @@ sym2.ind (λ v w, is_bridge_iff_adj_and_forall_cycle_not_mem) e
end bridge_edges
end simple_graph
+
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -1573,78 +1573,74 @@ def connected_component := quot G.reachable
/-- Gives the connected component containing a particular vertex. -/
def connected_component_mk (v : V) : G.connected_component := quot.mk G.reachable v
-@[simps] instance connected_component.inhabited [inhabited V] : inhabited G.connected_component :=
-⟨G.connected_component_mk default⟩
+variables {V' G G' G''}
-section connected_component
-variables {G}
+namespace connected_component
+
+@[simps] instance inhabited [inhabited V] : inhabited G.connected_component :=
+⟨G.connected_component_mk default⟩
@[elab_as_eliminator]
-protected lemma connected_component.ind {β : G.connected_component → Prop}
+protected lemma ind {β : G.connected_component → Prop}
(h : ∀ (v : V), β (G.connected_component_mk v)) (c : G.connected_component) : β c :=
quot.ind h c
@[elab_as_eliminator]
-protected lemma connected_component.ind₂ {β : G.connected_component → G.connected_component → Prop}
+protected lemma ind₂ {β : G.connected_component → G.connected_component → Prop}
(h : ∀ (v w : V), β (G.connected_component_mk v) (G.connected_component_mk w))
(c d : G.connected_component) : β c d :=
quot.induction_on₂ c d h
-protected lemma connected_component.sound {v w : V} :
+protected lemma sound {v w : V} :
G.reachable v w → G.connected_component_mk v = G.connected_component_mk w := quot.sound
-protected lemma connected_component.exact {v w : V} :
+protected lemma exact {v w : V} :
G.connected_component_mk v = G.connected_component_mk w → G.reachable v w :=
@quotient.exact _ G.reachable_setoid _ _
-@[simp] protected lemma connected_component.eq {v w : V} :
+@[simp] protected lemma eq {v w : V} :
G.connected_component_mk v = G.connected_component_mk w ↔ G.reachable v w :=
@quotient.eq _ G.reachable_setoid _ _
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
-protected def connected_component.lift {β : Sort*} (f : V → β)
+protected def lift {β : Sort*} (f : V → β)
(h : ∀ (v w : V) (p : G.walk v w), p.is_path → f v = f w) : G.connected_component → β :=
quot.lift f (λ v w (h' : G.reachable v w), h'.elim_path (λ hp, h v w hp hp.2))
-@[simp] protected lemma connected_component.lift_mk {β : Sort*} {f : V → β}
+@[simp] protected lemma lift_mk {β : Sort*} {f : V → β}
{h : ∀ (v w : V) (p : G.walk v w), p.is_path → f v = f w} {v : V} :
connected_component.lift f h (G.connected_component_mk v) = f v := rfl
-protected lemma connected_component.«exists» {p : G.connected_component → Prop} :
+protected lemma «exists» {p : G.connected_component → Prop} :
(∃ (c : G.connected_component), p c) ↔ ∃ v, p (G.connected_component_mk v) :=
(surjective_quot_mk G.reachable).exists
-protected lemma connected_component.«forall» {p : G.connected_component → Prop} :
+protected lemma «forall» {p : G.connected_component → Prop} :
(∀ (c : G.connected_component), p c) ↔ ∀ v, p (G.connected_component_mk v) :=
(surjective_quot_mk G.reachable).forall
-lemma preconnected.subsingleton_connected_component (h : G.preconnected) :
+lemma _root_.simple_graph.preconnected.subsingleton_connected_component (h : G.preconnected) :
subsingleton G.connected_component :=
⟨connected_component.ind₂ (λ v w, connected_component.sound (h v w))⟩
/-- The map on connected components induced by a graph homomorphism. -/
-def connected_component.map {V : Type*} {G : simple_graph V} {V' : Type*} {G' : simple_graph V'}
- (φ : G →g G') (C : G.connected_component) : G'.connected_component :=
+def map (φ : G →g G') (C : G.connected_component) : G'.connected_component :=
C.lift (λ v, G'.connected_component_mk (φ v)) $ λ v w p _,
connected_component.eq.mpr (p.map φ).reachable
-@[simp] lemma connected_component.map_mk
- {V : Type*} {G : simple_graph V} {V' : Type*} {G' : simple_graph V'} (φ : G →g G') (v : V) :
+@[simp] lemma map_mk (φ : G →g G') (v : V) :
(G.connected_component_mk v).map φ = G'.connected_component_mk (φ v) := rfl
-@[simp] lemma connected_component.map_id (C : connected_component G) : C.map hom.id = C :=
+@[simp] lemma map_id (C : connected_component G) : C.map hom.id = C :=
by { refine C.ind _, exact (λ _, rfl) }
-@[simp] lemma connected_component.map_comp
- {V' : Type*} {G' : simple_graph V'} {V'' : Type*} {G'' : simple_graph V''}
- (C : G.connected_component) (φ : G →g G') (ψ : G' →g G'') : (C.map φ).map ψ = C.map (ψ.comp φ) :=
+@[simp] lemma map_comp (C : G.connected_component)
+ (φ : G →g G') (ψ : G' →g G'') : (C.map φ).map ψ = C.map (ψ.comp φ) :=
by { refine C.ind _, exact (λ _, rfl), }
end connected_component
-variables {G}
-
/-- A subgraph is connected if it is connected as a simple graph. -/
abbreviation subgraph.connected (H : G.subgraph) : Prop := H.coe.connected
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1174,7 +1174,7 @@ theorem IsTrail.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
#print SimpleGraph.Walk.cons_isTrail_iff /-
@[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 ∧ ⟦(u, v)⟧ ∉ p.edges := by simp [is_trail_def, and_comm']
+ (cons h p).IsTrail ↔ p.IsTrail ∧ ⟦(u, v)⟧ ∉ p.edges := by simp [is_trail_def, and_comm]
#align simple_graph.walk.cons_is_trail_iff SimpleGraph.Walk.cons_isTrail_iff
-/
@@ -2814,7 +2814,7 @@ theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w
· simp
· have : w = y ∨ w ∈ p'.support ↔ w ∈ p'.support :=
⟨by rintro (rfl | h) <;> simp [*], by simp (config := { contextual := true })⟩
- simp [ih, or_assoc', this]
+ simp [ih, or_assoc, this]
#align simple_graph.walk.mem_verts_to_subgraph SimpleGraph.Walk.mem_verts_toSubgraph
-/
@@ -3008,7 +3008,7 @@ theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
instance fintypeSetPathLength (u v : V) (n : ℕ) :
Fintype {p : G.Walk u v | p.IsPath ∧ p.length = n} :=
Fintype.ofFinset ((G.finsetWalkLength n u v).filterₓ Walk.IsPath) <| by
- simp [walk.mem_finset_walk_length_iff_length_eq, and_comm']
+ simp [walk.mem_finset_walk_length_iff_length_eq, and_comm]
#align simple_graph.fintype_set_path_length SimpleGraph.fintypeSetPathLength
-/
@@ -3158,7 +3158,7 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
apply
reachable_delete_edges_iff_exists_cycle.aux hb' (pvu.append puv) (hc.to_trail.rotate hvc) _
(walk.start_mem_support _)
- rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
+ rwa [walk.edges_append, List.mem_append, or_comm, ← List.mem_append, ← walk.edges_append,
walk.take_spec, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -614,21 +614,21 @@ theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk
· cases p'
· exact ⟨rfl, rfl⟩
· exfalso
- simp only [concat_nil, concat_cons] at he
+ simp only [concat_nil, concat_cons] at he
obtain ⟨rfl, he⟩ := he
- simp only [heq_iff_eq] at he
+ simp only [heq_iff_eq] at he
exact concat_ne_nil _ _ he.symm
- · rw [concat_cons] at he
+ · rw [concat_cons] at he
cases p'
· exfalso
- simp only [concat_nil] at he
+ simp only [concat_nil] at he
obtain ⟨rfl, he⟩ := he
- rw [heq_iff_eq] at he
+ rw [heq_iff_eq] at he
exact concat_ne_nil _ _ he
- · rw [concat_cons] at he
- simp only at he
+ · rw [concat_cons] at he
+ simp only at he
obtain ⟨rfl, he⟩ := he
- rw [heq_iff_eq] at he
+ rw [heq_iff_eq] at he
obtain ⟨rfl, rfl⟩ := p_ih he
exact ⟨rfl, rfl⟩
#align simple_graph.walk.concat_inj SimpleGraph.Walk.concat_inj
@@ -1024,7 +1024,7 @@ theorem dart_snd_mem_support_of_mem_darts {u v : V} (p : G.Walk u v) {d : G.Dart
theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
t ∈ p.support := by
obtain ⟨d, hd, he⟩ := list.mem_map.mp he
- rw [dart_edge_eq_mk_iff'] at he
+ rw [dart_edge_eq_mk_iff'] at he
rcases he with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
· exact dart_fst_mem_support_of_mem_darts _ hd
· exact dart_snd_mem_support_of_mem_darts _ hd
@@ -1033,7 +1033,7 @@ theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t,
#print SimpleGraph.Walk.snd_mem_support_of_mem_edges /-
theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
- u ∈ p.support := by rw [Sym2.eq_swap] at he ; exact p.fst_mem_support_of_mem_edges he
+ u ∈ p.support := by rw [Sym2.eq_swap] at he; exact p.fst_mem_support_of_mem_edges he
#align simple_graph.walk.snd_mem_support_of_mem_edges SimpleGraph.Walk.snd_mem_support_of_mem_edges
-/
@@ -1194,14 +1194,14 @@ theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p
#print SimpleGraph.Walk.IsTrail.of_append_left /-
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 := by
- rw [is_trail_def, edges_append, List.nodup_append] at h ; exact ⟨h.1⟩
+ rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.1⟩
#align simple_graph.walk.is_trail.of_append_left SimpleGraph.Walk.IsTrail.of_append_left
-/
#print SimpleGraph.Walk.IsTrail.of_append_right /-
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 := by
- rw [is_trail_def, edges_append, List.nodup_append] at h ; exact ⟨h.2.1⟩
+ rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.2.1⟩
#align simple_graph.walk.is_trail.of_append_right SimpleGraph.Walk.IsTrail.of_append_right
-/
@@ -1270,7 +1270,7 @@ 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 :=
by
rw [← is_path_reverse_iff] at h ⊢
- rw [reverse_append] at h
+ rw [reverse_append] at h
apply h.of_append_left
#align simple_graph.walk.is_path.of_append_right SimpleGraph.Walk.IsPath.of_append_right
-/
@@ -1342,7 +1342,7 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).append (p.dropUntil u h) = p :=
by
induction p
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
rfl
· obtain rfl | h := h
@@ -1369,13 +1369,13 @@ theorem count_support_takeUntil_eq_one {u v w : V} (p : G.Walk v w) (h : u ∈ p
(p.takeUntil u h).support.count u = 1 :=
by
induction p
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
simp!
· obtain rfl | h := h
· simp!
· simp! only
- split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
+ split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
#align simple_graph.walk.count_support_take_until_eq_one SimpleGraph.Walk.count_support_takeUntil_eq_one
-/
@@ -1384,7 +1384,7 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
(p.takeUntil u h).edges.count ⟦(u, x)⟧ ≤ 1 :=
by
induction' p with u' u' v' w' ha p' ih
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
simp!
· obtain rfl | h := h
@@ -1395,7 +1395,7 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
simp
· rw [edges_cons, List.count_cons]
split_ifs with h''
- · rw [Sym2.eq_iff] at h''
+ · rw [Sym2.eq_iff] at h''
obtain ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ := h''
· exact (h' rfl).elim
· cases p' <;> simp!
@@ -1468,7 +1468,7 @@ theorem length_takeUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).length ≤ p.length :=
by
have := congr_arg walk.length (p.take_spec h)
- rw [length_append] at this
+ rw [length_append] at this
exact Nat.le.intro this
#align simple_graph.walk.length_take_until_le SimpleGraph.Walk.length_takeUntil_le
-/
@@ -1478,7 +1478,7 @@ theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).length ≤ p.length :=
by
have := congr_arg walk.length (p.take_spec h)
- rw [length_append, add_comm] at this
+ rw [length_append, add_comm] at this
exact Nat.le.intro this
#align simple_graph.walk.length_drop_until_le SimpleGraph.Walk.length_dropUntil_le
-/
@@ -1486,28 +1486,28 @@ theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
#print SimpleGraph.Walk.IsTrail.takeUntil /-
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 :=
- IsTrail.of_append_left (by rwa [← take_spec _ h] at hc )
+ IsTrail.of_append_left (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_trail.take_until SimpleGraph.Walk.IsTrail.takeUntil
-/
#print SimpleGraph.Walk.IsTrail.dropUntil /-
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 :=
- IsTrail.of_append_right (by rwa [← take_spec _ h] at hc )
+ IsTrail.of_append_right (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_trail.drop_until SimpleGraph.Walk.IsTrail.dropUntil
-/
#print SimpleGraph.Walk.IsPath.takeUntil /-
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 :=
- IsPath.of_append_left (by rwa [← take_spec _ h] at hc )
+ IsPath.of_append_left (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_path.take_until SimpleGraph.Walk.IsPath.takeUntil
-/
#print SimpleGraph.Walk.IsPath.dropUntil /-
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 :=
- IsPath.of_append_right (by rwa [← take_spec _ h] at hc )
+ IsPath.of_append_right (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_path.drop_until SimpleGraph.Walk.IsPath.dropUntil
-/
@@ -1564,7 +1564,7 @@ protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
· exact (hc.ne_nil rfl).elim
· intro hn
have hn' := congr_arg length hn
- rw [rotate, length_append, add_comm, ← length_append, take_spec] at hn'
+ rw [rotate, length_append, add_comm, ← length_append, take_spec] at hn'
simpa using hn'
#align simple_graph.walk.is_circuit.rotate SimpleGraph.Walk.IsCircuit.rotate
-/
@@ -1927,7 +1927,7 @@ theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
by
induction' p with w u v w huv hvw ih
· simp
- · rw [walk.cons_is_path_iff] at hp
+ · rw [walk.cons_is_path_iff] at hp
simp [ih hp.1]
intro x hx hf
cases hinj hf
@@ -1940,7 +1940,7 @@ protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPa
by
induction' p with w u v w huv hvw ih
· simp
- · rw [map_cons, walk.cons_is_path_iff, support_map] at hp
+ · rw [map_cons, walk.cons_is_path_iff, support_map] at hp
rw [walk.cons_is_path_iff]
cases' hp with hp1 hp2
refine' ⟨ih hp1, _⟩
@@ -1995,7 +1995,7 @@ theorem map_injective_of_injective {f : G →g G'} (hinj : Function.Injective f)
simpa using h
· induction p'
· simpa using h
- · simp only [map_cons] at h
+ · simp only [map_cons] at h
cases hinj h.1
simp only [eq_self_iff_true, heq_iff_eq, true_and_iff]
apply ih
@@ -2067,7 +2067,7 @@ 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)) :=
by
rintro ⟨p, hp⟩ ⟨p', hp'⟩ h
- simp only [Path.map, Subtype.coe_mk] at h
+ simp only [Path.map, Subtype.coe_mk] at h
simp [walk.map_injective_of_injective hinj u v h]
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
-/
@@ -2752,7 +2752,7 @@ theorem SimpleGraph.Subgraph.singletonSubgraph_connected {v : V} :
(G.singletonSubgraph v).Connected := by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
+ simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
subst_vars
#align simple_graph.singleton_subgraph_connected SimpleGraph.Subgraph.singletonSubgraph_connected
-/
@@ -2763,7 +2763,7 @@ theorem SimpleGraph.Subgraph.subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w)
(G.subgraphOfAdj hvw).Connected := by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
+ simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
first
| rfl
@@ -2963,7 +2963,7 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
congr with h
congr with q
have := set.ext_iff.mp (ih w v) q
- simp only [Finset.mem_coe, Set.mem_setOf_eq] at this
+ simp only [Finset.mem_coe, Set.mem_setOf_eq] at this
rw [← this]
rfl
#align simple_graph.coe_finset_walk_length_eq SimpleGraph.coe_finsetWalkLength_eq
@@ -3117,9 +3117,9 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- so they both contain the edge ⟦(v, w)⟧, but that's a contradiction since c is a trail.
have hbq := hb (pvu.append puw)
have hpq' := hb pwv.reverse
- rw [walk.edges_reverse, List.mem_reverse] at hpq'
+ rw [walk.edges_reverse, List.mem_reverse] at hpq'
rw [walk.is_trail_def, this, walk.edges_append, walk.edges_append, List.nodup_append_comm, ←
- List.append_assoc, ← walk.edges_append] at hc
+ List.append_assoc, ← walk.edges_append] at hc
exact List.disjoint_of_nodup_append hc hbq hpq'
#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1068,32 +1068,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:429:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1356,6 +1356,10 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
{p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r := by
classical
+ constructor
+ · exact fun h => ⟨_, _, (p.take_spec h).symm⟩
+ · rintro ⟨q, r, rfl⟩
+ simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
#align simple_graph.walk.mem_support_iff_exists_append SimpleGraph.Walk.mem_support_iff_exists_append
-/
@@ -2308,7 +2312,7 @@ protected theorem Reachable.elim {p : Prop} {u v : V} (h : G.Reachable u v) (hp
#print SimpleGraph.Reachable.elim_path /-
protected theorem Reachable.elim_path {p : Prop} {u v : V} (h : G.Reachable u v)
- (hp : G.Path u v → p) : p := by classical
+ (hp : G.Path u v → p) : p := by classical exact h.elim fun q => hp q.toPath
#align simple_graph.reachable.elim_path SimpleGraph.Reachable.elim_path
-/
@@ -3124,7 +3128,38 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
- by classical
+ by
+ classical
+ rw [reachable_delete_edges_iff_exists_walk]
+ constructor
+ · rintro ⟨h, p, hp⟩
+ refine' ⟨w, walk.cons h.symm p.to_path, _, _⟩
+ · apply path.cons_is_cycle
+ rw [Sym2.eq_swap]
+ intro h
+ exact absurd (walk.edges_to_path_subset p h) hp
+ simp only [Sym2.eq_swap, walk.edges_cons, List.mem_cons, eq_self_iff_true, true_or_iff]
+ · rintro ⟨u, c, hc, he⟩
+ have hvc : v ∈ c.support := walk.fst_mem_support_of_mem_edges c he
+ have hwc : w ∈ c.support := walk.snd_mem_support_of_mem_edges c he
+ let puv := c.take_until v hvc
+ let pvu := c.drop_until v hvc
+ obtain hw | hw' : w ∈ puv.support ∨ w ∈ pvu.support := by
+ rwa [← walk.mem_support_append_iff, walk.take_spec]
+ · by_contra! h
+ specialize h (c.adj_of_mem_edges he)
+ exact reachable_delete_edges_iff_exists_cycle.aux h c hc.to_trail he hw
+ · by_contra! hb
+ specialize hb (c.adj_of_mem_edges he)
+ have hb' : ∀ p : G.walk w v, ⟦(w, v)⟧ ∈ p.edges :=
+ by
+ intro p
+ simpa [Sym2.eq_swap] using hb p.reverse
+ apply
+ reachable_delete_edges_iff_exists_cycle.aux hb' (pvu.append puv) (hc.to_trail.rotate hvc) _
+ (walk.start_mem_support _)
+ rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
+ walk.take_spec, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1356,10 +1356,6 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
{p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r := by
classical
- constructor
- · exact fun h => ⟨_, _, (p.take_spec h).symm⟩
- · rintro ⟨q, r, rfl⟩
- simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
#align simple_graph.walk.mem_support_iff_exists_append SimpleGraph.Walk.mem_support_iff_exists_append
-/
@@ -2312,7 +2308,7 @@ protected theorem Reachable.elim {p : Prop} {u v : V} (h : G.Reachable u v) (hp
#print SimpleGraph.Reachable.elim_path /-
protected theorem Reachable.elim_path {p : Prop} {u v : V} (h : G.Reachable u v)
- (hp : G.Path u v → p) : p := by classical exact h.elim fun q => hp q.toPath
+ (hp : G.Path u v → p) : p := by classical
#align simple_graph.reachable.elim_path SimpleGraph.Reachable.elim_path
-/
@@ -3128,38 +3124,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
- by
- classical
- rw [reachable_delete_edges_iff_exists_walk]
- constructor
- · rintro ⟨h, p, hp⟩
- refine' ⟨w, walk.cons h.symm p.to_path, _, _⟩
- · apply path.cons_is_cycle
- rw [Sym2.eq_swap]
- intro h
- exact absurd (walk.edges_to_path_subset p h) hp
- simp only [Sym2.eq_swap, walk.edges_cons, List.mem_cons, eq_self_iff_true, true_or_iff]
- · rintro ⟨u, c, hc, he⟩
- have hvc : v ∈ c.support := walk.fst_mem_support_of_mem_edges c he
- have hwc : w ∈ c.support := walk.snd_mem_support_of_mem_edges c he
- let puv := c.take_until v hvc
- let pvu := c.drop_until v hvc
- obtain hw | hw' : w ∈ puv.support ∨ w ∈ pvu.support := by
- rwa [← walk.mem_support_append_iff, walk.take_spec]
- · by_contra! h
- specialize h (c.adj_of_mem_edges he)
- exact reachable_delete_edges_iff_exists_cycle.aux h c hc.to_trail he hw
- · by_contra! hb
- specialize hb (c.adj_of_mem_edges he)
- have hb' : ∀ p : G.walk w v, ⟦(w, v)⟧ ∈ p.edges :=
- by
- intro p
- simpa [Sym2.eq_swap] using hb p.reverse
- apply
- reachable_delete_edges_iff_exists_cycle.aux hb' (pvu.append puv) (hc.to_trail.rotate hvc) _
- (walk.start_mem_support _)
- rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
- walk.take_spec, Sym2.eq_swap]
+ by classical
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1068,32 +1068,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:433:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3146,10 +3146,10 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
let pvu := c.drop_until v hvc
obtain hw | hw' : w ∈ puv.support ∨ w ∈ pvu.support := by
rwa [← walk.mem_support_append_iff, walk.take_spec]
- · by_contra' h
+ · by_contra! h
specialize h (c.adj_of_mem_edges he)
exact reachable_delete_edges_iff_exists_cycle.aux h c hc.to_trail he hw
- · by_contra' hb
+ · by_contra! hb
specialize hb (c.adj_of_mem_edges he)
have hb' : ∀ p : G.walk w v, ⟦(w, v)⟧ ∈ p.edges :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe
@@ -2422,7 +2422,7 @@ def Preconnected : Prop :=
#print SimpleGraph.Preconnected.map /-
theorem Preconnected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
(hG : G.Preconnected) : H.Preconnected :=
- hf.forall₂.2 fun a b => Nonempty.map (Walk.map _) <| hG _ _
+ hf.Forall₂.2 fun a b => Nonempty.map (Walk.map _) <| hG _ _
#align simple_graph.preconnected.map SimpleGraph.Preconnected.map
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/b1abe23ae96fef89ad30d9f4362c307f72a55010
@@ -3090,7 +3090,7 @@ theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
G.IsBridge ⟦(v, w)⟧ ↔ G.Adj v w ∧ ∀ p : G.Walk v w, ⟦(v, w)⟧ ∈ p.edges :=
by
rw [is_bridge_iff, and_congr_right']
- rw [reachable_delete_edges_iff_exists_walk, not_exists_not]
+ rw [reachable_delete_edges_iff_exists_walk, Classical.not_exists_not]
#align simple_graph.is_bridge_iff_adj_and_forall_walk_mem_edges SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
-import Mathbin.Combinatorics.SimpleGraph.Basic
-import Mathbin.Combinatorics.SimpleGraph.Subgraph
-import Mathbin.Data.List.Rotate
+import Combinatorics.SimpleGraph.Basic
+import Combinatorics.SimpleGraph.Subgraph
+import Data.List.Rotate
#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4"
@@ -1068,32 +1068,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -1968,7 +1968,7 @@ theorem map_isTrail_iff_of_injective (hinj : Function.Injective f) :
#align simple_graph.walk.map_is_trail_iff_of_injective SimpleGraph.Walk.map_isTrail_iff_of_injective
-/
-alias map_is_trail_iff_of_injective ↔ _ map_is_trail_of_injective
+alias ⟨_, map_is_trail_of_injective⟩ := map_is_trail_iff_of_injective
#align simple_graph.walk.map_is_trail_of_injective SimpleGraph.Walk.map_isTrail_of_injective
#print SimpleGraph.Walk.map_isCycle_iff_of_injective /-
@@ -1979,7 +1979,7 @@ theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective
#align simple_graph.walk.map_is_cycle_iff_of_injective SimpleGraph.Walk.map_isCycle_iff_of_injective
-/
-alias map_is_cycle_iff_of_injective ↔ _ map_is_cycle_of_injective
+alias ⟨_, map_is_cycle_of_injective⟩ := map_is_cycle_iff_of_injective
#align simple_graph.walk.map_is_cycle_of_injective SimpleGraph.Walk.map_isCycle_of_injective
variable (p f)
@@ -2019,7 +2019,7 @@ theorem mapLe_isTrail {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Wal
#align simple_graph.walk.map_le_is_trail SimpleGraph.Walk.mapLe_isTrail
-/
-alias map_le_is_trail ↔ is_trail.of_map_le is_trail.map_le
+alias ⟨is_trail.of_map_le, is_trail.map_le⟩ := map_le_is_trail
#align simple_graph.walk.is_trail.of_map_le SimpleGraph.Walk.IsTrail.of_mapLe
#align simple_graph.walk.is_trail.map_le SimpleGraph.Walk.IsTrail.mapLe
@@ -2031,7 +2031,7 @@ theorem mapLe_isPath {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Walk
#align simple_graph.walk.map_le_is_path SimpleGraph.Walk.mapLe_isPath
-/
-alias map_le_is_path ↔ is_path.of_map_le is_path.map_le
+alias ⟨is_path.of_map_le, is_path.map_le⟩ := map_le_is_path
#align simple_graph.walk.is_path.of_map_le SimpleGraph.Walk.IsPath.of_mapLe
#align simple_graph.walk.is_path.map_le SimpleGraph.Walk.IsPath.mapLe
@@ -2043,7 +2043,7 @@ theorem mapLe_isCycle {G G' : SimpleGraph V} (h : G ≤ G') {u : V} {p : G.Walk
#align simple_graph.walk.map_le_is_cycle SimpleGraph.Walk.mapLe_isCycle
-/
-alias map_le_is_cycle ↔ is_cycle.of_map_le is_cycle.map_le
+alias ⟨is_cycle.of_map_le, is_cycle.map_le⟩ := map_le_is_cycle
#align simple_graph.walk.is_cycle.of_map_le SimpleGraph.Walk.IsCycle.of_mapLe
#align simple_graph.walk.is_cycle.map_le SimpleGraph.Walk.IsCycle.mapLe
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -2747,20 +2747,20 @@ abbrev Subgraph.Connected (H : G.Subgraph) : Prop :=
#align simple_graph.subgraph.connected SimpleGraph.Subgraph.Connected
-/
-#print SimpleGraph.singletonSubgraph_connected /-
-theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected :=
- by
+#print SimpleGraph.Subgraph.singletonSubgraph_connected /-
+theorem SimpleGraph.Subgraph.singletonSubgraph_connected {v : V} :
+ (G.singletonSubgraph v).Connected := by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
subst_vars
-#align simple_graph.singleton_subgraph_connected SimpleGraph.singletonSubgraph_connected
+#align simple_graph.singleton_subgraph_connected SimpleGraph.Subgraph.singletonSubgraph_connected
-/
-#print SimpleGraph.subgraphOfAdj_connected /-
+#print SimpleGraph.Subgraph.subgraphOfAdj_connected /-
@[simp]
-theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected :=
- by
+theorem SimpleGraph.Subgraph.subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) :
+ (G.subgraphOfAdj hvw).Connected := by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
@@ -2768,7 +2768,7 @@ theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj h
first
| rfl
| · apply adj.reachable; simp
-#align simple_graph.subgraph_of_adj_connected SimpleGraph.subgraphOfAdj_connected
+#align simple_graph.subgraph_of_adj_connected SimpleGraph.Subgraph.subgraphOfAdj_connected
-/
#print SimpleGraph.Preconnected.set_univ_walk_nonempty /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/63721b2c3eba6c325ecf8ae8cca27155a4f6306f
@@ -2194,7 +2194,7 @@ theorem transfer_append (hpq) :
@[simp]
theorem reverse_transfer :
(p.transfer H hp).reverse =
- p.reverse.transfer H (by simp only [edges_reverse, List.mem_reverse']; exact hp) :=
+ p.reverse.transfer H (by simp only [edges_reverse, List.mem_reverse]; exact hp) :=
by
induction p <;> simp only [*, transfer_append, transfer, reverse_nil, reverse_cons]
rfl
@@ -3117,7 +3117,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- so they both contain the edge ⟦(v, w)⟧, but that's a contradiction since c is a trail.
have hbq := hb (pvu.append puw)
have hpq' := hb pwv.reverse
- rw [walk.edges_reverse, List.mem_reverse'] at hpq'
+ rw [walk.edges_reverse, List.mem_reverse] at hpq'
rw [walk.is_trail_def, this, walk.edges_append, walk.edges_append, List.nodup_append_comm, ←
List.append_assoc, ← walk.edges_append] at hc
exact List.disjoint_of_nodup_append hc hbq hpq'
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit b99e2d58a5e6861833fa8de11e51a81144258db4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Combinatorics.SimpleGraph.Basic
import Mathbin.Combinatorics.SimpleGraph.Subgraph
import Mathbin.Data.List.Rotate
+#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4"
+
/-!
# Graph connectivity
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -223,7 +223,7 @@ def concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) : G.Walk u w :=
#print SimpleGraph.Walk.concat_eq_append /-
theorem concat_eq_append {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- p.concat h = p.append (cons h nil) :=
+ p.push h = p.append (cons h nil) :=
rfl
#align simple_graph.walk.concat_eq_append SimpleGraph.Walk.concat_eq_append
-/
@@ -340,7 +340,7 @@ theorem append_copy_copy {u v w u' v' w'} (p : G.Walk u v) (q : G.Walk v w) (hu
-/
#print SimpleGraph.Walk.concat_nil /-
-theorem concat_nil {u v : V} (h : G.Adj u v) : nil.concat h = cons h nil :=
+theorem concat_nil {u v : V} (h : G.Adj u v) : nil.push h = cons h nil :=
rfl
#align simple_graph.walk.concat_nil SimpleGraph.Walk.concat_nil
-/
@@ -348,21 +348,21 @@ theorem concat_nil {u v : V} (h : G.Adj u v) : nil.concat h = cons h nil :=
#print SimpleGraph.Walk.concat_cons /-
@[simp]
theorem concat_cons {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (h' : G.Adj w x) :
- (cons h p).concat h' = cons h (p.concat h') :=
+ (cons h p).push h' = cons h (p.push h') :=
rfl
#align simple_graph.walk.concat_cons SimpleGraph.Walk.concat_cons
-/
#print SimpleGraph.Walk.append_concat /-
theorem append_concat {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (h : G.Adj w x) :
- p.append (q.concat h) = (p.append q).concat h :=
+ p.append (q.push h) = (p.append q).push h :=
append_assoc _ _ _
#align simple_graph.walk.append_concat SimpleGraph.Walk.append_concat
-/
#print SimpleGraph.Walk.concat_append /-
theorem concat_append {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk w x) :
- (p.concat h).append q = p.append (cons h q) := by
+ (p.push h).append q = p.append (cons h q) := by
rw [concat_eq_append, ← append_assoc, cons_nil_append]
#align simple_graph.walk.concat_append SimpleGraph.Walk.concat_append
-/
@@ -371,7 +371,7 @@ theorem concat_append {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk
/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat :
∀ {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
- ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.concat h'
+ ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.push h'
| _, _, _, h, nil => ⟨_, nil, h, rfl⟩
| _, _, _, h, cons h' p =>
by
@@ -385,7 +385,7 @@ theorem exists_cons_eq_concat :
/-- A non-trivial `concat` walk is representable as a `cons` walk. -/
theorem exists_concat_eq_cons :
∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
- ∃ (x : V) (h' : G.Adj u x) (q : G.Walk x w), p.concat h = cons h' q
+ ∃ (x : V) (h' : G.Adj u x) (q : G.Walk x w), p.push h = cons h' q
| _, _, _, nil, h => ⟨_, h, nil, rfl⟩
| _, _, _, cons h' p, h => ⟨_, h', Walk.concat p h, concat_cons _ _ _⟩
#align simple_graph.walk.exists_concat_eq_cons SimpleGraph.Walk.exists_concat_eq_cons
@@ -462,7 +462,7 @@ theorem reverse_append {u v w : V} (p : G.Walk u v) (q : G.Walk v w) :
#print SimpleGraph.Walk.reverse_concat /-
@[simp]
theorem reverse_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).reverse = cons (G.symm h) p.reverse := by simp [concat_eq_append]
+ (p.push h).reverse = cons (G.symm h) p.reverse := by simp [concat_eq_append]
#align simple_graph.walk.reverse_concat SimpleGraph.Walk.reverse_concat
-/
@@ -508,7 +508,7 @@ theorem length_append :
#print SimpleGraph.Walk.length_concat /-
@[simp]
theorem length_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).length = p.length + 1 :=
+ (p.push h).length = p.length + 1 :=
length_append _ _
#align simple_graph.walk.length_concat SimpleGraph.Walk.length_concat
-/
@@ -555,7 +555,7 @@ theorem length_eq_zero_iff {u : V} {p : G.Walk u u} : p.length = 0 ↔ p = nil :
section ConcatRec
variable {motive : ∀ u v : V, G.Walk u v → Sort _} (Hnil : ∀ {u : V}, motive u u nil)
- (Hconcat : ∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w), motive u v p → motive u w (p.concat h))
+ (Hconcat : ∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w), motive u v p → motive u w (p.push h))
#print SimpleGraph.Walk.concatRecAux /-
/-- Auxiliary definition for `simple_graph.walk.concat_rec` -/
@@ -588,7 +588,7 @@ theorem concatRec_nil (u : V) :
#print SimpleGraph.Walk.concatRec_concat /-
@[simp]
theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- @concatRec _ _ motive @Hnil @Hconcat _ _ (p.concat h) =
+ @concatRec _ _ motive @Hnil @Hconcat _ _ (p.push h) =
Hconcat p h (concatRec (@Hnil) (@Hconcat) p) :=
by
simp only [concat_rec]
@@ -604,14 +604,14 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
end ConcatRec
#print SimpleGraph.Walk.concat_ne_nil /-
-theorem concat_ne_nil {u v : V} (p : G.Walk u v) (h : G.Adj v u) : p.concat h ≠ nil := by
+theorem concat_ne_nil {u v : V} (p : G.Walk u v) (h : G.Adj v u) : p.push h ≠ nil := by
cases p <;> simp [concat]
#align simple_graph.walk.concat_ne_nil SimpleGraph.Walk.concat_ne_nil
-/
#print SimpleGraph.Walk.concat_inj /-
theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk u v'}
- {h' : G.Adj v' w} (he : p.concat h = p'.concat h') : ∃ hv : v = v', p.copy rfl hv = p' :=
+ {h' : G.Adj v' w} (he : p.push h = p'.push h') : ∃ hv : v = v', p.copy rfl hv = p' :=
by
induction p
· cases p'
@@ -682,7 +682,7 @@ theorem support_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
#print SimpleGraph.Walk.support_concat /-
@[simp]
theorem support_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).support = p.support.concat w := by induction p <;> simp [*, concat_nil]
+ (p.push h).support = p.support.push w := by induction p <;> simp [*, concat_nil]
#align simple_graph.walk.support_concat SimpleGraph.Walk.support_concat
-/
@@ -884,7 +884,7 @@ theorem darts_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
#print SimpleGraph.Walk.darts_concat /-
@[simp]
theorem darts_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).darts = p.darts.concat ⟨(v, w), h⟩ := by induction p <;> simp [*, concat_nil]
+ (p.push h).darts = p.darts.push ⟨(v, w), h⟩ := by induction p <;> simp [*, concat_nil]
#align simple_graph.walk.darts_concat SimpleGraph.Walk.darts_concat
-/
@@ -959,7 +959,7 @@ theorem edges_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
#print SimpleGraph.Walk.edges_concat /-
@[simp]
theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).edges = p.edges.concat ⟦(v, w)⟧ := by simp [edges]
+ (p.push h).edges = p.edges.push ⟦(v, w)⟧ := by simp [edges]
#align simple_graph.walk.edges_concat SimpleGraph.Walk.edges_concat
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -577,12 +577,15 @@ def concatRec {u v : V} (p : G.Walk u v) : motive u v p :=
#align simple_graph.walk.concat_rec SimpleGraph.Walk.concatRec
-/
+#print SimpleGraph.Walk.concatRec_nil /-
@[simp]
theorem concatRec_nil (u : V) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (nil : G.Walk u u) = Hnil :=
rfl
#align simple_graph.walk.concat_rec_nil SimpleGraph.Walk.concatRec_nil
+-/
+#print SimpleGraph.Walk.concatRec_concat /-
@[simp]
theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (p.concat h) =
@@ -596,6 +599,7 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
· rw [concat_rec_aux, rec_heq_iff_heq]
congr <;> simp [heq_rec_iff_heq]
#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concat
+-/
end ConcatRec
@@ -846,12 +850,14 @@ theorem chain'_dartAdj_darts : ∀ {u v : V} (p : G.Walk u v), List.Chain' G.Dar
#align simple_graph.walk.chain'_dart_adj_darts SimpleGraph.Walk.chain'_dartAdj_darts
-/
+#print SimpleGraph.Walk.edges_subset_edgeSet /-
/-- Every edge in a walk's edge list is an edge of the graph.
It is written in this form (rather than using `⊆`) to avoid unsightly coercions. -/
theorem edges_subset_edgeSet :
∀ {u v : V} (p : G.Walk u v) ⦃e : Sym2 V⦄ (h : e ∈ p.edges), e ∈ G.edgeSetEmbedding
| _, _, cons h' p', e, h => by rcases h with ⟨rfl, h⟩ <;> solve_by_elim
#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSet
+-/
#print SimpleGraph.Walk.adj_of_mem_edges /-
theorem adj_of_mem_edges {u v x y : V} (p : G.Walk u v) (h : ⟦(x, y)⟧ ∈ p.edges) : G.Adj x y :=
@@ -1065,32 +1071,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
@@ -1855,9 +1861,11 @@ theorem map_copy (hu : u = u') (hv : v = v') :
#align simple_graph.walk.map_copy SimpleGraph.Walk.map_copy
-/
+#print SimpleGraph.Walk.map_id /-
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by induction p <;> simp [*]
#align simple_graph.walk.map_id SimpleGraph.Walk.map_id
+-/
#print SimpleGraph.Walk.map_map /-
@[simp]
@@ -2067,16 +2075,20 @@ theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
-/
+#print SimpleGraph.Path.mapEmbedding /-
/-- 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) :=
Path.map f.toHom f.Injective p
#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbedding
+-/
+#print SimpleGraph.Path.mapEmbedding_injective /-
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)) :=
map_injective f.Injective u v
#align simple_graph.path.map_embedding_injective SimpleGraph.Path.mapEmbedding_injective
+-/
end Path
@@ -2087,6 +2099,7 @@ namespace Walk
variable {G}
+#print SimpleGraph.Walk.transfer /-
/-- The walk `p` transferred to lie in `H`, given that `H` contains its edges. -/
@[protected, simp]
def transfer :
@@ -2096,6 +2109,7 @@ def transfer :
| _, _, walk.cons' u v w a p, H, h =>
Walk.cons (h (⟦(u, v)⟧ : Sym2 V) (by simp)) (p.transfer H fun e he => h e (by simp [he]))
#align simple_graph.walk.transfer SimpleGraph.Walk.transfer
+-/
variable {u v w : V} (p : G.Walk u v) (q : G.Walk v w) {H : SimpleGraph V}
(hp : ∀ e, e ∈ p.edges → e ∈ H.edgeSetEmbedding) (hq : ∀ e, e ∈ q.edges → e ∈ H.edgeSetEmbedding)
@@ -2106,35 +2120,46 @@ theorem transfer_self : p.transfer G p.edges_subset_edgeSet = p := by
#align simple_graph.walk.transfer_self SimpleGraph.Walk.transfer_self
-/
+#print SimpleGraph.Walk.transfer_eq_map_of_le /-
theorem transfer_eq_map_of_le (GH : G ≤ H) :
p.transfer H hp = p.map (SimpleGraph.Hom.mapSpanningSubgraphs GH) := by
induction p <;>
simp only [*, transfer, map_cons, hom.map_spanning_subgraphs_apply, eq_self_iff_true,
heq_iff_eq, and_self_iff, map_nil]
#align simple_graph.walk.transfer_eq_map_of_le SimpleGraph.Walk.transfer_eq_map_of_le
+-/
+#print SimpleGraph.Walk.edges_transfer /-
@[simp]
theorem edges_transfer : (p.transfer H hp).edges = p.edges := by
induction p <;> simp only [*, transfer, edges_nil, edges_cons, eq_self_iff_true, and_self_iff]
#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transfer
+-/
+#print SimpleGraph.Walk.support_transfer /-
@[simp]
theorem support_transfer : (p.transfer H hp).support = p.support := by
induction p <;> simp only [*, transfer, eq_self_iff_true, and_self_iff, support_nil, support_cons]
#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transfer
+-/
+#print SimpleGraph.Walk.length_transfer /-
@[simp]
theorem length_transfer : (p.transfer H hp).length = p.length := by induction p <;> simp [*]
#align simple_graph.walk.length_transfer SimpleGraph.Walk.length_transfer
+-/
variable {p}
+#print SimpleGraph.Walk.IsPath.transfer /-
protected theorem IsPath.transfer (pp : p.IsPath) : (p.transfer H hp).IsPath :=
by
induction p <;> simp only [transfer, is_path.nil, cons_is_path_iff, support_transfer] at pp ⊢
· tauto
#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transfer
+-/
+#print SimpleGraph.Walk.IsCycle.transfer /-
protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
(p.transfer H hp).IsCycle :=
by
@@ -2143,15 +2168,19 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
· exact pc
· exact ⟨pc.left.transfer _, pc.right⟩
#align simple_graph.walk.is_cycle.transfer SimpleGraph.Walk.IsCycle.transfer
+-/
variable (p)
+#print SimpleGraph.Walk.transfer_transfer /-
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
(p.transfer H hp).transfer K (by rw [p.edges_transfer hp]; exact hp') = p.transfer K hp' := by
induction p <;> simp only [transfer, eq_self_iff_true, heq_iff_eq, true_and_iff]; apply p_ih
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
+-/
+#print SimpleGraph.Walk.transfer_append /-
@[simp]
theorem transfer_append (hpq) :
(p.append q).transfer H hpq =
@@ -2162,7 +2191,9 @@ theorem transfer_append (hpq) :
simp only [transfer, nil_append, cons_append, eq_self_iff_true, heq_iff_eq, true_and_iff]
apply p_ih
#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_append
+-/
+#print SimpleGraph.Walk.reverse_transfer /-
@[simp]
theorem reverse_transfer :
(p.transfer H hp).reverse =
@@ -2171,6 +2202,7 @@ theorem reverse_transfer :
induction p <;> simp only [*, transfer_append, transfer, reverse_nil, reverse_cons]
rfl
#align simple_graph.walk.reverse_transfer SimpleGraph.Walk.reverse_transfer
+-/
end Walk
@@ -2220,28 +2252,36 @@ abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges)
#align simple_graph.walk.to_delete_edge SimpleGraph.Walk.toDeleteEdge
-/
+#print SimpleGraph.Walk.map_toDeleteEdges_eq /-
@[simp]
theorem map_toDeleteEdges_eq (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (hp) :
Walk.map (Hom.mapSpanningSubgraphs (G.deleteEdges_le s)) (p.toDeleteEdges s hp) = p := by
rw [← transfer_eq_map_of_le, transfer_transfer, transfer_self]
#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eq
+-/
+#print SimpleGraph.Walk.IsPath.toDeleteEdges /-
protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (h : p.IsPath)
(hp) : (p.toDeleteEdges s hp).IsPath :=
h.transfer _
#align simple_graph.walk.is_path.to_delete_edges SimpleGraph.Walk.IsPath.toDeleteEdges
+-/
+#print SimpleGraph.Walk.IsCycle.toDeleteEdges /-
protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V)) {v : V} {p : G.Walk v v} (h : p.IsCycle)
(hp) : (p.toDeleteEdges s hp).IsCycle :=
h.transfer _
#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdges
+-/
+#print SimpleGraph.Walk.toDeleteEdges_copy /-
@[simp]
theorem toDeleteEdges_copy (s : Set (Sym2 V)) {u v u' 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 := by
subst_vars; rfl
#align simple_graph.walk.to_delete_edges_copy SimpleGraph.Walk.toDeleteEdges_copy
+-/
end Walk
@@ -2339,20 +2379,26 @@ theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.Refl
#align simple_graph.reachable_iff_refl_trans_gen SimpleGraph.reachable_iff_reflTransGen
-/
+#print SimpleGraph.Reachable.map /-
protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G') {u v : V}
(h : G.Reachable u v) : G'.Reachable (f u) (f v) :=
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
+-/
+#print SimpleGraph.Iso.reachable_iff /-
theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iff
+-/
+#print SimpleGraph.Iso.symm_apply_reachable /-
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) := by
rw [← iso.reachable_iff, RelIso.apply_symm_apply]
#align simple_graph.iso.symm_apply_reachable SimpleGraph.Iso.symm_apply_reachable
+-/
variable (G)
@@ -2504,12 +2550,14 @@ protected def lift {β : Sort _} (f : V → β)
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
-/
+#print SimpleGraph.ConnectedComponent.lift_mk /-
@[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 :=
rfl
#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mk
+-/
#print SimpleGraph.ConnectedComponent.exists /-
protected theorem exists {p : G.ConnectedComponent → Prop} :
@@ -2564,6 +2612,7 @@ theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'')
variable {φ : G ≃g G'} {v : V} {v' : V'}
+#print SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp /-
@[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 :=
@@ -2572,7 +2621,9 @@ theorem iso_image_comp_eq_map_iff_eq_comp {C : G.ConnectedComponent} :
simp only [iso.reachable_iff, connected_component.map_mk, RelEmbedding.coe_coeFn,
RelIso.coe_coeFn, connected_component.eq]
#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
+-/
+#print SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map /-
@[simp]
theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ :=
@@ -2581,6 +2632,7 @@ theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
simp only [iso.symm_apply_reachable, connected_component.eq, coe_coe, connected_component.map_mk,
RelEmbedding.coe_coeFn, RelIso.coe_coeFn]
#align simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map
+-/
end connectedComponent
@@ -2789,10 +2841,12 @@ theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = {e
#align simple_graph.walk.edge_set_to_subgraph SimpleGraph.Walk.edgeSet_toSubgraph
-/
+#print SimpleGraph.Walk.toSubgraph_append /-
@[simp]
theorem toSubgraph_append (p : G.Walk u v) (q : G.Walk v w) :
(p.append q).toSubgraph = p.toSubgraph ⊔ q.toSubgraph := by induction p <;> simp [*, sup_assoc]
#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_append
+-/
#print SimpleGraph.Walk.toSubgraph_reverse /-
@[simp]
@@ -3009,11 +3063,14 @@ def IsBridge (G : SimpleGraph V) (e : Sym2 V) : Prop :=
#align simple_graph.is_bridge SimpleGraph.IsBridge
-/
+#print SimpleGraph.isBridge_iff /-
theorem isBridge_iff {u v : V} :
G.IsBridge ⟦(u, v)⟧ ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {⟦(u, v)⟧}).Reachable u v :=
Iff.rfl
#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iff
+-/
+#print SimpleGraph.reachable_delete_edges_iff_exists_walk /-
theorem reachable_delete_edges_iff_exists_walk {v w : V} :
(G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔ ∃ p : G.Walk v w, ¬⟦(v, w)⟧ ∈ p.edges :=
by
@@ -3029,6 +3086,7 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
Set.mem_singleton_iff]
exact ⟨p.edges_subset_edge_set ep, fun h' => h (h' ▸ ep)⟩
#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walk
+-/
#print SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges /-
theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
@@ -3069,6 +3127,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
-/
+#print SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle /-
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
@@ -3105,6 +3164,7 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
walk.take_spec, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
+-/
#print SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem /-
theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
@@ -3119,10 +3179,12 @@ theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
#align simple_graph.is_bridge_iff_adj_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem
-/
+#print SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem /-
theorem isBridge_iff_mem_and_forall_cycle_not_mem {e : Sym2 V} :
G.IsBridge e ↔ e ∈ G.edgeSetEmbedding ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges :=
Sym2.ind (fun v w => isBridge_iff_adj_and_forall_cycle_not_mem) e
#align simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem
+-/
end BridgeEdges
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -735,7 +735,7 @@ theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support := by induc
#print SimpleGraph.Walk.support_nonempty /-
@[simp]
-theorem support_nonempty {u v : V} (p : G.Walk u v) : { w | w ∈ p.support }.Nonempty :=
+theorem support_nonempty {u v : V} (p : G.Walk u v) : {w | w ∈ p.support}.Nonempty :=
⟨u, by simp⟩
#align simple_graph.walk.support_nonempty SimpleGraph.Walk.support_nonempty
-/
@@ -1065,32 +1065,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:423:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
@@ -1353,10 +1353,10 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
{p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r := by
classical
- constructor
- · exact fun h => ⟨_, _, (p.take_spec h).symm⟩
- · rintro ⟨q, r, rfl⟩
- simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
+ constructor
+ · exact fun h => ⟨_, _, (p.take_spec h).symm⟩
+ · rintro ⟨q, r, rfl⟩
+ simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
#align simple_graph.walk.mem_support_iff_exists_append SimpleGraph.Walk.mem_support_iff_exists_append
-/
@@ -2632,7 +2632,7 @@ namespace connectedComponent
#print SimpleGraph.ConnectedComponent.supp /-
/-- The set of vertices in a connected component of a graph. -/
def supp (C : G.ConnectedComponent) :=
- { v | G.connectedComponentMk v = C }
+ {v | G.connectedComponentMk v = C}
#align simple_graph.connected_component.supp SimpleGraph.ConnectedComponent.supp
-/
@@ -2771,7 +2771,7 @@ theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w
#print SimpleGraph.Walk.verts_toSubgraph /-
@[simp]
-theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = { w | w ∈ p.support } :=
+theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = {w | w ∈ p.support} :=
Set.ext fun _ => p.mem_verts_toSubgraph
#align simple_graph.walk.verts_to_subgraph SimpleGraph.Walk.verts_toSubgraph
-/
@@ -2784,7 +2784,7 @@ theorem mem_edges_toSubgraph (p : G.Walk u v) {e : Sym2 V} :
#print SimpleGraph.Walk.edgeSet_toSubgraph /-
@[simp]
-theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = { e | e ∈ p.edges } :=
+theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = {e | e ∈ p.edges} :=
Set.ext fun _ => p.mem_edges_toSubgraph
#align simple_graph.walk.edge_set_to_subgraph SimpleGraph.Walk.edgeSet_toSubgraph
-/
@@ -2844,14 +2844,14 @@ end Walk
section WalkCounting
#print SimpleGraph.set_walk_self_length_zero_eq /-
-theorem set_walk_self_length_zero_eq (u : V) : { p : G.Walk u u | p.length = 0 } = {Walk.nil} := by
+theorem set_walk_self_length_zero_eq (u : V) : {p : G.Walk u u | p.length = 0} = {Walk.nil} := by
ext p; simp
#align simple_graph.set_walk_self_length_zero_eq SimpleGraph.set_walk_self_length_zero_eq
-/
#print SimpleGraph.set_walk_length_zero_eq_of_ne /-
-theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) :
- { p : G.Walk u v | p.length = 0 } = ∅ := by
+theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) : {p : G.Walk u v | p.length = 0} = ∅ :=
+ by
ext p
simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
exact fun h' => absurd (walk.eq_of_length_eq_zero h') h
@@ -2860,8 +2860,8 @@ theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) :
#print SimpleGraph.set_walk_length_succ_eq /-
theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
- { p : G.Walk u v | p.length = n.succ } =
- ⋃ (w : V) (h : G.Adj u w), Walk.cons h '' { p' : G.Walk w v | p'.length = n } :=
+ {p : G.Walk u v | p.length = n.succ} =
+ ⋃ (w : V) (h : G.Adj u w), Walk.cons h '' {p' : G.Walk w v | p'.length = n} :=
by
ext p
cases' p with _ _ w _ huw pwv
@@ -2899,7 +2899,7 @@ def finsetWalkLength : ∀ (n : ℕ) (u v : V), Finset (G.Walk u v)
#print SimpleGraph.coe_finsetWalkLength_eq /-
theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
- (G.finsetWalkLength n u v : Set (G.Walk u v)) = { p : G.Walk u v | p.length = n } :=
+ (G.finsetWalkLength n u v : Set (G.Walk u v)) = {p : G.Walk u v | p.length = n} :=
by
induction' n with n ih generalizing u v
· obtain rfl | huv := eq_or_ne u v <;> simp [finset_walk_length, set_walk_length_zero_eq_of_ne, *]
@@ -2930,7 +2930,7 @@ theorem Walk.mem_finsetWalkLength_iff_length_eq {n : ℕ} {u v : V} (p : G.Walk
variable (G)
#print SimpleGraph.fintypeSetWalkLength /-
-instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype { p : G.Walk u v | p.length = n } :=
+instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype {p : G.Walk u v | p.length = n} :=
Fintype.ofFinset (G.finsetWalkLength n u v) fun p => by
rw [← Finset.mem_coe, coe_finset_walk_length_eq]
#align simple_graph.fintype_set_walk_length SimpleGraph.fintypeSetWalkLength
@@ -2938,7 +2938,7 @@ instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype { p : G.Walk u v | p
#print SimpleGraph.set_walk_length_toFinset_eq /-
theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
- { p : G.Walk u v | p.length = n }.toFinset = G.finsetWalkLength n u v := by ext p;
+ {p : G.Walk u v | p.length = n}.toFinset = G.finsetWalkLength n u v := by ext p;
simp [← coe_finset_walk_length_eq]
#align simple_graph.set_walk_length_to_finset_eq SimpleGraph.set_walk_length_toFinset_eq
-/
@@ -2947,7 +2947,7 @@ theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
/- See `simple_graph.adj_matrix_pow_apply_eq_card_walk` for the cardinality in terms of the `n`th
power of the adjacency matrix. -/
theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
- Fintype.card { p : G.Walk u v | p.length = n } = (G.finsetWalkLength n u v).card :=
+ Fintype.card {p : G.Walk u v | p.length = n} = (G.finsetWalkLength n u v).card :=
Fintype.card_ofFinset (G.finsetWalkLength n u v) fun p => by
rw [← Finset.mem_coe, coe_finset_walk_length_eq]
#align simple_graph.card_set_walk_length_eq SimpleGraph.card_set_walk_length_eq
@@ -2955,7 +2955,7 @@ theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
#print SimpleGraph.fintypeSetPathLength /-
instance fintypeSetPathLength (u v : V) (n : ℕ) :
- Fintype { p : G.Walk u v | p.IsPath ∧ p.length = n } :=
+ Fintype {p : G.Walk u v | p.IsPath ∧ p.length = n} :=
Fintype.ofFinset ((G.finsetWalkLength n u v).filterₓ Walk.IsPath) <| by
simp [walk.mem_finset_walk_length_iff_length_eq, and_comm']
#align simple_graph.fintype_set_path_length SimpleGraph.fintypeSetPathLength
@@ -3074,36 +3074,36 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
by
classical
- rw [reachable_delete_edges_iff_exists_walk]
- constructor
- · rintro ⟨h, p, hp⟩
- refine' ⟨w, walk.cons h.symm p.to_path, _, _⟩
- · apply path.cons_is_cycle
- rw [Sym2.eq_swap]
- intro h
- exact absurd (walk.edges_to_path_subset p h) hp
- simp only [Sym2.eq_swap, walk.edges_cons, List.mem_cons, eq_self_iff_true, true_or_iff]
- · rintro ⟨u, c, hc, he⟩
- have hvc : v ∈ c.support := walk.fst_mem_support_of_mem_edges c he
- have hwc : w ∈ c.support := walk.snd_mem_support_of_mem_edges c he
- let puv := c.take_until v hvc
- let pvu := c.drop_until v hvc
- obtain hw | hw' : w ∈ puv.support ∨ w ∈ pvu.support := by
- rwa [← walk.mem_support_append_iff, walk.take_spec]
- · by_contra' h
- specialize h (c.adj_of_mem_edges he)
- exact reachable_delete_edges_iff_exists_cycle.aux h c hc.to_trail he hw
- · by_contra' hb
- specialize hb (c.adj_of_mem_edges he)
- have hb' : ∀ p : G.walk w v, ⟦(w, v)⟧ ∈ p.edges :=
- by
- intro p
- simpa [Sym2.eq_swap] using hb p.reverse
- apply
- reachable_delete_edges_iff_exists_cycle.aux hb' (pvu.append puv) (hc.to_trail.rotate hvc)
- _ (walk.start_mem_support _)
- rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
- walk.take_spec, Sym2.eq_swap]
+ rw [reachable_delete_edges_iff_exists_walk]
+ constructor
+ · rintro ⟨h, p, hp⟩
+ refine' ⟨w, walk.cons h.symm p.to_path, _, _⟩
+ · apply path.cons_is_cycle
+ rw [Sym2.eq_swap]
+ intro h
+ exact absurd (walk.edges_to_path_subset p h) hp
+ simp only [Sym2.eq_swap, walk.edges_cons, List.mem_cons, eq_self_iff_true, true_or_iff]
+ · rintro ⟨u, c, hc, he⟩
+ have hvc : v ∈ c.support := walk.fst_mem_support_of_mem_edges c he
+ have hwc : w ∈ c.support := walk.snd_mem_support_of_mem_edges c he
+ let puv := c.take_until v hvc
+ let pvu := c.drop_until v hvc
+ obtain hw | hw' : w ∈ puv.support ∨ w ∈ pvu.support := by
+ rwa [← walk.mem_support_append_iff, walk.take_spec]
+ · by_contra' h
+ specialize h (c.adj_of_mem_edges he)
+ exact reachable_delete_edges_iff_exists_cycle.aux h c hc.to_trail he hw
+ · by_contra' hb
+ specialize hb (c.adj_of_mem_edges he)
+ have hb' : ∀ p : G.walk w v, ⟦(w, v)⟧ ∈ p.edges :=
+ by
+ intro p
+ simpa [Sym2.eq_swap] using hb p.reverse
+ apply
+ reachable_delete_edges_iff_exists_cycle.aux hb' (pvu.append puv) (hc.to_trail.rotate hvc) _
+ (walk.start_mem_support _)
+ rwa [walk.edges_append, List.mem_append, or_comm', ← List.mem_append, ← walk.edges_append,
+ walk.take_spec, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
#print SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -190,7 +190,7 @@ theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v)
#print SimpleGraph.Walk.exists_eq_cons_of_ne /-
theorem exists_eq_cons_of_ne :
∀ {u v : V} (hne : u ≠ v) (p : G.Walk u v),
- ∃ (w : V)(h : G.Adj u w)(p' : G.Walk w v), p = cons h p'
+ ∃ (w : V) (h : G.Adj u w) (p' : G.Walk w v), p = cons h p'
| _, _, hne, nil => (hne rfl).elim
| _, _, _, cons h p' => ⟨_, h, p', rfl⟩
#align simple_graph.walk.exists_eq_cons_of_ne SimpleGraph.Walk.exists_eq_cons_of_ne
@@ -371,7 +371,7 @@ theorem concat_append {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk
/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat :
∀ {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
- ∃ (x : V)(q : G.Walk u x)(h' : G.Adj x w), cons h p = q.concat h'
+ ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.concat h'
| _, _, _, h, nil => ⟨_, nil, h, rfl⟩
| _, _, _, h, cons h' p =>
by
@@ -385,7 +385,7 @@ theorem exists_cons_eq_concat :
/-- A non-trivial `concat` walk is representable as a `cons` walk. -/
theorem exists_concat_eq_cons :
∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
- ∃ (x : V)(h' : G.Adj u x)(q : G.Walk x w), p.concat h = cons h' q
+ ∃ (x : V) (h' : G.Adj u x) (q : G.Walk x w), p.concat h = cons h' q
| _, _, _, nil, h => ⟨_, h, nil, rfl⟩
| _, _, _, cons h' p, h => ⟨_, h', Walk.concat p h, concat_cons _ _ _⟩
#align simple_graph.walk.exists_concat_eq_cons SimpleGraph.Walk.exists_concat_eq_cons
@@ -592,7 +592,7 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
apply eq_of_hEq
apply rec_heq_of_heq
trans concat_rec_aux (@Hnil) (@Hconcat) (cons h.symm p.reverse)
- · congr ; simp
+ · congr; simp
· rw [concat_rec_aux, rec_heq_iff_heq]
congr <;> simp [heq_rec_iff_heq]
#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concat
@@ -613,21 +613,21 @@ theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk
· cases p'
· exact ⟨rfl, rfl⟩
· exfalso
- simp only [concat_nil, concat_cons] at he
+ simp only [concat_nil, concat_cons] at he
obtain ⟨rfl, he⟩ := he
- simp only [heq_iff_eq] at he
+ simp only [heq_iff_eq] at he
exact concat_ne_nil _ _ he.symm
- · rw [concat_cons] at he
+ · rw [concat_cons] at he
cases p'
· exfalso
- simp only [concat_nil] at he
+ simp only [concat_nil] at he
obtain ⟨rfl, he⟩ := he
- rw [heq_iff_eq] at he
+ rw [heq_iff_eq] at he
exact concat_ne_nil _ _ he
- · rw [concat_cons] at he
- simp only at he
+ · rw [concat_cons] at he
+ simp only at he
obtain ⟨rfl, he⟩ := he
- rw [heq_iff_eq] at he
+ rw [heq_iff_eq] at he
obtain ⟨rfl, rfl⟩ := p_ih he
exact ⟨rfl, rfl⟩
#align simple_graph.walk.concat_inj SimpleGraph.Walk.concat_inj
@@ -1003,7 +1003,7 @@ theorem dart_fst_mem_support_of_mem_darts :
∀ {u v : V} (p : G.Walk u v) {d : G.Dart}, d ∈ p.darts → d.fst ∈ p.support
| u, v, cons h p', d, hd =>
by
- simp only [support_cons, darts_cons, List.mem_cons] at hd⊢
+ simp only [support_cons, darts_cons, List.mem_cons] at hd ⊢
rcases hd with (rfl | hd)
· exact Or.inl rfl
· exact Or.inr (dart_fst_mem_support_of_mem_darts _ hd)
@@ -1021,7 +1021,7 @@ theorem dart_snd_mem_support_of_mem_darts {u v : V} (p : G.Walk u v) {d : G.Dart
theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
t ∈ p.support := by
obtain ⟨d, hd, he⟩ := list.mem_map.mp he
- rw [dart_edge_eq_mk_iff'] at he
+ rw [dart_edge_eq_mk_iff'] at he
rcases he with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
· exact dart_fst_mem_support_of_mem_darts _ hd
· exact dart_snd_mem_support_of_mem_darts _ hd
@@ -1030,7 +1030,7 @@ theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t,
#print SimpleGraph.Walk.snd_mem_support_of_mem_edges /-
theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
- u ∈ p.support := by rw [Sym2.eq_swap] at he; exact p.fst_mem_support_of_mem_edges he
+ u ∈ p.support := by rw [Sym2.eq_swap] at he ; exact p.fst_mem_support_of_mem_edges he
#align simple_graph.walk.snd_mem_support_of_mem_edges SimpleGraph.Walk.snd_mem_support_of_mem_edges
-/
@@ -1039,7 +1039,7 @@ theorem darts_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.N
p.darts.Nodup := by
induction p
· simp
- · simp only [darts_cons, support_cons, List.nodup_cons] at h⊢
+ · simp only [darts_cons, support_cons, List.nodup_cons] at h ⊢
refine' ⟨fun h' => h.1 (dart_fst_mem_support_of_mem_darts p_p h'), p_ih h.2⟩
#align simple_graph.walk.darts_nodup_of_support_nodup SimpleGraph.Walk.darts_nodup_of_support_nodup
-/
@@ -1049,7 +1049,7 @@ theorem edges_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.N
p.edges.Nodup := by
induction p
· simp
- · simp only [edges_cons, support_cons, List.nodup_cons] at h⊢
+ · simp only [edges_cons, support_cons, List.nodup_cons] at h ⊢
exact ⟨fun h' => h.1 (fst_mem_support_of_mem_edges p_p h'), p_ih h.2⟩
#align simple_graph.walk.edges_nodup_of_support_nodup SimpleGraph.Walk.edges_nodup_of_support_nodup
-/
@@ -1069,8 +1069,8 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
- Prop where
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
@@ -1079,8 +1079,8 @@ structure IsPath {u v : V} (p : G.Walk u v) extends
/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
- Prop where
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
@@ -1090,8 +1090,8 @@ structure IsCircuit {u : V} (p : G.Walk u u) extends
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
- Prop where
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
+ Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
-/
@@ -1191,14 +1191,14 @@ theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p
#print SimpleGraph.Walk.IsTrail.of_append_left /-
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 := by
- rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.1⟩
+ rw [is_trail_def, edges_append, List.nodup_append] at h ; exact ⟨h.1⟩
#align simple_graph.walk.is_trail.of_append_left SimpleGraph.Walk.IsTrail.of_append_left
-/
#print SimpleGraph.Walk.IsTrail.of_append_right /-
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 := by
- rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.2.1⟩
+ rw [is_trail_def, edges_append, List.nodup_append] at h ; exact ⟨h.2.1⟩
#align simple_graph.walk.is_trail.of_append_right SimpleGraph.Walk.IsTrail.of_append_right
-/
@@ -1266,8 +1266,8 @@ theorem IsPath.of_append_left {u v w : V} {p : G.Walk u v} {q : G.Walk v w} :
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 :=
by
- rw [← is_path_reverse_iff] at h⊢
- rw [reverse_append] at h
+ rw [← is_path_reverse_iff] at h ⊢
+ rw [reverse_append] at h
apply h.of_append_left
#align simple_graph.walk.is_path.of_append_right SimpleGraph.Walk.IsPath.of_append_right
-/
@@ -1339,7 +1339,7 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).append (p.dropUntil u h) = p :=
by
induction p
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
rfl
· obtain rfl | h := h
@@ -1351,7 +1351,7 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
#print SimpleGraph.Walk.mem_support_iff_exists_append /-
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
- {p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w)(r : G.Walk w v), p = q.append r := by
+ {p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r := by
classical
constructor
· exact fun h => ⟨_, _, (p.take_spec h).symm⟩
@@ -1366,13 +1366,13 @@ theorem count_support_takeUntil_eq_one {u v w : V} (p : G.Walk v w) (h : u ∈ p
(p.takeUntil u h).support.count u = 1 :=
by
induction p
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
simp!
· obtain rfl | h := h
· simp!
· simp! only
- split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
+ split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
#align simple_graph.walk.count_support_take_until_eq_one SimpleGraph.Walk.count_support_takeUntil_eq_one
-/
@@ -1381,7 +1381,7 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
(p.takeUntil u h).edges.count ⟦(u, x)⟧ ≤ 1 :=
by
induction' p with u' u' v' w' ha p' ih
- · rw [mem_support_nil_iff] at h
+ · rw [mem_support_nil_iff] at h
subst u
simp!
· obtain rfl | h := h
@@ -1392,7 +1392,7 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
simp
· rw [edges_cons, List.count_cons]
split_ifs with h''
- · rw [Sym2.eq_iff] at h''
+ · rw [Sym2.eq_iff] at h''
obtain ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ := h''
· exact (h' rfl).elim
· cases p' <;> simp!
@@ -1465,7 +1465,7 @@ theorem length_takeUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).length ≤ p.length :=
by
have := congr_arg walk.length (p.take_spec h)
- rw [length_append] at this
+ rw [length_append] at this
exact Nat.le.intro this
#align simple_graph.walk.length_take_until_le SimpleGraph.Walk.length_takeUntil_le
-/
@@ -1475,7 +1475,7 @@ theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).length ≤ p.length :=
by
have := congr_arg walk.length (p.take_spec h)
- rw [length_append, add_comm] at this
+ rw [length_append, add_comm] at this
exact Nat.le.intro this
#align simple_graph.walk.length_drop_until_le SimpleGraph.Walk.length_dropUntil_le
-/
@@ -1483,28 +1483,28 @@ theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
#print SimpleGraph.Walk.IsTrail.takeUntil /-
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 :=
- IsTrail.of_append_left (by rwa [← take_spec _ h] at hc)
+ IsTrail.of_append_left (by rwa [← take_spec _ h] at hc )
#align simple_graph.walk.is_trail.take_until SimpleGraph.Walk.IsTrail.takeUntil
-/
#print SimpleGraph.Walk.IsTrail.dropUntil /-
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 :=
- IsTrail.of_append_right (by rwa [← take_spec _ h] at hc)
+ IsTrail.of_append_right (by rwa [← take_spec _ h] at hc )
#align simple_graph.walk.is_trail.drop_until SimpleGraph.Walk.IsTrail.dropUntil
-/
#print SimpleGraph.Walk.IsPath.takeUntil /-
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 :=
- IsPath.of_append_left (by rwa [← take_spec _ h] at hc)
+ IsPath.of_append_left (by rwa [← take_spec _ h] at hc )
#align simple_graph.walk.is_path.take_until SimpleGraph.Walk.IsPath.takeUntil
-/
#print SimpleGraph.Walk.IsPath.dropUntil /-
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 :=
- IsPath.of_append_right (by rwa [← take_spec _ h] at hc)
+ IsPath.of_append_right (by rwa [← take_spec _ h] at hc )
#align simple_graph.walk.is_path.drop_until SimpleGraph.Walk.IsPath.dropUntil
-/
@@ -1561,7 +1561,7 @@ protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
· exact (hc.ne_nil rfl).elim
· intro hn
have hn' := congr_arg length hn
- rw [rotate, length_append, add_comm, ← length_append, take_spec] at hn'
+ rw [rotate, length_append, add_comm, ← length_append, take_spec] at hn'
simpa using hn'
#align simple_graph.walk.is_circuit.rotate SimpleGraph.Walk.IsCircuit.rotate
-/
@@ -1922,7 +1922,7 @@ theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
by
induction' p with w u v w huv hvw ih
· simp
- · rw [walk.cons_is_path_iff] at hp
+ · rw [walk.cons_is_path_iff] at hp
simp [ih hp.1]
intro x hx hf
cases hinj hf
@@ -1935,7 +1935,7 @@ protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPa
by
induction' p with w u v w huv hvw ih
· simp
- · rw [map_cons, walk.cons_is_path_iff, support_map] at hp
+ · rw [map_cons, walk.cons_is_path_iff, support_map] at hp
rw [walk.cons_is_path_iff]
cases' hp with hp1 hp2
refine' ⟨ih hp1, _⟩
@@ -1990,7 +1990,7 @@ theorem map_injective_of_injective {f : G →g G'} (hinj : Function.Injective f)
simpa using h
· induction p'
· simpa using h
- · simp only [map_cons] at h
+ · simp only [map_cons] at h
cases hinj h.1
simp only [eq_self_iff_true, heq_iff_eq, true_and_iff]
apply ih
@@ -2062,7 +2062,7 @@ 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)) :=
by
rintro ⟨p, hp⟩ ⟨p', hp'⟩ h
- simp only [Path.map, Subtype.coe_mk] at h
+ simp only [Path.map, Subtype.coe_mk] at h
simp [walk.map_injective_of_injective hinj u v h]
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
-/
@@ -2131,7 +2131,7 @@ variable {p}
protected theorem IsPath.transfer (pp : p.IsPath) : (p.transfer H hp).IsPath :=
by
- induction p <;> simp only [transfer, is_path.nil, cons_is_path_iff, support_transfer] at pp⊢
+ induction p <;> simp only [transfer, is_path.nil, cons_is_path_iff, support_transfer] at pp ⊢
· tauto
#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transfer
@@ -2139,7 +2139,7 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
(p.transfer H hp).IsCycle :=
by
cases p <;>
- simp only [transfer, is_cycle.not_of_nil, cons_is_cycle_iff, transfer, edges_transfer] at pc⊢
+ simp only [transfer, is_cycle.not_of_nil, cons_is_cycle_iff, transfer, edges_transfer] at pc ⊢
· exact pc
· exact ⟨pc.left.transfer _, pc.right⟩
#align simple_graph.walk.is_cycle.transfer SimpleGraph.Walk.IsCycle.transfer
@@ -2703,7 +2703,7 @@ theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected
by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
+ simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
subst_vars
#align simple_graph.singleton_subgraph_connected SimpleGraph.singletonSubgraph_connected
-/
@@ -2714,8 +2714,11 @@ theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj h
by
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
- obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;> first |rfl|· apply adj.reachable; simp
+ simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
+ obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
+ first
+ | rfl
+ | · apply adj.reachable; simp
#align simple_graph.subgraph_of_adj_connected SimpleGraph.subgraphOfAdj_connected
-/
@@ -2909,7 +2912,7 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
congr with h
congr with q
have := set.ext_iff.mp (ih w v) q
- simp only [Finset.mem_coe, Set.mem_setOf_eq] at this
+ simp only [Finset.mem_coe, Set.mem_setOf_eq] at this
rw [← this]
rfl
#align simple_graph.coe_finset_walk_length_eq SimpleGraph.coe_finsetWalkLength_eq
@@ -3059,16 +3062,16 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- so they both contain the edge ⟦(v, w)⟧, but that's a contradiction since c is a trail.
have hbq := hb (pvu.append puw)
have hpq' := hb pwv.reverse
- rw [walk.edges_reverse, List.mem_reverse'] at hpq'
+ rw [walk.edges_reverse, List.mem_reverse'] at hpq'
rw [walk.is_trail_def, this, walk.edges_append, walk.edges_append, List.nodup_append_comm, ←
- List.append_assoc, ← walk.edges_append] at hc
+ List.append_assoc, ← walk.edges_append] at hc
exact List.disjoint_of_nodup_append hc hbq hpq'
#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
-/
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
- ∃ (u : V)(p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
+ ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
by
classical
rw [reachable_delete_edges_iff_exists_walk]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -577,24 +577,12 @@ def concatRec {u v : V} (p : G.Walk u v) : motive u v p :=
#align simple_graph.walk.concat_rec SimpleGraph.Walk.concatRec
-/
-/- warning: simple_graph.walk.concat_rec_nil -> SimpleGraph.Walk.concatRec_nil is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u1} V G u v) -> Sort.{u2}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h))) (u : V), Eq.{u2} (motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (SimpleGraph.Walk.concatRec.{u1, u2} V G motive Hnil Hconcat u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hnil u)
-but is expected to have type
- forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u2} V G u v) -> Sort.{u1}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h))) (u : V), Eq.{u1} (motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (SimpleGraph.Walk.concatRec.{u2, u1} V G motive Hnil Hconcat u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hnil u)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.concat_rec_nil SimpleGraph.Walk.concatRec_nilₓ'. -/
@[simp]
theorem concatRec_nil (u : V) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (nil : G.Walk u u) = Hnil :=
rfl
#align simple_graph.walk.concat_rec_nil SimpleGraph.Walk.concatRec_nil
-/- warning: simple_graph.walk.concat_rec_concat -> SimpleGraph.Walk.concatRec_concat is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u1} V G u v) -> Sort.{u2}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h))) {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), Eq.{u2} (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h)) (SimpleGraph.Walk.concatRec.{u1, u2} V G motive Hnil Hconcat u w (SimpleGraph.Walk.concat.{u1} V G u v w p h)) (Hconcat u v w p h (SimpleGraph.Walk.concatRec.{u1, u2} V G (fun (_x : V) (_x_1 : V) (_x_2 : SimpleGraph.Walk.{u1} V G _x _x_1) => motive _x _x_1 _x_2) Hnil Hconcat u v p))
-but is expected to have type
- forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u2} V G u v) -> Sort.{u1}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h))) {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), Eq.{u1} (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h)) (SimpleGraph.Walk.concatRec.{u2, u1} V G motive Hnil Hconcat u w (SimpleGraph.Walk.concat.{u2} V G u v w p h)) (Hconcat u v w p h (SimpleGraph.Walk.concatRec.{u2, u1} V G (fun (_x : V) (_x_1 : V) (_x_2 : SimpleGraph.Walk.{u2} V G _x _x_1) => motive _x _x_1 _x_2) Hnil Hconcat u v p))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concatₓ'. -/
@[simp]
theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (p.concat h) =
@@ -858,12 +846,6 @@ theorem chain'_dartAdj_darts : ∀ {u v : V} (p : G.Walk u v), List.Chain' G.Dar
#align simple_graph.walk.chain'_dart_adj_darts SimpleGraph.Walk.chain'_dartAdj_darts
-/
-/- warning: simple_graph.walk.edges_subset_edge_set -> SimpleGraph.Walk.edges_subset_edgeSet is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {{e : Sym2.{u1} V}}, (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) G))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {{e : Sym2.{u1} V}}, (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V G))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSetₓ'. -/
/-- Every edge in a walk's edge list is an edge of the graph.
It is written in this form (rather than using `⊆`) to avoid unsightly coercions. -/
theorem edges_subset_edgeSet :
@@ -1873,12 +1855,6 @@ theorem map_copy (hu : u = u') (hv : v = v') :
#align simple_graph.walk.map_copy SimpleGraph.Walk.map_copy
-/
-/- warning: simple_graph.walk.map_id -> SimpleGraph.Walk.map_id is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) u) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, (SimpleGraph.Walk.{u1} V G u v) -> (forall (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) u) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_id SimpleGraph.Walk.map_idₓ'. -/
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by induction p <;> simp [*]
#align simple_graph.walk.map_id SimpleGraph.Walk.map_id
@@ -2091,24 +2067,12 @@ theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
-/
-/- warning: simple_graph.path.map_embedding -> SimpleGraph.Path.mapEmbedding is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v))
-Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbeddingₓ'. -/
/-- 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) :=
Path.map f.toHom f.Injective p
#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbedding
-/- warning: simple_graph.path.map_embedding_injective -> SimpleGraph.Path.mapEmbedding_injective is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
-Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding_injective SimpleGraph.Path.mapEmbedding_injectiveₓ'. -/
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)) :=
map_injective f.Injective u v
@@ -2123,12 +2087,6 @@ namespace Walk
variable {G}
-/- warning: simple_graph.walk.transfer -> SimpleGraph.Walk.transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) (H : SimpleGraph.{u1} V), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) -> (SimpleGraph.Walk.{u1} V H u v)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) (H : SimpleGraph.{u1} V), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) -> (SimpleGraph.Walk.{u1} V H u v)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer SimpleGraph.Walk.transferₓ'. -/
/-- The walk `p` transferred to lie in `H`, given that `H` contains its edges. -/
@[protected, simp]
def transfer :
@@ -2148,12 +2106,6 @@ theorem transfer_self : p.transfer G p.edges_subset_edgeSet = p := by
#align simple_graph.walk.transfer_self SimpleGraph.Walk.transfer_self
-/
-/- warning: simple_graph.walk.transfer_eq_map_of_le -> SimpleGraph.Walk.transfer_eq_map_of_le is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (GH : LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V) G H), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u v) (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) (SimpleGraph.Walk.map.{u1, u1} V V G H (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V G H GH) u v p)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (GH : LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instLESimpleGraph.{u1} V) G H), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u v) (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) (SimpleGraph.Walk.map.{u1, u1} V V G H (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V G H GH) u v p)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_eq_map_of_le SimpleGraph.Walk.transfer_eq_map_of_leₓ'. -/
theorem transfer_eq_map_of_le (GH : G ≤ H) :
p.transfer H hp = p.map (SimpleGraph.Hom.mapSpanningSubgraphs GH) := by
induction p <;>
@@ -2161,58 +2113,28 @@ theorem transfer_eq_map_of_le (GH : G ≤ H) :
heq_iff_eq, and_self_iff, map_nil]
#align simple_graph.walk.transfer_eq_map_of_le SimpleGraph.Walk.transfer_eq_map_of_le
-/- warning: simple_graph.walk.edges_transfer -> SimpleGraph.Walk.edges_transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.edges.{u1} V G u v p)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.edges.{u1} V G u v p)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transferₓ'. -/
@[simp]
theorem edges_transfer : (p.transfer H hp).edges = p.edges := by
induction p <;> simp only [*, transfer, edges_nil, edges_cons, eq_self_iff_true, and_self_iff]
#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transfer
-/- warning: simple_graph.walk.support_transfer -> SimpleGraph.Walk.support_transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (List.{u1} V) (SimpleGraph.Walk.support.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.support.{u1} V G u v p)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (List.{u1} V) (SimpleGraph.Walk.support.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.support.{u1} V G u v p)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transferₓ'. -/
@[simp]
theorem support_transfer : (p.transfer H hp).support = p.support := by
induction p <;> simp only [*, transfer, eq_self_iff_true, and_self_iff, support_nil, support_cons]
#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transfer
-/- warning: simple_graph.walk.length_transfer -> SimpleGraph.Walk.length_transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{1} Nat (SimpleGraph.Walk.length.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.length.{u1} V G u v p)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{1} Nat (SimpleGraph.Walk.length.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.length.{u1} V G u v p)
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.length_transfer SimpleGraph.Walk.length_transferₓ'. -/
@[simp]
theorem length_transfer : (p.transfer H hp).length = p.length := by induction p <;> simp [*]
#align simple_graph.walk.length_transfer SimpleGraph.Walk.length_transfer
variable {p}
-/- warning: simple_graph.walk.is_path.transfer -> SimpleGraph.Walk.IsPath.transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {p : SimpleGraph.Walk.{u1} V G u v} {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), (SimpleGraph.Walk.IsPath.{u1} V G u v p) -> (SimpleGraph.Walk.IsPath.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {p : SimpleGraph.Walk.{u1} V G u v} {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), (SimpleGraph.Walk.IsPath.{u1} V G u v p) -> (SimpleGraph.Walk.IsPath.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transferₓ'. -/
protected theorem IsPath.transfer (pp : p.IsPath) : (p.transfer H hp).IsPath :=
by
induction p <;> simp only [transfer, is_path.nil, cons_is_path_iff, support_transfer] at pp⊢
· tauto
#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transfer
-/- warning: simple_graph.walk.is_cycle.transfer -> SimpleGraph.Walk.IsCycle.transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {H : SimpleGraph.{u1} V} {p : SimpleGraph.Walk.{u1} V G u u}, (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), SimpleGraph.Walk.IsCycle.{u1} V H u (SimpleGraph.Walk.transfer.{u1} V G u u p H hp))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {H : SimpleGraph.{u1} V} {p : SimpleGraph.Walk.{u1} V G u u}, (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), SimpleGraph.Walk.IsCycle.{u1} V H u (SimpleGraph.Walk.transfer.{u1} V G u u p H hp))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_cycle.transfer SimpleGraph.Walk.IsCycle.transferₓ'. -/
protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
(p.transfer H hp).IsCycle :=
by
@@ -2224,18 +2146,12 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
variable (p)
-/- warning: simple_graph.walk.transfer_transfer -> SimpleGraph.Walk.transfer_transfer is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
(p.transfer H hp).transfer K (by rw [p.edges_transfer hp]; exact hp') = p.transfer K hp' := by
induction p <;> simp only [transfer, eq_self_iff_true, heq_iff_eq, true_and_iff]; apply p_ih
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
-/- warning: simple_graph.walk.transfer_append -> SimpleGraph.Walk.transfer_append is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_appendₓ'. -/
@[simp]
theorem transfer_append (hpq) :
(p.append q).transfer H hpq =
@@ -2247,9 +2163,6 @@ theorem transfer_append (hpq) :
apply p_ih
#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_append
-/- warning: simple_graph.walk.reverse_transfer -> SimpleGraph.Walk.reverse_transfer is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.reverse_transfer SimpleGraph.Walk.reverse_transferₓ'. -/
@[simp]
theorem reverse_transfer :
(p.transfer H hp).reverse =
@@ -2307,43 +2220,22 @@ abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges)
#align simple_graph.walk.to_delete_edge SimpleGraph.Walk.toDeleteEdge
-/
-/- warning: simple_graph.walk.map_to_delete_edges_eq -> SimpleGraph.Walk.map_toDeleteEdges_eq is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {w : V} {p : SimpleGraph.Walk.{u1} V G v w} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) w)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v w (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v w p hp)) p
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) v)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp)) p
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eqₓ'. -/
@[simp]
theorem map_toDeleteEdges_eq (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (hp) :
Walk.map (Hom.mapSpanningSubgraphs (G.deleteEdges_le s)) (p.toDeleteEdges s hp) = p := by
rw [← transfer_eq_map_of_le, transfer_transfer, transfer_self]
#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eq
-/- warning: simple_graph.walk.is_path.to_delete_edges -> SimpleGraph.Walk.IsPath.toDeleteEdges is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {w : V} {p : SimpleGraph.Walk.{u1} V G v w}, (SimpleGraph.Walk.IsPath.{u1} V G v w p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), SimpleGraph.Walk.IsPath.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) v w (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v w p hp))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v}, (SimpleGraph.Walk.IsPath.{u1} V G s v p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), SimpleGraph.Walk.IsPath.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_path.to_delete_edges SimpleGraph.Walk.IsPath.toDeleteEdgesₓ'. -/
protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (h : p.IsPath)
(hp) : (p.toDeleteEdges s hp).IsPath :=
h.transfer _
#align simple_graph.walk.is_path.to_delete_edges SimpleGraph.Walk.IsPath.toDeleteEdges
-/- warning: simple_graph.walk.is_cycle.to_delete_edges -> SimpleGraph.Walk.IsCycle.toDeleteEdges is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {p : SimpleGraph.Walk.{u1} V G v v}, (SimpleGraph.Walk.IsCycle.{u1} V G v p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), SimpleGraph.Walk.IsCycle.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) v (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v v p hp))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} (v : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s s}, (SimpleGraph.Walk.IsCycle.{u1} V G s p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s s p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v))), SimpleGraph.Walk.IsCycle.{u1} V (SimpleGraph.deleteEdges.{u1} V G v) s (SimpleGraph.Walk.toDeleteEdges.{u1} V G v s s p hp))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdgesₓ'. -/
protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V)) {v : V} {p : G.Walk v v} (h : p.IsCycle)
(hp) : (p.toDeleteEdges s hp).IsCycle :=
h.transfer _
#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdges
-/- warning: simple_graph.walk.to_delete_edges_copy -> SimpleGraph.Walk.toDeleteEdges_copy is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_delete_edges_copy SimpleGraph.Walk.toDeleteEdges_copyₓ'. -/
@[simp]
theorem toDeleteEdges_copy (s : Set (Sym2 V)) {u v u' v'} (p : G.Walk u v) (hu : u = u')
(hv : v = v') (h) :
@@ -2447,34 +2339,16 @@ theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.Refl
#align simple_graph.reachable_iff_refl_trans_gen SimpleGraph.reachable_iff_reflTransGen
-/
-/- warning: simple_graph.reachable.map -> SimpleGraph.Reachable.map is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Hom.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Reachable.{u1} V G u v) -> (SimpleGraph.Reachable.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : V} {G' : V} {f : SimpleGraph.{u1} V} {u : SimpleGraph.{u2} V'} (v : SimpleGraph.Hom.{u1, u2} V V' f u), (SimpleGraph.Reachable.{u1} V f G G') -> (SimpleGraph.Reachable.{u2} V' u (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G'))
-Case conversion may be inaccurate. Consider using '#align simple_graph.reachable.map SimpleGraph.Reachable.mapₓ'. -/
protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G') {u v : V}
(h : G.Reachable u v) : G'.Reachable (f u) (f v) :=
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
-/- warning: simple_graph.iso.reachable_iff -> SimpleGraph.Iso.reachable_iff is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V}, Iff (SimpleGraph.Reachable.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v)) (SimpleGraph.Reachable.{u1} V G u v)
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V}, Iff (SimpleGraph.Reachable.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ v)) (SimpleGraph.Reachable.{u1} V G u v)
-Case conversion may be inaccurate. Consider using '#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iffₓ'. -/
theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iff
-/- warning: simple_graph.iso.symm_apply_reachable -> SimpleGraph.Iso.symm_apply_reachable is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V'}, Iff (SimpleGraph.Reachable.{u1} V G (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (SimpleGraph.Iso.{u2, u1} V' V G' G) (fun (_x : RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) => V' -> V) (RelIso.hasCoeToFun.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v) u) (SimpleGraph.Reachable.{u2} V' G' v (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ u))
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V'}, Iff (SimpleGraph.Reachable.{u1} V G (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' (fun (_x : V') => V) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G) (RelIso.instRelHomClassRelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v) u) (SimpleGraph.Reachable.{u2} V' G' v (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ u))
-Case conversion may be inaccurate. Consider using '#align simple_graph.iso.symm_apply_reachable SimpleGraph.Iso.symm_apply_reachableₓ'. -/
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) := by
rw [← iso.reachable_iff, RelIso.apply_symm_apply]
@@ -2630,12 +2504,6 @@ protected def lift {β : Sort _} (f : V → β)
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
-/
-/- warning: simple_graph.connected_component.lift_mk -> SimpleGraph.ConnectedComponent.lift_mk is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {β : Sort.{u2}} {f : V -> β} {h : forall (v : V) (w : V) (p : SimpleGraph.Walk.{u1} V G v w), (SimpleGraph.Walk.IsPath.{u1} V G v w p) -> (Eq.{u2} β (f v) (f w))} {v : V}, Eq.{u2} β (SimpleGraph.ConnectedComponent.lift.{u1, u2} V G β f h (SimpleGraph.connectedComponentMk.{u1} V G v)) (f v)
-but is expected to have type
- forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {β : Sort.{u1}} {f : V -> β} {h : forall (v : V) (w : V) (p : SimpleGraph.Walk.{u2} V G v w), (SimpleGraph.Walk.IsPath.{u2} V G v w p) -> (Eq.{u1} β (f v) (f w))} {v : V}, Eq.{u1} β (SimpleGraph.ConnectedComponent.lift.{u2, u1} V G β f h (SimpleGraph.connectedComponentMk.{u2} V G v)) (f v)
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mkₓ'. -/
@[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} :
@@ -2696,12 +2564,6 @@ theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'')
variable {φ : G ≃g G'} {v : V} {v' : V'}
-/- warning: simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp -> SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v : V} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v)) (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (RelEmbedding.RelHom.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (RelIso.RelEmbedding.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) φ)) C)) (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G v) C)
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v : V} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ v)) (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' (RelEmbedding.toRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.toRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') φ)) C)) (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G v) C)
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_compₓ'. -/
@[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 :=
@@ -2711,12 +2573,6 @@ theorem iso_image_comp_eq_map_iff_eq_comp {C : G.ConnectedComponent} :
RelIso.coe_coeFn, connected_component.eq]
#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
-/- warning: simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map -> SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v' : V'} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (SimpleGraph.Iso.{u2, u1} V' V G' G) (fun (_x : RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) => V' -> V) (RelIso.hasCoeToFun.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v')) C) (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' v') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (coeTrans.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) (SimpleGraph.Hom.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) (SimpleGraph.Hom.{u1, u2} V V' G G') (RelEmbedding.RelHom.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) (RelIso.RelEmbedding.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) φ) C))
-but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v' : V'} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' (fun (_x : V') => V) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G) (RelIso.instRelHomClassRelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v')) C) (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' v') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' (RelEmbedding.toRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.toRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') φ)) C))
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_mapₓ'. -/
@[simp]
theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ :=
@@ -2930,12 +2786,6 @@ theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = {
#align simple_graph.walk.edge_set_to_subgraph SimpleGraph.Walk.edgeSet_toSubgraph
-/
-/- warning: simple_graph.walk.to_subgraph_append -> SimpleGraph.Walk.toSubgraph_append is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.hasSup.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instSupSubgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
-Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_appendₓ'. -/
@[simp]
theorem toSubgraph_append (p : G.Walk u v) (q : G.Walk v w) :
(p.append q).toSubgraph = p.toSubgraph ⊔ q.toSubgraph := by induction p <;> simp [*, sup_assoc]
@@ -3156,23 +3006,11 @@ def IsBridge (G : SimpleGraph V) (e : Sym2 V) : Prop :=
#align simple_graph.is_bridge SimpleGraph.IsBridge
-/
-/- warning: simple_graph.is_bridge_iff -> SimpleGraph.isBridge_iff is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
-Case conversion may be inaccurate. Consider using '#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iffₓ'. -/
theorem isBridge_iff {u v : V} :
G.IsBridge ⟦(u, v)⟧ ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {⟦(u, v)⟧}).Reachable u v :=
Iff.rfl
#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iff
-/- warning: simple_graph.reachable_delete_edges_iff_exists_walk -> SimpleGraph.reachable_delete_edges_iff_exists_walk is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
-Case conversion may be inaccurate. Consider using '#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walkₓ'. -/
theorem reachable_delete_edges_iff_exists_walk {v w : V} :
(G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔ ∃ p : G.Walk v w, ¬⟦(v, w)⟧ ∈ p.edges :=
by
@@ -3228,12 +3066,6 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
-/
-/- warning: simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle -> SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
-Case conversion may be inaccurate. Consider using '#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycleₓ'. -/
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
∃ (u : V)(p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
@@ -3284,12 +3116,6 @@ theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
#align simple_graph.is_bridge_iff_adj_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem
-/
-/- warning: simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem -> SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {e : Sym2.{u1} V}, Iff (SimpleGraph.IsBridge.{u1} V G e) (And (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) G)) (forall {{u : V}} (p : SimpleGraph.Walk.{u1} V G u u), (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)))))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {e : Sym2.{u1} V}, Iff (SimpleGraph.IsBridge.{u1} V G e) (And (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V G)) (forall {{u : V}} (p : SimpleGraph.Walk.{u1} V G u u), (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)))))
-Case conversion may be inaccurate. Consider using '#align simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_memₓ'. -/
theorem isBridge_iff_mem_and_forall_cycle_not_mem {e : Sym2 V} :
G.IsBridge e ↔ e ∈ G.edgeSetEmbedding ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges :=
Sym2.ind (fun v w => isBridge_iff_adj_and_forall_cycle_not_mem) e
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -162,38 +162,28 @@ theorem copy_rfl_rfl {u v} (p : G.Walk u v) : p.copy rfl rfl = p :=
#print SimpleGraph.Walk.copy_copy /-
@[simp]
theorem copy_copy {u v u' v' u'' v''} (p : G.Walk u v) (hu : u = u') (hv : v = v') (hu' : u' = u'')
- (hv' : v' = v'') : (p.copy hu hv).copy hu' hv' = p.copy (hu.trans hu') (hv.trans hv') :=
- by
- subst_vars
- rfl
+ (hv' : v' = v'') : (p.copy hu hv).copy hu' hv' = p.copy (hu.trans hu') (hv.trans hv') := by
+ subst_vars; rfl
#align simple_graph.walk.copy_copy SimpleGraph.Walk.copy_copy
-/
#print SimpleGraph.Walk.copy_nil /-
@[simp]
-theorem copy_nil {u u'} (hu : u = u') : (Walk.nil : G.Walk u u).copy hu hu = Walk.nil :=
- by
- subst_vars
- rfl
+theorem copy_nil {u u'} (hu : u = u') : (Walk.nil : G.Walk u u).copy hu hu = Walk.nil := by
+ subst_vars; rfl
#align simple_graph.walk.copy_nil SimpleGraph.Walk.copy_nil
-/
#print SimpleGraph.Walk.copy_cons /-
theorem copy_cons {u v w u' w'} (h : G.Adj u v) (p : G.Walk v w) (hu : u = u') (hw : w = w') :
- (Walk.cons h p).copy hu hw = Walk.cons (by rwa [← hu]) (p.copy rfl hw) :=
- by
- subst_vars
- rfl
+ (Walk.cons h p).copy hu hw = Walk.cons (by rwa [← hu]) (p.copy rfl hw) := by subst_vars; rfl
#align simple_graph.walk.copy_cons SimpleGraph.Walk.copy_cons
-/
#print SimpleGraph.Walk.cons_copy /-
@[simp]
theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v) (hw : w' = w) :
- Walk.cons h (p.copy hv hw) = (Walk.cons (by rwa [hv]) p).copy rfl hw :=
- by
- subst_vars
- rfl
+ Walk.cons h (p.copy hv hw) = (Walk.cons (by rwa [hv]) p).copy rfl hw := by subst_vars; rfl
#align simple_graph.walk.cons_copy SimpleGraph.Walk.cons_copy
-/
@@ -337,9 +327,7 @@ theorem append_assoc :
∀ {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (r : G.Walk w x),
p.append (q.append r) = (p.append q).append r
| _, _, _, _, nil, _, _ => rfl
- | _, _, _, _, cons h p', q, r => by
- dsimp only [append]
- rw [append_assoc]
+ | _, _, _, _, cons h p', q, r => by dsimp only [append]; rw [append_assoc]
#align simple_graph.walk.append_assoc SimpleGraph.Walk.append_assoc
-/
@@ -347,9 +335,7 @@ theorem append_assoc :
@[simp]
theorem append_copy_copy {u v w u' v' w'} (p : G.Walk u v) (q : G.Walk v w) (hu : u = u')
(hv : v = v') (hw : w = w') : (p.copy hu hv).append (q.copy hv hw) = (p.append q).copy hu hw :=
- by
- subst_vars
- rfl
+ by subst_vars; rfl
#align simple_graph.walk.append_copy_copy SimpleGraph.Walk.append_copy_copy
-/
@@ -462,10 +448,7 @@ theorem reverse_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
#print SimpleGraph.Walk.reverse_copy /-
@[simp]
theorem reverse_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
- (p.copy hu hv).reverse = p.reverse.copy hv hu :=
- by
- subst_vars
- rfl
+ (p.copy hu hv).reverse = p.reverse.copy hv hu := by subst_vars; rfl
#align simple_graph.walk.reverse_copy SimpleGraph.Walk.reverse_copy
-/
@@ -509,9 +492,7 @@ theorem length_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
#print SimpleGraph.Walk.length_copy /-
@[simp]
theorem length_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
- (p.copy hu hv).length = p.length := by
- subst_vars
- rfl
+ (p.copy hu hv).length = p.length := by subst_vars; rfl
#align simple_graph.walk.length_copy SimpleGraph.Walk.length_copy
-/
@@ -623,8 +604,7 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
apply eq_of_hEq
apply rec_heq_of_heq
trans concat_rec_aux (@Hnil) (@Hconcat) (cons h.symm p.reverse)
- · congr
- simp
+ · congr ; simp
· rw [concat_rec_aux, rec_heq_iff_heq]
congr <;> simp [heq_rec_iff_heq]
#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concat
@@ -717,9 +697,7 @@ theorem support_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
#print SimpleGraph.Walk.support_copy /-
@[simp]
theorem support_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
- (p.copy hu hv).support = p.support := by
- subst_vars
- rfl
+ (p.copy hu hv).support = p.support := by subst_vars; rfl
#align simple_graph.walk.support_copy SimpleGraph.Walk.support_copy
-/
@@ -795,10 +773,8 @@ theorem mem_tail_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk
#print SimpleGraph.Walk.end_mem_tail_support_of_ne /-
@[simp]
-theorem end_mem_tail_support_of_ne {u v : V} (h : u ≠ v) (p : G.Walk u v) : v ∈ p.support.tail :=
- by
- obtain ⟨_, _, _, rfl⟩ := exists_eq_cons_of_ne h p
- simp
+theorem end_mem_tail_support_of_ne {u v : V} (h : u ≠ v) (p : G.Walk u v) : v ∈ p.support.tail := by
+ obtain ⟨_, _, _, rfl⟩ := exists_eq_cons_of_ne h p; simp
#align simple_graph.walk.end_mem_tail_support_of_ne SimpleGraph.Walk.end_mem_tail_support_of_ne
-/
@@ -823,9 +799,7 @@ theorem subset_support_append_left {V : Type u} {G : SimpleGraph V} {u v w : V}
#print SimpleGraph.Walk.subset_support_append_right /-
@[simp]
theorem subset_support_append_right {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v)
- (q : G.Walk v w) : q.support ⊆ (p.append q).support :=
- by
- intro h
+ (q : G.Walk v w) : q.support ⊆ (p.append q).support := by intro h;
simp (config := { contextual := true }) only [mem_support_append_iff, or_true_iff, imp_true_iff]
#align simple_graph.walk.subset_support_append_right SimpleGraph.Walk.subset_support_append_right
-/
@@ -929,9 +903,7 @@ theorem darts_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
#print SimpleGraph.Walk.darts_copy /-
@[simp]
theorem darts_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
- (p.copy hu hv).darts = p.darts := by
- subst_vars
- rfl
+ (p.copy hu hv).darts = p.darts := by subst_vars; rfl
#align simple_graph.walk.darts_copy SimpleGraph.Walk.darts_copy
-/
@@ -1006,9 +978,7 @@ theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
#print SimpleGraph.Walk.edges_copy /-
@[simp]
theorem edges_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
- (p.copy hu hv).edges = p.edges := by
- subst_vars
- rfl
+ (p.copy hu hv).edges = p.edges := by subst_vars; rfl
#align simple_graph.walk.edges_copy SimpleGraph.Walk.edges_copy
-/
@@ -1078,9 +1048,7 @@ theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t,
#print SimpleGraph.Walk.snd_mem_support_of_mem_edges /-
theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
- u ∈ p.support := by
- rw [Sym2.eq_swap] at he
- exact p.fst_mem_support_of_mem_edges he
+ u ∈ p.support := by rw [Sym2.eq_swap] at he; exact p.fst_mem_support_of_mem_edges he
#align simple_graph.walk.snd_mem_support_of_mem_edges SimpleGraph.Walk.snd_mem_support_of_mem_edges
-/
@@ -1155,9 +1123,7 @@ theorem isTrail_def {u v : V} (p : G.Walk u v) : p.IsTrail ↔ p.edges.Nodup :=
#print SimpleGraph.Walk.isTrail_copy /-
@[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 := by
- subst_vars
- rfl
+ (p.copy hu hv).IsTrail ↔ p.IsTrail := by subst_vars; rfl
#align simple_graph.walk.is_trail_copy SimpleGraph.Walk.isTrail_copy
-/
@@ -1176,9 +1142,7 @@ theorem isPath_def {u v : V} (p : G.Walk u v) : p.IsPath ↔ p.support.Nodup :=
#print SimpleGraph.Walk.isPath_copy /-
@[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 := by
- subst_vars
- rfl
+ (p.copy hu hv).IsPath ↔ p.IsPath := by subst_vars; rfl
#align simple_graph.walk.is_path_copy SimpleGraph.Walk.isPath_copy
-/
@@ -1191,10 +1155,7 @@ theorem isCircuit_def {u : V} (p : G.Walk u u) : p.IsCircuit ↔ IsTrail p ∧ p
#print SimpleGraph.Walk.isCircuit_copy /-
@[simp]
theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
- (p.copy hu hu).IsCircuit ↔ p.IsCircuit :=
- by
- subst_vars
- rfl
+ (p.copy hu hu).IsCircuit ↔ p.IsCircuit := by subst_vars; rfl
#align simple_graph.walk.is_circuit_copy SimpleGraph.Walk.isCircuit_copy
-/
@@ -1208,9 +1169,7 @@ theorem isCycle_def {u : V} (p : G.Walk u u) :
#print SimpleGraph.Walk.isCycle_copy /-
@[simp]
theorem isCycle_copy {u u'} (p : G.Walk u u) (hu : u = u') : (p.copy hu hu).IsCycle ↔ p.IsCycle :=
- by
- subst_vars
- rfl
+ by subst_vars; rfl
#align simple_graph.walk.is_cycle_copy SimpleGraph.Walk.isCycle_copy
-/
@@ -1243,28 +1202,21 @@ theorem IsTrail.reverse {u v : V} (p : G.Walk u v) (h : p.IsTrail) : p.reverse.I
#print SimpleGraph.Walk.reverse_isTrail_iff /-
@[simp]
theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p.IsTrail := by
- constructor <;>
- · intro h
- convert h.reverse _
- try rw [reverse_reverse]
+ constructor <;> · intro h; convert h.reverse _; try rw [reverse_reverse]
#align simple_graph.walk.reverse_is_trail_iff SimpleGraph.Walk.reverse_isTrail_iff
-/
#print SimpleGraph.Walk.IsTrail.of_append_left /-
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 :=
- by
- rw [is_trail_def, edges_append, List.nodup_append] at h
- exact ⟨h.1⟩
+ (h : (p.append q).IsTrail) : p.IsTrail := by
+ rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.1⟩
#align simple_graph.walk.is_trail.of_append_left SimpleGraph.Walk.IsTrail.of_append_left
-/
#print SimpleGraph.Walk.IsTrail.of_append_right /-
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 :=
- by
- rw [is_trail_def, edges_append, List.nodup_append] at h
- exact ⟨h.2.1⟩
+ (h : (p.append q).IsTrail) : q.IsTrail := by
+ rw [is_trail_def, edges_append, List.nodup_append] at h; exact ⟨h.2.1⟩
#align simple_graph.walk.is_trail.of_append_right SimpleGraph.Walk.IsTrail.of_append_right
-/
@@ -1323,9 +1275,7 @@ theorem isPath_reverse_iff {u v : V} (p : G.Walk u v) : p.reverse.IsPath ↔ p.I
#print SimpleGraph.Walk.IsPath.of_append_left /-
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 :=
- by
- simp only [is_path_def, support_append]
+ (p.append q).IsPath → p.IsPath := by simp only [is_path_def, support_append];
exact List.Nodup.of_append_left
#align simple_graph.walk.is_path.of_append_left SimpleGraph.Walk.IsPath.of_append_left
-/
@@ -1360,16 +1310,12 @@ theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
/-! ### About paths -/
-instance [DecidableEq V] {u v : V} (p : G.Walk u v) : Decidable p.IsPath :=
- by
- rw [is_path_def]
+instance [DecidableEq V] {u v : V} (p : G.Walk u v) : Decidable p.IsPath := by rw [is_path_def];
infer_instance
#print SimpleGraph.Walk.IsPath.length_lt /-
theorem IsPath.length_lt [Fintype V] {u v : V} {p : G.Walk u v} (hp : p.IsPath) :
- p.length < Fintype.card V :=
- by
- rw [Nat.lt_iff_add_one_le, ← length_support]
+ p.length < Fintype.card V := by rw [Nat.lt_iff_add_one_le, ← length_support];
exact hp.support_nodup.length_le_card
#align simple_graph.walk.is_path.length_lt SimpleGraph.Walk.IsPath.length_lt
-/
@@ -1398,9 +1344,7 @@ that vertex. -/
def dropUntil : ∀ {v w : V} (p : G.Walk v w) (u : V) (h : u ∈ p.support), G.Walk u w
| v, w, nil, u, h => by rw [mem_support_nil_iff.mp h]
| v, w, cons r p, u, h =>
- if hx : v = u then by
- subst u
- exact cons r p
+ if hx : v = u then by subst u; exact cons r p
else drop_until p _ <| h.casesOn (fun h' => (hx h'.symm).elim) id
#align simple_graph.walk.drop_until SimpleGraph.Walk.dropUntil
-/
@@ -1478,15 +1422,8 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
@[simp]
theorem takeUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
(h : u ∈ (p.copy hv hw).support) :
- (p.copy hv hw).takeUntil u h =
- (p.takeUntil u
- (by
- subst_vars
- exact h)).copy
- hv rfl :=
- by
- subst_vars
- rfl
+ (p.copy hv hw).takeUntil u h = (p.takeUntil u (by subst_vars; exact h)).copy hv rfl := by
+ subst_vars; rfl
#align simple_graph.walk.take_until_copy SimpleGraph.Walk.takeUntil_copy
-/
@@ -1494,51 +1431,36 @@ theorem takeUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w'
@[simp]
theorem dropUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
(h : u ∈ (p.copy hv hw).support) :
- (p.copy hv hw).dropUntil u h =
- (p.dropUntil u
- (by
- subst_vars
- exact h)).copy
- rfl hw :=
- by
- subst_vars
- rfl
+ (p.copy hv hw).dropUntil u h = (p.dropUntil u (by subst_vars; exact h)).copy rfl hw := by
+ subst_vars; rfl
#align simple_graph.walk.drop_until_copy SimpleGraph.Walk.dropUntil_copy
-/
#print SimpleGraph.Walk.support_takeUntil_subset /-
theorem support_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
- (p.takeUntil u h).support ⊆ p.support := fun x hx =>
- by
- rw [← take_spec p h, mem_support_append_iff]
- exact Or.inl hx
+ (p.takeUntil u h).support ⊆ p.support := fun x hx => by
+ rw [← take_spec p h, mem_support_append_iff]; exact Or.inl hx
#align simple_graph.walk.support_take_until_subset SimpleGraph.Walk.support_takeUntil_subset
-/
#print SimpleGraph.Walk.support_dropUntil_subset /-
theorem support_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
- (p.dropUntil u h).support ⊆ p.support := fun x hx =>
- by
- rw [← take_spec p h, mem_support_append_iff]
- exact Or.inr hx
+ (p.dropUntil u h).support ⊆ p.support := fun x hx => by
+ rw [← take_spec p h, mem_support_append_iff]; exact Or.inr hx
#align simple_graph.walk.support_drop_until_subset SimpleGraph.Walk.support_dropUntil_subset
-/
#print SimpleGraph.Walk.darts_takeUntil_subset /-
theorem darts_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
- (p.takeUntil u h).darts ⊆ p.darts := fun x hx =>
- by
- rw [← take_spec p h, darts_append, List.mem_append]
- exact Or.inl hx
+ (p.takeUntil u h).darts ⊆ p.darts := fun x hx => by
+ rw [← take_spec p h, darts_append, List.mem_append]; exact Or.inl hx
#align simple_graph.walk.darts_take_until_subset SimpleGraph.Walk.darts_takeUntil_subset
-/
#print SimpleGraph.Walk.darts_dropUntil_subset /-
theorem darts_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
- (p.dropUntil u h).darts ⊆ p.darts := fun x hx =>
- by
- rw [← take_spec p h, darts_append, List.mem_append]
- exact Or.inr hx
+ (p.dropUntil u h).darts ⊆ p.darts := fun x hx => by
+ rw [← take_spec p h, darts_append, List.mem_append]; exact Or.inr hx
#align simple_graph.walk.darts_drop_until_subset SimpleGraph.Walk.darts_dropUntil_subset
-/
@@ -1816,10 +1738,7 @@ def bypass : ∀ {u v : V}, G.Walk u v → G.Walk u v
#print SimpleGraph.Walk.bypass_copy /-
@[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 :=
- by
- subst_vars
- rfl
+ (p.copy hu hv).bypass = p.bypass.copy hu hv := by subst_vars; rfl
#align simple_graph.walk.bypass_copy SimpleGraph.Walk.bypass_copy
-/
@@ -1950,10 +1869,7 @@ theorem map_cons {w : V} (h : G.Adj w u) : (cons h p).map f = cons (f.map_adj h)
#print SimpleGraph.Walk.map_copy /-
@[simp]
theorem map_copy (hu : u = u') (hv : v = v') :
- (p.copy hu hv).map f = (p.map f).copy (by rw [hu]) (by rw [hv]) :=
- by
- subst_vars
- rfl
+ (p.copy hu hv).map f = (p.map f).copy (by rw [hu]) (by rw [hv]) := by subst_vars; rfl
#align simple_graph.walk.map_copy SimpleGraph.Walk.map_copy
-/
@@ -1977,10 +1893,7 @@ theorem map_map : (p.map f).map f' = p.map (f'.comp f) := by induction p <;> sim
/-- Unlike categories, for graphs vertex equality is an important notion, so needing to be able to
to work with equality of graph homomorphisms is a necessary evil. -/
theorem map_eq_of_eq {f : G →g G'} (f' : G →g G') (h : f = f') :
- p.map f = (p.map f').copy (by rw [h]) (by rw [h]) :=
- by
- subst_vars
- rfl
+ p.map f = (p.map f').copy (by rw [h]) (by rw [h]) := by subst_vars; rfl
#align simple_graph.walk.map_eq_of_eq SimpleGraph.Walk.map_eq_of_eq
-/
@@ -2316,14 +2229,8 @@ variable (p)
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
- (p.transfer H hp).transfer K
- (by
- rw [p.edges_transfer hp]
- exact hp') =
- p.transfer K hp' :=
- by
- induction p <;> simp only [transfer, eq_self_iff_true, heq_iff_eq, true_and_iff]
- apply p_ih
+ (p.transfer H hp).transfer K (by rw [p.edges_transfer hp]; exact hp') = p.transfer K hp' := by
+ induction p <;> simp only [transfer, eq_self_iff_true, heq_iff_eq, true_and_iff]; apply p_ih
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
/- warning: simple_graph.walk.transfer_append -> SimpleGraph.Walk.transfer_append is a dubious translation:
@@ -2332,12 +2239,8 @@ Case conversion may be inaccurate. Consider using '#align simple_graph.walk.tran
@[simp]
theorem transfer_append (hpq) :
(p.append q).transfer H hpq =
- (p.transfer H fun e he => by
- apply hpq
- simp [he]).append
- (q.transfer H fun e he => by
- apply hpq
- simp [he]) :=
+ (p.transfer H fun e he => by apply hpq; simp [he]).append
+ (q.transfer H fun e he => by apply hpq; simp [he]) :=
by
induction p <;>
simp only [transfer, nil_append, cons_append, eq_self_iff_true, heq_iff_eq, true_and_iff]
@@ -2350,10 +2253,7 @@ Case conversion may be inaccurate. Consider using '#align simple_graph.walk.reve
@[simp]
theorem reverse_transfer :
(p.transfer H hp).reverse =
- p.reverse.transfer H
- (by
- simp only [edges_reverse, List.mem_reverse']
- exact hp) :=
+ p.reverse.transfer H (by simp only [edges_reverse, List.mem_reverse']; exact hp) :=
by
induction p <;> simp only [*, transfer_append, transfer, reverse_nil, reverse_cons]
rfl
@@ -2403,9 +2303,7 @@ theorem toDeleteEdges_cons (s : Set (Sym2 V)) {u v w : V} (h : G.Adj u v) (p : G
This is an abbreviation for `simple_graph.walk.to_delete_edges`. -/
abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges) :
(G.deleteEdges {e}).Walk v w :=
- p.toDeleteEdges {e} fun e' => by
- contrapose!
- simp (config := { contextual := true }) [hp]
+ p.toDeleteEdges {e} fun e' => by contrapose!; simp (config := { contextual := true }) [hp]
#align simple_graph.walk.to_delete_edge SimpleGraph.Walk.toDeleteEdge
-/
@@ -2449,15 +2347,8 @@ Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_d
@[simp]
theorem toDeleteEdges_copy (s : Set (Sym2 V)) {u v u' 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 :=
- by
- subst_vars
- rfl
+ (p.copy hu hv).toDeleteEdges s h = (p.toDeleteEdges s (by subst_vars; exact h)).copy hu hv := by
+ subst_vars; rfl
#align simple_graph.walk.to_delete_edges_copy SimpleGraph.Walk.toDeleteEdges_copy
end Walk
@@ -2510,10 +2401,7 @@ protected theorem Adj.reachable {u v : V} (h : G.Adj u v) : G.Reachable u v :=
#print SimpleGraph.Reachable.refl /-
@[refl]
-protected theorem Reachable.refl (u : V) : G.Reachable u u :=
- by
- fconstructor
- rfl
+protected theorem Reachable.refl (u : V) : G.Reachable u u := by fconstructor; rfl
#align simple_graph.reachable.refl SimpleGraph.Reachable.refl
-/
@@ -2794,9 +2682,7 @@ theorem map_mk (φ : G →g G') (v : V) :
#print SimpleGraph.ConnectedComponent.map_id /-
@[simp]
-theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
- by
- refine' C.ind _
+theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C := by refine' C.ind _;
exact fun _ => rfl
#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_id
-/
@@ -2804,9 +2690,7 @@ theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
#print SimpleGraph.ConnectedComponent.map_comp /-
@[simp]
theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
- (C.map φ).map ψ = C.map (ψ.comp φ) := by
- refine' C.ind _
- exact fun _ => rfl
+ (C.map φ).map ψ = C.map (ψ.comp φ) := by refine' C.ind _; exact fun _ => rfl
#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_comp
-/
@@ -2865,19 +2749,14 @@ def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.Conne
#print SimpleGraph.Iso.connectedComponentEquiv_refl /-
@[simp]
theorem connectedComponentEquiv_refl : (Iso.refl : G ≃g G).connectedComponentEquiv = Equiv.refl _ :=
- by
- ext ⟨v⟩
- rfl
+ by ext ⟨v⟩; rfl
#align simple_graph.iso.connected_component_equiv_refl SimpleGraph.Iso.connectedComponentEquiv_refl
-/
#print SimpleGraph.Iso.connectedComponentEquiv_symm /-
@[simp]
theorem connectedComponentEquiv_symm (φ : G ≃g G') :
- φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm :=
- by
- ext ⟨_⟩
- rfl
+ φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm := by ext ⟨_⟩; rfl
#align simple_graph.iso.connected_component_equiv_symm SimpleGraph.Iso.connectedComponentEquiv_symm
-/
@@ -2886,9 +2765,7 @@ theorem connectedComponentEquiv_symm (φ : G ≃g G') :
theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
connectedComponentEquiv (φ.trans φ') =
φ.connectedComponentEquiv.trans φ'.connectedComponentEquiv :=
- by
- ext ⟨_⟩
- rfl
+ by ext ⟨_⟩; rfl
#align simple_graph.iso.connected_component_equiv_trans SimpleGraph.Iso.connectedComponentEquiv_trans
-/
@@ -2982,19 +2859,13 @@ theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj h
constructor
rintro ⟨a, ha⟩ ⟨b, hb⟩
simp only [subgraph_of_adj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
- obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
- first
- |rfl|·
- apply adj.reachable
- simp
+ obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;> first |rfl|· apply adj.reachable; simp
#align simple_graph.subgraph_of_adj_connected SimpleGraph.subgraphOfAdj_connected
-/
#print SimpleGraph.Preconnected.set_univ_walk_nonempty /-
theorem Preconnected.set_univ_walk_nonempty (hconn : G.Preconnected) (u v : V) :
- (Set.univ : Set (G.Walk u v)).Nonempty :=
- by
- rw [← Set.nonempty_iff_univ_nonempty]
+ (Set.univ : Set (G.Walk u v)).Nonempty := by rw [← Set.nonempty_iff_univ_nonempty];
exact hconn u v
#align simple_graph.preconnected.set_univ_walk_nonempty SimpleGraph.Preconnected.set_univ_walk_nonempty
-/
@@ -3120,10 +2991,8 @@ end Walk
section WalkCounting
#print SimpleGraph.set_walk_self_length_zero_eq /-
-theorem set_walk_self_length_zero_eq (u : V) : { p : G.Walk u u | p.length = 0 } = {Walk.nil} :=
- by
- ext p
- simp
+theorem set_walk_self_length_zero_eq (u : V) : { p : G.Walk u u | p.length = 0 } = {Walk.nil} := by
+ ext p; simp
#align simple_graph.set_walk_self_length_zero_eq SimpleGraph.set_walk_self_length_zero_eq
-/
@@ -3168,11 +3037,7 @@ can also be useful as a recursive description of this set when `V` is finite.
See `simple_graph.coe_finset_walk_length_eq` for the relationship between this `finset` and
the set of length-`n` walks. -/
def finsetWalkLength : ∀ (n : ℕ) (u v : V), Finset (G.Walk u v)
- | 0, u, v =>
- if h : u = v then by
- subst u
- exact {walk.nil}
- else ∅
+ | 0, u, v => if h : u = v then by subst u; exact {walk.nil} else ∅
| n + 1, u, v =>
Finset.univ.biUnion fun w : G.neighborSet u =>
(finset_walk_length n w v).map ⟨fun p => Walk.cons w.property p, fun p q => by simp⟩
@@ -3220,9 +3085,7 @@ instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype { p : G.Walk u v | p
#print SimpleGraph.set_walk_length_toFinset_eq /-
theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
- { p : G.Walk u v | p.length = n }.toFinset = G.finsetWalkLength n u v :=
- by
- ext p
+ { p : G.Walk u v | p.length = n }.toFinset = G.finsetWalkLength n u v := by ext p;
simp [← coe_finset_walk_length_eq]
#align simple_graph.set_walk_length_to_finset_eq SimpleGraph.set_walk_length_toFinset_eq
-/
@@ -3260,8 +3123,7 @@ theorem reachable_iff_exists_finsetWalkLength_nonempty (u v : V) :
refine' r.elim_path fun p => _
refine' ⟨⟨_, p.is_path.length_lt⟩, p, _⟩
simp [walk.mem_finset_walk_length_iff_length_eq]
- · rintro ⟨_, p, _⟩
- use p
+ · rintro ⟨_, p, _⟩; use p
#align simple_graph.reachable_iff_exists_finset_walk_length_nonempty SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty
-/
@@ -3271,13 +3133,9 @@ instance : DecidableRel G.Reachable := fun u v =>
instance : Fintype G.ConnectedComponent :=
@Quotient.fintype _ _ G.reachableSetoid (inferInstance : DecidableRel G.Reachable)
-instance : Decidable G.Preconnected := by
- unfold preconnected
- infer_instance
+instance : Decidable G.Preconnected := by unfold preconnected; infer_instance
-instance : Decidable G.Connected :=
- by
- rw [connected_iff, ← Finset.univ_nonempty_iff]
+instance : Decidable G.Connected := by rw [connected_iff, ← Finset.univ_nonempty_iff];
exact And.decidable
end Finite
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -2312,10 +2312,7 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
variable (p)
/- warning: simple_graph.walk.transfer_transfer -> SimpleGraph.Walk.transfer_transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (id_tag Tactic.IdTag.rw (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (Eq.ndrec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (_a : List.{u1} (Sym2.{u1} V)) => Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e _a) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (rfl.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp))) hp')) (SimpleGraph.Walk.transfer.{u1} V G u v p K hp')
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
+<too large>
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
@@ -2330,10 +2327,7 @@ theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
/- warning: simple_graph.walk.transfer_append -> SimpleGraph.Walk.transfer_append is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w) {H : SimpleGraph.{u1} V} (hpq : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u w) (SimpleGraph.Walk.transfer.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q) H hpq) (SimpleGraph.Walk.append.{u1} V H u v w (SimpleGraph.Walk.transfer.{u1} V G u v p H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) he)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))))) (propext (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (true_or_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)))))) trivial))) (SimpleGraph.Walk.transfer.{u1} V G v w q H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) he)))) (propext (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (or_true_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)))))) trivial))))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (w : SimpleGraph.Walk.{u1} V G u v) {p : V} {q : SimpleGraph.{u1} V} (H : SimpleGraph.Walk.{u1} V G v p) (hpq : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V q))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V q u p) (SimpleGraph.Walk.transfer.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H) q hpq) (SimpleGraph.Walk.append.{u1} V q u v p (SimpleGraph.Walk.transfer.{u1} V G u v w q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.11.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrFun.{1, 1} Prop (fun (b : Prop) => Prop) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (Or True) (congrArg.{1, 1} Prop (Prop -> Prop) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True Or (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) he)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)))) (true_or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))))))) (SimpleGraph.Walk.transfer.{u1} V G v p H q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.11.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{1, 1} Prop Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) True (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) he))) (or_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))))))))
+<too large>
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_appendₓ'. -/
@[simp]
theorem transfer_append (hpq) :
@@ -2351,10 +2345,7 @@ theorem transfer_append (hpq) :
#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_append
/- warning: simple_graph.walk.reverse_transfer -> SimpleGraph.Walk.reverse_transfer is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H v u) (SimpleGraph.Walk.reverse.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.transfer.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p) H (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (id_tag Tactic.IdTag.simp (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)))) (forall_congr.{succ u1} (Sym2.{u1} V) (fun (e : Sym2.{u1} V) => (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (fun (e : Sym2.{u1} V) => (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (fun (e : Sym2.{u1} V) => imp_congr_eq (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p)) (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p)) (SimpleGraph.Walk.edges_reverse.{u1} V G u v p)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (List.mem_reverse'.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p)))) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)))))) hp))
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H v u) (SimpleGraph.Walk.reverse.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.transfer.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p) H (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (id.{0} (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)))) (forall_congr.{succ u1} (Sym2.{u1} V) (fun (e : Sym2.{u1} V) => (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (fun (e : Sym2.{u1} V) => (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (fun (e : Sym2.{u1} V) => implies_congr.{0, 0} (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p)) (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_reverse.{u1} V G u v p)) (Mathlib.Combinatorics.SimpleGraph.Connectivity._auxLemma.49.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p))) (Eq.refl.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)))))) hp))
+<too large>
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.reverse_transfer SimpleGraph.Walk.reverse_transferₓ'. -/
@[simp]
theorem reverse_transfer :
@@ -2453,10 +2444,7 @@ protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V)) {v : V} {p : G.Walk v
#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdges
/- warning: simple_graph.walk.to_delete_edges_copy -> SimpleGraph.Walk.toDeleteEdges_copy is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {u : V} {v : V} {u' : V} {v' : V} (p : SimpleGraph.Walk.{u1} V G u v) (hu : Eq.{succ u1} V u u') (hv : Eq.{succ u1} V v v') (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p hu hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) u' v') (SimpleGraph.Walk.toDeleteEdges.{u1} V G s u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p hu hv) h) (SimpleGraph.Walk.copy.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) u v u' v' (SimpleGraph.Walk.toDeleteEdges.{u1} V G s u v p (Eq.drec.{0, succ u1} V u' (fun {u : V} (_h : Eq.{succ u1} V u' u) => forall (p : SimpleGraph.Walk.{u1} V G u v), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p (Eq.symm.{succ u1} V u' u _h) hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) -> (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s)))) (fun (p : SimpleGraph.Walk.{u1} V G u' v) (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v u' v' p (rfl.{succ u1} V u') hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) => Eq.drec.{0, succ u1} V v' (fun {v : V} (_h : Eq.{succ u1} V v' v) => forall (p : SimpleGraph.Walk.{u1} V G u' v), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v u' v' p (rfl.{succ u1} V u') (Eq.symm.{succ u1} V v' v _h)))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) -> (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s)))) (fun (p : SimpleGraph.Walk.{u1} V G u' v') (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v' u' v' p (rfl.{succ u1} V u') (rfl.{succ u1} V v')))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) => h) v (Eq.symm.{succ u1} V v v' hv) p h) u (Eq.symm.{succ u1} V u u' hu) p h)) hu hv)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {u : V} {v : V} {u' : V} (v' : Set.{u1} (Sym2.{u1} V)) (p : SimpleGraph.Walk.{u1} V G s u) (hu : Eq.{succ u1} V s v) (hv : Eq.{succ u1} V u u') (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G s u v u' p hu hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V (SimpleGraph.deleteEdges.{u1} V G v') v u') (SimpleGraph.Walk.toDeleteEdges.{u1} V G v' v u' (SimpleGraph.Walk.copy.{u1} V G s u v u' p hu hv) h) (SimpleGraph.Walk.copy.{u1} V (SimpleGraph.deleteEdges.{u1} V G v') s u v u' (SimpleGraph.Walk.toDeleteEdges.{u1} V G v' s u p (Eq.rec.{0, succ u1} V v (fun {u_1 : V} (_h : Eq.{succ u1} V v u_1) => forall (p : SimpleGraph.Walk.{u1} V G u_1 u), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G u_1 u v u' p (Eq.symm.{succ u1} V v u_1 _h) hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) -> (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u_1 u p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v')))) (fun (p : SimpleGraph.Walk.{u1} V G v u) (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v u v u' p (Eq.refl.{succ u1} V v) hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) => Eq.rec.{0, succ u1} V u' (fun {v_1 : V} (_h : Eq.{succ u1} V u' v_1) => forall (p : SimpleGraph.Walk.{u1} V G v v_1), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v v_1 v u' p (Eq.refl.{succ u1} V v) (Eq.symm.{succ u1} V u' v_1 _h)))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) -> (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v v_1 p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v')))) (fun (p : SimpleGraph.Walk.{u1} V G v u') (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v u' v u' p (Eq.refl.{succ u1} V v) (Eq.refl.{succ u1} V u')))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) => h) u (Eq.symm.{succ u1} V u u' hv) p h) s (Eq.symm.{succ u1} V s v hu) p h)) hu hv)
+<too large>
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_delete_edges_copy SimpleGraph.Walk.toDeleteEdges_copyₓ'. -/
@[simp]
theorem toDeleteEdges_copy (s : Set (Sym2 V)) {u v u' v'} (p : G.Walk u v) (hu : u = u')
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -1961,7 +1961,7 @@ theorem map_copy (hu : u = u') (hv : v = v') :
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) u) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, (SimpleGraph.Walk.{u1} V G u v) -> (forall (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) u) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p)
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, (SimpleGraph.Walk.{u1} V G u v) -> (forall (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) u) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p)
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_id SimpleGraph.Walk.map_idₓ'. -/
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by induction p <;> simp [*]
@@ -2182,7 +2182,7 @@ theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
lean 3 declaration is
forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v))
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v))
Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbeddingₓ'. -/
/-- Given a graph embedding, map paths to paths. -/
@[simps]
@@ -2194,7 +2194,7 @@ protected def mapEmbedding (f : G ↪g G') {u v : V} (p : G.Path u v) : G'.Path
lean 3 declaration is
forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding_injective SimpleGraph.Path.mapEmbedding_injectiveₓ'. -/
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)) :=
@@ -2422,7 +2422,7 @@ abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges)
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {w : V} {p : SimpleGraph.Walk.{u1} V G v w} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) w)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v w (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v w p hp)) p
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) v)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp)) p
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) v)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp)) p
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eqₓ'. -/
@[simp]
theorem map_toDeleteEdges_eq (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (hp) :
@@ -2575,7 +2575,7 @@ theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.Refl
lean 3 declaration is
forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Hom.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Reachable.{u1} V G u v) -> (SimpleGraph.Reachable.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : V} {G' : V} {f : SimpleGraph.{u1} V} {u : SimpleGraph.{u2} V'} (v : SimpleGraph.Hom.{u1, u2} V V' f u), (SimpleGraph.Reachable.{u1} V f G G') -> (SimpleGraph.Reachable.{u2} V' u (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G'))
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : V} {G' : V} {f : SimpleGraph.{u1} V} {u : SimpleGraph.{u2} V'} (v : SimpleGraph.Hom.{u1, u2} V V' f u), (SimpleGraph.Reachable.{u1} V f G G') -> (SimpleGraph.Reachable.{u2} V' u (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G'))
Case conversion may be inaccurate. Consider using '#align simple_graph.reachable.map SimpleGraph.Reachable.mapₓ'. -/
protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G') {u v : V}
(h : G.Reachable u v) : G'.Reachable (f u) (f v) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -3157,7 +3157,7 @@ theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
cases' p with _ _ w _ huw pwv
· simp [eq_comm]
· simp only [Nat.succ_eq_add_one, Set.mem_setOf_eq, walk.length_cons, add_left_inj,
- Set.mem_unionᵢ, Set.mem_image, exists_prop]
+ Set.mem_iUnion, Set.mem_image, exists_prop]
constructor
· rintro rfl
exact ⟨w, huw, pwv, rfl, rfl, HEq.rfl⟩
@@ -3186,7 +3186,7 @@ def finsetWalkLength : ∀ (n : ℕ) (u v : V), Finset (G.Walk u v)
exact {walk.nil}
else ∅
| n + 1, u, v =>
- Finset.univ.bunionᵢ fun w : G.neighborSet u =>
+ Finset.univ.biUnion fun w : G.neighborSet u =>
(finset_walk_length n w v).map ⟨fun p => Walk.cons w.property p, fun p q => by simp⟩
#align simple_graph.finset_walk_length SimpleGraph.finsetWalkLength
-/
@@ -3197,11 +3197,11 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
by
induction' n with n ih generalizing u v
· obtain rfl | huv := eq_or_ne u v <;> simp [finset_walk_length, set_walk_length_zero_eq_of_ne, *]
- · simp only [finset_walk_length, set_walk_length_succ_eq, Finset.coe_bunionᵢ, Finset.mem_coe,
- Finset.mem_univ, Set.unionᵢ_true]
+ · simp only [finset_walk_length, set_walk_length_succ_eq, Finset.coe_biUnion, Finset.mem_coe,
+ Finset.mem_univ, Set.iUnion_true]
ext p
- simp only [mem_neighbor_set, Finset.coe_map, embedding.coe_fn_mk, Set.unionᵢ_coe_set,
- Set.mem_unionᵢ, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq]
+ simp only [mem_neighbor_set, Finset.coe_map, embedding.coe_fn_mk, Set.iUnion_coe_set,
+ Set.mem_iUnion, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq]
congr with w
congr with h
congr with q
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -1115,32 +1115,32 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
-/
#print SimpleGraph.Walk.IsPath /-
-/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
structure IsPath {u v : V} (p : G.Walk u v) extends
- "./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-/
#print SimpleGraph.Walk.IsCircuit /-
-/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
- "./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
-/
#print SimpleGraph.Walk.IsCycle /-
-/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
+/- ./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure -/
/-- 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
- "./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure" :
+ "./././Mathport/Syntax/Translate/Command.lean:422:11: unsupported: advanced extends in structure" :
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -2582,11 +2582,23 @@ protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
+/- warning: simple_graph.iso.reachable_iff -> SimpleGraph.Iso.reachable_iff is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V}, Iff (SimpleGraph.Reachable.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v)) (SimpleGraph.Reachable.{u1} V G u v)
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V}, Iff (SimpleGraph.Reachable.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ v)) (SimpleGraph.Reachable.{u1} V G u v)
+Case conversion may be inaccurate. Consider using '#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iffₓ'. -/
theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iff
+/- warning: simple_graph.iso.symm_apply_reachable -> SimpleGraph.Iso.symm_apply_reachable is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V'}, Iff (SimpleGraph.Reachable.{u1} V G (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (SimpleGraph.Iso.{u2, u1} V' V G' G) (fun (_x : RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) => V' -> V) (RelIso.hasCoeToFun.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v) u) (SimpleGraph.Reachable.{u2} V' G' v (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ u))
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {u : V} {v : V'}, Iff (SimpleGraph.Reachable.{u1} V G (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' (fun (_x : V') => V) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G) (RelIso.instRelHomClassRelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v) u) (SimpleGraph.Reachable.{u2} V' G' v (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ u))
+Case conversion may be inaccurate. Consider using '#align simple_graph.iso.symm_apply_reachable SimpleGraph.Iso.symm_apply_reachableₓ'. -/
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) := by
rw [← iso.reachable_iff, RelIso.apply_symm_apply]
@@ -2726,10 +2738,12 @@ protected theorem eq {v w : V} :
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
-/
+#print SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj /-
theorem connectedComponentMk_eq_of_adj {v w : V} (a : G.Adj v w) :
G.connectedComponentMk v = G.connectedComponentMk w :=
ConnectedComponent.sound a.Reachable
#align simple_graph.connected_component.connected_component_mk_eq_of_adj SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj
+-/
#print SimpleGraph.ConnectedComponent.lift /-
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
@@ -2810,6 +2824,12 @@ theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'')
variable {φ : G ≃g G'} {v : V} {v' : V'}
+/- warning: simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp -> SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v : V} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (fun (_x : RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelIso.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v)) (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (RelEmbedding.RelHom.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Embedding.{u1, u2} V V' G G') (RelIso.RelEmbedding.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) φ)) C)) (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G v) C)
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v : V} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V (fun (_x : V) => V') (RelHomClass.toFunLike.{max u1 u2, u1, u2} (RelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.instRelHomClassRelIso.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) φ v)) (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' (RelEmbedding.toRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.toRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') φ)) C)) (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G v) C)
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_compₓ'. -/
@[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 :=
@@ -2819,6 +2839,12 @@ theorem iso_image_comp_eq_map_iff_eq_comp {C : G.ConnectedComponent} :
RelIso.coe_coeFn, connected_component.eq]
#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
+/- warning: simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map -> SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v' : V'} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (SimpleGraph.Iso.{u2, u1} V' V G' G) (fun (_x : RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) => V' -> V) (RelIso.hasCoeToFun.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v')) C) (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' v') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (SimpleGraph.Hom.{u1, u2} V V' G G') (coeTrans.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Iso.{u1, u2} V V' G G') (RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) (SimpleGraph.Hom.{u1, u2} V V' G G') (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) (SimpleGraph.Hom.{u1, u2} V V' G G') (RelEmbedding.RelHom.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) (RelIso.RelEmbedding.hasCoe.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))))) φ) C))
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {φ : SimpleGraph.Iso.{u1, u2} V V' G G'} {v' : V'} {C : SimpleGraph.ConnectedComponent.{u1} V G}, Iff (Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.connectedComponentMk.{u1} V G (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' (fun (_x : V') => V) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (RelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G)) V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G) (RelIso.instRelHomClassRelIso.{u2, u1} V' V (SimpleGraph.Adj.{u2} V' G') (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Iso.symm.{u1, u2} V V' G G' φ) v')) C) (Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.connectedComponentMk.{u2} V' G' v') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' (RelEmbedding.toRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelIso.toRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') φ)) C))
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_mapₓ'. -/
@[simp]
theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ :=
@@ -2832,6 +2858,7 @@ end connectedComponent
namespace Iso
+#print SimpleGraph.Iso.connectedComponentEquiv /-
/-- An isomorphism of graphs induces a bijection of connected components. -/
@[simps]
def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent
@@ -2845,14 +2872,18 @@ def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.Conne
ConnectedComponent.ind
(fun v => congr_arg G'.connectedComponentMk (Equiv.right_inv φ.toEquiv v)) C
#align simple_graph.iso.connected_component_equiv SimpleGraph.Iso.connectedComponentEquiv
+-/
+#print SimpleGraph.Iso.connectedComponentEquiv_refl /-
@[simp]
theorem connectedComponentEquiv_refl : (Iso.refl : G ≃g G).connectedComponentEquiv = Equiv.refl _ :=
by
ext ⟨v⟩
rfl
#align simple_graph.iso.connected_component_equiv_refl SimpleGraph.Iso.connectedComponentEquiv_refl
+-/
+#print SimpleGraph.Iso.connectedComponentEquiv_symm /-
@[simp]
theorem connectedComponentEquiv_symm (φ : G ≃g G') :
φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm :=
@@ -2860,7 +2891,9 @@ theorem connectedComponentEquiv_symm (φ : G ≃g G') :
ext ⟨_⟩
rfl
#align simple_graph.iso.connected_component_equiv_symm SimpleGraph.Iso.connectedComponentEquiv_symm
+-/
+#print SimpleGraph.Iso.connectedComponentEquiv_trans /-
@[simp]
theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
connectedComponentEquiv (φ.trans φ') =
@@ -2869,16 +2902,20 @@ theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
ext ⟨_⟩
rfl
#align simple_graph.iso.connected_component_equiv_trans SimpleGraph.Iso.connectedComponentEquiv_trans
+-/
end Iso
namespace connectedComponent
+#print SimpleGraph.ConnectedComponent.supp /-
/-- The set of vertices in a connected component of a graph. -/
def supp (C : G.ConnectedComponent) :=
{ v | G.connectedComponentMk v = C }
#align simple_graph.connected_component.supp SimpleGraph.ConnectedComponent.supp
+-/
+#print SimpleGraph.ConnectedComponent.supp_injective /-
@[ext]
theorem supp_injective :
Function.Injective (ConnectedComponent.supp : G.ConnectedComponent → Set V) :=
@@ -2889,27 +2926,35 @@ theorem supp_injective :
intro h
rw [reachable_comm, h]
#align simple_graph.connected_component.supp_injective SimpleGraph.ConnectedComponent.supp_injective
+-/
+#print SimpleGraph.ConnectedComponent.supp_inj /-
@[simp]
theorem supp_inj {C D : G.ConnectedComponent} : C.supp = D.supp ↔ C = D :=
ConnectedComponent.supp_injective.eq_iff
#align simple_graph.connected_component.supp_inj SimpleGraph.ConnectedComponent.supp_inj
+-/
instance : SetLike G.ConnectedComponent V
where
coe := ConnectedComponent.supp
coe_injective' := ConnectedComponent.supp_injective
+#print SimpleGraph.ConnectedComponent.mem_supp_iff /-
@[simp]
theorem mem_supp_iff (C : G.ConnectedComponent) (v : V) :
v ∈ C.supp ↔ G.connectedComponentMk v = C :=
Iff.rfl
#align simple_graph.connected_component.mem_supp_iff SimpleGraph.ConnectedComponent.mem_supp_iff
+-/
+#print SimpleGraph.ConnectedComponent.connectedComponentMk_mem /-
theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v :=
rfl
#align simple_graph.connected_component.connected_component_mk_mem SimpleGraph.ConnectedComponent.connectedComponentMk_mem
+-/
+#print SimpleGraph.ConnectedComponent.isoEquivSupp /-
/-- The equivalence between connected components, induced by an isomorphism of graphs,
itself defines an equivalence on the supports of each connected component.
-/
@@ -2921,6 +2966,7 @@ def isoEquivSupp (φ : G ≃g G') (C : G.ConnectedComponent) :
left_inv v := Subtype.ext_val (φ.toEquiv.left_inv ↑v)
right_inv v := Subtype.ext_val (φ.toEquiv.right_inv ↑v)
#align simple_graph.connected_component.iso_equiv_supp SimpleGraph.ConnectedComponent.isoEquivSupp
+-/
end connectedComponent
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -2182,7 +2182,7 @@ theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
lean 3 declaration is
forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) v))
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v))
Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbeddingₓ'. -/
/-- Given a graph embedding, map paths to paths. -/
@[simps]
@@ -2194,7 +2194,7 @@ protected def mapEmbedding (f : G ↪g G') {u v : V} (p : G.Path u v) : G'.Path
lean 3 declaration is
forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
but is expected to have type
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Embedding.{u1, u2} V V' G G') V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') (RelEmbedding.instRelHomClassRelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G'))) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding_injective SimpleGraph.Path.mapEmbedding_injectiveₓ'. -/
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)) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -2774,55 +2774,39 @@ theorem SimpleGraph.Preconnected.subsingleton_connectedComponent (h : G.Preconne
#align simple_graph.preconnected.subsingleton_connected_component SimpleGraph.Preconnected.subsingleton_connectedComponent
-/
-/- warning: simple_graph.connected_component.map -> SimpleGraph.ConnectedComponent.map is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'}, (SimpleGraph.Hom.{u1, u2} V V' G G') -> (SimpleGraph.ConnectedComponent.{u1} V G) -> (SimpleGraph.ConnectedComponent.{u2} V' G')
-but is expected to have type
- forall {V : Type.{u1}} {V' : SimpleGraph.{u1} V} {G : Type.{u2}} {G' : SimpleGraph.{u2} G}, (SimpleGraph.Hom.{u1, u2} V G V' G') -> (SimpleGraph.ConnectedComponent.{u1} V V') -> (SimpleGraph.ConnectedComponent.{u2} G G')
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.mapₓ'. -/
+#print SimpleGraph.ConnectedComponent.map /-
/-- The map on connected components induced by a graph homomorphism. -/
def map (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
C.lift (fun v => G'.connectedComponentMk (φ v)) fun v w p _ =>
ConnectedComponent.eq.mpr (p.map φ).Reachable
#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.map
+-/
-/- warning: simple_graph.connected_component.map_mk -> SimpleGraph.ConnectedComponent.map_mk is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (v : V), Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' φ (SimpleGraph.connectedComponentMk.{u1} V G v)) (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v))
-but is expected to have type
- forall {V : Type.{u2}} {V' : SimpleGraph.{u2} V} {G : Type.{u1}} {G' : SimpleGraph.{u1} G} (φ : SimpleGraph.Hom.{u2, u1} V G V' G') (v : V), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} G G') (SimpleGraph.ConnectedComponent.map.{u2, u1} V V' G G' φ (SimpleGraph.connectedComponentMk.{u2} V V' v)) (SimpleGraph.connectedComponentMk.{u1} G G' (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (SimpleGraph.Hom.{u2, u1} V G V' G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => G) _x) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (SimpleGraph.Hom.{u2, u1} V G V' G') V G (SimpleGraph.Adj.{u2} V V') (SimpleGraph.Adj.{u1} G G') (RelHom.instRelHomClassRelHom.{u2, u1} V G (SimpleGraph.Adj.{u2} V V') (SimpleGraph.Adj.{u1} G G'))) φ v))
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mkₓ'. -/
+#print SimpleGraph.ConnectedComponent.map_mk /-
@[simp]
theorem map_mk (φ : G →g G') (v : V) :
(G.connectedComponentMk v).map φ = G'.connectedComponentMk (φ v) :=
rfl
#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mk
+-/
-/- warning: simple_graph.connected_component.map_id -> SimpleGraph.ConnectedComponent.map_id is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (C : SimpleGraph.ConnectedComponent.{u1} V G), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.ConnectedComponent.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) C) C
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (C : SimpleGraph.ConnectedComponent.{u1} V G), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.ConnectedComponent.map.{u1, u1} V G V G (SimpleGraph.Hom.id.{u1} V G) C) C
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_idₓ'. -/
+#print SimpleGraph.ConnectedComponent.map_id /-
@[simp]
theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_id
+-/
-/- warning: simple_graph.connected_component.map_comp -> SimpleGraph.ConnectedComponent.map_comp is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {V' : Type.{u2}} {V'' : Type.{u3}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {G'' : SimpleGraph.{u3} V''} (C : SimpleGraph.ConnectedComponent.{u1} V G) (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u3} V' V'' G' G''), Eq.{succ u3} (SimpleGraph.ConnectedComponent.{u3} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u3} V' V'' G' G'' ψ (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' φ C)) (SimpleGraph.ConnectedComponent.map.{u1, u3} V V'' G G'' (SimpleGraph.Hom.comp.{u1, u2, u3} V V' V'' G G' G'' ψ φ) C)
-but is expected to have type
- forall {V : Type.{u3}} {V' : SimpleGraph.{u3} V} {V'' : Type.{u2}} {G : SimpleGraph.{u2} V''} {G' : Type.{u1}} {G'' : SimpleGraph.{u1} G'} (C : SimpleGraph.ConnectedComponent.{u3} V V') (φ : SimpleGraph.Hom.{u3, u2} V V'' V' G) (ψ : SimpleGraph.Hom.{u2, u1} V'' G' G G''), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} G' G'') (SimpleGraph.ConnectedComponent.map.{u2, u1} V'' G G' G'' ψ (SimpleGraph.ConnectedComponent.map.{u3, u2} V V' V'' G φ C)) (SimpleGraph.ConnectedComponent.map.{u3, u1} V V' G' G'' (SimpleGraph.Hom.comp.{u3, u2, u1} V V'' G' V' G G'' ψ φ) C)
-Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_compₓ'. -/
+#print SimpleGraph.ConnectedComponent.map_comp /-
@[simp]
theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
(C.map φ).map ψ = C.map (ψ.comp φ) := by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_comp
+-/
variable {φ : G ≃g G'} {v : V} {v' : V'}
mathlib commit https://github.com/leanprover-community/mathlib/commit/b685f506164f8d17a6404048bc4d696739c5d976
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit 832f7b9162039c28b9361289c8681f155cae758f
+! leanprover-community/mathlib commit b99e2d58a5e6861833fa8de11e51a81144258db4
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -2582,6 +2582,16 @@ protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
+theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
+ G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
+ ⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
+#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iff
+
+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) := by
+ rw [← iso.reachable_iff, RelIso.apply_symm_apply]
+#align simple_graph.iso.symm_apply_reachable SimpleGraph.Iso.symm_apply_reachable
+
variable (G)
#print SimpleGraph.reachable_is_equivalence /-
@@ -2716,6 +2726,11 @@ protected theorem eq {v w : V} :
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
-/
+theorem connectedComponentMk_eq_of_adj {v w : V} (a : G.Adj v w) :
+ G.connectedComponentMk v = G.connectedComponentMk w :=
+ ConnectedComponent.sound a.Reachable
+#align simple_graph.connected_component.connected_component_mk_eq_of_adj SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj
+
#print SimpleGraph.ConnectedComponent.lift /-
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
@@ -2809,6 +2824,120 @@ theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'')
exact fun _ => rfl
#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_comp
+variable {φ : G ≃g G'} {v : V} {v' : V'}
+
+@[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 :=
+ by
+ refine' C.ind fun u => _
+ simp only [iso.reachable_iff, connected_component.map_mk, RelEmbedding.coe_coeFn,
+ RelIso.coe_coeFn, connected_component.eq]
+#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
+
+@[simp]
+theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
+ G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ :=
+ by
+ refine' C.ind fun u => _
+ simp only [iso.symm_apply_reachable, connected_component.eq, coe_coe, connected_component.map_mk,
+ RelEmbedding.coe_coeFn, RelIso.coe_coeFn]
+#align simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map
+
+end connectedComponent
+
+namespace Iso
+
+/-- An isomorphism of graphs induces a bijection of connected components. -/
+@[simps]
+def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent
+ where
+ toFun := ConnectedComponent.map φ
+ invFun := ConnectedComponent.map φ.symm
+ left_inv C :=
+ ConnectedComponent.ind (fun v => congr_arg G.connectedComponentMk (Equiv.left_inv φ.toEquiv v))
+ C
+ right_inv C :=
+ ConnectedComponent.ind
+ (fun v => congr_arg G'.connectedComponentMk (Equiv.right_inv φ.toEquiv v)) C
+#align simple_graph.iso.connected_component_equiv SimpleGraph.Iso.connectedComponentEquiv
+
+@[simp]
+theorem connectedComponentEquiv_refl : (Iso.refl : G ≃g G).connectedComponentEquiv = Equiv.refl _ :=
+ by
+ ext ⟨v⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_refl SimpleGraph.Iso.connectedComponentEquiv_refl
+
+@[simp]
+theorem connectedComponentEquiv_symm (φ : G ≃g G') :
+ φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm :=
+ by
+ ext ⟨_⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_symm SimpleGraph.Iso.connectedComponentEquiv_symm
+
+@[simp]
+theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
+ connectedComponentEquiv (φ.trans φ') =
+ φ.connectedComponentEquiv.trans φ'.connectedComponentEquiv :=
+ by
+ ext ⟨_⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_trans SimpleGraph.Iso.connectedComponentEquiv_trans
+
+end Iso
+
+namespace connectedComponent
+
+/-- The set of vertices in a connected component of a graph. -/
+def supp (C : G.ConnectedComponent) :=
+ { v | G.connectedComponentMk v = C }
+#align simple_graph.connected_component.supp SimpleGraph.ConnectedComponent.supp
+
+@[ext]
+theorem supp_injective :
+ Function.Injective (ConnectedComponent.supp : G.ConnectedComponent → Set V) :=
+ by
+ refine' connected_component.ind₂ _
+ intro v w
+ simp only [connected_component.supp, Set.ext_iff, connected_component.eq, Set.mem_setOf_eq]
+ intro h
+ rw [reachable_comm, h]
+#align simple_graph.connected_component.supp_injective SimpleGraph.ConnectedComponent.supp_injective
+
+@[simp]
+theorem supp_inj {C D : G.ConnectedComponent} : C.supp = D.supp ↔ C = D :=
+ ConnectedComponent.supp_injective.eq_iff
+#align simple_graph.connected_component.supp_inj SimpleGraph.ConnectedComponent.supp_inj
+
+instance : SetLike G.ConnectedComponent V
+ where
+ coe := ConnectedComponent.supp
+ coe_injective' := ConnectedComponent.supp_injective
+
+@[simp]
+theorem mem_supp_iff (C : G.ConnectedComponent) (v : V) :
+ v ∈ C.supp ↔ G.connectedComponentMk v = C :=
+ Iff.rfl
+#align simple_graph.connected_component.mem_supp_iff SimpleGraph.ConnectedComponent.mem_supp_iff
+
+theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v :=
+ rfl
+#align simple_graph.connected_component.connected_component_mk_mem SimpleGraph.ConnectedComponent.connectedComponentMk_mem
+
+/-- 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
+ where
+ toFun v := ⟨φ v, ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp.mpr v.Prop⟩
+ invFun v' := ⟨φ.symm v', ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map.mpr v'.Prop⟩
+ left_inv v := Subtype.ext_val (φ.toEquiv.left_inv ↑v)
+ right_inv v := Subtype.ext_val (φ.toEquiv.right_inv ↑v)
+#align simple_graph.connected_component.iso_equiv_supp SimpleGraph.ConnectedComponent.isoEquivSupp
+
end connectedComponent
#print SimpleGraph.Subgraph.Connected /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -2916,7 +2916,7 @@ theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = {
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.hasSup.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SemilatticeSup.toSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (Lattice.toSemilatticeSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instLatticeSubgraph.{u1} V G))) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instSupSubgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_appendₓ'. -/
@[simp]
theorem toSubgraph_append (p : G.Walk u v) (q : G.Walk v w) :
@@ -3155,7 +3155,7 @@ def IsBridge (G : SimpleGraph V) (e : Sym2 V) : Prop :=
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
Case conversion may be inaccurate. Consider using '#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iffₓ'. -/
theorem isBridge_iff {u v : V} :
G.IsBridge ⟦(u, v)⟧ ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {⟦(u, v)⟧}).Reachable u v :=
@@ -3166,7 +3166,7 @@ theorem isBridge_iff {u v : V} :
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
Case conversion may be inaccurate. Consider using '#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walkₓ'. -/
theorem reachable_delete_edges_iff_exists_walk {v w : V} :
(G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔ ∃ p : G.Walk v w, ¬⟦(v, w)⟧ ∈ p.edges :=
@@ -3227,7 +3227,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.sdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
Case conversion may be inaccurate. Consider using '#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycleₓ'. -/
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -2315,7 +2315,7 @@ variable (p)
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (id_tag Tactic.IdTag.rw (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (Eq.ndrec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (_a : List.{u1} (Sym2.{u1} V)) => Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e _a) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (rfl.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp))) hp')) (SimpleGraph.Walk.transfer.{u1} V G u v p K hp')
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18642 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18640) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
@@ -2333,7 +2333,7 @@ theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w) {H : SimpleGraph.{u1} V} (hpq : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u w) (SimpleGraph.Walk.transfer.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q) H hpq) (SimpleGraph.Walk.append.{u1} V H u v w (SimpleGraph.Walk.transfer.{u1} V G u v p H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) he)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))))) (propext (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (true_or_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)))))) trivial))) (SimpleGraph.Walk.transfer.{u1} V G v w q H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) he)))) (propext (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (or_true_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)))))) trivial))))
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (w : SimpleGraph.Walk.{u1} V G u v) {p : V} {q : SimpleGraph.{u1} V} (H : SimpleGraph.Walk.{u1} V G v p) (hpq : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V q))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V q u p) (SimpleGraph.Walk.transfer.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H) q hpq) (SimpleGraph.Walk.append.{u1} V q u v p (SimpleGraph.Walk.transfer.{u1} V G u v w q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.10.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrFun.{1, 1} Prop (fun (b : Prop) => Prop) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (Or True) (congrArg.{1, 1} Prop (Prop -> Prop) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True Or (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) he)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)))) (true_or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))))))) (SimpleGraph.Walk.transfer.{u1} V G v p H q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.10.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{1, 1} Prop Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) True (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) he))) (or_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))))))))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (w : SimpleGraph.Walk.{u1} V G u v) {p : V} {q : SimpleGraph.{u1} V} (H : SimpleGraph.Walk.{u1} V G v p) (hpq : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V q))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V q u p) (SimpleGraph.Walk.transfer.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H) q hpq) (SimpleGraph.Walk.append.{u1} V q u v p (SimpleGraph.Walk.transfer.{u1} V G u v w q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.11.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrFun.{1, 1} Prop (fun (b : Prop) => Prop) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (Or True) (congrArg.{1, 1} Prop (Prop -> Prop) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True Or (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) he)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)))) (true_or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))))))) (SimpleGraph.Walk.transfer.{u1} V G v p H q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.11.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{1, 1} Prop Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) True (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) he))) (or_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))))))))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_appendₓ'. -/
@[simp]
theorem transfer_append (hpq) :
@@ -3174,7 +3174,7 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
constructor
· rintro ⟨p⟩
use p.map (hom.map_spanning_subgraphs (by simp))
- simp_rw [walk.edges_map, List.mem_map', hom.map_spanning_subgraphs_apply, Sym2.map_id', id.def]
+ simp_rw [walk.edges_map, List.mem_map, hom.map_spanning_subgraphs_apply, Sym2.map_id', id.def]
rintro ⟨e, h, rfl⟩
simpa using p.edges_subset_edge_set h
· rintro ⟨p, h⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/57e09a1296bfb4330ddf6624f1028ba186117d82
@@ -2173,7 +2173,7 @@ 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)) :=
by
rintro ⟨p, hp⟩ ⟨p', hp'⟩ h
- simp only [path.map, Subtype.coe_mk] at h
+ simp only [Path.map, Subtype.coe_mk] at h
simp [walk.map_injective_of_injective hinj u v h]
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -2315,7 +2315,7 @@ variable (p)
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (id_tag Tactic.IdTag.rw (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (Eq.ndrec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (_a : List.{u1} (Sym2.{u1} V)) => Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e _a) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (rfl.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp))) hp')) (SimpleGraph.Walk.transfer.{u1} V G u v p K hp')
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18538 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18642 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18641) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -2315,7 +2315,7 @@ variable (p)
lean 3 declaration is
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (id_tag Tactic.IdTag.rw (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (Eq.ndrec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (_a : List.{u1} (Sym2.{u1} V)) => Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e _a) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (rfl.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp))) hp')) (SimpleGraph.Walk.transfer.{u1} V G u v p K hp')
but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18516 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18538 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18537) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/62e8311c791f02c47451bf14aa2501048e7c2f33
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit e876965f7ee86f683b44e2f462ab5bfb47f993b3
+! leanprover-community/mathlib commit 832f7b9162039c28b9361289c8681f155cae758f
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.Data.List.Rotate
# Graph connectivity
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In a simple graph,
* A *walk* is a finite sequence of adjacent vertices, and can be
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit 13cd3e89b30352d5b1b7349f5537ea18ba878e40
+! leanprover-community/mathlib commit e876965f7ee86f683b44e2f462ab5bfb47f993b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -2663,28 +2663,28 @@ def connectedComponentMk (v : V) : G.ConnectedComponent :=
#align simple_graph.connected_component_mk SimpleGraph.connectedComponentMk
-/
+variable {V' G G' G''}
+
+namespace connectedComponent
+
#print SimpleGraph.ConnectedComponent.inhabited /-
@[simps]
-instance ConnectedComponent.inhabited [Inhabited V] : Inhabited G.ConnectedComponent :=
+instance inhabited [Inhabited V] : Inhabited G.ConnectedComponent :=
⟨G.connectedComponentMk default⟩
#align simple_graph.connected_component.inhabited SimpleGraph.ConnectedComponent.inhabited
-/
-section connectedComponent
-
-variable {G}
-
#print SimpleGraph.ConnectedComponent.ind /-
@[elab_as_elim]
-protected theorem ConnectedComponent.ind {β : G.ConnectedComponent → Prop}
- (h : ∀ v : V, β (G.connectedComponentMk v)) (c : G.ConnectedComponent) : β c :=
+protected theorem ind {β : G.ConnectedComponent → Prop} (h : ∀ v : V, β (G.connectedComponentMk v))
+ (c : G.ConnectedComponent) : β c :=
Quot.ind h c
#align simple_graph.connected_component.ind SimpleGraph.ConnectedComponent.ind
-/
#print SimpleGraph.ConnectedComponent.ind₂ /-
@[elab_as_elim]
-protected theorem ConnectedComponent.ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
+protected theorem ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
(h : ∀ v w : V, β (G.connectedComponentMk v) (G.connectedComponentMk w))
(c d : G.ConnectedComponent) : β c d :=
Quot.induction_on₂ c d h
@@ -2692,14 +2692,14 @@ protected theorem ConnectedComponent.ind₂ {β : G.ConnectedComponent → G.Con
-/
#print SimpleGraph.ConnectedComponent.sound /-
-protected theorem ConnectedComponent.sound {v w : V} :
+protected theorem sound {v w : V} :
G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w :=
Quot.sound
#align simple_graph.connected_component.sound SimpleGraph.ConnectedComponent.sound
-/
#print SimpleGraph.ConnectedComponent.exact /-
-protected theorem ConnectedComponent.exact {v w : V} :
+protected theorem exact {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w → G.Reachable v w :=
@Quotient.exact _ G.reachableSetoid _ _
#align simple_graph.connected_component.exact SimpleGraph.ConnectedComponent.exact
@@ -2707,7 +2707,7 @@ protected theorem ConnectedComponent.exact {v w : V} :
#print SimpleGraph.ConnectedComponent.eq /-
@[simp]
-protected theorem ConnectedComponent.eq {v w : V} :
+protected theorem eq {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w :=
@Quotient.eq' _ G.reachableSetoid _ _
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
@@ -2716,7 +2716,7 @@ protected theorem ConnectedComponent.eq {v w : V} :
#print SimpleGraph.ConnectedComponent.lift /-
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
-protected def ConnectedComponent.lift {β : Sort _} (f : V → β)
+protected def lift {β : Sort _} (f : V → β)
(h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w) : G.ConnectedComponent → β :=
Quot.lift f fun v w (h' : G.Reachable v w) => h'.elim_path fun hp => h v w hp hp.2
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
@@ -2729,73 +2729,78 @@ but is expected to have type
forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {β : Sort.{u1}} {f : V -> β} {h : forall (v : V) (w : V) (p : SimpleGraph.Walk.{u2} V G v w), (SimpleGraph.Walk.IsPath.{u2} V G v w p) -> (Eq.{u1} β (f v) (f w))} {v : V}, Eq.{u1} β (SimpleGraph.ConnectedComponent.lift.{u2, u1} V G β f h (SimpleGraph.connectedComponentMk.{u2} V G v)) (f v)
Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mkₓ'. -/
@[simp]
-protected theorem ConnectedComponent.lift_mk {β : Sort _} {f : V → β}
+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 :=
rfl
#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mk
#print SimpleGraph.ConnectedComponent.exists /-
-protected theorem ConnectedComponent.exists {p : G.ConnectedComponent → Prop} :
+protected theorem exists {p : G.ConnectedComponent → Prop} :
(∃ c : G.ConnectedComponent, p c) ↔ ∃ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).exists
#align simple_graph.connected_component.exists SimpleGraph.ConnectedComponent.exists
-/
#print SimpleGraph.ConnectedComponent.forall /-
-protected theorem ConnectedComponent.forall {p : G.ConnectedComponent → Prop} :
+protected theorem forall {p : G.ConnectedComponent → Prop} :
(∀ c : G.ConnectedComponent, p c) ↔ ∀ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).forall
#align simple_graph.connected_component.forall SimpleGraph.ConnectedComponent.forall
-/
#print SimpleGraph.Preconnected.subsingleton_connectedComponent /-
-theorem Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
+theorem SimpleGraph.Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
Subsingleton G.ConnectedComponent :=
⟨ConnectedComponent.ind₂ fun v w => ConnectedComponent.sound (h v w)⟩
#align simple_graph.preconnected.subsingleton_connected_component SimpleGraph.Preconnected.subsingleton_connectedComponent
-/
-#print SimpleGraph.ConnectedComponent.map /-
+/- warning: simple_graph.connected_component.map -> SimpleGraph.ConnectedComponent.map is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'}, (SimpleGraph.Hom.{u1, u2} V V' G G') -> (SimpleGraph.ConnectedComponent.{u1} V G) -> (SimpleGraph.ConnectedComponent.{u2} V' G')
+but is expected to have type
+ forall {V : Type.{u1}} {V' : SimpleGraph.{u1} V} {G : Type.{u2}} {G' : SimpleGraph.{u2} G}, (SimpleGraph.Hom.{u1, u2} V G V' G') -> (SimpleGraph.ConnectedComponent.{u1} V V') -> (SimpleGraph.ConnectedComponent.{u2} G G')
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.mapₓ'. -/
/-- The map on connected components induced by a graph homomorphism. -/
-def ConnectedComponent.map {V : Type _} {G : SimpleGraph V} {V' : Type _} {G' : SimpleGraph V'}
- (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
+def map (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
C.lift (fun v => G'.connectedComponentMk (φ v)) fun v w p _ =>
ConnectedComponent.eq.mpr (p.map φ).Reachable
#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.map
--/
/- warning: simple_graph.connected_component.map_mk -> SimpleGraph.ConnectedComponent.map_mk is a dubious translation:
lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (v : V), Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.ConnectedComponent.map.{u1, u2} V G V' G' φ (SimpleGraph.connectedComponentMk.{u1} V G v)) (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v))
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (v : V), Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' φ (SimpleGraph.connectedComponentMk.{u1} V G v)) (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v))
but is expected to have type
- forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {V' : Type.{u1}} {G' : SimpleGraph.{u1} V'} (φ : SimpleGraph.Hom.{u2, u1} V V' G G') (v : V), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V' G') (SimpleGraph.ConnectedComponent.map.{u2, u1} V G V' G' φ (SimpleGraph.connectedComponentMk.{u2} V G v)) (SimpleGraph.connectedComponentMk.{u1} V' G' (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (SimpleGraph.Hom.{u2, u1} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (SimpleGraph.Hom.{u2, u1} V V' G G') V V' (SimpleGraph.Adj.{u2} V G) (SimpleGraph.Adj.{u1} V' G') (RelHom.instRelHomClassRelHom.{u2, u1} V V' (SimpleGraph.Adj.{u2} V G) (SimpleGraph.Adj.{u1} V' G'))) φ v))
+ forall {V : Type.{u2}} {V' : SimpleGraph.{u2} V} {G : Type.{u1}} {G' : SimpleGraph.{u1} G} (φ : SimpleGraph.Hom.{u2, u1} V G V' G') (v : V), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} G G') (SimpleGraph.ConnectedComponent.map.{u2, u1} V V' G G' φ (SimpleGraph.connectedComponentMk.{u2} V V' v)) (SimpleGraph.connectedComponentMk.{u1} G G' (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (SimpleGraph.Hom.{u2, u1} V G V' G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => G) _x) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (SimpleGraph.Hom.{u2, u1} V G V' G') V G (SimpleGraph.Adj.{u2} V V') (SimpleGraph.Adj.{u1} G G') (RelHom.instRelHomClassRelHom.{u2, u1} V G (SimpleGraph.Adj.{u2} V V') (SimpleGraph.Adj.{u1} G G'))) φ v))
Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mkₓ'. -/
@[simp]
-theorem ConnectedComponent.map_mk {V : Type _} {G : SimpleGraph V} {V' : Type _}
- {G' : SimpleGraph V'} (φ : G →g G') (v : V) :
+theorem map_mk (φ : G →g G') (v : V) :
(G.connectedComponentMk v).map φ = G'.connectedComponentMk (φ v) :=
rfl
#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mk
-#print SimpleGraph.ConnectedComponent.map_id /-
+/- warning: simple_graph.connected_component.map_id -> SimpleGraph.ConnectedComponent.map_id is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (C : SimpleGraph.ConnectedComponent.{u1} V G), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.ConnectedComponent.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) C) C
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (C : SimpleGraph.ConnectedComponent.{u1} V G), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V G) (SimpleGraph.ConnectedComponent.map.{u1, u1} V G V G (SimpleGraph.Hom.id.{u1} V G) C) C
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_idₓ'. -/
@[simp]
-theorem ConnectedComponent.map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
+theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_id
--/
/- warning: simple_graph.connected_component.map_comp -> SimpleGraph.ConnectedComponent.map_comp is a dubious translation:
lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} {V'' : Type.{u3}} {G'' : SimpleGraph.{u3} V''} (C : SimpleGraph.ConnectedComponent.{u1} V G) (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u3} V' V'' G' G''), Eq.{succ u3} (SimpleGraph.ConnectedComponent.{u3} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u3} V' G' V'' G'' ψ (SimpleGraph.ConnectedComponent.map.{u1, u2} V G V' G' φ C)) (SimpleGraph.ConnectedComponent.map.{u1, u3} V G V'' G'' (SimpleGraph.Hom.comp.{u1, u2, u3} V V' V'' G G' G'' ψ φ) C)
+ forall {V : Type.{u1}} {V' : Type.{u2}} {V'' : Type.{u3}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} {G'' : SimpleGraph.{u3} V''} (C : SimpleGraph.ConnectedComponent.{u1} V G) (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u3} V' V'' G' G''), Eq.{succ u3} (SimpleGraph.ConnectedComponent.{u3} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u3} V' V'' G' G'' ψ (SimpleGraph.ConnectedComponent.map.{u1, u2} V V' G G' φ C)) (SimpleGraph.ConnectedComponent.map.{u1, u3} V V'' G G'' (SimpleGraph.Hom.comp.{u1, u2, u3} V V' V'' G G' G'' ψ φ) C)
but is expected to have type
- forall {V : Type.{u3}} {G : SimpleGraph.{u3} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} {V'' : Type.{u1}} {G'' : SimpleGraph.{u1} V''} (C : SimpleGraph.ConnectedComponent.{u3} V G) (φ : SimpleGraph.Hom.{u3, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u1} V' V'' G' G''), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u1} V' G' V'' G'' ψ (SimpleGraph.ConnectedComponent.map.{u3, u2} V G V' G' φ C)) (SimpleGraph.ConnectedComponent.map.{u3, u1} V G V'' G'' (SimpleGraph.Hom.comp.{u3, u2, u1} V V' V'' G G' G'' ψ φ) C)
+ forall {V : Type.{u3}} {V' : SimpleGraph.{u3} V} {V'' : Type.{u2}} {G : SimpleGraph.{u2} V''} {G' : Type.{u1}} {G'' : SimpleGraph.{u1} G'} (C : SimpleGraph.ConnectedComponent.{u3} V V') (φ : SimpleGraph.Hom.{u3, u2} V V'' V' G) (ψ : SimpleGraph.Hom.{u2, u1} V'' G' G G''), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} G' G'') (SimpleGraph.ConnectedComponent.map.{u2, u1} V'' G G' G'' ψ (SimpleGraph.ConnectedComponent.map.{u3, u2} V V' V'' G φ C)) (SimpleGraph.ConnectedComponent.map.{u3, u1} V V' G' G'' (SimpleGraph.Hom.comp.{u3, u2, u1} V V'' G' V' G G'' ψ φ) C)
Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_compₓ'. -/
@[simp]
-theorem ConnectedComponent.map_comp {V' : Type _} {G' : SimpleGraph V'} {V'' : Type _}
- {G'' : SimpleGraph V''} (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
+theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
(C.map φ).map ψ = C.map (ψ.comp φ) := by
refine' C.ind _
exact fun _ => rfl
@@ -2803,8 +2808,6 @@ theorem ConnectedComponent.map_comp {V' : Type _} {G' : SimpleGraph V'} {V'' : T
end connectedComponent
-variable {G}
-
#print SimpleGraph.Subgraph.Connected /-
/-- A subgraph is connected if it is connected as a simple graph. -/
abbrev Subgraph.Connected (H : G.Subgraph) : Prop :=
@@ -2908,7 +2911,7 @@ theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = {
/- warning: simple_graph.walk.to_subgraph_append -> SimpleGraph.Walk.toSubgraph_append is a dubious translation:
lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SemilatticeSup.toHasSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (Lattice.toSemilatticeSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.lattice.{u1} V G))) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.hasSup.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
but is expected to have type
forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SemilatticeSup.toSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (Lattice.toSemilatticeSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instLatticeSubgraph.{u1} V G))) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_appendₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -84,6 +84,7 @@ variable {V : Type u} {V' : Type v} {V'' : Type w}
variable (G : SimpleGraph V) (G' : SimpleGraph V') (G'' : SimpleGraph V'')
+#print SimpleGraph.Walk /-
/-- A walk is a sequence of adjacent vertices. For vertices `u v : V`,
the type `walk u v` consists of all walks starting at `u` and ending at `v`.
@@ -97,36 +98,46 @@ inductive Walk : V → V → Type u
| cons {u v w : V} (h : G.Adj u v) (p : walk v w) : walk u w
deriving DecidableEq
#align simple_graph.walk SimpleGraph.Walk
+-/
attribute [refl] walk.nil
+#print SimpleGraph.Walk.instInhabited /-
@[simps]
-instance Walk.inhabited (v : V) : Inhabited (G.Walk v v) :=
+instance Walk.instInhabited (v : V) : Inhabited (G.Walk v v) :=
⟨Walk.nil⟩
-#align simple_graph.walk.inhabited SimpleGraph.Walk.inhabited
+#align simple_graph.walk.inhabited SimpleGraph.Walk.instInhabited
+-/
+#print SimpleGraph.Adj.toWalk /-
/-- The one-edge walk associated to a pair of adjacent vertices. -/
@[match_pattern, reducible]
def Adj.toWalk {G : SimpleGraph V} {u v : V} (h : G.Adj u v) : G.Walk u v :=
Walk.cons h Walk.nil
#align simple_graph.adj.to_walk SimpleGraph.Adj.toWalk
+-/
namespace Walk
variable {G}
+#print SimpleGraph.Walk.nil' /-
/-- Pattern to get `walk.nil` with the vertex as an explicit argument. -/
@[match_pattern]
abbrev nil' (u : V) : G.Walk u u :=
Walk.nil
#align simple_graph.walk.nil' SimpleGraph.Walk.nil'
+-/
+#print SimpleGraph.Walk.cons' /-
/-- Pattern to get `walk.cons` with the vertices as explicit arguments. -/
@[match_pattern]
abbrev cons' (u v w : V) (h : G.Adj u v) (p : G.Walk v w) : G.Walk u w :=
Walk.cons h p
#align simple_graph.walk.cons' SimpleGraph.Walk.cons'
+-/
+#print SimpleGraph.Walk.copy /-
/-- Change the endpoints of a walk using equalities. This is helpful for relaxing
definitional equality constraints and to be able to state otherwise difficult-to-state
lemmas. While this is a simple wrapper around `eq.rec`, it gives a canonical way to write it.
@@ -136,12 +147,16 @@ occur within the "copy context." -/
protected def copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') : G.Walk u' v' :=
Eq.ndrec (Eq.ndrec p hv) hu
#align simple_graph.walk.copy SimpleGraph.Walk.copy
+-/
+#print SimpleGraph.Walk.copy_rfl_rfl /-
@[simp]
theorem copy_rfl_rfl {u v} (p : G.Walk u v) : p.copy rfl rfl = p :=
rfl
#align simple_graph.walk.copy_rfl_rfl SimpleGraph.Walk.copy_rfl_rfl
+-/
+#print SimpleGraph.Walk.copy_copy /-
@[simp]
theorem copy_copy {u v u' v' u'' v''} (p : G.Walk u v) (hu : u = u') (hv : v = v') (hu' : u' = u'')
(hv' : v' = v'') : (p.copy hu hv).copy hu' hv' = p.copy (hu.trans hu') (hv.trans hv') :=
@@ -149,21 +164,27 @@ theorem copy_copy {u v u' v' u'' v''} (p : G.Walk u v) (hu : u = u') (hv : v = v
subst_vars
rfl
#align simple_graph.walk.copy_copy SimpleGraph.Walk.copy_copy
+-/
+#print SimpleGraph.Walk.copy_nil /-
@[simp]
theorem copy_nil {u u'} (hu : u = u') : (Walk.nil : G.Walk u u).copy hu hu = Walk.nil :=
by
subst_vars
rfl
#align simple_graph.walk.copy_nil SimpleGraph.Walk.copy_nil
+-/
+#print SimpleGraph.Walk.copy_cons /-
theorem copy_cons {u v w u' w'} (h : G.Adj u v) (p : G.Walk v w) (hu : u = u') (hw : w = w') :
(Walk.cons h p).copy hu hw = Walk.cons (by rwa [← hu]) (p.copy rfl hw) :=
by
subst_vars
rfl
#align simple_graph.walk.copy_cons SimpleGraph.Walk.copy_cons
+-/
+#print SimpleGraph.Walk.cons_copy /-
@[simp]
theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v) (hw : w' = w) :
Walk.cons h (p.copy hv hw) = (Walk.cons (by rwa [hv]) p).copy rfl hw :=
@@ -171,50 +192,66 @@ theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v)
subst_vars
rfl
#align simple_graph.walk.cons_copy SimpleGraph.Walk.cons_copy
+-/
+#print SimpleGraph.Walk.exists_eq_cons_of_ne /-
theorem exists_eq_cons_of_ne :
∀ {u v : V} (hne : u ≠ v) (p : G.Walk u v),
∃ (w : V)(h : G.Adj u w)(p' : G.Walk w v), p = cons h p'
| _, _, hne, nil => (hne rfl).elim
| _, _, _, cons h p' => ⟨_, h, p', rfl⟩
#align simple_graph.walk.exists_eq_cons_of_ne SimpleGraph.Walk.exists_eq_cons_of_ne
+-/
+#print SimpleGraph.Walk.length /-
/-- The length of a walk is the number of edges/darts along it. -/
def length : ∀ {u v : V}, G.Walk u v → ℕ
| _, _, nil => 0
| _, _, cons _ q => q.length.succ
#align simple_graph.walk.length SimpleGraph.Walk.length
+-/
+#print SimpleGraph.Walk.append /-
/-- The concatenation of two compatible walks. -/
@[trans]
def append : ∀ {u v w : V}, G.Walk u v → G.Walk v w → G.Walk u w
| _, _, _, nil, q => q
| _, _, _, cons h p, q => cons h (p.append q)
#align simple_graph.walk.append SimpleGraph.Walk.append
+-/
+#print SimpleGraph.Walk.concat /-
/-- The reversed version of `simple_graph.walk.cons`, concatenating an edge to
the end of a walk. -/
def concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) : G.Walk u w :=
p.append (cons h nil)
#align simple_graph.walk.concat SimpleGraph.Walk.concat
+-/
+#print SimpleGraph.Walk.concat_eq_append /-
theorem concat_eq_append {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
p.concat h = p.append (cons h nil) :=
rfl
#align simple_graph.walk.concat_eq_append SimpleGraph.Walk.concat_eq_append
+-/
+#print SimpleGraph.Walk.reverseAux /-
/-- The concatenation of the reverse of the first walk with the second walk. -/
protected def reverseAux : ∀ {u v w : V}, G.Walk u v → G.Walk u w → G.Walk v w
| _, _, _, nil, q => q
| _, _, _, cons h p, q => reverse_aux p (cons (G.symm h) q)
#align simple_graph.walk.reverse_aux SimpleGraph.Walk.reverseAux
+-/
+#print SimpleGraph.Walk.reverse /-
/-- The walk in reverse. -/
@[symm]
def reverse {u v : V} (w : G.Walk u v) : G.Walk v u :=
w.reverseAux nil
#align simple_graph.walk.reverse SimpleGraph.Walk.reverse
+-/
+#print SimpleGraph.Walk.getVert /-
/-- Get the `n`th vertex from a walk, where `n` is generally expected to be
between `0` and `p.length`, inclusive.
If `n` is greater than or equal to `p.length`, the result is the path's endpoint. -/
@@ -223,11 +260,15 @@ def getVert : ∀ {u v : V} (p : G.Walk u v) (n : ℕ), V
| u, v, cons _ _, 0 => u
| u, v, cons _ q, n + 1 => q.getVert n
#align simple_graph.walk.get_vert SimpleGraph.Walk.getVert
+-/
+#print SimpleGraph.Walk.getVert_zero /-
@[simp]
theorem getVert_zero {u v} (w : G.Walk u v) : w.getVert 0 = u := by cases w <;> rfl
#align simple_graph.walk.get_vert_zero SimpleGraph.Walk.getVert_zero
+-/
+#print SimpleGraph.Walk.getVert_of_length_le /-
theorem getVert_of_length_le {u v} (w : G.Walk u v) {i : ℕ} (hi : w.length ≤ i) : w.getVert i = v :=
by
induction' w with _ x y z hxy wyz IH generalizing i
@@ -236,12 +277,16 @@ theorem getVert_of_length_le {u v} (w : G.Walk u v) {i : ℕ} (hi : w.length ≤
· cases hi
· exact IH (Nat.succ_le_succ_iff.1 hi)
#align simple_graph.walk.get_vert_of_length_le SimpleGraph.Walk.getVert_of_length_le
+-/
+#print SimpleGraph.Walk.getVert_length /-
@[simp]
theorem getVert_length {u v} (w : G.Walk u v) : w.getVert w.length = v :=
w.getVert_of_length_le rfl.le
#align simple_graph.walk.get_vert_length SimpleGraph.Walk.getVert_length
+-/
+#print SimpleGraph.Walk.adj_getVert_succ /-
theorem adj_getVert_succ {u v} (w : G.Walk u v) {i : ℕ} (hi : i < w.length) :
G.Adj (w.getVert i) (w.getVert (i + 1)) :=
by
@@ -251,30 +296,40 @@ theorem adj_getVert_succ {u v} (w : G.Walk u v) {i : ℕ} (hi : i < w.length) :
· simp [get_vert, hxy]
· exact IH (Nat.succ_lt_succ_iff.1 hi)
#align simple_graph.walk.adj_get_vert_succ SimpleGraph.Walk.adj_getVert_succ
+-/
+#print SimpleGraph.Walk.cons_append /-
@[simp]
theorem cons_append {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (q : G.Walk w x) :
(cons h p).append q = cons h (p.append q) :=
rfl
#align simple_graph.walk.cons_append SimpleGraph.Walk.cons_append
+-/
+#print SimpleGraph.Walk.cons_nil_append /-
@[simp]
theorem cons_nil_append {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h nil).append p = cons h p :=
rfl
#align simple_graph.walk.cons_nil_append SimpleGraph.Walk.cons_nil_append
+-/
+#print SimpleGraph.Walk.append_nil /-
@[simp]
theorem append_nil : ∀ {u v : V} (p : G.Walk u v), p.append nil = p
| _, _, nil => rfl
| _, _, cons h p => by rw [cons_append, append_nil]
#align simple_graph.walk.append_nil SimpleGraph.Walk.append_nil
+-/
+#print SimpleGraph.Walk.nil_append /-
@[simp]
theorem nil_append {u v : V} (p : G.Walk u v) : nil.append p = p :=
rfl
#align simple_graph.walk.nil_append SimpleGraph.Walk.nil_append
+-/
+#print SimpleGraph.Walk.append_assoc /-
theorem append_assoc :
∀ {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (r : G.Walk w x),
p.append (q.append r) = (p.append q).append r
@@ -283,7 +338,9 @@ theorem append_assoc :
dsimp only [append]
rw [append_assoc]
#align simple_graph.walk.append_assoc SimpleGraph.Walk.append_assoc
+-/
+#print SimpleGraph.Walk.append_copy_copy /-
@[simp]
theorem append_copy_copy {u v w u' v' w'} (p : G.Walk u v) (q : G.Walk v w) (hu : u = u')
(hv : v = v') (hw : w = w') : (p.copy hu hv).append (q.copy hv hw) = (p.append q).copy hu hw :=
@@ -291,27 +348,37 @@ theorem append_copy_copy {u v w u' v' w'} (p : G.Walk u v) (q : G.Walk v w) (hu
subst_vars
rfl
#align simple_graph.walk.append_copy_copy SimpleGraph.Walk.append_copy_copy
+-/
+#print SimpleGraph.Walk.concat_nil /-
theorem concat_nil {u v : V} (h : G.Adj u v) : nil.concat h = cons h nil :=
rfl
#align simple_graph.walk.concat_nil SimpleGraph.Walk.concat_nil
+-/
+#print SimpleGraph.Walk.concat_cons /-
@[simp]
theorem concat_cons {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (h' : G.Adj w x) :
(cons h p).concat h' = cons h (p.concat h') :=
rfl
#align simple_graph.walk.concat_cons SimpleGraph.Walk.concat_cons
+-/
+#print SimpleGraph.Walk.append_concat /-
theorem append_concat {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (h : G.Adj w x) :
p.append (q.concat h) = (p.append q).concat h :=
append_assoc _ _ _
#align simple_graph.walk.append_concat SimpleGraph.Walk.append_concat
+-/
+#print SimpleGraph.Walk.concat_append /-
theorem concat_append {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk w x) :
(p.concat h).append q = p.append (cons h q) := by
rw [concat_eq_append, ← append_assoc, cons_nil_append]
#align simple_graph.walk.concat_append SimpleGraph.Walk.concat_append
+-/
+#print SimpleGraph.Walk.exists_cons_eq_concat /-
/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat :
∀ {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
@@ -323,7 +390,9 @@ theorem exists_cons_eq_concat :
refine' ⟨y, cons h q, h'', _⟩
rw [concat_cons, hc]
#align simple_graph.walk.exists_cons_eq_concat SimpleGraph.Walk.exists_cons_eq_concat
+-/
+#print SimpleGraph.Walk.exists_concat_eq_cons /-
/-- A non-trivial `concat` walk is representable as a `cons` walk. -/
theorem exists_concat_eq_cons :
∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
@@ -331,22 +400,30 @@ theorem exists_concat_eq_cons :
| _, _, _, nil, h => ⟨_, h, nil, rfl⟩
| _, _, _, cons h' p, h => ⟨_, h', Walk.concat p h, concat_cons _ _ _⟩
#align simple_graph.walk.exists_concat_eq_cons SimpleGraph.Walk.exists_concat_eq_cons
+-/
+#print SimpleGraph.Walk.reverse_nil /-
@[simp]
theorem reverse_nil {u : V} : (nil : G.Walk u u).reverse = nil :=
rfl
#align simple_graph.walk.reverse_nil SimpleGraph.Walk.reverse_nil
+-/
+#print SimpleGraph.Walk.reverse_singleton /-
theorem reverse_singleton {u v : V} (h : G.Adj u v) : (cons h nil).reverse = cons (G.symm h) nil :=
rfl
#align simple_graph.walk.reverse_singleton SimpleGraph.Walk.reverse_singleton
+-/
+#print SimpleGraph.Walk.cons_reverseAux /-
@[simp]
theorem cons_reverseAux {u v w x : V} (p : G.Walk u v) (q : G.Walk w x) (h : G.Adj w u) :
(cons h p).reverseAux q = p.reverseAux (cons (G.symm h) q) :=
rfl
#align simple_graph.walk.cons_reverse_aux SimpleGraph.Walk.cons_reverseAux
+-/
+#print SimpleGraph.Walk.append_reverseAux /-
@[simp]
protected theorem append_reverseAux :
∀ {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (r : G.Walk u x),
@@ -354,7 +431,9 @@ protected theorem append_reverseAux :
| _, _, _, _, nil, _, _ => rfl
| _, _, _, _, cons h p', q, r => append_reverse_aux p' q (cons (G.symm h) r)
#align simple_graph.walk.append_reverse_aux SimpleGraph.Walk.append_reverseAux
+-/
+#print SimpleGraph.Walk.reverseAux_append /-
@[simp]
protected theorem reverseAux_append :
∀ {u v w x : V} (p : G.Walk u v) (q : G.Walk u w) (r : G.Walk w x),
@@ -362,16 +441,22 @@ protected theorem reverseAux_append :
| _, _, _, _, nil, _, _ => rfl
| _, _, _, _, cons h p', q, r => by simp [reverse_aux_append p' (cons (G.symm h) q) r]
#align simple_graph.walk.reverse_aux_append SimpleGraph.Walk.reverseAux_append
+-/
+#print SimpleGraph.Walk.reverseAux_eq_reverse_append /-
protected theorem reverseAux_eq_reverse_append {u v w : V} (p : G.Walk u v) (q : G.Walk u w) :
p.reverseAux q = p.reverse.append q := by simp [reverse]
#align simple_graph.walk.reverse_aux_eq_reverse_append SimpleGraph.Walk.reverseAux_eq_reverse_append
+-/
+#print SimpleGraph.Walk.reverse_cons /-
@[simp]
theorem reverse_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h p).reverse = p.reverse.append (cons (G.symm h) nil) := by simp [reverse]
#align simple_graph.walk.reverse_cons SimpleGraph.Walk.reverse_cons
+-/
+#print SimpleGraph.Walk.reverse_copy /-
@[simp]
theorem reverse_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
(p.copy hu hv).reverse = p.reverse.copy hv hu :=
@@ -379,69 +464,93 @@ theorem reverse_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
subst_vars
rfl
#align simple_graph.walk.reverse_copy SimpleGraph.Walk.reverse_copy
+-/
+#print SimpleGraph.Walk.reverse_append /-
@[simp]
theorem reverse_append {u v w : V} (p : G.Walk u v) (q : G.Walk v w) :
(p.append q).reverse = q.reverse.append p.reverse := by simp [reverse]
#align simple_graph.walk.reverse_append SimpleGraph.Walk.reverse_append
+-/
+#print SimpleGraph.Walk.reverse_concat /-
@[simp]
theorem reverse_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
(p.concat h).reverse = cons (G.symm h) p.reverse := by simp [concat_eq_append]
#align simple_graph.walk.reverse_concat SimpleGraph.Walk.reverse_concat
+-/
+#print SimpleGraph.Walk.reverse_reverse /-
@[simp]
theorem reverse_reverse : ∀ {u v : V} (p : G.Walk u v), p.reverse.reverse = p
| _, _, nil => rfl
| _, _, cons h p => by simp [reverse_reverse]
#align simple_graph.walk.reverse_reverse SimpleGraph.Walk.reverse_reverse
+-/
+#print SimpleGraph.Walk.length_nil /-
@[simp]
theorem length_nil {u : V} : (nil : G.Walk u u).length = 0 :=
rfl
#align simple_graph.walk.length_nil SimpleGraph.Walk.length_nil
+-/
+#print SimpleGraph.Walk.length_cons /-
@[simp]
theorem length_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h p).length = p.length + 1 :=
rfl
#align simple_graph.walk.length_cons SimpleGraph.Walk.length_cons
+-/
+#print SimpleGraph.Walk.length_copy /-
@[simp]
theorem length_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
(p.copy hu hv).length = p.length := by
subst_vars
rfl
#align simple_graph.walk.length_copy SimpleGraph.Walk.length_copy
+-/
+#print SimpleGraph.Walk.length_append /-
@[simp]
theorem length_append :
∀ {u v w : V} (p : G.Walk u v) (q : G.Walk v w), (p.append q).length = p.length + q.length
| _, _, _, nil, _ => by simp
| _, _, _, cons _ _, _ => by simp [length_append, add_left_comm, add_comm]
#align simple_graph.walk.length_append SimpleGraph.Walk.length_append
+-/
+#print SimpleGraph.Walk.length_concat /-
@[simp]
theorem length_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
(p.concat h).length = p.length + 1 :=
length_append _ _
#align simple_graph.walk.length_concat SimpleGraph.Walk.length_concat
+-/
+#print SimpleGraph.Walk.length_reverseAux /-
@[simp]
protected theorem length_reverseAux :
∀ {u v w : V} (p : G.Walk u v) (q : G.Walk u w), (p.reverseAux q).length = p.length + q.length
| _, _, _, nil, _ => by simp!
| _, _, _, cons _ _, _ => by simp [length_reverse_aux, Nat.add_succ, Nat.succ_add]
#align simple_graph.walk.length_reverse_aux SimpleGraph.Walk.length_reverseAux
+-/
+#print SimpleGraph.Walk.length_reverse /-
@[simp]
theorem length_reverse {u v : V} (p : G.Walk u v) : p.reverse.length = p.length := by simp [reverse]
#align simple_graph.walk.length_reverse SimpleGraph.Walk.length_reverse
+-/
+#print SimpleGraph.Walk.eq_of_length_eq_zero /-
theorem eq_of_length_eq_zero : ∀ {u v : V} {p : G.Walk u v}, p.length = 0 → u = v
| _, _, nil, _ => rfl
#align simple_graph.walk.eq_of_length_eq_zero SimpleGraph.Walk.eq_of_length_eq_zero
+-/
+#print SimpleGraph.Walk.exists_length_eq_zero_iff /-
@[simp]
theorem exists_length_eq_zero_iff {u v : V} : (∃ p : G.Walk u v, p.length = 0) ↔ u = v :=
by
@@ -451,23 +560,29 @@ theorem exists_length_eq_zero_iff {u v : V} : (∃ p : G.Walk u v, p.length = 0)
· rintro rfl
exact ⟨nil, rfl⟩
#align simple_graph.walk.exists_length_eq_zero_iff SimpleGraph.Walk.exists_length_eq_zero_iff
+-/
+#print SimpleGraph.Walk.length_eq_zero_iff /-
@[simp]
theorem length_eq_zero_iff {u : V} {p : G.Walk u u} : p.length = 0 ↔ p = nil := by cases p <;> simp
#align simple_graph.walk.length_eq_zero_iff SimpleGraph.Walk.length_eq_zero_iff
+-/
section ConcatRec
variable {motive : ∀ u v : V, G.Walk u v → Sort _} (Hnil : ∀ {u : V}, motive u u nil)
(Hconcat : ∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w), motive u v p → motive u w (p.concat h))
+#print SimpleGraph.Walk.concatRecAux /-
/-- Auxiliary definition for `simple_graph.walk.concat_rec` -/
def concatRecAux : ∀ {u v : V} (p : G.Walk u v), motive v u p.reverse
| _, _, nil => Hnil
| _, _, cons h p =>
Eq.ndrec (Hconcat p.reverse (G.symm h) (concat_rec_aux p)) (reverse_cons h p).symm
#align simple_graph.walk.concat_rec_aux SimpleGraph.Walk.concatRecAux
+-/
+#print SimpleGraph.Walk.concatRec /-
/-- Recursor on walks by inducting on `simple_graph.walk.concat`.
This is inducting from the opposite end of the walk compared
@@ -476,13 +591,26 @@ to `simple_graph.walk.rec`, which inducts on `simple_graph.walk.cons`. -/
def concatRec {u v : V} (p : G.Walk u v) : motive u v p :=
Eq.ndrec (concatRecAux (@Hnil) (@Hconcat) p.reverse) (reverse_reverse p)
#align simple_graph.walk.concat_rec SimpleGraph.Walk.concatRec
+-/
+/- warning: simple_graph.walk.concat_rec_nil -> SimpleGraph.Walk.concatRec_nil is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u1} V G u v) -> Sort.{u2}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h))) (u : V), Eq.{u2} (motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (SimpleGraph.Walk.concatRec.{u1, u2} V G motive Hnil Hconcat u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hnil u)
+but is expected to have type
+ forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u2} V G u v) -> Sort.{u1}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h))) (u : V), Eq.{u1} (motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (SimpleGraph.Walk.concatRec.{u2, u1} V G motive Hnil Hconcat u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hnil u)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.concat_rec_nil SimpleGraph.Walk.concatRec_nilₓ'. -/
@[simp]
theorem concatRec_nil (u : V) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (nil : G.Walk u u) = Hnil :=
rfl
#align simple_graph.walk.concat_rec_nil SimpleGraph.Walk.concatRec_nil
+/- warning: simple_graph.walk.concat_rec_concat -> SimpleGraph.Walk.concatRec_concat is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u1} V G u v) -> Sort.{u2}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u1} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h))) {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (h : SimpleGraph.Adj.{u1} V G v w), Eq.{u2} (motive u w (SimpleGraph.Walk.concat.{u1} V G u v w p h)) (SimpleGraph.Walk.concatRec.{u1, u2} V G motive Hnil Hconcat u w (SimpleGraph.Walk.concat.{u1} V G u v w p h)) (Hconcat u v w p h (SimpleGraph.Walk.concatRec.{u1, u2} V G (fun (_x : V) (_x_1 : V) (_x_2 : SimpleGraph.Walk.{u1} V G _x _x_1) => motive _x _x_1 _x_2) Hnil Hconcat u v p))
+but is expected to have type
+ forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {motive : forall (u : V) (v : V), (SimpleGraph.Walk.{u2} V G u v) -> Sort.{u1}} (Hnil : forall {u : V}, motive u u (SimpleGraph.Walk.nil.{u2} V G u)) (Hconcat : forall {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), (motive u v p) -> (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h))) {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u2} V G u v) (h : SimpleGraph.Adj.{u2} V G v w), Eq.{u1} (motive u w (SimpleGraph.Walk.concat.{u2} V G u v w p h)) (SimpleGraph.Walk.concatRec.{u2, u1} V G motive Hnil Hconcat u w (SimpleGraph.Walk.concat.{u2} V G u v w p h)) (Hconcat u v w p h (SimpleGraph.Walk.concatRec.{u2, u1} V G (fun (_x : V) (_x_1 : V) (_x_2 : SimpleGraph.Walk.{u2} V G _x _x_1) => motive _x _x_1 _x_2) Hnil Hconcat u v p))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concatₓ'. -/
@[simp]
theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
@concatRec _ _ motive @Hnil @Hconcat _ _ (p.concat h) =
@@ -500,10 +628,13 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
end ConcatRec
+#print SimpleGraph.Walk.concat_ne_nil /-
theorem concat_ne_nil {u v : V} (p : G.Walk u v) (h : G.Adj v u) : p.concat h ≠ nil := by
cases p <;> simp [concat]
#align simple_graph.walk.concat_ne_nil SimpleGraph.Walk.concat_ne_nil
+-/
+#print SimpleGraph.Walk.concat_inj /-
theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk u v'}
{h' : G.Adj v' w} (he : p.concat h = p'.concat h') : ∃ hv : v = v', p.copy rfl hv = p' :=
by
@@ -529,106 +660,146 @@ theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk
obtain ⟨rfl, rfl⟩ := p_ih he
exact ⟨rfl, rfl⟩
#align simple_graph.walk.concat_inj SimpleGraph.Walk.concat_inj
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.support /-
/-- The `support` of a walk is the list of vertices it visits in order. -/
def support : ∀ {u v : V}, G.Walk u v → List V
| u, v, nil => [u]
| u, v, cons h p => u::p.support
#align simple_graph.walk.support SimpleGraph.Walk.support
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.darts /-
/-- The `darts` of a walk is the list of darts it visits in order. -/
def darts : ∀ {u v : V}, G.Walk u v → List G.Dart
| u, v, nil => []
| u, v, cons h p => ⟨(u, _), h⟩::p.darts
#align simple_graph.walk.darts SimpleGraph.Walk.darts
+-/
+#print SimpleGraph.Walk.edges /-
/-- The `edges` of a walk is the list of edges it visits in order.
This is defined to be the list of edges underlying `simple_graph.walk.darts`. -/
def edges {u v : V} (p : G.Walk u v) : List (Sym2 V) :=
p.darts.map Dart.edge
#align simple_graph.walk.edges SimpleGraph.Walk.edges
+-/
+#print SimpleGraph.Walk.support_nil /-
@[simp]
theorem support_nil {u : V} : (nil : G.Walk u u).support = [u] :=
rfl
#align simple_graph.walk.support_nil SimpleGraph.Walk.support_nil
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.support_cons /-
@[simp]
theorem support_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h p).support = u::p.support :=
rfl
#align simple_graph.walk.support_cons SimpleGraph.Walk.support_cons
+-/
+#print SimpleGraph.Walk.support_concat /-
@[simp]
theorem support_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
(p.concat h).support = p.support.concat w := by induction p <;> simp [*, concat_nil]
#align simple_graph.walk.support_concat SimpleGraph.Walk.support_concat
+-/
+#print SimpleGraph.Walk.support_copy /-
@[simp]
theorem support_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
(p.copy hu hv).support = p.support := by
subst_vars
rfl
#align simple_graph.walk.support_copy SimpleGraph.Walk.support_copy
+-/
+#print SimpleGraph.Walk.support_append /-
theorem support_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
(p.append p').support = p.support ++ p'.support.tail := by induction p <;> cases p' <;> simp [*]
#align simple_graph.walk.support_append SimpleGraph.Walk.support_append
+-/
+#print SimpleGraph.Walk.support_reverse /-
@[simp]
theorem support_reverse {u v : V} (p : G.Walk u v) : p.reverse.support = p.support.reverse := by
induction p <;> simp [support_append, *]
#align simple_graph.walk.support_reverse SimpleGraph.Walk.support_reverse
+-/
+#print SimpleGraph.Walk.support_ne_nil /-
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ [] := by cases p <;> simp
#align simple_graph.walk.support_ne_nil SimpleGraph.Walk.support_ne_nil
+-/
+#print SimpleGraph.Walk.tail_support_append /-
theorem tail_support_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
(p.append p').support.tail = p.support.tail ++ p'.support.tail := by
rw [support_append, List.tail_append_of_ne_nil _ _ (support_ne_nil _)]
#align simple_graph.walk.tail_support_append SimpleGraph.Walk.tail_support_append
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.support_eq_cons /-
theorem support_eq_cons {u v : V} (p : G.Walk u v) : p.support = u::p.support.tail := by
cases p <;> simp
#align simple_graph.walk.support_eq_cons SimpleGraph.Walk.support_eq_cons
+-/
+#print SimpleGraph.Walk.start_mem_support /-
@[simp]
theorem start_mem_support {u v : V} (p : G.Walk u v) : u ∈ p.support := by cases p <;> simp
#align simple_graph.walk.start_mem_support SimpleGraph.Walk.start_mem_support
+-/
+#print SimpleGraph.Walk.end_mem_support /-
@[simp]
theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support := by induction p <;> simp [*]
#align simple_graph.walk.end_mem_support SimpleGraph.Walk.end_mem_support
+-/
+#print SimpleGraph.Walk.support_nonempty /-
@[simp]
theorem support_nonempty {u v : V} (p : G.Walk u v) : { w | w ∈ p.support }.Nonempty :=
⟨u, by simp⟩
#align simple_graph.walk.support_nonempty SimpleGraph.Walk.support_nonempty
+-/
+#print SimpleGraph.Walk.mem_support_iff /-
theorem mem_support_iff {u v w : V} (p : G.Walk u v) : w ∈ p.support ↔ w = u ∨ w ∈ p.support.tail :=
by cases p <;> simp
#align simple_graph.walk.mem_support_iff SimpleGraph.Walk.mem_support_iff
+-/
+#print SimpleGraph.Walk.mem_support_nil_iff /-
theorem mem_support_nil_iff {u v : V} : u ∈ (nil : G.Walk v v).support ↔ u = v := by simp
#align simple_graph.walk.mem_support_nil_iff SimpleGraph.Walk.mem_support_nil_iff
+-/
+#print SimpleGraph.Walk.mem_tail_support_append_iff /-
@[simp]
theorem mem_tail_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
t ∈ (p.append p').support.tail ↔ t ∈ p.support.tail ∨ t ∈ p'.support.tail := by
rw [tail_support_append, List.mem_append]
#align simple_graph.walk.mem_tail_support_append_iff SimpleGraph.Walk.mem_tail_support_append_iff
+-/
+#print SimpleGraph.Walk.end_mem_tail_support_of_ne /-
@[simp]
theorem end_mem_tail_support_of_ne {u v : V} (h : u ≠ v) (p : G.Walk u v) : v ∈ p.support.tail :=
by
obtain ⟨_, _, _, rfl⟩ := exists_eq_cons_of_ne h p
simp
#align simple_graph.walk.end_mem_tail_support_of_ne SimpleGraph.Walk.end_mem_tail_support_of_ne
+-/
+#print SimpleGraph.Walk.mem_support_append_iff /-
@[simp]
theorem mem_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
t ∈ (p.append p').support ↔ t ∈ p.support ∨ t ∈ p'.support :=
@@ -636,13 +807,17 @@ theorem mem_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w)
simp only [mem_support_iff, mem_tail_support_append_iff]
by_cases h : t = v <;> by_cases h' : t = u <;> subst_vars <;> try have := Ne.symm h' <;> simp [*]
#align simple_graph.walk.mem_support_append_iff SimpleGraph.Walk.mem_support_append_iff
+-/
+#print SimpleGraph.Walk.subset_support_append_left /-
@[simp]
theorem subset_support_append_left {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v)
(q : G.Walk v w) : p.support ⊆ (p.append q).support := by
simp only [walk.support_append, List.subset_append_left]
#align simple_graph.walk.subset_support_append_left SimpleGraph.Walk.subset_support_append_left
+-/
+#print SimpleGraph.Walk.subset_support_append_right /-
@[simp]
theorem subset_support_append_right {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v)
(q : G.Walk v w) : q.support ⊆ (p.append q).support :=
@@ -650,16 +825,22 @@ theorem subset_support_append_right {V : Type u} {G : SimpleGraph V} {u v w : V}
intro h
simp (config := { contextual := true }) only [mem_support_append_iff, or_true_iff, imp_true_iff]
#align simple_graph.walk.subset_support_append_right SimpleGraph.Walk.subset_support_append_right
+-/
+#print SimpleGraph.Walk.coe_support /-
theorem coe_support {u v : V} (p : G.Walk u v) : (p.support : Multiset V) = {u} + p.support.tail :=
by cases p <;> rfl
#align simple_graph.walk.coe_support SimpleGraph.Walk.coe_support
+-/
+#print SimpleGraph.Walk.coe_support_append /-
theorem coe_support_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
((p.append p').support : Multiset V) = {u} + p.support.tail + p'.support.tail := by
rw [support_append, ← Multiset.coe_add, coe_support]
#align simple_graph.walk.coe_support_append SimpleGraph.Walk.coe_support_append
+-/
+#print SimpleGraph.Walk.coe_support_append' /-
theorem coe_support_append' [DecidableEq V] {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
((p.append p').support : Multiset V) = p.support + p'.support - {v} :=
by
@@ -668,143 +849,201 @@ theorem coe_support_append' [DecidableEq V] {u v w : V} (p : G.Walk u v) (p' : G
rw [add_comm {v}]
simp only [← add_assoc, add_tsub_cancel_right]
#align simple_graph.walk.coe_support_append' SimpleGraph.Walk.coe_support_append'
+-/
+#print SimpleGraph.Walk.chain_adj_support /-
theorem chain_adj_support :
∀ {u v w : V} (h : G.Adj u v) (p : G.Walk v w), List.Chain G.Adj u p.support
| _, _, _, h, nil => List.Chain.cons h List.Chain.nil
| _, _, _, h, cons h' p => List.Chain.cons h (chain_adj_support h' p)
#align simple_graph.walk.chain_adj_support SimpleGraph.Walk.chain_adj_support
+-/
+#print SimpleGraph.Walk.chain'_adj_support /-
theorem chain'_adj_support : ∀ {u v : V} (p : G.Walk u v), List.Chain' G.Adj p.support
| _, _, nil => List.Chain.nil
| _, _, cons h p => chain_adj_support h p
#align simple_graph.walk.chain'_adj_support SimpleGraph.Walk.chain'_adj_support
+-/
+#print SimpleGraph.Walk.chain_dartAdj_darts /-
theorem chain_dartAdj_darts :
∀ {d : G.Dart} {v w : V} (h : d.snd = v) (p : G.Walk v w), List.Chain G.DartAdj d p.darts
| _, _, _, h, nil => List.Chain.nil
| _, _, _, h, cons h' p => List.Chain.cons h (chain_dart_adj_darts rfl p)
#align simple_graph.walk.chain_dart_adj_darts SimpleGraph.Walk.chain_dartAdj_darts
+-/
+#print SimpleGraph.Walk.chain'_dartAdj_darts /-
theorem chain'_dartAdj_darts : ∀ {u v : V} (p : G.Walk u v), List.Chain' G.DartAdj p.darts
| _, _, nil => trivial
| _, _, cons h p => chain_dartAdj_darts rfl p
#align simple_graph.walk.chain'_dart_adj_darts SimpleGraph.Walk.chain'_dartAdj_darts
+-/
+/- warning: simple_graph.walk.edges_subset_edge_set -> SimpleGraph.Walk.edges_subset_edgeSet is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {{e : Sym2.{u1} V}}, (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) G))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {{e : Sym2.{u1} V}}, (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V G))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSetₓ'. -/
/-- Every edge in a walk's edge list is an edge of the graph.
It is written in this form (rather than using `⊆`) to avoid unsightly coercions. -/
-theorem edges_subset_edgeSetEmbedding :
+theorem edges_subset_edgeSet :
∀ {u v : V} (p : G.Walk u v) ⦃e : Sym2 V⦄ (h : e ∈ p.edges), e ∈ G.edgeSetEmbedding
| _, _, cons h' p', e, h => by rcases h with ⟨rfl, h⟩ <;> solve_by_elim
-#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSetEmbedding
+#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSet
+#print SimpleGraph.Walk.adj_of_mem_edges /-
theorem adj_of_mem_edges {u v x y : V} (p : G.Walk u v) (h : ⟦(x, y)⟧ ∈ p.edges) : G.Adj x y :=
- edges_subset_edgeSetEmbedding p h
+ edges_subset_edgeSet p h
#align simple_graph.walk.adj_of_mem_edges SimpleGraph.Walk.adj_of_mem_edges
+-/
+#print SimpleGraph.Walk.darts_nil /-
@[simp]
theorem darts_nil {u : V} : (nil : G.Walk u u).darts = [] :=
rfl
#align simple_graph.walk.darts_nil SimpleGraph.Walk.darts_nil
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.darts_cons /-
@[simp]
theorem darts_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h p).darts = ⟨(u, v), h⟩::p.darts :=
rfl
#align simple_graph.walk.darts_cons SimpleGraph.Walk.darts_cons
+-/
+#print SimpleGraph.Walk.darts_concat /-
@[simp]
theorem darts_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
(p.concat h).darts = p.darts.concat ⟨(v, w), h⟩ := by induction p <;> simp [*, concat_nil]
#align simple_graph.walk.darts_concat SimpleGraph.Walk.darts_concat
+-/
+#print SimpleGraph.Walk.darts_copy /-
@[simp]
theorem darts_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
(p.copy hu hv).darts = p.darts := by
subst_vars
rfl
#align simple_graph.walk.darts_copy SimpleGraph.Walk.darts_copy
+-/
+#print SimpleGraph.Walk.darts_append /-
@[simp]
theorem darts_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
(p.append p').darts = p.darts ++ p'.darts := by induction p <;> simp [*]
#align simple_graph.walk.darts_append SimpleGraph.Walk.darts_append
+-/
+#print SimpleGraph.Walk.darts_reverse /-
@[simp]
theorem darts_reverse {u v : V} (p : G.Walk u v) :
p.reverse.darts = (p.darts.map Dart.symm).reverse := by induction p <;> simp [*, Sym2.eq_swap]
#align simple_graph.walk.darts_reverse SimpleGraph.Walk.darts_reverse
+-/
+#print SimpleGraph.Walk.mem_darts_reverse /-
theorem mem_darts_reverse {u v : V} {d : G.Dart} {p : G.Walk u v} :
d ∈ p.reverse.darts ↔ d.symm ∈ p.darts := by simp
#align simple_graph.walk.mem_darts_reverse SimpleGraph.Walk.mem_darts_reverse
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.cons_map_snd_darts /-
theorem cons_map_snd_darts {u v : V} (p : G.Walk u v) : (u::p.darts.map Dart.snd) = p.support := by
induction p <;> simp! [*]
#align simple_graph.walk.cons_map_snd_darts SimpleGraph.Walk.cons_map_snd_darts
+-/
+#print SimpleGraph.Walk.map_snd_darts /-
theorem map_snd_darts {u v : V} (p : G.Walk u v) : p.darts.map Dart.snd = p.support.tail := by
simpa using congr_arg List.tail (cons_map_snd_darts p)
#align simple_graph.walk.map_snd_darts SimpleGraph.Walk.map_snd_darts
+-/
+#print SimpleGraph.Walk.map_fst_darts_append /-
theorem map_fst_darts_append {u v : V} (p : G.Walk u v) : p.darts.map Dart.fst ++ [v] = p.support :=
by induction p <;> simp! [*]
#align simple_graph.walk.map_fst_darts_append SimpleGraph.Walk.map_fst_darts_append
+-/
+#print SimpleGraph.Walk.map_fst_darts /-
theorem map_fst_darts {u v : V} (p : G.Walk u v) : p.darts.map Dart.fst = p.support.dropLast := by
simpa! using congr_arg List.dropLast (map_fst_darts_append p)
#align simple_graph.walk.map_fst_darts SimpleGraph.Walk.map_fst_darts
+-/
+#print SimpleGraph.Walk.edges_nil /-
@[simp]
theorem edges_nil {u : V} : (nil : G.Walk u u).edges = [] :=
rfl
#align simple_graph.walk.edges_nil SimpleGraph.Walk.edges_nil
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SimpleGraph.Walk.edges_cons /-
@[simp]
theorem edges_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
(cons h p).edges = ⟦(u, v)⟧::p.edges :=
rfl
#align simple_graph.walk.edges_cons SimpleGraph.Walk.edges_cons
+-/
+#print SimpleGraph.Walk.edges_concat /-
@[simp]
theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
(p.concat h).edges = p.edges.concat ⟦(v, w)⟧ := by simp [edges]
#align simple_graph.walk.edges_concat SimpleGraph.Walk.edges_concat
+-/
+#print SimpleGraph.Walk.edges_copy /-
@[simp]
theorem edges_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
(p.copy hu hv).edges = p.edges := by
subst_vars
rfl
#align simple_graph.walk.edges_copy SimpleGraph.Walk.edges_copy
+-/
+#print SimpleGraph.Walk.edges_append /-
@[simp]
theorem edges_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
(p.append p').edges = p.edges ++ p'.edges := by simp [edges]
#align simple_graph.walk.edges_append SimpleGraph.Walk.edges_append
+-/
+#print SimpleGraph.Walk.edges_reverse /-
@[simp]
theorem edges_reverse {u v : V} (p : G.Walk u v) : p.reverse.edges = p.edges.reverse := by
simp [edges]
#align simple_graph.walk.edges_reverse SimpleGraph.Walk.edges_reverse
+-/
+#print SimpleGraph.Walk.length_support /-
@[simp]
theorem length_support {u v : V} (p : G.Walk u v) : p.support.length = p.length + 1 := by
induction p <;> simp [*]
#align simple_graph.walk.length_support SimpleGraph.Walk.length_support
+-/
+#print SimpleGraph.Walk.length_darts /-
@[simp]
theorem length_darts {u v : V} (p : G.Walk u v) : p.darts.length = p.length := by
induction p <;> simp [*]
#align simple_graph.walk.length_darts SimpleGraph.Walk.length_darts
+-/
+#print SimpleGraph.Walk.length_edges /-
@[simp]
theorem length_edges {u v : V} (p : G.Walk u v) : p.edges.length = p.length := by simp [edges]
#align simple_graph.walk.length_edges SimpleGraph.Walk.length_edges
+-/
+#print SimpleGraph.Walk.dart_fst_mem_support_of_mem_darts /-
theorem dart_fst_mem_support_of_mem_darts :
∀ {u v : V} (p : G.Walk u v) {d : G.Dart}, d ∈ p.darts → d.fst ∈ p.support
| u, v, cons h p', d, hd =>
@@ -814,12 +1053,16 @@ theorem dart_fst_mem_support_of_mem_darts :
· exact Or.inl rfl
· exact Or.inr (dart_fst_mem_support_of_mem_darts _ hd)
#align simple_graph.walk.dart_fst_mem_support_of_mem_darts SimpleGraph.Walk.dart_fst_mem_support_of_mem_darts
+-/
+#print SimpleGraph.Walk.dart_snd_mem_support_of_mem_darts /-
theorem dart_snd_mem_support_of_mem_darts {u v : V} (p : G.Walk u v) {d : G.Dart}
(h : d ∈ p.darts) : d.snd ∈ p.support := by
simpa using p.reverse.dart_fst_mem_support_of_mem_darts (by simp [h] : d.symm ∈ p.reverse.darts)
#align simple_graph.walk.dart_snd_mem_support_of_mem_darts SimpleGraph.Walk.dart_snd_mem_support_of_mem_darts
+-/
+#print SimpleGraph.Walk.fst_mem_support_of_mem_edges /-
theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
t ∈ p.support := by
obtain ⟨d, hd, he⟩ := list.mem_map.mp he
@@ -828,13 +1071,17 @@ theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t,
· exact dart_fst_mem_support_of_mem_darts _ hd
· exact dart_snd_mem_support_of_mem_darts _ hd
#align simple_graph.walk.fst_mem_support_of_mem_edges SimpleGraph.Walk.fst_mem_support_of_mem_edges
+-/
+#print SimpleGraph.Walk.snd_mem_support_of_mem_edges /-
theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
u ∈ p.support := by
rw [Sym2.eq_swap] at he
exact p.fst_mem_support_of_mem_edges he
#align simple_graph.walk.snd_mem_support_of_mem_edges SimpleGraph.Walk.snd_mem_support_of_mem_edges
+-/
+#print SimpleGraph.Walk.darts_nodup_of_support_nodup /-
theorem darts_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.Nodup) :
p.darts.Nodup := by
induction p
@@ -842,7 +1089,9 @@ theorem darts_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.N
· simp only [darts_cons, support_cons, List.nodup_cons] at h⊢
refine' ⟨fun h' => h.1 (dart_fst_mem_support_of_mem_darts p_p h'), p_ih h.2⟩
#align simple_graph.walk.darts_nodup_of_support_nodup SimpleGraph.Walk.darts_nodup_of_support_nodup
+-/
+#print SimpleGraph.Walk.edges_nodup_of_support_nodup /-
theorem edges_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.Nodup) :
p.edges.Nodup := by
induction p
@@ -850,15 +1099,19 @@ theorem edges_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.N
· simp only [edges_cons, support_cons, List.nodup_cons] at h⊢
exact ⟨fun h' => h.1 (fst_mem_support_of_mem_edges p_p h'), p_ih h.2⟩
#align simple_graph.walk.edges_nodup_of_support_nodup SimpleGraph.Walk.edges_nodup_of_support_nodup
+-/
/-! ### Trails, paths, circuits, cycles -/
+#print SimpleGraph.Walk.IsTrail /-
/-- A *trail* is a walk with no repeating edges. -/
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
edges_nodup : p.edges.Nodup
#align simple_graph.walk.is_trail SimpleGraph.Walk.IsTrail
+-/
+#print SimpleGraph.Walk.IsPath /-
/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
@@ -867,7 +1120,9 @@ structure IsPath {u v : V} (p : G.Walk u v) extends
Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
+-/
+#print SimpleGraph.Walk.IsCircuit /-
/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
structure IsCircuit {u : V} (p : G.Walk u u) extends
@@ -875,7 +1130,9 @@ structure IsCircuit {u : V} (p : G.Walk u u) extends
Prop where
ne_nil : p ≠ nil
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
+-/
+#print SimpleGraph.Walk.IsCycle /-
/- ./././Mathport/Syntax/Translate/Command.lean:417:11: unsupported: advanced extends in structure -/
/-- A *cycle* at `u : V` is a circuit at `u` whose only repeating vertex
is `u` (which appears exactly twice). -/
@@ -884,37 +1141,51 @@ structure IsCycle {u : V} (p : G.Walk u u) extends
Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
+-/
+#print SimpleGraph.Walk.isTrail_def /-
theorem isTrail_def {u v : V} (p : G.Walk u v) : p.IsTrail ↔ p.edges.Nodup :=
⟨IsTrail.edges_nodup, fun h => ⟨h⟩⟩
#align simple_graph.walk.is_trail_def SimpleGraph.Walk.isTrail_def
+-/
+#print SimpleGraph.Walk.isTrail_copy /-
@[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 := by
subst_vars
rfl
#align simple_graph.walk.is_trail_copy SimpleGraph.Walk.isTrail_copy
+-/
+#print SimpleGraph.Walk.IsPath.mk' /-
theorem IsPath.mk' {u v : V} {p : G.Walk u v} (h : p.support.Nodup) : IsPath p :=
⟨⟨edges_nodup_of_support_nodup h⟩, h⟩
#align simple_graph.walk.is_path.mk' SimpleGraph.Walk.IsPath.mk'
+-/
+#print SimpleGraph.Walk.isPath_def /-
theorem isPath_def {u v : V} (p : G.Walk u v) : p.IsPath ↔ p.support.Nodup :=
⟨IsPath.support_nodup, IsPath.mk'⟩
#align simple_graph.walk.is_path_def SimpleGraph.Walk.isPath_def
+-/
+#print SimpleGraph.Walk.isPath_copy /-
@[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 := by
subst_vars
rfl
#align simple_graph.walk.is_path_copy SimpleGraph.Walk.isPath_copy
+-/
+#print SimpleGraph.Walk.isCircuit_def /-
theorem isCircuit_def {u : V} (p : G.Walk u u) : p.IsCircuit ↔ IsTrail p ∧ p ≠ nil :=
Iff.intro (fun h => ⟨h.1, h.2⟩) fun h => ⟨h.1, h.2⟩
#align simple_graph.walk.is_circuit_def SimpleGraph.Walk.isCircuit_def
+-/
+#print SimpleGraph.Walk.isCircuit_copy /-
@[simp]
theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
(p.copy hu hu).IsCircuit ↔ p.IsCircuit :=
@@ -922,37 +1193,51 @@ theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
subst_vars
rfl
#align simple_graph.walk.is_circuit_copy SimpleGraph.Walk.isCircuit_copy
+-/
+#print SimpleGraph.Walk.isCycle_def /-
theorem isCycle_def {u : V} (p : G.Walk u u) :
p.IsCycle ↔ IsTrail p ∧ p ≠ nil ∧ p.support.tail.Nodup :=
Iff.intro (fun h => ⟨h.1.1, h.1.2, h.2⟩) fun h => ⟨⟨h.1, h.2.1⟩, h.2.2⟩
#align simple_graph.walk.is_cycle_def SimpleGraph.Walk.isCycle_def
+-/
+#print SimpleGraph.Walk.isCycle_copy /-
@[simp]
theorem isCycle_copy {u u'} (p : G.Walk u u) (hu : u = u') : (p.copy hu hu).IsCycle ↔ p.IsCycle :=
by
subst_vars
rfl
#align simple_graph.walk.is_cycle_copy SimpleGraph.Walk.isCycle_copy
+-/
+#print SimpleGraph.Walk.IsTrail.nil /-
@[simp]
theorem IsTrail.nil {u : V} : (nil : G.Walk u u).IsTrail :=
⟨by simp [edges]⟩
#align simple_graph.walk.is_trail.nil SimpleGraph.Walk.IsTrail.nil
+-/
+#print SimpleGraph.Walk.IsTrail.of_cons /-
theorem IsTrail.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
(cons h p).IsTrail → p.IsTrail := by simp [is_trail_def]
#align simple_graph.walk.is_trail.of_cons SimpleGraph.Walk.IsTrail.of_cons
+-/
+#print SimpleGraph.Walk.cons_isTrail_iff /-
@[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 ∧ ⟦(u, v)⟧ ∉ p.edges := by simp [is_trail_def, and_comm']
#align simple_graph.walk.cons_is_trail_iff SimpleGraph.Walk.cons_isTrail_iff
+-/
+#print SimpleGraph.Walk.IsTrail.reverse /-
theorem IsTrail.reverse {u v : V} (p : G.Walk u v) (h : p.IsTrail) : p.reverse.IsTrail := by
simpa [is_trail_def] using h
#align simple_graph.walk.is_trail.reverse SimpleGraph.Walk.IsTrail.reverse
+-/
+#print SimpleGraph.Walk.reverse_isTrail_iff /-
@[simp]
theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p.IsTrail := by
constructor <;>
@@ -960,65 +1245,89 @@ theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p
convert h.reverse _
try rw [reverse_reverse]
#align simple_graph.walk.reverse_is_trail_iff SimpleGraph.Walk.reverse_isTrail_iff
+-/
+#print SimpleGraph.Walk.IsTrail.of_append_left /-
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 :=
by
rw [is_trail_def, edges_append, List.nodup_append] at h
exact ⟨h.1⟩
#align simple_graph.walk.is_trail.of_append_left SimpleGraph.Walk.IsTrail.of_append_left
+-/
+#print SimpleGraph.Walk.IsTrail.of_append_right /-
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 :=
by
rw [is_trail_def, edges_append, List.nodup_append] at h
exact ⟨h.2.1⟩
#align simple_graph.walk.is_trail.of_append_right SimpleGraph.Walk.IsTrail.of_append_right
+-/
+#print SimpleGraph.Walk.IsTrail.count_edges_le_one /-
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 :=
List.nodup_iff_count_le_one.mp h.edges_nodup e
#align simple_graph.walk.is_trail.count_edges_le_one SimpleGraph.Walk.IsTrail.count_edges_le_one
+-/
+#print SimpleGraph.Walk.IsTrail.count_edges_eq_one /-
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 :=
List.count_eq_one_of_mem h.edges_nodup he
#align simple_graph.walk.is_trail.count_edges_eq_one SimpleGraph.Walk.IsTrail.count_edges_eq_one
+-/
+#print SimpleGraph.Walk.IsPath.nil /-
theorem IsPath.nil {u : V} : (nil : G.Walk u u).IsPath := by fconstructor <;> simp
#align simple_graph.walk.is_path.nil SimpleGraph.Walk.IsPath.nil
+-/
+#print SimpleGraph.Walk.IsPath.of_cons /-
theorem IsPath.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
(cons h p).IsPath → p.IsPath := by simp [is_path_def]
#align simple_graph.walk.is_path.of_cons SimpleGraph.Walk.IsPath.of_cons
+-/
+#print SimpleGraph.Walk.cons_isPath_iff /-
@[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 := by
constructor <;> simp (config := { contextual := true }) [is_path_def]
#align simple_graph.walk.cons_is_path_iff SimpleGraph.Walk.cons_isPath_iff
+-/
+#print SimpleGraph.Walk.isPath_iff_eq_nil /-
@[simp]
theorem isPath_iff_eq_nil {u : V} (p : G.Walk u u) : p.IsPath ↔ p = nil := by
cases p <;> simp [is_path.nil]
#align simple_graph.walk.is_path_iff_eq_nil SimpleGraph.Walk.isPath_iff_eq_nil
+-/
+#print SimpleGraph.Walk.IsPath.reverse /-
theorem IsPath.reverse {u v : V} {p : G.Walk u v} (h : p.IsPath) : p.reverse.IsPath := by
simpa [is_path_def] using h
#align simple_graph.walk.is_path.reverse SimpleGraph.Walk.IsPath.reverse
+-/
+#print SimpleGraph.Walk.isPath_reverse_iff /-
@[simp]
theorem isPath_reverse_iff {u v : V} (p : G.Walk u v) : p.reverse.IsPath ↔ p.IsPath := by
constructor <;> intro h <;> convert h.reverse <;> simp
#align simple_graph.walk.is_path_reverse_iff SimpleGraph.Walk.isPath_reverse_iff
+-/
+#print SimpleGraph.Walk.IsPath.of_append_left /-
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 :=
by
simp only [is_path_def, support_append]
exact List.Nodup.of_append_left
#align simple_graph.walk.is_path.of_append_left SimpleGraph.Walk.IsPath.of_append_left
+-/
+#print SimpleGraph.Walk.IsPath.of_append_right /-
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 :=
by
@@ -1026,11 +1335,15 @@ theorem IsPath.of_append_right {u v w : V} {p : G.Walk u v} {q : G.Walk v w}
rw [reverse_append] at h
apply h.of_append_left
#align simple_graph.walk.is_path.of_append_right SimpleGraph.Walk.IsPath.of_append_right
+-/
+#print SimpleGraph.Walk.IsCycle.not_of_nil /-
@[simp]
theorem IsCycle.not_of_nil {u : V} : ¬(nil : G.Walk u u).IsCycle := fun h => h.ne_nil rfl
#align simple_graph.walk.is_cycle.not_of_nil SimpleGraph.Walk.IsCycle.not_of_nil
+-/
+#print SimpleGraph.Walk.cons_isCycle_iff /-
theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
(Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬⟦(u, v)⟧ ∈ p.edges :=
by
@@ -1039,6 +1352,7 @@ theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
have : p.support.nodup → p.edges.nodup := edges_nodup_of_support_nodup
tauto
#align simple_graph.walk.cons_is_cycle_iff SimpleGraph.Walk.cons_isCycle_iff
+-/
/-! ### About paths -/
@@ -1048,12 +1362,14 @@ instance [DecidableEq V] {u v : V} (p : G.Walk u v) : Decidable p.IsPath :=
rw [is_path_def]
infer_instance
+#print SimpleGraph.Walk.IsPath.length_lt /-
theorem IsPath.length_lt [Fintype V] {u v : V} {p : G.Walk u v} (hp : p.IsPath) :
p.length < Fintype.card V :=
by
rw [Nat.lt_iff_add_one_le, ← length_support]
exact hp.support_nodup.length_le_card
#align simple_graph.walk.is_path.length_lt SimpleGraph.Walk.IsPath.length_lt
+-/
/-! ### Walk decompositions -/
@@ -1062,6 +1378,7 @@ section WalkDecomp
variable [DecidableEq V]
+#print SimpleGraph.Walk.takeUntil /-
/-- Given a vertex in the support of a path, give the path up until (and including) that vertex. -/
def takeUntil : ∀ {v w : V} (p : G.Walk v w) (u : V) (h : u ∈ p.support), G.Walk v u
| v, w, nil, u, h => by rw [mem_support_nil_iff.mp h]
@@ -1069,7 +1386,9 @@ def takeUntil : ∀ {v w : V} (p : G.Walk v w) (u : V) (h : u ∈ p.support), G.
if hx : v = u then by subst u
else cons r (take_until p _ <| h.casesOn (fun h' => (hx h'.symm).elim) id)
#align simple_graph.walk.take_until SimpleGraph.Walk.takeUntil
+-/
+#print SimpleGraph.Walk.dropUntil /-
/-- Given a vertex in the support of a path, give the path from (and including) that vertex to
the end. In other words, drop vertices from the front of a path until (and not including)
that vertex. -/
@@ -1081,7 +1400,9 @@ def dropUntil : ∀ {v w : V} (p : G.Walk v w) (u : V) (h : u ∈ p.support), G.
exact cons r p
else drop_until p _ <| h.casesOn (fun h' => (hx h'.symm).elim) id
#align simple_graph.walk.drop_until SimpleGraph.Walk.dropUntil
+-/
+#print SimpleGraph.Walk.take_spec /-
/-- The `take_until` and `drop_until` functions split a walk into two pieces.
The lemma `count_support_take_until_eq_one` specifies where this split occurs. -/
@[simp]
@@ -1097,7 +1418,9 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
· simp! only
split_ifs with h' <;> subst_vars <;> simp [*]
#align simple_graph.walk.take_spec SimpleGraph.Walk.take_spec
+-/
+#print SimpleGraph.Walk.mem_support_iff_exists_append /-
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
{p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w)(r : G.Walk w v), p = q.append r := by
classical
@@ -1106,7 +1429,9 @@ theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w :
· rintro ⟨q, r, rfl⟩
simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
#align simple_graph.walk.mem_support_iff_exists_append SimpleGraph.Walk.mem_support_iff_exists_append
+-/
+#print SimpleGraph.Walk.count_support_takeUntil_eq_one /-
@[simp]
theorem count_support_takeUntil_eq_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).support.count u = 1 :=
@@ -1120,7 +1445,9 @@ theorem count_support_takeUntil_eq_one {u v w : V} (p : G.Walk v w) (h : u ∈ p
· simp! only
split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
#align simple_graph.walk.count_support_take_until_eq_one SimpleGraph.Walk.count_support_takeUntil_eq_one
+-/
+#print SimpleGraph.Walk.count_edges_takeUntil_le_one /-
theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) (x : V) :
(p.takeUntil u h).edges.count ⟦(u, x)⟧ ≤ 1 :=
by
@@ -1142,7 +1469,9 @@ theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.s
· cases p' <;> simp!
· apply ih
#align simple_graph.walk.count_edges_take_until_le_one SimpleGraph.Walk.count_edges_takeUntil_le_one
+-/
+#print SimpleGraph.Walk.takeUntil_copy /-
@[simp]
theorem takeUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
(h : u ∈ (p.copy hv hw).support) :
@@ -1156,7 +1485,9 @@ theorem takeUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w'
subst_vars
rfl
#align simple_graph.walk.take_until_copy SimpleGraph.Walk.takeUntil_copy
+-/
+#print SimpleGraph.Walk.dropUntil_copy /-
@[simp]
theorem dropUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
(h : u ∈ (p.copy hv hw).support) :
@@ -1170,45 +1501,59 @@ theorem dropUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w'
subst_vars
rfl
#align simple_graph.walk.drop_until_copy SimpleGraph.Walk.dropUntil_copy
+-/
+#print SimpleGraph.Walk.support_takeUntil_subset /-
theorem support_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).support ⊆ p.support := fun x hx =>
by
rw [← take_spec p h, mem_support_append_iff]
exact Or.inl hx
#align simple_graph.walk.support_take_until_subset SimpleGraph.Walk.support_takeUntil_subset
+-/
+#print SimpleGraph.Walk.support_dropUntil_subset /-
theorem support_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).support ⊆ p.support := fun x hx =>
by
rw [← take_spec p h, mem_support_append_iff]
exact Or.inr hx
#align simple_graph.walk.support_drop_until_subset SimpleGraph.Walk.support_dropUntil_subset
+-/
+#print SimpleGraph.Walk.darts_takeUntil_subset /-
theorem darts_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).darts ⊆ p.darts := fun x hx =>
by
rw [← take_spec p h, darts_append, List.mem_append]
exact Or.inl hx
#align simple_graph.walk.darts_take_until_subset SimpleGraph.Walk.darts_takeUntil_subset
+-/
+#print SimpleGraph.Walk.darts_dropUntil_subset /-
theorem darts_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).darts ⊆ p.darts := fun x hx =>
by
rw [← take_spec p h, darts_append, List.mem_append]
exact Or.inr hx
#align simple_graph.walk.darts_drop_until_subset SimpleGraph.Walk.darts_dropUntil_subset
+-/
+#print SimpleGraph.Walk.edges_takeUntil_subset /-
theorem edges_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).edges ⊆ p.edges :=
List.map_subset _ (p.darts_takeUntil_subset h)
#align simple_graph.walk.edges_take_until_subset SimpleGraph.Walk.edges_takeUntil_subset
+-/
+#print SimpleGraph.Walk.edges_dropUntil_subset /-
theorem edges_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).edges ⊆ p.edges :=
List.map_subset _ (p.darts_dropUntil_subset h)
#align simple_graph.walk.edges_drop_until_subset SimpleGraph.Walk.edges_dropUntil_subset
+-/
+#print SimpleGraph.Walk.length_takeUntil_le /-
theorem length_takeUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.takeUntil u h).length ≤ p.length :=
by
@@ -1216,7 +1561,9 @@ theorem length_takeUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
rw [length_append] at this
exact Nat.le.intro this
#align simple_graph.walk.length_take_until_le SimpleGraph.Walk.length_takeUntil_le
+-/
+#print SimpleGraph.Walk.length_dropUntil_le /-
theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
(p.dropUntil u h).length ≤ p.length :=
by
@@ -1224,32 +1571,44 @@ theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
rw [length_append, add_comm] at this
exact Nat.le.intro this
#align simple_graph.walk.length_drop_until_le SimpleGraph.Walk.length_dropUntil_le
+-/
+#print SimpleGraph.Walk.IsTrail.takeUntil /-
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 :=
IsTrail.of_append_left (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_trail.take_until SimpleGraph.Walk.IsTrail.takeUntil
+-/
+#print SimpleGraph.Walk.IsTrail.dropUntil /-
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 :=
IsTrail.of_append_right (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_trail.drop_until SimpleGraph.Walk.IsTrail.dropUntil
+-/
+#print SimpleGraph.Walk.IsPath.takeUntil /-
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 :=
IsPath.of_append_left (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_path.take_until SimpleGraph.Walk.IsPath.takeUntil
+-/
+#print SimpleGraph.Walk.IsPath.dropUntil /-
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 :=
IsPath.of_append_right (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_path.drop_until SimpleGraph.Walk.IsPath.dropUntil
+-/
+#print SimpleGraph.Walk.rotate /-
/-- Rotate a loop walk such that it is centered at the given vertex. -/
def rotate {u v : V} (c : G.Walk v v) (h : u ∈ c.support) : G.Walk u u :=
(c.dropUntil u h).append (c.takeUntil u h)
#align simple_graph.walk.rotate SimpleGraph.Walk.rotate
+-/
+#print SimpleGraph.Walk.support_rotate /-
@[simp]
theorem support_rotate {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
(c.rotate h).support.tail ~r c.support.tail :=
@@ -1258,7 +1617,9 @@ theorem support_rotate {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
apply List.IsRotated.trans List.isRotated_append
rw [← tail_support_append, take_spec]
#align simple_graph.walk.support_rotate SimpleGraph.Walk.support_rotate
+-/
+#print SimpleGraph.Walk.rotate_darts /-
theorem rotate_darts {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
(c.rotate h).darts ~r c.darts :=
by
@@ -1266,19 +1627,25 @@ theorem rotate_darts {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
apply List.IsRotated.trans List.isRotated_append
rw [← darts_append, take_spec]
#align simple_graph.walk.rotate_darts SimpleGraph.Walk.rotate_darts
+-/
+#print SimpleGraph.Walk.rotate_edges /-
theorem rotate_edges {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
(c.rotate h).edges ~r c.edges :=
(rotate_darts c h).map _
#align simple_graph.walk.rotate_edges SimpleGraph.Walk.rotate_edges
+-/
+#print SimpleGraph.Walk.IsTrail.rotate /-
protected theorem IsTrail.rotate {u v : V} {c : G.Walk v v} (hc : c.IsTrail) (h : u ∈ c.support) :
(c.rotate h).IsTrail :=
by
rw [is_trail_def, (c.rotate_edges h).Perm.nodup_iff]
exact hc.edges_nodup
#align simple_graph.walk.is_trail.rotate SimpleGraph.Walk.IsTrail.rotate
+-/
+#print SimpleGraph.Walk.IsCircuit.rotate /-
protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
(h : u ∈ c.support) : (c.rotate h).IsCircuit :=
by
@@ -1290,16 +1657,20 @@ protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
rw [rotate, length_append, add_comm, ← length_append, take_spec] at hn'
simpa using hn'
#align simple_graph.walk.is_circuit.rotate SimpleGraph.Walk.IsCircuit.rotate
+-/
+#print SimpleGraph.Walk.IsCycle.rotate /-
protected theorem IsCycle.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCycle) (h : u ∈ c.support) :
(c.rotate h).IsCycle := by
refine' ⟨hc.to_circuit.rotate _, _⟩
rw [List.IsRotated.nodup_iff (support_rotate _ _)]
exact hc.support_nodup
#align simple_graph.walk.is_cycle.rotate SimpleGraph.Walk.IsCycle.rotate
+-/
end WalkDecomp
+#print SimpleGraph.Walk.exists_boundary_dart /-
/-- Given a set `S` and a walk `w` from `u` to `v` such that `u ∈ S` but `v ∉ S`,
there exists a dart in the walk whose start is in `S` but whose end is not.
-/
@@ -1313,83 +1684,110 @@ theorem exists_boundary_dart {u v : V} (p : G.Walk u v) (S : Set V) (uS : u ∈
exact ⟨d, Or.inr hd, hcd⟩
· exact ⟨⟨(x, y), a⟩, Or.inl rfl, uS, h⟩
#align simple_graph.walk.exists_boundary_dart SimpleGraph.Walk.exists_boundary_dart
+-/
end Walk
/-! ### Type of paths -/
+#print SimpleGraph.Path /-
/-- The type for paths between two vertices. -/
abbrev Path (u v : V) :=
{ p : G.Walk u v // p.IsPath }
#align simple_graph.path SimpleGraph.Path
+-/
namespace Path
variable {G G'}
+#print SimpleGraph.Path.isPath /-
@[simp]
protected theorem isPath {u v : V} (p : G.Path u v) : (p : G.Walk u v).IsPath :=
p.property
#align simple_graph.path.is_path SimpleGraph.Path.isPath
+-/
+#print SimpleGraph.Path.isTrail /-
@[simp]
protected theorem isTrail {u v : V} (p : G.Path u v) : (p : G.Walk u v).IsTrail :=
- p.property.to_trail
+ p.property.isTrail
#align simple_graph.path.is_trail SimpleGraph.Path.isTrail
+-/
+#print SimpleGraph.Path.nil /-
/-- The length-0 path at a vertex. -/
@[refl, simps]
protected def nil {u : V} : G.Path u u :=
⟨Walk.nil, Walk.IsPath.nil⟩
#align simple_graph.path.nil SimpleGraph.Path.nil
+-/
+#print SimpleGraph.Path.singleton /-
/-- 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 :=
⟨Walk.cons h Walk.nil, by simp [h.ne]⟩
#align simple_graph.path.singleton SimpleGraph.Path.singleton
+-/
+#print SimpleGraph.Path.mk'_mem_edges_singleton /-
theorem mk'_mem_edges_singleton {u v : V} (h : G.Adj u v) :
⟦(u, v)⟧ ∈ (singleton h : G.Walk u v).edges := by simp [singleton]
#align simple_graph.path.mk_mem_edges_singleton SimpleGraph.Path.mk'_mem_edges_singleton
+-/
+#print SimpleGraph.Path.reverse /-
/-- The reverse of a path is another path. See also `simple_graph.walk.reverse`. -/
@[symm, simps]
def reverse {u v : V} (p : G.Path u v) : G.Path v u :=
⟨Walk.reverse p, p.property.reverse⟩
#align simple_graph.path.reverse SimpleGraph.Path.reverse
+-/
+#print SimpleGraph.Path.count_support_eq_one /-
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 :=
List.count_eq_one_of_mem p.property.support_nodup hw
#align simple_graph.path.count_support_eq_one SimpleGraph.Path.count_support_eq_one
+-/
+#print SimpleGraph.Path.count_edges_eq_one /-
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 :=
- List.count_eq_one_of_mem p.property.to_trail.edges_nodup hw
+ List.count_eq_one_of_mem p.property.isTrail.edges_nodup hw
#align simple_graph.path.count_edges_eq_one SimpleGraph.Path.count_edges_eq_one
+-/
+#print SimpleGraph.Path.nodup_support /-
@[simp]
theorem nodup_support {u v : V} (p : G.Path u v) : (p : G.Walk u v).support.Nodup :=
(Walk.isPath_def _).mp p.property
#align simple_graph.path.nodup_support SimpleGraph.Path.nodup_support
+-/
+#print SimpleGraph.Path.loop_eq /-
theorem loop_eq {v : V} (p : G.Path v v) : p = Path.nil :=
by
obtain ⟨_ | _, this⟩ := p
· rfl
· simpa
#align simple_graph.path.loop_eq SimpleGraph.Path.loop_eq
+-/
+#print SimpleGraph.Path.not_mem_edges_of_loop /-
theorem not_mem_edges_of_loop {v : V} {e : Sym2 V} {p : G.Path v v} : ¬e ∈ (p : G.Walk v v).edges :=
by simp [p.loop_eq]
#align simple_graph.path.not_mem_edges_of_loop SimpleGraph.Path.not_mem_edges_of_loop
+-/
+#print SimpleGraph.Path.cons_isCycle /-
theorem cons_isCycle {u v : V} (p : G.Path v u) (h : G.Adj u v)
(he : ¬⟦(u, v)⟧ ∈ (p : G.Walk v u).edges) : (Walk.cons h ↑p).IsCycle := by
simp [walk.is_cycle_def, walk.cons_is_trail_iff, he]
#align simple_graph.path.cons_is_cycle SimpleGraph.Path.cons_isCycle
+-/
end Path
@@ -1400,6 +1798,7 @@ namespace Walk
variable {G} [DecidableEq V]
+#print SimpleGraph.Walk.bypass /-
/-- Given a walk, produces a walk from it by bypassing subwalks between repeated vertices.
The result is a path, as shown in `simple_graph.walk.bypass_is_path`.
This is packaged up in `simple_graph.walk.to_path`. -/
@@ -1409,7 +1808,9 @@ def bypass : ∀ {u v : V}, G.Walk u v → G.Walk u v
let p' := p.bypass
if hs : u ∈ p'.support then p'.dropUntil u hs else cons ha p'
#align simple_graph.walk.bypass SimpleGraph.Walk.bypass
+-/
+#print SimpleGraph.Walk.bypass_copy /-
@[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 :=
@@ -1417,7 +1818,9 @@ theorem bypass_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
subst_vars
rfl
#align simple_graph.walk.bypass_copy SimpleGraph.Walk.bypass_copy
+-/
+#print SimpleGraph.Walk.bypass_isPath /-
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath :=
by
induction p
@@ -1428,7 +1831,9 @@ theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath :=
assumption
· simp [*, cons_is_path_iff]
#align simple_graph.walk.bypass_is_path SimpleGraph.Walk.bypass_isPath
+-/
+#print SimpleGraph.Walk.length_bypass_le /-
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length :=
by
induction p
@@ -1442,12 +1847,16 @@ theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.leng
· rw [length_cons, length_cons]
exact add_le_add_right p_ih 1
#align simple_graph.walk.length_bypass_le SimpleGraph.Walk.length_bypass_le
+-/
+#print SimpleGraph.Walk.toPath /-
/-- Given a walk, produces a path with the same endpoints using `simple_graph.walk.bypass`. -/
def toPath {u v : V} (p : G.Walk u v) : G.Path u v :=
⟨p.bypass, p.bypass_isPath⟩
#align simple_graph.walk.to_path SimpleGraph.Walk.toPath
+-/
+#print SimpleGraph.Walk.support_bypass_subset /-
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support :=
by
induction p
@@ -1461,12 +1870,16 @@ theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆
apply List.cons_subset_cons
assumption
#align simple_graph.walk.support_bypass_subset SimpleGraph.Walk.support_bypass_subset
+-/
+#print SimpleGraph.Walk.support_toPath_subset /-
theorem support_toPath_subset {u v : V} (p : G.Walk u v) :
(p.toPath : G.Walk u v).support ⊆ p.support :=
support_bypass_subset _
#align simple_graph.walk.support_to_path_subset SimpleGraph.Walk.support_toPath_subset
+-/
+#print SimpleGraph.Walk.darts_bypass_subset /-
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts :=
by
induction p
@@ -1478,18 +1891,25 @@ theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.da
· rw [darts_cons]
exact List.cons_subset_cons _ p_ih
#align simple_graph.walk.darts_bypass_subset SimpleGraph.Walk.darts_bypass_subset
+-/
+#print SimpleGraph.Walk.edges_bypass_subset /-
theorem edges_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.edges ⊆ p.edges :=
List.map_subset _ p.darts_bypass_subset
#align simple_graph.walk.edges_bypass_subset SimpleGraph.Walk.edges_bypass_subset
+-/
+#print SimpleGraph.Walk.darts_toPath_subset /-
theorem darts_toPath_subset {u v : V} (p : G.Walk u v) : (p.toPath : G.Walk u v).darts ⊆ p.darts :=
darts_bypass_subset _
#align simple_graph.walk.darts_to_path_subset SimpleGraph.Walk.darts_toPath_subset
+-/
+#print SimpleGraph.Walk.edges_toPath_subset /-
theorem edges_toPath_subset {u v : V} (p : G.Walk u v) : (p.toPath : G.Walk u v).edges ⊆ p.edges :=
edges_bypass_subset _
#align simple_graph.walk.edges_to_path_subset SimpleGraph.Walk.edges_toPath_subset
+-/
end Walk
@@ -1500,24 +1920,31 @@ namespace Walk
variable {G G' G''}
+#print SimpleGraph.Walk.map /-
/-- Given a graph homomorphism, map walks to walks. -/
protected def map (f : G →g G') : ∀ {u v : V}, G.Walk u v → G'.Walk (f u) (f v)
| _, _, nil => nil
| _, _, cons h p => cons (f.map_adj h) (map p)
#align simple_graph.walk.map SimpleGraph.Walk.map
+-/
variable (f : G →g G') (f' : G' →g G'') {u v u' v' : V} (p : G.Walk u v)
+#print SimpleGraph.Walk.map_nil /-
@[simp]
theorem map_nil : (nil : G.Walk u u).map f = nil :=
rfl
#align simple_graph.walk.map_nil SimpleGraph.Walk.map_nil
+-/
+#print SimpleGraph.Walk.map_cons /-
@[simp]
theorem map_cons {w : V} (h : G.Adj w u) : (cons h p).map f = cons (f.map_adj h) (p.map f) :=
rfl
#align simple_graph.walk.map_cons SimpleGraph.Walk.map_cons
+-/
+#print SimpleGraph.Walk.map_copy /-
@[simp]
theorem map_copy (hu : u = u') (hv : v = v') :
(p.copy hu hv).map f = (p.map f).copy (by rw [hu]) (by rw [hv]) :=
@@ -1525,15 +1952,25 @@ theorem map_copy (hu : u = u') (hv : v = v') :
subst_vars
rfl
#align simple_graph.walk.map_copy SimpleGraph.Walk.map_copy
+-/
+/- warning: simple_graph.walk.map_id -> SimpleGraph.Walk.map_id is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) u) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, (SimpleGraph.Walk.{u1} V G u v) -> (forall (p : SimpleGraph.Walk.{u1} V G u v), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) u) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V G G) V (fun (a : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) a) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V G G) V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.id.{u1} V G) v)) (SimpleGraph.Walk.map.{u1, u1} V V G G (SimpleGraph.Hom.id.{u1} V G) u v p) p)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_id SimpleGraph.Walk.map_idₓ'. -/
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by induction p <;> simp [*]
#align simple_graph.walk.map_id SimpleGraph.Walk.map_id
+#print SimpleGraph.Walk.map_map /-
@[simp]
theorem map_map : (p.map f).map f' = p.map (f'.comp f) := by induction p <;> simp [*]
#align simple_graph.walk.map_map SimpleGraph.Walk.map_map
+-/
+#print SimpleGraph.Walk.map_eq_of_eq /-
/-- Unlike categories, for graphs vertex equality is an important notion, so needing to be able to
to work with equality of graph homomorphisms is a necessary evil. -/
theorem map_eq_of_eq {f : G →g G'} (f' : G →g G') (h : f = f') :
@@ -1542,37 +1979,53 @@ theorem map_eq_of_eq {f : G →g G'} (f' : G →g G') (h : f = f') :
subst_vars
rfl
#align simple_graph.walk.map_eq_of_eq SimpleGraph.Walk.map_eq_of_eq
+-/
+#print SimpleGraph.Walk.map_eq_nil_iff /-
@[simp]
theorem map_eq_nil_iff {p : G.Walk u u} : p.map f = nil ↔ p = nil := by cases p <;> simp
#align simple_graph.walk.map_eq_nil_iff SimpleGraph.Walk.map_eq_nil_iff
+-/
+#print SimpleGraph.Walk.length_map /-
@[simp]
theorem length_map : (p.map f).length = p.length := by induction p <;> simp [*]
#align simple_graph.walk.length_map SimpleGraph.Walk.length_map
+-/
+#print SimpleGraph.Walk.map_append /-
theorem map_append {u v w : V} (p : G.Walk u v) (q : G.Walk v w) :
(p.append q).map f = (p.map f).append (q.map f) := by induction p <;> simp [*]
#align simple_graph.walk.map_append SimpleGraph.Walk.map_append
+-/
+#print SimpleGraph.Walk.reverse_map /-
@[simp]
theorem reverse_map : (p.map f).reverse = p.reverse.map f := by induction p <;> simp [map_append, *]
#align simple_graph.walk.reverse_map SimpleGraph.Walk.reverse_map
+-/
+#print SimpleGraph.Walk.support_map /-
@[simp]
theorem support_map : (p.map f).support = p.support.map f := by induction p <;> simp [*]
#align simple_graph.walk.support_map SimpleGraph.Walk.support_map
+-/
+#print SimpleGraph.Walk.darts_map /-
@[simp]
theorem darts_map : (p.map f).darts = p.darts.map f.mapDart := by induction p <;> simp [*]
#align simple_graph.walk.darts_map SimpleGraph.Walk.darts_map
+-/
+#print SimpleGraph.Walk.edges_map /-
@[simp]
theorem edges_map : (p.map f).edges = p.edges.map (Sym2.map f) := by induction p <;> simp [*]
#align simple_graph.walk.edges_map SimpleGraph.Walk.edges_map
+-/
variable {p f}
+#print SimpleGraph.Walk.map_isPath_of_injective /-
theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) : (p.map f).IsPath :=
by
induction' p with w u v w huv hvw ih
@@ -1583,7 +2036,9 @@ theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
cases hinj hf
exact hp.2 hx
#align simple_graph.walk.map_is_path_of_injective SimpleGraph.Walk.map_isPath_of_injective
+-/
+#print SimpleGraph.Walk.IsPath.of_map /-
protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPath :=
by
induction' p with w u v w huv hvw ih
@@ -1595,11 +2050,15 @@ protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPa
contrapose! hp2
exact List.mem_map_of_mem f hp2
#align simple_graph.walk.is_path.of_map SimpleGraph.Walk.IsPath.of_map
+-/
+#print SimpleGraph.Walk.map_isPath_iff_of_injective /-
theorem map_isPath_iff_of_injective (hinj : Function.Injective f) : (p.map f).IsPath ↔ p.IsPath :=
⟨IsPath.of_map, map_isPath_of_injective hinj⟩
#align simple_graph.walk.map_is_path_iff_of_injective SimpleGraph.Walk.map_isPath_iff_of_injective
+-/
+#print SimpleGraph.Walk.map_isTrail_iff_of_injective /-
theorem map_isTrail_iff_of_injective (hinj : Function.Injective f) :
(p.map f).IsTrail ↔ p.IsTrail :=
by
@@ -1610,21 +2069,25 @@ theorem map_isTrail_iff_of_injective (hinj : Function.Injective f) :
rw [List.mem_map_of_injective (Sym2.map.injective hinj)]
exact and_congr_left' ih
#align simple_graph.walk.map_is_trail_iff_of_injective SimpleGraph.Walk.map_isTrail_iff_of_injective
+-/
alias map_is_trail_iff_of_injective ↔ _ map_is_trail_of_injective
#align simple_graph.walk.map_is_trail_of_injective SimpleGraph.Walk.map_isTrail_of_injective
+#print SimpleGraph.Walk.map_isCycle_iff_of_injective /-
theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective f) :
(p.map f).IsCycle ↔ p.IsCycle := by
rw [is_cycle_def, is_cycle_def, map_is_trail_iff_of_injective hinj, Ne.def, map_eq_nil_iff,
support_map, ← List.map_tail, List.nodup_map_iff hinj]
#align simple_graph.walk.map_is_cycle_iff_of_injective SimpleGraph.Walk.map_isCycle_iff_of_injective
+-/
alias map_is_cycle_iff_of_injective ↔ _ map_is_cycle_of_injective
#align simple_graph.walk.map_is_cycle_of_injective SimpleGraph.Walk.map_isCycle_of_injective
variable (p f)
+#print SimpleGraph.Walk.map_injective_of_injective /-
theorem map_injective_of_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
Function.Injective (Walk.map f : G.Walk u v → G'.Walk (f u) (f v)) :=
by
@@ -1641,38 +2104,47 @@ theorem map_injective_of_injective {f : G →g G'} (hinj : Function.Injective f)
apply ih
simpa using h.2
#align simple_graph.walk.map_injective_of_injective SimpleGraph.Walk.map_injective_of_injective
+-/
+#print SimpleGraph.Walk.mapLe /-
/-- The specialization of `simple_graph.walk.map` for mapping walks to supergraphs. -/
@[reducible]
def mapLe {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} (p : G.Walk u v) : G'.Walk u v :=
p.map (Hom.mapSpanningSubgraphs h)
#align simple_graph.walk.map_le SimpleGraph.Walk.mapLe
+-/
+#print SimpleGraph.Walk.mapLe_isTrail /-
@[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 :=
map_isTrail_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_trail SimpleGraph.Walk.mapLe_isTrail
+-/
alias map_le_is_trail ↔ is_trail.of_map_le is_trail.map_le
#align simple_graph.walk.is_trail.of_map_le SimpleGraph.Walk.IsTrail.of_mapLe
#align simple_graph.walk.is_trail.map_le SimpleGraph.Walk.IsTrail.mapLe
+#print SimpleGraph.Walk.mapLe_isPath /-
@[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 :=
map_isPath_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_path SimpleGraph.Walk.mapLe_isPath
+-/
alias map_le_is_path ↔ is_path.of_map_le is_path.map_le
#align simple_graph.walk.is_path.of_map_le SimpleGraph.Walk.IsPath.of_mapLe
#align simple_graph.walk.is_path.map_le SimpleGraph.Walk.IsPath.mapLe
+#print SimpleGraph.Walk.mapLe_isCycle /-
@[simp]
theorem mapLe_isCycle {G G' : SimpleGraph V} (h : G ≤ G') {u : V} {p : G.Walk u u} :
(p.mapLe h).IsCycle ↔ p.IsCycle :=
map_isCycle_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_cycle SimpleGraph.Walk.mapLe_isCycle
+-/
alias map_le_is_cycle ↔ is_cycle.of_map_le is_cycle.map_le
#align simple_graph.walk.is_cycle.of_map_le SimpleGraph.Walk.IsCycle.of_mapLe
@@ -1684,13 +2156,16 @@ namespace Path
variable {G G'}
+#print SimpleGraph.Path.map /-
/-- 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) :=
⟨Walk.map f p, Walk.map_isPath_of_injective hinj p.2⟩
#align simple_graph.path.map SimpleGraph.Path.map
+-/
+#print SimpleGraph.Path.map_injective /-
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)) :=
by
@@ -1698,13 +2173,26 @@ theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
simp only [path.map, Subtype.coe_mk] at h
simp [walk.map_injective_of_injective hinj u v h]
#align simple_graph.path.map_injective SimpleGraph.Path.map_injective
+-/
+/- warning: simple_graph.path.map_embedding -> SimpleGraph.Path.mapEmbedding is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Path.{u1} V G u v) -> (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) v))
+Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbeddingₓ'. -/
/-- 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) :=
Path.map f.toHom f.Injective p
#align simple_graph.path.map_embedding SimpleGraph.Path.mapEmbedding
+/- warning: simple_graph.path.map_embedding_injective -> SimpleGraph.Path.mapEmbedding_injective is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Embedding.{u1, u2} V V' G G') (fun (_x : RelEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelEmbedding.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Embedding.{u1, u2} V V' G G') (u : V) (v : V), Function.Injective.{succ u1, succ u2} (SimpleGraph.Path.{u1} V G u v) (SimpleGraph.Path.{u2} V' G' (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) u) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V (fun (_x : V) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : V) => V') _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u1, succ u2} (Function.Embedding.{succ u1, succ u2} V V') V V' (Function.instEmbeddingLikeEmbedding.{succ u1, succ u2} V V')) (RelEmbedding.toEmbedding.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G') f) v)) (SimpleGraph.Path.mapEmbedding.{u1, u2} V V' G G' f u v)
+Case conversion may be inaccurate. Consider using '#align simple_graph.path.map_embedding_injective SimpleGraph.Path.mapEmbedding_injectiveₓ'. -/
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)) :=
map_injective f.Injective u v
@@ -1719,6 +2207,12 @@ namespace Walk
variable {G}
+/- warning: simple_graph.walk.transfer -> SimpleGraph.Walk.transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) (H : SimpleGraph.{u1} V), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) -> (SimpleGraph.Walk.{u1} V H u v)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) (H : SimpleGraph.{u1} V), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) -> (SimpleGraph.Walk.{u1} V H u v)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer SimpleGraph.Walk.transferₓ'. -/
/-- The walk `p` transferred to lie in `H`, given that `H` contains its edges. -/
@[protected, simp]
def transfer :
@@ -1732,10 +2226,18 @@ def transfer :
variable {u v w : V} (p : G.Walk u v) (q : G.Walk v w) {H : SimpleGraph V}
(hp : ∀ e, e ∈ p.edges → e ∈ H.edgeSetEmbedding) (hq : ∀ e, e ∈ q.edges → e ∈ H.edgeSetEmbedding)
-theorem transfer_self : p.transfer G p.edges_subset_edgeSetEmbedding = p := by
+#print SimpleGraph.Walk.transfer_self /-
+theorem transfer_self : p.transfer G p.edges_subset_edgeSet = p := by
induction p <;> simp only [*, transfer, eq_self_iff_true, heq_iff_eq, and_self_iff]
#align simple_graph.walk.transfer_self SimpleGraph.Walk.transfer_self
+-/
+/- warning: simple_graph.walk.transfer_eq_map_of_le -> SimpleGraph.Walk.transfer_eq_map_of_le is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (GH : LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V) G H), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u v) (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) (SimpleGraph.Walk.map.{u1, u1} V V G H (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V G H GH) u v p)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (GH : LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instLESimpleGraph.{u1} V) G H), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u v) (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) (SimpleGraph.Walk.map.{u1, u1} V V G H (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V G H GH) u v p)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_eq_map_of_le SimpleGraph.Walk.transfer_eq_map_of_leₓ'. -/
theorem transfer_eq_map_of_le (GH : G ≤ H) :
p.transfer H hp = p.map (SimpleGraph.Hom.mapSpanningSubgraphs GH) := by
induction p <;>
@@ -1743,28 +2245,58 @@ theorem transfer_eq_map_of_le (GH : G ≤ H) :
heq_iff_eq, and_self_iff, map_nil]
#align simple_graph.walk.transfer_eq_map_of_le SimpleGraph.Walk.transfer_eq_map_of_le
+/- warning: simple_graph.walk.edges_transfer -> SimpleGraph.Walk.edges_transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.edges.{u1} V G u v p)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.edges.{u1} V G u v p)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transferₓ'. -/
@[simp]
theorem edges_transfer : (p.transfer H hp).edges = p.edges := by
induction p <;> simp only [*, transfer, edges_nil, edges_cons, eq_self_iff_true, and_self_iff]
#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transfer
+/- warning: simple_graph.walk.support_transfer -> SimpleGraph.Walk.support_transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (List.{u1} V) (SimpleGraph.Walk.support.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.support.{u1} V G u v p)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (List.{u1} V) (SimpleGraph.Walk.support.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.support.{u1} V G u v p)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transferₓ'. -/
@[simp]
theorem support_transfer : (p.transfer H hp).support = p.support := by
induction p <;> simp only [*, transfer, eq_self_iff_true, and_self_iff, support_nil, support_cons]
#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transfer
+/- warning: simple_graph.walk.length_transfer -> SimpleGraph.Walk.length_transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{1} Nat (SimpleGraph.Walk.length.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.length.{u1} V G u v p)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{1} Nat (SimpleGraph.Walk.length.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.length.{u1} V G u v p)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.length_transfer SimpleGraph.Walk.length_transferₓ'. -/
@[simp]
theorem length_transfer : (p.transfer H hp).length = p.length := by induction p <;> simp [*]
#align simple_graph.walk.length_transfer SimpleGraph.Walk.length_transfer
variable {p}
+/- warning: simple_graph.walk.is_path.transfer -> SimpleGraph.Walk.IsPath.transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {p : SimpleGraph.Walk.{u1} V G u v} {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), (SimpleGraph.Walk.IsPath.{u1} V G u v p) -> (SimpleGraph.Walk.IsPath.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {p : SimpleGraph.Walk.{u1} V G u v} {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), (SimpleGraph.Walk.IsPath.{u1} V G u v p) -> (SimpleGraph.Walk.IsPath.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transferₓ'. -/
protected theorem IsPath.transfer (pp : p.IsPath) : (p.transfer H hp).IsPath :=
by
induction p <;> simp only [transfer, is_path.nil, cons_is_path_iff, support_transfer] at pp⊢
· tauto
#align simple_graph.walk.is_path.transfer SimpleGraph.Walk.IsPath.transfer
+/- warning: simple_graph.walk.is_cycle.transfer -> SimpleGraph.Walk.IsCycle.transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {H : SimpleGraph.{u1} V} {p : SimpleGraph.Walk.{u1} V G u u}, (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), SimpleGraph.Walk.IsCycle.{u1} V H u (SimpleGraph.Walk.transfer.{u1} V G u u p H hp))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {H : SimpleGraph.{u1} V} {p : SimpleGraph.Walk.{u1} V G u u}, (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), SimpleGraph.Walk.IsCycle.{u1} V H u (SimpleGraph.Walk.transfer.{u1} V G u u p H hp))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_cycle.transfer SimpleGraph.Walk.IsCycle.transferₓ'. -/
protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
(p.transfer H hp).IsCycle :=
by
@@ -1776,6 +2308,12 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
variable (p)
+/- warning: simple_graph.walk.transfer_transfer -> SimpleGraph.Walk.transfer_transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (id_tag Tactic.IdTag.rw (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (Eq.ndrec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (_a : List.{u1} (Sym2.{u1} V)) => Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e _a) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (rfl.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) K)))) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp))) hp')) (SimpleGraph.Walk.transfer.{u1} V G u v p K hp')
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) {K : SimpleGraph.{u1} V} (hp' : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V K u v) (SimpleGraph.Walk.transfer.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp) K hp') (SimpleGraph.Walk.transfer.{u1} V G u v p K (Eq.rec.{0, succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (fun (x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515 : List.{u1} (Sym2.{u1} V)) (h._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18516 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515) => forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e x._@.Mathlib.Combinatorics.SimpleGraph.Connectivity._hyg.18515) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V K))) hp' (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges_transfer.{u1} V G u v p H hp)))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transferₓ'. -/
@[simp]
theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
(p.transfer H hp).transfer K
@@ -1788,6 +2326,12 @@ theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e
apply p_ih
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
+/- warning: simple_graph.walk.transfer_append -> SimpleGraph.Walk.transfer_append is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w) {H : SimpleGraph.{u1} V} (hpq : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H u w) (SimpleGraph.Walk.transfer.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q) H hpq) (SimpleGraph.Walk.append.{u1} V H u v w (SimpleGraph.Walk.transfer.{u1} V G u v p H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) he)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))))) (propext (Or True (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) True (true_or_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)))))) trivial))) (SimpleGraph.Walk.transfer.{u1} V G v w q H (fun (e : Sym2.{u1} V) (he : Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) => hpq e (Eq.mpr.{0} (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True (id_tag Tactic.IdTag.simp (Eq.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)) (SimpleGraph.Walk.edges_append.{u1} V G u v w p q)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (Append.append.{u1} (List.{u1} (Sym2.{u1} V)) (List.hasAppend.{u1} (Sym2.{u1} V)) (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q))) (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q))) (List.mem_append.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p) (SimpleGraph.Walk.edges.{u1} V G v w q)))) ((fun (a : Prop) (a_1 : Prop) (e_1 : Eq.{1} Prop a a_1) (b : Prop) (b_1 : Prop) (e_2 : Eq.{1} Prop b b_1) => congr.{1, 1} Prop Prop (Or a) (Or a_1) b b_1 (congr_arg.{1, 1} Prop (Prop -> Prop) a a_1 Or e_1) e_2) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) True (iff_true_intro (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w q)) he)))) (propext (Or (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) True) True (or_true_iff (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)))))) trivial))))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (w : SimpleGraph.Walk.{u1} V G u v) {p : V} {q : SimpleGraph.{u1} V} (H : SimpleGraph.Walk.{u1} V G v p) (hpq : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V q))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V q u p) (SimpleGraph.Walk.transfer.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H) q hpq) (SimpleGraph.Walk.append.{u1} V q u v p (SimpleGraph.Walk.transfer.{u1} V G u v w q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or True (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.10.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrFun.{1, 1} Prop (fun (b : Prop) => Prop) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (Or True) (congrArg.{1, 1} Prop (Prop -> Prop) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True Or (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) he)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)))) (true_or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))))))) (SimpleGraph.Walk.transfer.{u1} V G v p H q (fun (e : Sym2.{u1} V) (he : Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) => hpq e (of_eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) True (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) True) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G u p (SimpleGraph.Walk.append.{u1} V G u v p w H)) (HAppend.hAppend.{u1, u1, u1} (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.{u1} (Sym2.{u1} V)) (instHAppend.{u1} (List.{u1} (Sym2.{u1} V)) (List.instAppendList.{u1} (Sym2.{u1} V))) (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_append.{u1} V G u v p w H)) (Std.Data.List.Lemmas._auxLemma.10.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v w) (SimpleGraph.Walk.edges.{u1} V G v p H))) (congrArg.{1, 1} Prop Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) True (Or (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))) (eq_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v p H)) he))) (or_true (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v w))))))))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_appendₓ'. -/
@[simp]
theorem transfer_append (hpq) :
(p.append q).transfer H hpq =
@@ -1803,6 +2347,12 @@ theorem transfer_append (hpq) :
apply p_ih
#align simple_graph.walk.transfer_append SimpleGraph.Walk.transfer_append
+/- warning: simple_graph.walk.reverse_transfer -> SimpleGraph.Walk.reverse_transfer is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H v u) (SimpleGraph.Walk.reverse.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.transfer.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p) H (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (id_tag Tactic.IdTag.simp (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)))) (forall_congr.{succ u1} (Sym2.{u1} V) (fun (e : Sym2.{u1} V) => (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (fun (e : Sym2.{u1} V) => (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H))) (fun (e : Sym2.{u1} V) => imp_congr_eq (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)) (Eq.trans.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) ((fun [self : Membership.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V))] (ᾰ : Sym2.{u1} V) (ᾰ_1 : Sym2.{u1} V) (e_2 : Eq.{succ u1} (Sym2.{u1} V) ᾰ ᾰ_1) (ᾰ_2 : List.{u1} (Sym2.{u1} V)) (ᾰ_3 : List.{u1} (Sym2.{u1} V)) (e_3 : Eq.{succ u1} (List.{u1} (Sym2.{u1} V)) ᾰ_2 ᾰ_3) => congr.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self ᾰ_1) ᾰ_2 ᾰ_3 (congr_arg.{succ u1, succ u1} (Sym2.{u1} V) ((List.{u1} (Sym2.{u1} V)) -> Prop) ᾰ ᾰ_1 (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) self) e_2) e_3) (List.hasMem.{u1} (Sym2.{u1} V)) e e (rfl.{succ u1} (Sym2.{u1} V) e) (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p)) (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p)) (SimpleGraph.Walk.edges_reverse.{u1} V G u v p)) (propext (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (List.mem_reverse'.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p)))) (rfl.{1} Prop (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) H)))))) hp))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} (p : SimpleGraph.Walk.{u1} V G u v) {H : SimpleGraph.{u1} V} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V H v u) (SimpleGraph.Walk.reverse.{u1} V H u v (SimpleGraph.Walk.transfer.{u1} V G u v p H hp)) (SimpleGraph.Walk.transfer.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p) H (Eq.mpr.{0} (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (id.{0} (Eq.{1} Prop (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)))) (forall_congr.{succ u1} (Sym2.{u1} V) (fun (e : Sym2.{u1} V) => (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (fun (e : Sym2.{u1} V) => (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H))) (fun (e : Sym2.{u1} V) => implies_congr.{0, 0} (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)) (Eq.trans.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p))) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) (congrArg.{succ u1, 1} (List.{u1} (Sym2.{u1} V)) Prop (SimpleGraph.Walk.edges.{u1} V G v u (SimpleGraph.Walk.reverse.{u1} V G u v p)) (List.reverse.{u1} (Sym2.{u1} V) (SimpleGraph.Walk.edges.{u1} V G u v p)) (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e) (SimpleGraph.Walk.edges_reverse.{u1} V G u v p)) (Mathlib.Combinatorics.SimpleGraph.Connectivity._auxLemma.49.{u1} (Sym2.{u1} V) e (SimpleGraph.Walk.edges.{u1} V G u v p))) (Eq.refl.{1} Prop (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V H)))))) hp))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.reverse_transfer SimpleGraph.Walk.reverse_transferₓ'. -/
@[simp]
theorem reverse_transfer :
(p.transfer H hp).reverse =
@@ -1824,6 +2374,7 @@ namespace Walk
variable {G}
+#print SimpleGraph.Walk.toDeleteEdges /-
/-- Given a walk that avoids a set of edges, produce a walk in the graph
with those edges deleted. -/
@[reducible]
@@ -1834,20 +2385,26 @@ def toDeleteEdges (s : Set (Sym2 V)) {v w : V} (p : G.Walk v w) (hp : ∀ e, e
simp only [edge_set_delete_edges, Set.mem_diff]
exact fun e ep => ⟨edges_subset_edge_set p ep, hp e ep⟩)
#align simple_graph.walk.to_delete_edges SimpleGraph.Walk.toDeleteEdges
+-/
+#print SimpleGraph.Walk.toDeleteEdges_nil /-
@[simp]
theorem toDeleteEdges_nil (s : Set (Sym2 V)) {v : V} (hp) :
(Walk.nil : G.Walk v v).toDeleteEdges s hp = Walk.nil :=
rfl
#align simple_graph.walk.to_delete_edges_nil SimpleGraph.Walk.toDeleteEdges_nil
+-/
+#print SimpleGraph.Walk.toDeleteEdges_cons /-
@[simp]
theorem toDeleteEdges_cons (s : Set (Sym2 V)) {u v w : V} (h : G.Adj u v) (p : G.Walk v w) (hp) :
(Walk.cons h p).toDeleteEdges s hp =
Walk.cons ⟨h, hp _ (Or.inl rfl)⟩ (p.toDeleteEdges s fun _ he => hp _ <| Or.inr he) :=
rfl
#align simple_graph.walk.to_delete_edges_cons SimpleGraph.Walk.toDeleteEdges_cons
+-/
+#print SimpleGraph.Walk.toDeleteEdge /-
/-- Given a walk that avoids an edge, create a walk in the subgraph with that edge deleted.
This is an abbreviation for `simple_graph.walk.to_delete_edges`. -/
abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges) :
@@ -1856,23 +2413,48 @@ abbrev toDeleteEdge {v w : V} (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges)
contrapose!
simp (config := { contextual := true }) [hp]
#align simple_graph.walk.to_delete_edge SimpleGraph.Walk.toDeleteEdge
+-/
+/- warning: simple_graph.walk.map_to_delete_edges_eq -> SimpleGraph.Walk.map_toDeleteEdges_eq is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {w : V} {p : SimpleGraph.Walk.{u1} V G v w} (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v) (coeFn.{succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G) (fun (_x : RelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) => V -> V) (RelHom.hasCoeToFun.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G s)) (SimpleGraph.Adj.{u1} V G)) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) w)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) G (SimpleGraph.deleteEdges_le.{u1} V G s)) v w (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v w p hp)) p
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v} (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V G (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s) (FunLike.coe.{succ u1, succ u1, succ u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V) _x) (RelHomClass.toFunLike.{u1, u1, u1} (SimpleGraph.Hom.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G) V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G) (RelHom.instRelHomClassRelHom.{u1, u1} V V (SimpleGraph.Adj.{u1} V (SimpleGraph.deleteEdges.{u1} V G w)) (SimpleGraph.Adj.{u1} V G))) (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) v)) (SimpleGraph.Walk.map.{u1, u1} V V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.Hom.mapSpanningSubgraphs.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) G (SimpleGraph.deleteEdges_le.{u1} V G w)) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp)) p
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eqₓ'. -/
@[simp]
theorem map_toDeleteEdges_eq (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (hp) :
Walk.map (Hom.mapSpanningSubgraphs (G.deleteEdges_le s)) (p.toDeleteEdges s hp) = p := by
rw [← transfer_eq_map_of_le, transfer_transfer, transfer_self]
#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eq
+/- warning: simple_graph.walk.is_path.to_delete_edges -> SimpleGraph.Walk.IsPath.toDeleteEdges is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {w : V} {p : SimpleGraph.Walk.{u1} V G v w}, (SimpleGraph.Walk.IsPath.{u1} V G v w p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v w p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), SimpleGraph.Walk.IsPath.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) v w (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v w p hp))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {v : V} (w : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s v}, (SimpleGraph.Walk.IsPath.{u1} V G s v p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s v p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e w))), SimpleGraph.Walk.IsPath.{u1} V (SimpleGraph.deleteEdges.{u1} V G w) s v (SimpleGraph.Walk.toDeleteEdges.{u1} V G w s v p hp))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_path.to_delete_edges SimpleGraph.Walk.IsPath.toDeleteEdgesₓ'. -/
protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V)) {v w : V} {p : G.Walk v w} (h : p.IsPath)
(hp) : (p.toDeleteEdges s hp).IsPath :=
h.transfer _
#align simple_graph.walk.is_path.to_delete_edges SimpleGraph.Walk.IsPath.toDeleteEdges
+/- warning: simple_graph.walk.is_cycle.to_delete_edges -> SimpleGraph.Walk.IsCycle.toDeleteEdges is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {v : V} {p : SimpleGraph.Walk.{u1} V G v v}, (SimpleGraph.Walk.IsCycle.{u1} V G v p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), SimpleGraph.Walk.IsCycle.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) v (SimpleGraph.Walk.toDeleteEdges.{u1} V G s v v p hp))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} (v : Set.{u1} (Sym2.{u1} V)) {p : SimpleGraph.Walk.{u1} V G s s}, (SimpleGraph.Walk.IsCycle.{u1} V G s p) -> (forall (hp : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G s s p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v))), SimpleGraph.Walk.IsCycle.{u1} V (SimpleGraph.deleteEdges.{u1} V G v) s (SimpleGraph.Walk.toDeleteEdges.{u1} V G v s s p hp))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdgesₓ'. -/
protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V)) {v : V} {p : G.Walk v v} (h : p.IsCycle)
(hp) : (p.toDeleteEdges s hp).IsCycle :=
h.transfer _
#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdges
+/- warning: simple_graph.walk.to_delete_edges_copy -> SimpleGraph.Walk.toDeleteEdges_copy is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} (s : Set.{u1} (Sym2.{u1} V)) {u : V} {v : V} {u' : V} {v' : V} (p : SimpleGraph.Walk.{u1} V G u v) (hu : Eq.{succ u1} V u u') (hv : Eq.{succ u1} V v v') (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p hu hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) u' v') (SimpleGraph.Walk.toDeleteEdges.{u1} V G s u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p hu hv) h) (SimpleGraph.Walk.copy.{u1} V (SimpleGraph.deleteEdges.{u1} V G s) u v u' v' (SimpleGraph.Walk.toDeleteEdges.{u1} V G s u v p (Eq.drec.{0, succ u1} V u' (fun {u : V} (_h : Eq.{succ u1} V u' u) => forall (p : SimpleGraph.Walk.{u1} V G u v), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u v u' v' p (Eq.symm.{succ u1} V u' u _h) hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) -> (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s)))) (fun (p : SimpleGraph.Walk.{u1} V G u' v) (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v u' v' p (rfl.{succ u1} V u') hv))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) => Eq.drec.{0, succ u1} V v' (fun {v : V} (_h : Eq.{succ u1} V v' v) => forall (p : SimpleGraph.Walk.{u1} V G u' v), (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v u' v' p (rfl.{succ u1} V u') (Eq.symm.{succ u1} V v' v _h)))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) -> (forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v p)) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s)))) (fun (p : SimpleGraph.Walk.{u1} V G u' v') (h : forall (e : Sym2.{u1} V), (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u' v' (SimpleGraph.Walk.copy.{u1} V G u' v' u' v' p (rfl.{succ u1} V u') (rfl.{succ u1} V v')))) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e s))) => h) v (Eq.symm.{succ u1} V v v' hv) p h) u (Eq.symm.{succ u1} V u u' hu) p h)) hu hv)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {s : V} {u : V} {v : V} {u' : V} (v' : Set.{u1} (Sym2.{u1} V)) (p : SimpleGraph.Walk.{u1} V G s u) (hu : Eq.{succ u1} V s v) (hv : Eq.{succ u1} V u u') (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G s u v u' p hu hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))), Eq.{succ u1} (SimpleGraph.Walk.{u1} V (SimpleGraph.deleteEdges.{u1} V G v') v u') (SimpleGraph.Walk.toDeleteEdges.{u1} V G v' v u' (SimpleGraph.Walk.copy.{u1} V G s u v u' p hu hv) h) (SimpleGraph.Walk.copy.{u1} V (SimpleGraph.deleteEdges.{u1} V G v') s u v u' (SimpleGraph.Walk.toDeleteEdges.{u1} V G v' s u p (Eq.rec.{0, succ u1} V v (fun {u_1 : V} (_h : Eq.{succ u1} V v u_1) => forall (p : SimpleGraph.Walk.{u1} V G u_1 u), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G u_1 u v u' p (Eq.symm.{succ u1} V v u_1 _h) hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) -> (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u_1 u p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v')))) (fun (p : SimpleGraph.Walk.{u1} V G v u) (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v u v u' p (Eq.refl.{succ u1} V v) hv))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) => Eq.rec.{0, succ u1} V u' (fun {v_1 : V} (_h : Eq.{succ u1} V u' v_1) => forall (p : SimpleGraph.Walk.{u1} V G v v_1), (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v v_1 v u' p (Eq.refl.{succ u1} V v) (Eq.symm.{succ u1} V u' v_1 _h)))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) -> (forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v v_1 p)) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v')))) (fun (p : SimpleGraph.Walk.{u1} V G v u') (h : forall (e : Sym2.{u1} V), (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G v u' (SimpleGraph.Walk.copy.{u1} V G v u' v u' p (Eq.refl.{succ u1} V v) (Eq.refl.{succ u1} V u')))) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e v'))) => h) u (Eq.symm.{succ u1} V u u' hv) p h) s (Eq.symm.{succ u1} V s v hu) p h)) hu hv)
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_delete_edges_copy SimpleGraph.Walk.toDeleteEdges_copyₓ'. -/
@[simp]
theorem toDeleteEdges_copy (s : Set (Sym2 V)) {u v u' v'} (p : G.Walk u v) (hu : u = u')
(hv : v = v') (h) :
@@ -1892,63 +2474,86 @@ end Walk
/-! ## `reachable` and `connected` -/
+#print SimpleGraph.Reachable /-
/-- Two vertices are *reachable* if there is a walk between them.
This is equivalent to `relation.refl_trans_gen` of `G.adj`.
See `simple_graph.reachable_iff_refl_trans_gen`. -/
def Reachable (u v : V) : Prop :=
Nonempty (G.Walk u v)
#align simple_graph.reachable SimpleGraph.Reachable
+-/
variable {G}
+#print SimpleGraph.reachable_iff_nonempty_univ /-
theorem reachable_iff_nonempty_univ {u v : V} :
G.Reachable u v ↔ (Set.univ : Set (G.Walk u v)).Nonempty :=
Set.nonempty_iff_univ_nonempty
#align simple_graph.reachable_iff_nonempty_univ SimpleGraph.reachable_iff_nonempty_univ
+-/
+#print SimpleGraph.Reachable.elim /-
protected theorem Reachable.elim {p : Prop} {u v : V} (h : G.Reachable u v) (hp : G.Walk u v → p) :
p :=
Nonempty.elim h hp
#align simple_graph.reachable.elim SimpleGraph.Reachable.elim
+-/
+#print SimpleGraph.Reachable.elim_path /-
protected theorem Reachable.elim_path {p : Prop} {u v : V} (h : G.Reachable u v)
(hp : G.Path u v → p) : p := by classical exact h.elim fun q => hp q.toPath
#align simple_graph.reachable.elim_path SimpleGraph.Reachable.elim_path
+-/
+#print SimpleGraph.Walk.reachable /-
protected theorem Walk.reachable {G : SimpleGraph V} {u v : V} (p : G.Walk u v) : G.Reachable u v :=
⟨p⟩
#align simple_graph.walk.reachable SimpleGraph.Walk.reachable
+-/
+#print SimpleGraph.Adj.reachable /-
protected theorem Adj.reachable {u v : V} (h : G.Adj u v) : G.Reachable u v :=
h.toWalk.Reachable
#align simple_graph.adj.reachable SimpleGraph.Adj.reachable
+-/
+#print SimpleGraph.Reachable.refl /-
@[refl]
protected theorem Reachable.refl (u : V) : G.Reachable u u :=
by
fconstructor
rfl
#align simple_graph.reachable.refl SimpleGraph.Reachable.refl
+-/
+#print SimpleGraph.Reachable.rfl /-
protected theorem Reachable.rfl {u : V} : G.Reachable u u :=
Reachable.refl _
#align simple_graph.reachable.rfl SimpleGraph.Reachable.rfl
+-/
+#print SimpleGraph.Reachable.symm /-
@[symm]
protected theorem Reachable.symm {u v : V} (huv : G.Reachable u v) : G.Reachable v u :=
huv.elim fun p => ⟨p.reverse⟩
#align simple_graph.reachable.symm SimpleGraph.Reachable.symm
+-/
+#print SimpleGraph.reachable_comm /-
theorem reachable_comm {u v : V} : G.Reachable u v ↔ G.Reachable v u :=
⟨Reachable.symm, Reachable.symm⟩
#align simple_graph.reachable_comm SimpleGraph.reachable_comm
+-/
+#print SimpleGraph.Reachable.trans /-
@[trans]
protected theorem Reachable.trans {u v w : V} (huv : G.Reachable u v) (hvw : G.Reachable v w) :
G.Reachable u w :=
huv.elim fun puv => hvw.elim fun pvw => ⟨puv.append pvw⟩
#align simple_graph.reachable.trans SimpleGraph.Reachable.trans
+-/
+#print SimpleGraph.reachable_iff_reflTransGen /-
theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v :=
by
constructor
@@ -1961,7 +2566,14 @@ theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.Refl
· rfl
· exact reachable.trans hr ⟨walk.cons ha walk.nil⟩
#align simple_graph.reachable_iff_refl_trans_gen SimpleGraph.reachable_iff_reflTransGen
+-/
+/- warning: simple_graph.reachable.map -> SimpleGraph.Reachable.map is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : SimpleGraph.{u1} V} {G' : SimpleGraph.{u2} V'} (f : SimpleGraph.Hom.{u1, u2} V V' G G') {u : V} {v : V}, (SimpleGraph.Reachable.{u1} V G u v) -> (SimpleGraph.Reachable.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f u) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) f v))
+but is expected to have type
+ forall {V : Type.{u1}} {V' : Type.{u2}} {G : V} {G' : V} {f : SimpleGraph.{u1} V} {u : SimpleGraph.{u2} V'} (v : SimpleGraph.Hom.{u1, u2} V V' f u), (SimpleGraph.Reachable.{u1} V f G G') -> (SimpleGraph.Reachable.{u2} V' u (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u1 u2, u1, u2} (SimpleGraph.Hom.{u1, u2} V V' f u) V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u) (RelHom.instRelHomClassRelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V f) (SimpleGraph.Adj.{u2} V' u))) v G'))
+Case conversion may be inaccurate. Consider using '#align simple_graph.reachable.map SimpleGraph.Reachable.mapₓ'. -/
protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G') {u v : V}
(h : G.Reachable u v) : G'.Reachable (f u) (f v) :=
h.elim fun p => ⟨p.map f⟩
@@ -1969,31 +2581,42 @@ protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G
variable (G)
+#print SimpleGraph.reachable_is_equivalence /-
theorem reachable_is_equivalence : Equivalence G.Reachable :=
Equivalence.mk _ (@Reachable.refl _ G) (@Reachable.symm _ G) (@Reachable.trans _ G)
#align simple_graph.reachable_is_equivalence SimpleGraph.reachable_is_equivalence
+-/
+#print SimpleGraph.reachableSetoid /-
/-- The equivalence relation on vertices given by `simple_graph.reachable`. -/
def reachableSetoid : Setoid V :=
Setoid.mk _ G.reachable_is_equivalence
#align simple_graph.reachable_setoid SimpleGraph.reachableSetoid
+-/
+#print SimpleGraph.Preconnected /-
/-- A graph is preconnected if every pair of vertices is reachable from one another. -/
def Preconnected : Prop :=
∀ u v : V, G.Reachable u v
#align simple_graph.preconnected SimpleGraph.Preconnected
+-/
+#print SimpleGraph.Preconnected.map /-
theorem Preconnected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
(hG : G.Preconnected) : H.Preconnected :=
hf.forall₂.2 fun a b => Nonempty.map (Walk.map _) <| hG _ _
#align simple_graph.preconnected.map SimpleGraph.Preconnected.map
+-/
+#print SimpleGraph.Iso.preconnected_iff /-
theorem Iso.preconnected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
G.Preconnected ↔ H.Preconnected :=
⟨Preconnected.map e.toHom e.toEquiv.Surjective,
Preconnected.map e.symm.toHom e.symm.toEquiv.Surjective⟩
#align simple_graph.iso.preconnected_iff SimpleGraph.Iso.preconnected_iff
+-/
+#print SimpleGraph.Connected /-
/-- 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.
@@ -2005,77 +2628,106 @@ structure Connected : Prop where
Preconnected : G.Preconnected
[Nonempty : Nonempty V]
#align simple_graph.connected SimpleGraph.Connected
+-/
instance : CoeFun G.Connected fun _ => ∀ u v : V, G.Reachable u v :=
⟨fun h => h.Preconnected⟩
+#print SimpleGraph.Connected.map /-
theorem Connected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
(hG : G.Connected) : H.Connected :=
haveI := hG.nonempty.map f
⟨hG.preconnected.map f hf⟩
#align simple_graph.connected.map SimpleGraph.Connected.map
+-/
+#print SimpleGraph.Iso.connected_iff /-
theorem Iso.connected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
G.Connected ↔ H.Connected :=
⟨Connected.map e.toHom e.toEquiv.Surjective, Connected.map e.symm.toHom e.symm.toEquiv.Surjective⟩
#align simple_graph.iso.connected_iff SimpleGraph.Iso.connected_iff
+-/
+#print SimpleGraph.ConnectedComponent /-
/-- The quotient of `V` by the `simple_graph.reachable` relation gives the connected
components of a graph. -/
def ConnectedComponent :=
Quot G.Reachable
#align simple_graph.connected_component SimpleGraph.ConnectedComponent
+-/
+#print SimpleGraph.connectedComponentMk /-
/-- Gives the connected component containing a particular vertex. -/
def connectedComponentMk (v : V) : G.ConnectedComponent :=
Quot.mk G.Reachable v
#align simple_graph.connected_component_mk SimpleGraph.connectedComponentMk
+-/
+#print SimpleGraph.ConnectedComponent.inhabited /-
@[simps]
instance ConnectedComponent.inhabited [Inhabited V] : Inhabited G.ConnectedComponent :=
⟨G.connectedComponentMk default⟩
#align simple_graph.connected_component.inhabited SimpleGraph.ConnectedComponent.inhabited
+-/
section connectedComponent
variable {G}
+#print SimpleGraph.ConnectedComponent.ind /-
@[elab_as_elim]
protected theorem ConnectedComponent.ind {β : G.ConnectedComponent → Prop}
(h : ∀ v : V, β (G.connectedComponentMk v)) (c : G.ConnectedComponent) : β c :=
Quot.ind h c
#align simple_graph.connected_component.ind SimpleGraph.ConnectedComponent.ind
+-/
+#print SimpleGraph.ConnectedComponent.ind₂ /-
@[elab_as_elim]
protected theorem ConnectedComponent.ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
(h : ∀ v w : V, β (G.connectedComponentMk v) (G.connectedComponentMk w))
(c d : G.ConnectedComponent) : β c d :=
Quot.induction_on₂ c d h
#align simple_graph.connected_component.ind₂ SimpleGraph.ConnectedComponent.ind₂
+-/
+#print SimpleGraph.ConnectedComponent.sound /-
protected theorem ConnectedComponent.sound {v w : V} :
G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w :=
Quot.sound
#align simple_graph.connected_component.sound SimpleGraph.ConnectedComponent.sound
+-/
+#print SimpleGraph.ConnectedComponent.exact /-
protected theorem ConnectedComponent.exact {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w → G.Reachable v w :=
@Quotient.exact _ G.reachableSetoid _ _
#align simple_graph.connected_component.exact SimpleGraph.ConnectedComponent.exact
+-/
+#print SimpleGraph.ConnectedComponent.eq /-
@[simp]
protected theorem ConnectedComponent.eq {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w :=
@Quotient.eq' _ G.reachableSetoid _ _
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
+-/
+#print SimpleGraph.ConnectedComponent.lift /-
/-- The `connected_component` specialization of `quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
protected def ConnectedComponent.lift {β : Sort _} (f : V → β)
(h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w) : G.ConnectedComponent → β :=
Quot.lift f fun v w (h' : G.Reachable v w) => h'.elim_path fun hp => h v w hp hp.2
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
+-/
+/- warning: simple_graph.connected_component.lift_mk -> SimpleGraph.ConnectedComponent.lift_mk is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {β : Sort.{u2}} {f : V -> β} {h : forall (v : V) (w : V) (p : SimpleGraph.Walk.{u1} V G v w), (SimpleGraph.Walk.IsPath.{u1} V G v w p) -> (Eq.{u2} β (f v) (f w))} {v : V}, Eq.{u2} β (SimpleGraph.ConnectedComponent.lift.{u1, u2} V G β f h (SimpleGraph.connectedComponentMk.{u1} V G v)) (f v)
+but is expected to have type
+ forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {β : Sort.{u1}} {f : V -> β} {h : forall (v : V) (w : V) (p : SimpleGraph.Walk.{u2} V G v w), (SimpleGraph.Walk.IsPath.{u2} V G v w p) -> (Eq.{u1} β (f v) (f w))} {v : V}, Eq.{u1} β (SimpleGraph.ConnectedComponent.lift.{u2, u1} V G β f h (SimpleGraph.connectedComponentMk.{u2} V G v)) (f v)
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mkₓ'. -/
@[simp]
protected theorem ConnectedComponent.lift_mk {β : Sort _} {f : V → β}
{h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w} {v : V} :
@@ -2083,28 +2735,42 @@ protected theorem ConnectedComponent.lift_mk {β : Sort _} {f : V → β}
rfl
#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mk
+#print SimpleGraph.ConnectedComponent.exists /-
protected theorem ConnectedComponent.exists {p : G.ConnectedComponent → Prop} :
(∃ c : G.ConnectedComponent, p c) ↔ ∃ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).exists
#align simple_graph.connected_component.exists SimpleGraph.ConnectedComponent.exists
+-/
+#print SimpleGraph.ConnectedComponent.forall /-
protected theorem ConnectedComponent.forall {p : G.ConnectedComponent → Prop} :
(∀ c : G.ConnectedComponent, p c) ↔ ∀ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).forall
#align simple_graph.connected_component.forall SimpleGraph.ConnectedComponent.forall
+-/
+#print SimpleGraph.Preconnected.subsingleton_connectedComponent /-
theorem Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
Subsingleton G.ConnectedComponent :=
⟨ConnectedComponent.ind₂ fun v w => ConnectedComponent.sound (h v w)⟩
#align simple_graph.preconnected.subsingleton_connected_component SimpleGraph.Preconnected.subsingleton_connectedComponent
+-/
+#print SimpleGraph.ConnectedComponent.map /-
/-- The map on connected components induced by a graph homomorphism. -/
def ConnectedComponent.map {V : Type _} {G : SimpleGraph V} {V' : Type _} {G' : SimpleGraph V'}
(φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
C.lift (fun v => G'.connectedComponentMk (φ v)) fun v w p _ =>
ConnectedComponent.eq.mpr (p.map φ).Reachable
#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.map
+-/
+/- warning: simple_graph.connected_component.map_mk -> SimpleGraph.ConnectedComponent.map_mk is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (v : V), Eq.{succ u2} (SimpleGraph.ConnectedComponent.{u2} V' G') (SimpleGraph.ConnectedComponent.map.{u1, u2} V G V' G' φ (SimpleGraph.connectedComponentMk.{u1} V G v)) (SimpleGraph.connectedComponentMk.{u2} V' G' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (SimpleGraph.Hom.{u1, u2} V V' G G') (fun (_x : RelHom.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) => V -> V') (RelHom.hasCoeToFun.{u1, u2} V V' (SimpleGraph.Adj.{u1} V G) (SimpleGraph.Adj.{u2} V' G')) φ v))
+but is expected to have type
+ forall {V : Type.{u2}} {G : SimpleGraph.{u2} V} {V' : Type.{u1}} {G' : SimpleGraph.{u1} V'} (φ : SimpleGraph.Hom.{u2, u1} V V' G G') (v : V), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V' G') (SimpleGraph.ConnectedComponent.map.{u2, u1} V G V' G' φ (SimpleGraph.connectedComponentMk.{u2} V G v)) (SimpleGraph.connectedComponentMk.{u1} V' G' (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (SimpleGraph.Hom.{u2, u1} V V' G G') V (fun (_x : V) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : V) => V') _x) (RelHomClass.toFunLike.{max u2 u1, u2, u1} (SimpleGraph.Hom.{u2, u1} V V' G G') V V' (SimpleGraph.Adj.{u2} V G) (SimpleGraph.Adj.{u1} V' G') (RelHom.instRelHomClassRelHom.{u2, u1} V V' (SimpleGraph.Adj.{u2} V G) (SimpleGraph.Adj.{u1} V' G'))) φ v))
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mkₓ'. -/
@[simp]
theorem ConnectedComponent.map_mk {V : Type _} {G : SimpleGraph V} {V' : Type _}
{G' : SimpleGraph V'} (φ : G →g G') (v : V) :
@@ -2112,13 +2778,21 @@ theorem ConnectedComponent.map_mk {V : Type _} {G : SimpleGraph V} {V' : Type _}
rfl
#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mk
+#print SimpleGraph.ConnectedComponent.map_id /-
@[simp]
theorem ConnectedComponent.map_id (C : ConnectedComponent G) : C.map Hom.id = C :=
by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_id
+-/
+/- warning: simple_graph.connected_component.map_comp -> SimpleGraph.ConnectedComponent.map_comp is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} {V'' : Type.{u3}} {G'' : SimpleGraph.{u3} V''} (C : SimpleGraph.ConnectedComponent.{u1} V G) (φ : SimpleGraph.Hom.{u1, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u3} V' V'' G' G''), Eq.{succ u3} (SimpleGraph.ConnectedComponent.{u3} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u3} V' G' V'' G'' ψ (SimpleGraph.ConnectedComponent.map.{u1, u2} V G V' G' φ C)) (SimpleGraph.ConnectedComponent.map.{u1, u3} V G V'' G'' (SimpleGraph.Hom.comp.{u1, u2, u3} V V' V'' G G' G'' ψ φ) C)
+but is expected to have type
+ forall {V : Type.{u3}} {G : SimpleGraph.{u3} V} {V' : Type.{u2}} {G' : SimpleGraph.{u2} V'} {V'' : Type.{u1}} {G'' : SimpleGraph.{u1} V''} (C : SimpleGraph.ConnectedComponent.{u3} V G) (φ : SimpleGraph.Hom.{u3, u2} V V' G G') (ψ : SimpleGraph.Hom.{u2, u1} V' V'' G' G''), Eq.{succ u1} (SimpleGraph.ConnectedComponent.{u1} V'' G'') (SimpleGraph.ConnectedComponent.map.{u2, u1} V' G' V'' G'' ψ (SimpleGraph.ConnectedComponent.map.{u3, u2} V G V' G' φ C)) (SimpleGraph.ConnectedComponent.map.{u3, u1} V G V'' G'' (SimpleGraph.Hom.comp.{u3, u2, u1} V V' V'' G G' G'' ψ φ) C)
+Case conversion may be inaccurate. Consider using '#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_compₓ'. -/
@[simp]
theorem ConnectedComponent.map_comp {V' : Type _} {G' : SimpleGraph V'} {V'' : Type _}
{G'' : SimpleGraph V''} (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
@@ -2131,11 +2805,14 @@ end connectedComponent
variable {G}
+#print SimpleGraph.Subgraph.Connected /-
/-- A subgraph is connected if it is connected as a simple graph. -/
abbrev Subgraph.Connected (H : G.Subgraph) : Prop :=
H.coe.Connected
#align simple_graph.subgraph.connected SimpleGraph.Subgraph.Connected
+-/
+#print SimpleGraph.singletonSubgraph_connected /-
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected :=
by
constructor
@@ -2143,7 +2820,9 @@ theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected
simp only [singleton_subgraph_verts, Set.mem_singleton_iff] at ha hb
subst_vars
#align simple_graph.singleton_subgraph_connected SimpleGraph.singletonSubgraph_connected
+-/
+#print SimpleGraph.subgraphOfAdj_connected /-
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected :=
by
@@ -2156,18 +2835,23 @@ theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj h
apply adj.reachable
simp
#align simple_graph.subgraph_of_adj_connected SimpleGraph.subgraphOfAdj_connected
+-/
+#print SimpleGraph.Preconnected.set_univ_walk_nonempty /-
theorem Preconnected.set_univ_walk_nonempty (hconn : G.Preconnected) (u v : V) :
(Set.univ : Set (G.Walk u v)).Nonempty :=
by
rw [← Set.nonempty_iff_univ_nonempty]
exact hconn u v
#align simple_graph.preconnected.set_univ_walk_nonempty SimpleGraph.Preconnected.set_univ_walk_nonempty
+-/
+#print SimpleGraph.Connected.set_univ_walk_nonempty /-
theorem Connected.set_univ_walk_nonempty (hconn : G.Connected) (u v : V) :
(Set.univ : Set (G.Walk u v)).Nonempty :=
hconn.Preconnected.set_univ_walk_nonempty u v
#align simple_graph.connected.set_univ_walk_nonempty SimpleGraph.Connected.set_univ_walk_nonempty
+-/
/-! ### Walks as subgraphs -/
@@ -2176,17 +2860,22 @@ namespace Walk
variable {G G'} {u v w : V}
+#print SimpleGraph.Walk.toSubgraph /-
/-- The subgraph consisting of the vertices and edges of the walk. -/
@[simp]
protected def toSubgraph : ∀ {u v : V}, G.Walk u v → G.Subgraph
| u, _, nil => G.singletonSubgraph u
| _, _, cons h p => G.subgraphOfAdj h ⊔ p.toSubgraph
#align simple_graph.walk.to_subgraph SimpleGraph.Walk.toSubgraph
+-/
+#print SimpleGraph.Walk.toSubgraph_cons_nil_eq_subgraphOfAdj /-
theorem toSubgraph_cons_nil_eq_subgraphOfAdj (h : G.Adj u v) :
(cons h nil).toSubgraph = G.subgraphOfAdj h := by simp
#align simple_graph.walk.to_subgraph_cons_nil_eq_subgraph_of_adj SimpleGraph.Walk.toSubgraph_cons_nil_eq_subgraphOfAdj
+-/
+#print SimpleGraph.Walk.mem_verts_toSubgraph /-
theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w ∈ p.support :=
by
induction' p with _ x y z h p' ih
@@ -2195,26 +2884,40 @@ theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w
⟨by rintro (rfl | h) <;> simp [*], by simp (config := { contextual := true })⟩
simp [ih, or_assoc', this]
#align simple_graph.walk.mem_verts_to_subgraph SimpleGraph.Walk.mem_verts_toSubgraph
+-/
+#print SimpleGraph.Walk.verts_toSubgraph /-
@[simp]
theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = { w | w ∈ p.support } :=
Set.ext fun _ => p.mem_verts_toSubgraph
#align simple_graph.walk.verts_to_subgraph SimpleGraph.Walk.verts_toSubgraph
+-/
+#print SimpleGraph.Walk.mem_edges_toSubgraph /-
theorem mem_edges_toSubgraph (p : G.Walk u v) {e : Sym2 V} :
e ∈ p.toSubgraph.edgeSetEmbedding ↔ e ∈ p.edges := by induction p <;> simp [*]
#align simple_graph.walk.mem_edges_to_subgraph SimpleGraph.Walk.mem_edges_toSubgraph
+-/
+#print SimpleGraph.Walk.edgeSet_toSubgraph /-
@[simp]
theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = { e | e ∈ p.edges } :=
Set.ext fun _ => p.mem_edges_toSubgraph
#align simple_graph.walk.edge_set_to_subgraph SimpleGraph.Walk.edgeSet_toSubgraph
+-/
+/- warning: simple_graph.walk.to_subgraph_append -> SimpleGraph.Walk.toSubgraph_append is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SemilatticeSup.toHasSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (Lattice.toSemilatticeSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.lattice.{u1} V G))) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {w : V} (p : SimpleGraph.Walk.{u1} V G u v) (q : SimpleGraph.Walk.{u1} V G v w), Eq.{succ u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Walk.toSubgraph.{u1} V G u w (SimpleGraph.Walk.append.{u1} V G u v w p q)) (Sup.sup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SemilatticeSup.toSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (Lattice.toSemilatticeSup.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instLatticeSubgraph.{u1} V G))) (SimpleGraph.Walk.toSubgraph.{u1} V G u v p) (SimpleGraph.Walk.toSubgraph.{u1} V G v w q))
+Case conversion may be inaccurate. Consider using '#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_appendₓ'. -/
@[simp]
theorem toSubgraph_append (p : G.Walk u v) (q : G.Walk v w) :
(p.append q).toSubgraph = p.toSubgraph ⊔ q.toSubgraph := by induction p <;> simp [*, sup_assoc]
#align simple_graph.walk.to_subgraph_append SimpleGraph.Walk.toSubgraph_append
+#print SimpleGraph.Walk.toSubgraph_reverse /-
@[simp]
theorem toSubgraph_reverse (p : G.Walk u v) : p.reverse.toSubgraph = p.toSubgraph :=
by
@@ -2225,18 +2928,24 @@ theorem toSubgraph_reverse (p : G.Walk u v) : p.reverse.toSubgraph = p.toSubgrap
congr
ext <;> simp [-Set.bot_eq_empty]
#align simple_graph.walk.to_subgraph_reverse SimpleGraph.Walk.toSubgraph_reverse
+-/
+#print SimpleGraph.Walk.toSubgraph_rotate /-
@[simp]
theorem toSubgraph_rotate [DecidableEq V] (c : G.Walk v v) (h : u ∈ c.support) :
(c.rotate h).toSubgraph = c.toSubgraph := by
rw [rotate, to_subgraph_append, sup_comm, ← to_subgraph_append, take_spec]
#align simple_graph.walk.to_subgraph_rotate SimpleGraph.Walk.toSubgraph_rotate
+-/
+#print SimpleGraph.Walk.toSubgraph_map /-
@[simp]
theorem toSubgraph_map (f : G →g G') (p : G.Walk u v) : (p.map f).toSubgraph = p.toSubgraph.map f :=
by induction p <;> simp [*, subgraph.map_sup]
#align simple_graph.walk.to_subgraph_map SimpleGraph.Walk.toSubgraph_map
+-/
+#print SimpleGraph.Walk.finite_neighborSet_toSubgraph /-
@[simp]
theorem finite_neighborSet_toSubgraph (p : G.Walk u v) : (p.toSubgraph.neighborSet w).Finite :=
by
@@ -2248,6 +2957,7 @@ theorem finite_neighborSet_toSubgraph (p : G.Walk u v) : (p.toSubgraph.neighborS
refine' Set.Finite.subset _ (neighbor_set_subgraph_of_adj_subset p_h)
apply Set.toFinite
#align simple_graph.walk.finite_neighbor_set_to_subgraph SimpleGraph.Walk.finite_neighborSet_toSubgraph
+-/
end Walk
@@ -2256,19 +2966,24 @@ end Walk
section WalkCounting
+#print SimpleGraph.set_walk_self_length_zero_eq /-
theorem set_walk_self_length_zero_eq (u : V) : { p : G.Walk u u | p.length = 0 } = {Walk.nil} :=
by
ext p
simp
#align simple_graph.set_walk_self_length_zero_eq SimpleGraph.set_walk_self_length_zero_eq
+-/
+#print SimpleGraph.set_walk_length_zero_eq_of_ne /-
theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) :
{ p : G.Walk u v | p.length = 0 } = ∅ := by
ext p
simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
exact fun h' => absurd (walk.eq_of_length_eq_zero h') h
#align simple_graph.set_walk_length_zero_eq_of_ne SimpleGraph.set_walk_length_zero_eq_of_ne
+-/
+#print SimpleGraph.set_walk_length_succ_eq /-
theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
{ p : G.Walk u v | p.length = n.succ } =
⋃ (w : V) (h : G.Adj u w), Walk.cons h '' { p' : G.Walk w v | p'.length = n } :=
@@ -2284,6 +2999,7 @@ theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
· rintro ⟨w, huw, pwv, rfl, rfl, rfl⟩
rfl
#align simple_graph.set_walk_length_succ_eq SimpleGraph.set_walk_length_succ_eq
+-/
variable (G) [DecidableEq V]
@@ -2291,6 +3007,7 @@ section LocallyFinite
variable [LocallyFinite G]
+#print SimpleGraph.finsetWalkLength /-
/-- The `finset` of length-`n` walks from `u` to `v`.
This is used to give `{p : G.walk u v | p.length = n}` a `fintype` instance, and it
can also be useful as a recursive description of this set when `V` is finite.
@@ -2307,7 +3024,9 @@ def finsetWalkLength : ∀ (n : ℕ) (u v : V), Finset (G.Walk u v)
Finset.univ.bunionᵢ fun w : G.neighborSet u =>
(finset_walk_length n w v).map ⟨fun p => Walk.cons w.property p, fun p q => by simp⟩
#align simple_graph.finset_walk_length SimpleGraph.finsetWalkLength
+-/
+#print SimpleGraph.coe_finsetWalkLength_eq /-
theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
(G.finsetWalkLength n u v : Set (G.Walk u v)) = { p : G.Walk u v | p.length = n } :=
by
@@ -2326,28 +3045,36 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
rw [← this]
rfl
#align simple_graph.coe_finset_walk_length_eq SimpleGraph.coe_finsetWalkLength_eq
+-/
variable {G}
+#print SimpleGraph.Walk.mem_finsetWalkLength_iff_length_eq /-
theorem Walk.mem_finsetWalkLength_iff_length_eq {n : ℕ} {u v : V} (p : G.Walk u v) :
p ∈ G.finsetWalkLength n u v ↔ p.length = n :=
Set.ext_iff.mp (G.coe_finsetWalkLength_eq n u v) p
#align simple_graph.walk.mem_finset_walk_length_iff_length_eq SimpleGraph.Walk.mem_finsetWalkLength_iff_length_eq
+-/
variable (G)
+#print SimpleGraph.fintypeSetWalkLength /-
instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype { p : G.Walk u v | p.length = n } :=
Fintype.ofFinset (G.finsetWalkLength n u v) fun p => by
rw [← Finset.mem_coe, coe_finset_walk_length_eq]
#align simple_graph.fintype_set_walk_length SimpleGraph.fintypeSetWalkLength
+-/
+#print SimpleGraph.set_walk_length_toFinset_eq /-
theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
{ p : G.Walk u v | p.length = n }.toFinset = G.finsetWalkLength n u v :=
by
ext p
simp [← coe_finset_walk_length_eq]
#align simple_graph.set_walk_length_to_finset_eq SimpleGraph.set_walk_length_toFinset_eq
+-/
+#print SimpleGraph.card_set_walk_length_eq /-
/- See `simple_graph.adj_matrix_pow_apply_eq_card_walk` for the cardinality in terms of the `n`th
power of the adjacency matrix. -/
theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
@@ -2355,12 +3082,15 @@ theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
Fintype.card_ofFinset (G.finsetWalkLength n u v) fun p => by
rw [← Finset.mem_coe, coe_finset_walk_length_eq]
#align simple_graph.card_set_walk_length_eq SimpleGraph.card_set_walk_length_eq
+-/
+#print SimpleGraph.fintypeSetPathLength /-
instance fintypeSetPathLength (u v : V) (n : ℕ) :
Fintype { p : G.Walk u v | p.IsPath ∧ p.length = n } :=
Fintype.ofFinset ((G.finsetWalkLength n u v).filterₓ Walk.IsPath) <| by
simp [walk.mem_finset_walk_length_iff_length_eq, and_comm']
#align simple_graph.fintype_set_path_length SimpleGraph.fintypeSetPathLength
+-/
end LocallyFinite
@@ -2368,6 +3098,7 @@ section Finite
variable [Fintype V] [DecidableRel G.Adj]
+#print SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty /-
theorem reachable_iff_exists_finsetWalkLength_nonempty (u v : V) :
G.Reachable u v ↔ ∃ n : Fin (Fintype.card V), (G.finsetWalkLength n u v).Nonempty :=
by
@@ -2379,6 +3110,7 @@ theorem reachable_iff_exists_finsetWalkLength_nonempty (u v : V) :
· rintro ⟨_, p, _⟩
use p
#align simple_graph.reachable_iff_exists_finset_walk_length_nonempty SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty
+-/
instance : DecidableRel G.Reachable := fun u v =>
decidable_of_iff' _ (reachable_iff_exists_finsetWalkLength_nonempty G u v)
@@ -2404,18 +3136,32 @@ section BridgeEdges
/-! ### Bridge edges -/
+#print SimpleGraph.IsBridge /-
/-- 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 :=
e ∈ G.edgeSetEmbedding ∧
Sym2.lift ⟨fun v w => ¬(G \ fromEdgeSet {e}).Reachable v w, by simp [reachable_comm]⟩ e
#align simple_graph.is_bridge SimpleGraph.IsBridge
+-/
+/- warning: simple_graph.is_bridge_iff -> SimpleGraph.isBridge_iff is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V}, Iff (SimpleGraph.IsBridge.{u1} V G (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))) (And (SimpleGraph.Adj.{u1} V G u v) (Not (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V u v))))) u v)))
+Case conversion may be inaccurate. Consider using '#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iffₓ'. -/
theorem isBridge_iff {u v : V} :
G.IsBridge ⟦(u, v)⟧ ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {⟦(u, v)⟧}).Reachable u v :=
Iff.rfl
#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iff
+/- warning: simple_graph.reachable_delete_edges_iff_exists_walk -> SimpleGraph.reachable_delete_edges_iff_exists_walk is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w) (Exists.{succ u1} (SimpleGraph.Walk.{u1} V G v w) (fun (p : SimpleGraph.Walk.{u1} V G v w) => Not (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G v w p))))
+Case conversion may be inaccurate. Consider using '#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walkₓ'. -/
theorem reachable_delete_edges_iff_exists_walk {v w : V} :
(G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔ ∃ p : G.Walk v w, ¬⟦(v, w)⟧ ∈ p.edges :=
by
@@ -2432,14 +3178,17 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
exact ⟨p.edges_subset_edge_set ep, fun h' => h (h' ▸ ep)⟩
#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walk
+#print SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges /-
theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
G.IsBridge ⟦(v, w)⟧ ↔ G.Adj v w ∧ ∀ p : G.Walk v w, ⟦(v, w)⟧ ∈ p.edges :=
by
rw [is_bridge_iff, and_congr_right']
rw [reachable_delete_edges_iff_exists_walk, not_exists_not]
#align simple_graph.is_bridge_iff_adj_and_forall_walk_mem_edges SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges
+-/
-theorem ReachableDeleteEdgesIffExistsCycle.aux [DecidableEq V] {u v w : V}
+#print SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux /-
+theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
(hb : ∀ p : G.Walk v w, ⟦(v, w)⟧ ∈ p.edges) (c : G.Walk u u) (hc : c.IsTrail)
(he : ⟦(v, w)⟧ ∈ c.edges)
(hw : w ∈ (c.takeUntil v (c.fst_mem_support_of_mem_edges he)).support) : False :=
@@ -2465,8 +3214,15 @@ theorem ReachableDeleteEdgesIffExistsCycle.aux [DecidableEq V] {u v w : V}
rw [walk.is_trail_def, this, walk.edges_append, walk.edges_append, List.nodup_append_comm, ←
List.append_assoc, ← walk.edges_append] at hc
exact List.disjoint_of_nodup_append hc hbq hpq'
-#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.ReachableDeleteEdgesIffExistsCycle.aux
+#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
+-/
+/- warning: simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle -> SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasSdiff.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasSingleton.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.Mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) (Quotient.mk'.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {v : V} {w : V}, Iff (And (SimpleGraph.Adj.{u1} V G v w) (SimpleGraph.Reachable.{u1} V (SDiff.sdiff.{u1} (SimpleGraph.{u1} V) (SimpleGraph.instSDiffSimpleGraph.{u1} V) G (SimpleGraph.fromEdgeSet.{u1} V (Singleton.singleton.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (Set.{u1} (Sym2.{u1} V)) (Set.instSingletonSet.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w))))) v w)) (Exists.{succ u1} V (fun (u : V) => Exists.{succ u1} (SimpleGraph.Walk.{u1} V G u u) (fun (p : SimpleGraph.Walk.{u1} V G u u) => And (SimpleGraph.Walk.IsCycle.{u1} V G u p) (Membership.mem.{u1, u1} (Quotient.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V)) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) (Quotient.mk.{succ u1} (Prod.{u1, u1} V V) (Sym2.Rel.setoid.{u1} V) (Prod.mk.{u1, u1} V V v w)) (SimpleGraph.Walk.edges.{u1} V G u u p)))))
+Case conversion may be inaccurate. Consider using '#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycleₓ'. -/
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
∃ (u : V)(p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges :=
@@ -2504,6 +3260,7 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
walk.take_spec, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
+#print SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem /-
theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
G.IsBridge ⟦(v, w)⟧ ↔ G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → ⟦(v, w)⟧ ∉ p.edges :=
by
@@ -2514,7 +3271,14 @@ theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
rw [← adj_and_reachable_delete_edges_iff_exists_cycle]
simp only [h, true_and_iff]
#align simple_graph.is_bridge_iff_adj_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem
+-/
+/- warning: simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem -> SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {e : Sym2.{u1} V}, Iff (SimpleGraph.IsBridge.{u1} V G e) (And (Membership.Mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.hasMem.{u1} (Sym2.{u1} V)) e (coeFn.{succ u1, succ u1} (OrderEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (SimpleGraph.hasLe.{u1} V) (Set.hasLe.{u1} (Sym2.{u1} V))) (fun (_x : RelEmbedding.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) => (SimpleGraph.{u1} V) -> (Set.{u1} (Sym2.{u1} V))) (RelEmbedding.hasCoeToFun.{u1, u1} (SimpleGraph.{u1} V) (Set.{u1} (Sym2.{u1} V)) (LE.le.{u1} (SimpleGraph.{u1} V) (SimpleGraph.hasLe.{u1} V)) (LE.le.{u1} (Set.{u1} (Sym2.{u1} V)) (Set.hasLe.{u1} (Sym2.{u1} V)))) (SimpleGraph.edgeSetEmbedding.{u1} V) G)) (forall {{u : V}} (p : SimpleGraph.Walk.{u1} V G u u), (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (Not (Membership.Mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.hasMem.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)))))
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {e : Sym2.{u1} V}, Iff (SimpleGraph.IsBridge.{u1} V G e) (And (Membership.mem.{u1, u1} (Sym2.{u1} V) (Set.{u1} (Sym2.{u1} V)) (Set.instMembershipSet.{u1} (Sym2.{u1} V)) e (SimpleGraph.edgeSet.{u1} V G)) (forall {{u : V}} (p : SimpleGraph.Walk.{u1} V G u u), (SimpleGraph.Walk.IsCycle.{u1} V G u p) -> (Not (Membership.mem.{u1, u1} (Sym2.{u1} V) (List.{u1} (Sym2.{u1} V)) (List.instMembershipList.{u1} (Sym2.{u1} V)) e (SimpleGraph.Walk.edges.{u1} V G u u p)))))
+Case conversion may be inaccurate. Consider using '#align simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_memₓ'. -/
theorem isBridge_iff_mem_and_forall_cycle_not_mem {e : Sym2 V} :
G.IsBridge e ↔ e ∈ G.edgeSetEmbedding ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges :=
Sym2.ind (fun v w => isBridge_iff_adj_and_forall_cycle_not_mem) e
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -494,8 +494,8 @@ theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
trans concat_rec_aux (@Hnil) (@Hconcat) (cons h.symm p.reverse)
· congr
simp
- · rw [concat_rec_aux, ndrec_hEq_iff_hEq]
- congr <;> simp [hEq_ndrec_iff_hEq]
+ · rw [concat_rec_aux, rec_heq_iff_heq]
+ congr <;> simp [heq_rec_iff_heq]
#align simple_graph.walk.concat_rec_concat SimpleGraph.Walk.concatRec_concat
end ConcatRec
mathlib commit https://github.com/leanprover-community/mathlib/commit/22131150f88a2d125713ffa0f4693e3355b1eb49
@@ -693,13 +693,13 @@ theorem chain'_dartAdj_darts : ∀ {u v : V} (p : G.Walk u v), List.Chain' G.Dar
/-- Every edge in a walk's edge list is an edge of the graph.
It is written in this form (rather than using `⊆`) to avoid unsightly coercions. -/
-theorem edges_subset_edgeSet :
- ∀ {u v : V} (p : G.Walk u v) ⦃e : Sym2 V⦄ (h : e ∈ p.edges), e ∈ G.edgeSet
+theorem edges_subset_edgeSetEmbedding :
+ ∀ {u v : V} (p : G.Walk u v) ⦃e : Sym2 V⦄ (h : e ∈ p.edges), e ∈ G.edgeSetEmbedding
| _, _, cons h' p', e, h => by rcases h with ⟨rfl, h⟩ <;> solve_by_elim
-#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSet
+#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSetEmbedding
theorem adj_of_mem_edges {u v x y : V} (p : G.Walk u v) (h : ⟦(x, y)⟧ ∈ p.edges) : G.Adj x y :=
- edges_subset_edgeSet p h
+ edges_subset_edgeSetEmbedding p h
#align simple_graph.walk.adj_of_mem_edges SimpleGraph.Walk.adj_of_mem_edges
@[simp]
@@ -1722,17 +1722,17 @@ variable {G}
/-- The walk `p` transferred to lie in `H`, given that `H` contains its edges. -/
@[protected, simp]
def transfer :
- ∀ {u v : V} (p : G.Walk u v) (H : SimpleGraph V) (h : ∀ e, e ∈ p.edges → e ∈ H.edgeSet),
- H.Walk u v
+ ∀ {u v : V} (p : G.Walk u v) (H : SimpleGraph V)
+ (h : ∀ e, e ∈ p.edges → e ∈ H.edgeSetEmbedding), H.Walk u v
| _, _, walk.nil, H, h => Walk.nil
| _, _, walk.cons' u v w a p, H, h =>
Walk.cons (h (⟦(u, v)⟧ : Sym2 V) (by simp)) (p.transfer H fun e he => h e (by simp [he]))
#align simple_graph.walk.transfer SimpleGraph.Walk.transfer
variable {u v w : V} (p : G.Walk u v) (q : G.Walk v w) {H : SimpleGraph V}
- (hp : ∀ e, e ∈ p.edges → e ∈ H.edgeSet) (hq : ∀ e, e ∈ q.edges → e ∈ H.edgeSet)
+ (hp : ∀ e, e ∈ p.edges → e ∈ H.edgeSetEmbedding) (hq : ∀ e, e ∈ q.edges → e ∈ H.edgeSetEmbedding)
-theorem transfer_self : p.transfer G p.edges_subset_edgeSet = p := by
+theorem transfer_self : p.transfer G p.edges_subset_edgeSetEmbedding = p := by
induction p <;> simp only [*, transfer, eq_self_iff_true, heq_iff_eq, and_self_iff]
#align simple_graph.walk.transfer_self SimpleGraph.Walk.transfer_self
@@ -1777,7 +1777,7 @@ protected theorem IsCycle.transfer {p : G.Walk u u} (pc : p.IsCycle) (hp) :
variable (p)
@[simp]
-theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSet) :
+theorem transfer_transfer {K : SimpleGraph V} (hp' : ∀ e, e ∈ p.edges → e ∈ K.edgeSetEmbedding) :
(p.transfer H hp).transfer K
(by
rw [p.edges_transfer hp]
@@ -2202,11 +2202,11 @@ theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = { w | w ∈ p.s
#align simple_graph.walk.verts_to_subgraph SimpleGraph.Walk.verts_toSubgraph
theorem mem_edges_toSubgraph (p : G.Walk u v) {e : Sym2 V} :
- e ∈ p.toSubgraph.edgeSet ↔ e ∈ p.edges := by induction p <;> simp [*]
+ e ∈ p.toSubgraph.edgeSetEmbedding ↔ e ∈ p.edges := by induction p <;> simp [*]
#align simple_graph.walk.mem_edges_to_subgraph SimpleGraph.Walk.mem_edges_toSubgraph
@[simp]
-theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSet = { e | e ∈ p.edges } :=
+theorem edgeSet_toSubgraph (p : G.Walk u v) : p.toSubgraph.edgeSetEmbedding = { e | e ∈ p.edges } :=
Set.ext fun _ => p.mem_edges_toSubgraph
#align simple_graph.walk.edge_set_to_subgraph SimpleGraph.Walk.edgeSet_toSubgraph
@@ -2407,7 +2407,7 @@ section BridgeEdges
/-- 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 :=
- e ∈ G.edgeSet ∧
+ e ∈ G.edgeSetEmbedding ∧
Sym2.lift ⟨fun v w => ¬(G \ fromEdgeSet {e}).Reachable v w, by simp [reachable_comm]⟩ e
#align simple_graph.is_bridge SimpleGraph.IsBridge
@@ -2516,7 +2516,7 @@ theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
#align simple_graph.is_bridge_iff_adj_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_adj_and_forall_cycle_not_mem
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 :=
+ G.IsBridge e ↔ e ∈ G.edgeSetEmbedding ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → e ∉ p.edges :=
Sym2.ind (fun v w => isBridge_iff_adj_and_forall_cycle_not_mem) e
#align simple_graph.is_bridge_iff_mem_and_forall_cycle_not_mem SimpleGraph.isBridge_iff_mem_and_forall_cycle_not_mem
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -1150,7 +1150,10 @@ def takeUntil {v w : V} : ∀ (p : G.Walk v w) (u : V), u ∈ p.support → G.Wa
if hx : v = u then
by subst u; exact Walk.nil
else
- cons r (takeUntil p u <| by cases h; exact (hx rfl).elim; assumption)
+ cons r (takeUntil p u <| by
+ cases h
+ · exact (hx rfl).elim
+ · assumption)
#align simple_graph.walk.take_until SimpleGraph.Walk.takeUntil
/-- Given a vertex in the support of a path, give the path from (and including) that vertex to
@@ -1162,7 +1165,10 @@ def dropUntil {v w : V} : ∀ (p : G.Walk v w) (u : V), u ∈ p.support → G.Wa
if hx : v = u then by
subst u
exact cons r p
- else dropUntil p u <| by cases h; exact (hx rfl).elim; assumption
+ else dropUntil p u <| by
+ cases h
+ · exact (hx rfl).elim
+ · assumption
#align simple_graph.walk.drop_until SimpleGraph.Walk.dropUntil
/-- The `takeUntil` and `dropUntil` functions split a walk into two pieces.
@@ -1491,7 +1497,7 @@ theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.leng
simp only [bypass]
split_ifs
· trans
- apply length_dropUntil_le
+ · apply length_dropUntil_le
rw [length_cons]
exact le_add_right ih
· rw [length_cons, length_cons]
@@ -1938,9 +1938,9 @@ abbrev toDeleteEdge (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges) :
theorem map_toDeleteEdges_eq (s : Set (Sym2 V)) {p : G.Walk v w} (hp) :
Walk.map (Hom.mapSpanningSubgraphs (G.deleteEdges_le s)) (p.toDeleteEdges s hp) = p := by
rw [← transfer_eq_map_of_le, transfer_transfer, transfer_self]
- · intros e
- rw [edges_transfer]
- apply edges_subset_edgeSet p
+ intros e
+ rw [edges_transfer]
+ apply edges_subset_edgeSet p
#align simple_graph.walk.map_to_delete_edges_eq SimpleGraph.Walk.map_toDeleteEdges_eq
protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V))
@@ -430,6 +430,28 @@ theorem exists_length_eq_zero_iff {u v : V} : (∃ p : G.Walk u v, p.length = 0)
theorem length_eq_zero_iff {u : V} {p : G.Walk u u} : p.length = 0 ↔ p = nil := by cases p <;> simp
#align simple_graph.walk.length_eq_zero_iff SimpleGraph.Walk.length_eq_zero_iff
+theorem getVert_append {u v w : V} (p : G.Walk u v) (q : G.Walk v w) (i : ℕ) :
+ (p.append q).getVert i = if i < p.length then p.getVert i else q.getVert (i - p.length) := by
+ induction p generalizing i with
+ | nil => simp
+ | cons h p ih => cases i <;> simp [getVert, ih, Nat.succ_lt_succ_iff]
+
+theorem getVert_reverse {u v : V} (p : G.Walk u v) (i : ℕ) :
+ p.reverse.getVert i = p.getVert (p.length - i) := by
+ induction p with
+ | nil => rfl
+ | cons h p ih =>
+ simp only [reverse_cons, getVert_append, length_reverse, ih, length_cons]
+ split_ifs
+ next hi =>
+ rw [Nat.succ_sub hi.le]
+ simp [getVert]
+ next hi =>
+ obtain rfl | hi' := Nat.eq_or_lt_of_not_lt hi
+ · simp [getVert]
+ · rw [Nat.eq_add_of_sub_eq (Nat.sub_pos_of_lt hi') rfl, Nat.sub_eq_zero_of_le hi']
+ simp [getVert]
+
section ConcatRec
variable {motive : ∀ u v : V, G.Walk u v → Sort*} (Hnil : ∀ {u : V}, motive u u nil)
u
to v
of length equal to G.dist u v
(#11814)
Checkout this conversation on zulip. Co-authored-by: Kyle Miller [kmill31415@gmail.com](mailto:kmill31415@gmail.com)
Co-authored-by: Rida Hamadani <106540880+Rida-Hamadani@users.noreply.github.com>
@@ -1476,6 +1476,24 @@ theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.leng
exact add_le_add_right ih 1
#align simple_graph.walk.length_bypass_le SimpleGraph.Walk.length_bypass_le
+lemma bypass_eq_self_of_length_le {u v : V} (p : G.Walk u v) (h : p.length ≤ p.bypass.length) :
+ p.bypass = p := by
+ induction p with
+ | nil => rfl
+ | cons h p ih =>
+ simp only [Walk.bypass]
+ split_ifs with hb
+ · exfalso
+ simp only [hb, Walk.bypass, Walk.length_cons, dif_pos] at h
+ apply Nat.not_succ_le_self p.length
+ calc p.length + 1
+ _ ≤ (p.bypass.dropUntil _ _).length := h
+ _ ≤ p.bypass.length := Walk.length_dropUntil_le p.bypass hb
+ _ ≤ p.length := Walk.length_bypass_le _
+ · simp only [hb, Walk.bypass, Walk.length_cons, not_false_iff, dif_neg, add_le_add_iff_right]
+ at h
+ rw [ih h]
+
/-- 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 :=
⟨p.bypass, p.bypass_isPath⟩
@@ -2576,7 +2576,7 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
constructor
· rintro ⟨p⟩
use p.map (Hom.mapSpanningSubgraphs (by simp))
- simp_rw [Walk.edges_map, List.mem_map, Hom.mapSpanningSubgraphs_apply, Sym2.map_id', id.def]
+ simp_rw [Walk.edges_map, List.mem_map, Hom.mapSpanningSubgraphs_apply, Sym2.map_id', id]
rintro ⟨e, h, rfl⟩
simpa using p.edges_subset_edgeSet h
· rintro ⟨p, h⟩
@@ -66,9 +66,6 @@ walks, trails, paths, circuits, cycles, bridge edges
-/
-set_option autoImplicit true
-
-
open Function
universe u v w
@@ -830,6 +827,8 @@ only if `p` has defeq endpoints. -/
inductive Nil : {v w : V} → G.Walk v w → Prop
| nil {u : V} : Nil (nil : G.Walk u u)
+variable {u v w : V}
+
@[simp] lemma nil_nil : (nil : G.Walk u u).Nil := Nil.nil
@[simp] lemma not_nil_cons {h : G.Adj u v} {p : G.Walk v w} : ¬ (cons h p).Nil := nofun
@@ -870,7 +869,7 @@ def sndOfNotNil (p : G.Walk v w) (hp : ¬ p.Nil) : V :=
p.notNilRec (fun h _ => h) hp
/-- The walk obtained by removing the first dart of a non-nil walk. -/
-def tail (p : G.Walk x y) (hp : ¬ p.Nil) : G.Walk (p.sndOfNotNil hp) y :=
+def tail (p : G.Walk u v) (hp : ¬ p.Nil) : G.Walk (p.sndOfNotNil hp) v :=
p.notNilRec (fun _ q => q) hp
/-- The first dart of a walk. -/
@@ -883,6 +882,8 @@ def firstDart (p : G.Walk v w) (hp : ¬ p.Nil) : G.Dart where
lemma edge_firstDart (p : G.Walk v w) (hp : ¬ p.Nil) :
(p.firstDart hp).edge = s(v, p.sndOfNotNil hp) := rfl
+variable {x y : V} -- TODO: rename to u, v, w instead?
+
@[simp] lemma cons_tail_eq (p : G.Walk x y) (hp : ¬ p.Nil) :
cons (p.adj_sndOfNotNil hp) (p.tail hp) = p :=
p.notNilRec (fun _ _ => rfl) hp
@@ -895,7 +896,7 @@ lemma edge_firstDart (p : G.Walk v w) (hp : ¬ p.Nil) :
(p.tail hp).length + 1 = p.length := by
rw [← length_cons, cons_tail_eq]
-@[simp] lemma nil_copy {p : G.Walk x y} (hx : x = x') (hy : y = y') :
+@[simp] lemma nil_copy {x' y' : V} {p : G.Walk x y} (hx : x = x') (hy : y = y') :
(p.copy hx hy).Nil = p.Nil := by
subst_vars; rfl
@@ -915,7 +916,7 @@ structure IsPath {u v : V} (p : G.Walk u v) extends IsTrail p : Prop where
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
-- Porting note: used to use `extends to_trail : is_trail p` in structure
-protected lemma IsPath.isTrail (h : IsPath p) : IsTrail p := h.toIsTrail
+protected lemma IsPath.isTrail {p : Walk G u v}(h : IsPath p) : IsTrail p := h.toIsTrail
#align simple_graph.walk.is_path.to_trail SimpleGraph.Walk.IsPath.isTrail
/-- A *circuit* at `u : V` is a nonempty trail beginning and ending at `u`. -/
@@ -926,7 +927,7 @@ structure IsCircuit {u : V} (p : G.Walk u u) extends IsTrail p : Prop where
#align simple_graph.walk.is_circuit_def SimpleGraph.Walk.isCircuit_def
-- Porting note: used to use `extends to_trail : is_trail p` in structure
-protected lemma IsCircuit.isTrail (h : IsCircuit p) : IsTrail p := h.toIsTrail
+protected lemma IsCircuit.isTrail {p : Walk G u u} (h : IsCircuit p) : IsTrail p := h.toIsTrail
#align simple_graph.walk.is_circuit.to_trail SimpleGraph.Walk.IsCircuit.isTrail
/-- A *cycle* at `u : V` is a circuit at `u` whose only repeating vertex
@@ -936,7 +937,7 @@ structure IsCycle {u : V} (p : G.Walk u u) extends IsCircuit p : Prop where
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
-- Porting note: used to use `extends to_circuit : is_circuit p` in structure
-protected lemma IsCycle.isCircuit (h : IsCycle p) : IsCircuit p := h.toIsCircuit
+protected lemma IsCycle.isCircuit {p : Walk G u u} (h : IsCycle p) : IsCircuit p := h.toIsCircuit
#align simple_graph.walk.is_cycle.to_circuit SimpleGraph.Walk.IsCycle.isCircuit
@[simp]
@@ -1041,7 +1042,7 @@ theorem cons_isPath_iff {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
constructor <;> simp (config := { contextual := true }) [isPath_def]
#align simple_graph.walk.cons_is_path_iff SimpleGraph.Walk.cons_isPath_iff
-protected lemma IsPath.cons (hp : p.IsPath) (hu : u ∉ p.support) {h : G.Adj u v} :
+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 :=
(cons_isPath_iff _ _).2 ⟨hp, hu⟩
@@ -1775,6 +1776,8 @@ theorem transfer_self : p.transfer G p.edges_subset_edgeSet = p := by
induction p <;> simp [*]
#align simple_graph.walk.transfer_self SimpleGraph.Walk.transfer_self
+variable {H : SimpleGraph V}
+
theorem transfer_eq_map_of_le (hp) (GH : G ≤ H) :
p.transfer H hp = p.map (SimpleGraph.Hom.mapSpanningSubgraphs GH) := by
induction p <;> simp [*]
@@ -1832,7 +1835,7 @@ theorem transfer_transfer (hp) {K : SimpleGraph V} (hp') :
#align simple_graph.walk.transfer_transfer SimpleGraph.Walk.transfer_transfer
@[simp]
-theorem transfer_append (q : G.Walk v w) (hpq) :
+theorem transfer_append {w : V} (q : G.Walk v w) (hpq) :
(p.append q).transfer H hpq =
(p.transfer H fun e he => hpq _ (by simp [he])).append
(q.transfer H fun e he => hpq _ (by simp [he])) := by
@@ -1882,6 +1885,8 @@ theorem toDeleteEdges_cons (s : Set (Sym2 V)) {u v w : V} (h : G.Adj u v) (p : G
rfl
#align simple_graph.walk.to_delete_edges_cons SimpleGraph.Walk.toDeleteEdges_cons
+variable {v w : V}
+
/-- Given a walk that avoids an edge, create a walk in the subgraph with that edge deleted.
This is an abbreviation for `SimpleGraph.Walk.toDeleteEdges`. -/
abbrev toDeleteEdge (e : Sym2 V) (p : G.Walk v w) (hp : e ∉ p.edges) :
@@ -1909,7 +1914,7 @@ protected theorem IsCycle.toDeleteEdges (s : Set (Sym2 V))
#align simple_graph.walk.is_cycle.to_delete_edges SimpleGraph.Walk.IsCycle.toDeleteEdges
@[simp]
-theorem toDeleteEdges_copy (s : Set (Sym2 V))
+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 := by
@@ -1987,14 +1992,15 @@ theorem reachable_iff_reflTransGen (u v : V) :
| tail _ ha hr => exact Reachable.trans hr ⟨Walk.cons ha Walk.nil⟩
#align simple_graph.reachable_iff_refl_trans_gen SimpleGraph.reachable_iff_reflTransGen
-protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G')
+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) :=
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
@[mono]
-protected lemma Reachable.mono {G G' : SimpleGraph V} (h : G ≤ G') (Guv : G.Reachable u v) :
- G'.Reachable u v := Guv.map (SimpleGraph.Hom.mapSpanningSubgraphs h)
+protected lemma Reachable.mono {u v : V} {G G' : SimpleGraph V}
+ (h : G ≤ G') (Guv : G.Reachable u v) : G'.Reachable u v :=
+ Guv.map (SimpleGraph.Hom.mapSpanningSubgraphs h)
theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
@@ -909,7 +909,7 @@ structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
#align simple_graph.walk.is_trail_def SimpleGraph.Walk.isTrail_def
/-- A *path* is a walk with no repeating vertices.
-Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
+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
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
@@ -1656,7 +1656,7 @@ alias ⟨_, map_isTrail_of_injective⟩ := map_isTrail_iff_of_injective
theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective f) :
(p.map f).IsCycle ↔ p.IsCycle := by
- rw [isCycle_def, isCycle_def, map_isTrail_iff_of_injective hinj, Ne.def, map_eq_nil_iff,
+ rw [isCycle_def, isCycle_def, map_isTrail_iff_of_injective hinj, Ne, map_eq_nil_iff,
support_map, ← List.map_tail, List.nodup_map_iff hinj]
#align simple_graph.walk.map_is_cycle_iff_of_injective SimpleGraph.Walk.map_isCycle_iff_of_injective
@@ -1080,6 +1080,14 @@ lemma IsCycle.ne_bot : ∀ {p : G.Walk u u}, p.IsCycle → G ≠ ⊥
| nil, hp => by cases hp.ne_nil rfl
| cons h _, hp => by rintro rfl; exact h
+lemma IsCycle.three_le_length {v : V} {p : G.Walk v v} (hp : p.IsCycle) : 3 ≤ p.length := by
+ have ⟨⟨hp, hp'⟩, _⟩ := hp
+ match p with
+ | .nil => simp at hp'
+ | .cons h .nil => simp at h
+ | .cons _ (.cons _ .nil) => simp at hp
+ | .cons _ (.cons _ (.cons _ _)) => simp_rw [SimpleGraph.Walk.length_cons]; omega
+
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 := by
simp only [Walk.isCycle_def, Walk.isPath_def, Walk.isTrail_def, edges_cons, List.nodup_cons,
These will be caught by the linter in a future lean version.
@@ -1757,7 +1757,7 @@ protected def transfer {u v : V} (p : G.Walk u v)
(H : SimpleGraph V) (h : ∀ e, e ∈ p.edges → e ∈ H.edgeSet) : H.Walk u v :=
match p with
| nil => nil
- | cons' u v w a p =>
+ | cons' u v w _ p =>
cons (h s(u, v) (by simp)) (p.transfer H fun e he => h e (by simp [he]))
#align simple_graph.walk.transfer SimpleGraph.Walk.transfer
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -76,7 +76,6 @@ universe u v w
namespace SimpleGraph
variable {V : Type u} {V' : Type v} {V'' : Type w}
-
variable (G : SimpleGraph V) (G' : SimpleGraph V') (G'' : SimpleGraph V'')
/-- A walk is a sequence of adjacent vertices. For vertices `u v : V`,
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0
branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -833,12 +833,12 @@ inductive Nil : {v w : V} → G.Walk v w → Prop
@[simp] lemma nil_nil : (nil : G.Walk u u).Nil := Nil.nil
-@[simp] lemma not_nil_cons {h : G.Adj u v} {p : G.Walk v w} : ¬ (cons h p).Nil := fun.
+@[simp] lemma not_nil_cons {h : G.Adj u v} {p : G.Walk v w} : ¬ (cons h p).Nil := nofun
instance (p : G.Walk v w) : Decidable p.Nil :=
match p with
| nil => isTrue .nil
- | cons _ _ => isFalse fun.
+ | cons _ _ => isFalse nofun
protected lemma Nil.eq {p : G.Walk v w} : p.Nil → v = w | .nil => rfl
@@ -2590,7 +2590,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
let puw := (c.takeUntil v hv).takeUntil w hw
let pwv := (c.takeUntil v hv).dropUntil w hw
let pvu := c.dropUntil v hv
- have : c = (puw.append pwv).append pvu := by simp
+ have : c = (puw.append pwv).append pvu := by simp [puw, pwv, pvu]
-- We have two walks from v to w
-- pvu puw
-- v ----> u ----> w
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -653,13 +653,13 @@ theorem chain_dartAdj_darts {d : G.Dart} {v w : V} (h : d.snd = v) (p : G.Walk v
List.Chain G.DartAdj d p.darts := by
induction p generalizing d with
| nil => exact List.Chain.nil
- -- porting note: needed to defer `h` and `rfl` to help elaboration
+ -- Porting note: needed to defer `h` and `rfl` to help elaboration
| cons h' p ih => exact List.Chain.cons (by exact h) (ih (by rfl))
#align simple_graph.walk.chain_dart_adj_darts SimpleGraph.Walk.chain_dartAdj_darts
theorem chain'_dartAdj_darts {u v : V} : ∀ (p : G.Walk u v), List.Chain' G.DartAdj p.darts
| nil => trivial
- -- porting note: needed to defer `rfl` to help elaboration
+ -- Porting note: needed to defer `rfl` to help elaboration
| cons h p => chain_dartAdj_darts (by rfl) p
#align simple_graph.walk.chain'_dart_adj_darts SimpleGraph.Walk.chain'_dartAdj_darts
@@ -915,7 +915,7 @@ structure IsPath {u v : V} (p : G.Walk u v) extends IsTrail p : Prop where
support_nodup : p.support.Nodup
#align simple_graph.walk.is_path SimpleGraph.Walk.IsPath
--- porting note: used to use `extends to_trail : is_trail p` in structure
+-- Porting note: used to use `extends to_trail : is_trail p` in structure
protected lemma IsPath.isTrail (h : IsPath p) : IsTrail p := h.toIsTrail
#align simple_graph.walk.is_path.to_trail SimpleGraph.Walk.IsPath.isTrail
@@ -926,7 +926,7 @@ structure IsCircuit {u : V} (p : G.Walk u u) extends IsTrail p : Prop where
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
#align simple_graph.walk.is_circuit_def SimpleGraph.Walk.isCircuit_def
--- porting note: used to use `extends to_trail : is_trail p` in structure
+-- Porting note: used to use `extends to_trail : is_trail p` in structure
protected lemma IsCircuit.isTrail (h : IsCircuit p) : IsTrail p := h.toIsTrail
#align simple_graph.walk.is_circuit.to_trail SimpleGraph.Walk.IsCircuit.isTrail
@@ -936,7 +936,7 @@ structure IsCycle {u : V} (p : G.Walk u u) extends IsCircuit p : Prop where
support_nodup : p.support.tail.Nodup
#align simple_graph.walk.is_cycle SimpleGraph.Walk.IsCycle
--- porting note: used to use `extends to_circuit : is_circuit p` in structure
+-- Porting note: used to use `extends to_circuit : is_circuit p` in structure
protected lemma IsCycle.isCircuit (h : IsCycle p) : IsCircuit p := h.toIsCircuit
#align simple_graph.walk.is_cycle.to_circuit SimpleGraph.Walk.IsCycle.isCircuit
@@ -1272,7 +1272,7 @@ protected theorem IsPath.takeUntil {u v w : V} {p : G.Walk v w} (hc : p.IsPath)
IsPath.of_append_left (by rwa [← take_spec _ h] at hc)
#align simple_graph.walk.is_path.take_until SimpleGraph.Walk.IsPath.takeUntil
--- porting note: p was previously accidentally an explicit argument
+-- Porting note: p was previously accidentally an explicit argument
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 :=
IsPath.of_append_right (by rwa [← take_spec _ h] at hc)
@@ -1811,7 +1811,7 @@ protected theorem IsCycle.transfer {q : G.Walk u u} (qc : q.IsCycle) (hq) :
variable (p)
--- porting note: this failed the simpNF linter since it was originally of the form
+-- Porting note: this failed the simpNF linter since it was originally of the form
-- `(p.transfer H hp).transfer K hp' = p.transfer K hp''` with `hp'` a function of `hp` and `hp'`.
-- This was a mistake and it's corrected here.
@[simp]
@@ -2606,7 +2606,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
exact List.disjoint_of_nodup_append hc hbq hpq'
#align simple_graph.reachable_delete_edges_iff_exists_cycle.aux SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux
--- porting note: the unused variable checker helped eliminate a good amount of this proof (!)
+-- Porting note: the unused variable checker helped eliminate a good amount of this proof (!)
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 := by
@@ -3,7 +3,6 @@ Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
-import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Data.List.Rotate
@@ -2037,7 +2037,7 @@ This follows the convention observed by mathlib that something is connected iff
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 connected_iff]
+@[mk_iff]
structure Connected : Prop where
protected preconnected : G.Preconnected
protected [nonempty : Nonempty V]
Sym2
's global Prod
setoid instance, use s(x, y)
notation for unordered pairs (#8729)
The Sym2
type used a global setoid instance on α × α
so that ⟦(x, y)⟧
could stand for an unordered pair using standard Quotient
syntax. This commit refactors Sym2
to not use Quotient
and instead use its own s(x, y)
notation. One benefit to this is that this notation produces a term with type Sym2
rather than Quotient
.
The Fintype
instance for Sym2
is in Mathlib.Data.Finset.Sym
. We switch from using the one for Quotient
because it does not require DecidableEq
.
@@ -674,7 +674,7 @@ theorem edges_subset_edgeSet {u v : V} :
next h' => exact edges_subset_edgeSet p' h'
#align simple_graph.walk.edges_subset_edge_set SimpleGraph.Walk.edges_subset_edgeSet
-theorem adj_of_mem_edges {u v x y : V} (p : G.Walk u v) (h : ⟦(x, y)⟧ ∈ p.edges) : G.Adj x y :=
+theorem adj_of_mem_edges {u v x y : V} (p : G.Walk u v) (h : s(x, y) ∈ p.edges) : G.Adj x y :=
edges_subset_edgeSet p h
#align simple_graph.walk.adj_of_mem_edges SimpleGraph.Walk.adj_of_mem_edges
@@ -739,12 +739,12 @@ theorem edges_nil {u : V} : (nil : G.Walk u u).edges = [] := rfl
@[simp]
theorem edges_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
- (cons h p).edges = ⟦(u, v)⟧ :: p.edges := rfl
+ (cons h p).edges = s(u, v) :: p.edges := rfl
#align simple_graph.walk.edges_cons SimpleGraph.Walk.edges_cons
@[simp]
theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
- (p.concat h).edges = p.edges.concat ⟦(v, w)⟧ := by simp [edges]
+ (p.concat h).edges = p.edges.concat s(v, w) := by simp [edges]
#align simple_graph.walk.edges_concat SimpleGraph.Walk.edges_concat
@[simp]
@@ -792,7 +792,7 @@ theorem dart_snd_mem_support_of_mem_darts {u v : V} (p : G.Walk u v) {d : G.Dart
simpa using p.reverse.dart_fst_mem_support_of_mem_darts (by simp [h] : d.symm ∈ p.reverse.darts)
#align simple_graph.walk.dart_snd_mem_support_of_mem_darts SimpleGraph.Walk.dart_snd_mem_support_of_mem_darts
-theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
+theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : s(t, u) ∈ p.edges) :
t ∈ p.support := by
obtain ⟨d, hd, he⟩ := List.mem_map.mp he
rw [dart_edge_eq_mk'_iff'] at he
@@ -801,7 +801,7 @@ theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t,
· exact dart_snd_mem_support_of_mem_darts _ hd
#align simple_graph.walk.fst_mem_support_of_mem_edges SimpleGraph.Walk.fst_mem_support_of_mem_edges
-theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
+theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : s(t, u) ∈ p.edges) :
u ∈ p.support := by
rw [Sym2.eq_swap] at he
exact p.fst_mem_support_of_mem_edges he
@@ -883,7 +883,7 @@ def firstDart (p : G.Walk v w) (hp : ¬ p.Nil) : G.Dart where
is_adj := p.adj_sndOfNotNil hp
lemma edge_firstDart (p : G.Walk v w) (hp : ¬ p.Nil) :
- (p.firstDart hp).edge = ⟦(v, p.sndOfNotNil hp)⟧ := rfl
+ (p.firstDart hp).edge = s(v, p.sndOfNotNil hp) := rfl
@[simp] lemma cons_tail_eq (p : G.Walk x y) (hp : ¬ p.Nil) :
cons (p.adj_sndOfNotNil hp) (p.tail hp) = p :=
@@ -993,7 +993,7 @@ theorem IsTrail.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
@[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 ∧ ⟦(u, v)⟧ ∉ p.edges := by simp [isTrail_def, and_comm]
+ (cons h p).IsTrail ↔ p.IsTrail ∧ s(u, v) ∉ p.edges := by simp [isTrail_def, and_comm]
#align simple_graph.walk.cons_is_trail_iff SimpleGraph.Walk.cons_isTrail_iff
theorem IsTrail.reverse {u v : V} (p : G.Walk u v) (h : p.IsTrail) : p.reverse.IsTrail := by
@@ -1083,7 +1083,7 @@ lemma IsCycle.ne_bot : ∀ {p : G.Walk u u}, p.IsCycle → G ≠ ⊥
| cons h _, hp => by rintro rfl; exact h
theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
- (Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬⟦(u, v)⟧ ∈ p.edges := by
+ (Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬s(u, v) ∈ p.edges := by
simp only [Walk.isCycle_def, Walk.isPath_def, Walk.isTrail_def, edges_cons, List.nodup_cons,
support_cons, List.tail_cons]
have : p.support.Nodup → p.edges.Nodup := edges_nodup_of_support_nodup
@@ -1174,7 +1174,7 @@ theorem count_support_takeUntil_eq_one {u v w : V} (p : G.Walk v w) (h : u ∈ p
#align simple_graph.walk.count_support_take_until_eq_one SimpleGraph.Walk.count_support_takeUntil_eq_one
theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) (x : V) :
- (p.takeUntil u h).edges.count ⟦(u, x)⟧ ≤ 1 := by
+ (p.takeUntil u h).edges.count s(u, x) ≤ 1 := by
induction' p with u' u' v' w' ha p' ih
· rw [mem_support_nil_iff] at h
subst u
@@ -1377,7 +1377,7 @@ def singleton {u v : V} (h : G.Adj u v) : G.Path u v :=
#align simple_graph.path.singleton SimpleGraph.Path.singleton
theorem mk'_mem_edges_singleton {u v : V} (h : G.Adj u v) :
- ⟦(u, v)⟧ ∈ (singleton h : G.Walk u v).edges := by simp [singleton]
+ s(u, v) ∈ (singleton h : G.Walk u v).edges := by simp [singleton]
#align simple_graph.path.mk_mem_edges_singleton SimpleGraph.Path.mk'_mem_edges_singleton
/-- The reverse of a path is another path. See also `SimpleGraph.Walk.reverse`. -/
@@ -1412,7 +1412,7 @@ theorem not_mem_edges_of_loop {v : V} {e : Sym2 V} {p : G.Path v v} : ¬e ∈ (p
#align simple_graph.path.not_mem_edges_of_loop SimpleGraph.Path.not_mem_edges_of_loop
theorem cons_isCycle {u v : V} (p : G.Path v u) (h : G.Adj u v)
- (he : ¬⟦(u, v)⟧ ∈ (p : G.Walk v u).edges) : (Walk.cons h ↑p).IsCycle := by
+ (he : ¬s(u, v) ∈ (p : G.Walk v u).edges) : (Walk.cons h ↑p).IsCycle := by
simp [Walk.isCycle_def, Walk.cons_isTrail_iff, he]
#align simple_graph.path.cons_is_cycle SimpleGraph.Path.cons_isCycle
@@ -1760,7 +1760,7 @@ protected def transfer {u v : V} (p : G.Walk u v)
match p with
| nil => nil
| cons' u v w a p =>
- cons (h ⟦(u, v)⟧ (by simp)) (p.transfer H fun e he => h e (by simp [he]))
+ cons (h s(u, v) (by simp)) (p.transfer H fun e he => h e (by simp [he]))
#align simple_graph.walk.transfer SimpleGraph.Walk.transfer
variable {u v : V} (p : G.Walk u v)
@@ -2556,11 +2556,11 @@ def IsBridge (G : SimpleGraph V) (e : Sym2 V) : Prop :=
#align simple_graph.is_bridge SimpleGraph.IsBridge
theorem isBridge_iff {u v : V} :
- G.IsBridge ⟦(u, v)⟧ ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {⟦(u, v)⟧}).Reachable u v := Iff.rfl
+ G.IsBridge s(u, v) ↔ G.Adj u v ∧ ¬(G \ fromEdgeSet {s(u, v)}).Reachable u v := Iff.rfl
#align simple_graph.is_bridge_iff SimpleGraph.isBridge_iff
theorem reachable_delete_edges_iff_exists_walk {v w : V} :
- (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔ ∃ p : G.Walk v w, ¬⟦(v, w)⟧ ∈ p.edges := by
+ (G \ fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ p : G.Walk v w, ¬s(v, w) ∈ p.edges := by
constructor
· rintro ⟨p⟩
use p.map (Hom.mapSpanningSubgraphs (by simp))
@@ -2575,14 +2575,14 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
#align simple_graph.reachable_delete_edges_iff_exists_walk SimpleGraph.reachable_delete_edges_iff_exists_walk
theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
- G.IsBridge ⟦(v, w)⟧ ↔ G.Adj v w ∧ ∀ p : G.Walk v w, ⟦(v, w)⟧ ∈ p.edges := by
+ G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ p : G.Walk v w, s(v, w) ∈ p.edges := by
rw [isBridge_iff, and_congr_right']
rw [reachable_delete_edges_iff_exists_walk, not_exists_not]
#align simple_graph.is_bridge_iff_adj_and_forall_walk_mem_edges SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges
theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
- (hb : ∀ p : G.Walk v w, ⟦(v, w)⟧ ∈ p.edges) (c : G.Walk u u) (hc : c.IsTrail)
- (he : ⟦(v, w)⟧ ∈ c.edges)
+ (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 := by
have hv := c.fst_mem_support_of_mem_edges he
-- decompose c into
@@ -2598,7 +2598,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- | ^
-- `-------------'
-- pwv.reverse
- -- so they both contain the edge ⟦(v, w)⟧, but that's a contradiction since c is a trail.
+ -- so they both contain the edge s(v, w), but that's a contradiction since c is a trail.
have hbq := hb (pvu.append puw)
have hpq' := hb pwv.reverse
rw [Walk.edges_reverse, List.mem_reverse] at hpq'
@@ -2609,8 +2609,8 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- porting note: the unused variable checker helped eliminate a good amount of this proof (!)
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
- G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
- ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges := by
+ 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 := by
classical
rw [reachable_delete_edges_iff_exists_walk]
constructor
@@ -2624,7 +2624,7 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
· rintro ⟨u, c, hc, he⟩
refine ⟨c.adj_of_mem_edges he, ?_⟩
by_contra! hb
- have hb' : ∀ p : G.Walk w v, ⟦(w, v)⟧ ∈ p.edges := by
+ have hb' : ∀ p : G.Walk w v, s(w, v) ∈ p.edges := by
intro p
simpa [Sym2.eq_swap] using hb p.reverse
have hvc : v ∈ c.support := Walk.fst_mem_support_of_mem_edges c he
@@ -2633,8 +2633,8 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
rwa [(Walk.rotate_edges c hvc).mem_iff, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
-theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} : G.IsBridge ⟦(v, w)⟧ ↔
- G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → ⟦(v, w)⟧ ∉ p.edges := by
+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 := by
rw [isBridge_iff, and_congr_right_iff]
intro h
rw [← not_iff_not]
@@ -2623,7 +2623,7 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
· simp only [Sym2.eq_swap, Walk.edges_cons, List.mem_cons, eq_self_iff_true, true_or_iff]
· rintro ⟨u, c, hc, he⟩
refine ⟨c.adj_of_mem_edges he, ?_⟩
- by_contra' hb
+ by_contra! hb
have hb' : ∀ p : G.Walk w v, ⟦(w, v)⟧ ∈ p.edges := by
intro p
simpa [Sym2.eq_swap] using hb p.reverse
Removes nonterminal simps on lines looking like simp [...]
@@ -1612,7 +1612,8 @@ theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
| nil => simp
| cons _ _ ih =>
rw [Walk.cons_isPath_iff] at hp
- simp [ih hp.1]
+ simp only [map_cons, cons_isPath_iff, ih hp.1, support_map, List.mem_map, not_exists, not_and,
+ true_and]
intro x hx hf
cases hinj hf
exact hp.2 hx
@@ -1079,8 +1079,8 @@ theorem IsCycle.not_of_nil {u : V} : ¬(nil : G.Walk u u).IsCycle := fun h => h.
#align simple_graph.walk.is_cycle.not_of_nil SimpleGraph.Walk.IsCycle.not_of_nil
lemma IsCycle.ne_bot : ∀ {p : G.Walk u u}, p.IsCycle → G ≠ ⊥
-| nil, hp => by cases hp.ne_nil rfl
-| cons h _, hp => by rintro rfl; exact h
+ | nil, hp => by cases hp.ne_nil rfl
+ | cons h _, hp => by rintro rfl; exact h
theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
(Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬⟦(u, v)⟧ ∈ p.edges := by
@@ -904,9 +904,11 @@ lemma edge_firstDart (p : G.Walk v w) (hp : ¬ p.Nil) :
/-! ### Trails, paths, circuits, cycles -/
/-- 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
#align simple_graph.walk.is_trail SimpleGraph.Walk.IsTrail
+#align simple_graph.walk.is_trail_def SimpleGraph.Walk.isTrail_def
/-- A *path* is a walk with no repeating vertices.
Use `simple_graph.walk.is_path.mk'` for a simpler constructor. -/
@@ -919,9 +921,11 @@ protected lemma IsPath.isTrail (h : IsPath p) : IsTrail p := h.toIsTrail
#align simple_graph.walk.is_path.to_trail SimpleGraph.Walk.IsPath.isTrail
/-- 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
#align simple_graph.walk.is_circuit SimpleGraph.Walk.IsCircuit
+#align simple_graph.walk.is_circuit_def SimpleGraph.Walk.isCircuit_def
-- porting note: used to use `extends to_trail : is_trail p` in structure
protected lemma IsCircuit.isTrail (h : IsCircuit p) : IsTrail p := h.toIsTrail
@@ -937,10 +941,6 @@ structure IsCycle {u : V} (p : G.Walk u u) extends IsCircuit p : Prop where
protected lemma IsCycle.isCircuit (h : IsCycle p) : IsCircuit p := h.toIsCircuit
#align simple_graph.walk.is_cycle.to_circuit SimpleGraph.Walk.IsCycle.isCircuit
-theorem isTrail_def {u v : V} (p : G.Walk u v) : p.IsTrail ↔ p.edges.Nodup :=
- ⟨IsTrail.edges_nodup, fun h => ⟨h⟩⟩
-#align simple_graph.walk.is_trail_def SimpleGraph.Walk.isTrail_def
-
@[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 := by
@@ -963,10 +963,6 @@ theorem isPath_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
rfl
#align simple_graph.walk.is_path_copy SimpleGraph.Walk.isPath_copy
-theorem isCircuit_def {u : V} (p : G.Walk u u) : p.IsCircuit ↔ p.IsTrail ∧ p ≠ nil :=
- Iff.intro (fun h => ⟨h.1, h.2⟩) fun h => ⟨h.1, h.2⟩
-#align simple_graph.walk.is_circuit_def SimpleGraph.Walk.isCircuit_def
-
@[simp]
theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
(p.copy hu hu).IsCircuit ↔ p.IsCircuit := by
@@ -1082,6 +1082,10 @@ theorem IsPath.of_append_right {u v w : V} {p : G.Walk u v} {q : G.Walk v w}
theorem IsCycle.not_of_nil {u : V} : ¬(nil : G.Walk u u).IsCycle := fun h => h.ne_nil rfl
#align simple_graph.walk.is_cycle.not_of_nil SimpleGraph.Walk.IsCycle.not_of_nil
+lemma IsCycle.ne_bot : ∀ {p : G.Walk u u}, p.IsCycle → G ≠ ⊥
+| nil, hp => by cases hp.ne_nil rfl
+| cons h _, hp => by rintro rfl; exact h
+
theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
(Walk.cons h p).IsCycle ↔ p.IsPath ∧ ¬⟦(u, v)⟧ ∈ p.edges := by
simp only [Walk.isCycle_def, Walk.isPath_def, Walk.isTrail_def, edges_cons, List.nodup_cons,
@@ -1644,7 +1644,7 @@ theorem map_isTrail_iff_of_injective (hinj : Function.Injective f) :
rw [← Sym2.map_pair_eq, edges_map, ← List.mem_map_of_injective (Sym2.map.injective hinj)]
#align simple_graph.walk.map_is_trail_iff_of_injective SimpleGraph.Walk.map_isTrail_iff_of_injective
-alias map_isTrail_iff_of_injective ↔ _ map_isTrail_of_injective
+alias ⟨_, map_isTrail_of_injective⟩ := map_isTrail_iff_of_injective
#align simple_graph.walk.map_is_trail_of_injective SimpleGraph.Walk.map_isTrail_of_injective
theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective f) :
@@ -1653,7 +1653,7 @@ theorem map_isCycle_iff_of_injective {p : G.Walk u u} (hinj : Function.Injective
support_map, ← List.map_tail, List.nodup_map_iff hinj]
#align simple_graph.walk.map_is_cycle_iff_of_injective SimpleGraph.Walk.map_isCycle_iff_of_injective
-alias map_isCycle_iff_of_injective ↔ _ map_isCycle_of_injective
+alias ⟨_, map_isCycle_of_injective⟩ := map_isCycle_iff_of_injective
#align simple_graph.walk.map_is_cycle_of_injective SimpleGraph.Walk.map_isCycle_of_injective
variable (p f)
@@ -1689,7 +1689,7 @@ theorem mapLe_isTrail {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Wal
map_isTrail_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_trail SimpleGraph.Walk.mapLe_isTrail
-alias mapLe_isTrail ↔ IsTrail.of_mapLe IsTrail.mapLe
+alias ⟨IsTrail.of_mapLe, IsTrail.mapLe⟩ := mapLe_isTrail
#align simple_graph.walk.is_trail.of_map_le SimpleGraph.Walk.IsTrail.of_mapLe
#align simple_graph.walk.is_trail.map_le SimpleGraph.Walk.IsTrail.mapLe
@@ -1699,7 +1699,7 @@ theorem mapLe_isPath {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Walk
map_isPath_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_path SimpleGraph.Walk.mapLe_isPath
-alias mapLe_isPath ↔ IsPath.of_mapLe IsPath.mapLe
+alias ⟨IsPath.of_mapLe, IsPath.mapLe⟩ := mapLe_isPath
#align simple_graph.walk.is_path.of_map_le SimpleGraph.Walk.IsPath.of_mapLe
#align simple_graph.walk.is_path.map_le SimpleGraph.Walk.IsPath.mapLe
@@ -1709,7 +1709,7 @@ theorem mapLe_isCycle {G G' : SimpleGraph V} (h : G ≤ G') {u : V} {p : G.Walk
map_isCycle_iff_of_injective Function.injective_id
#align simple_graph.walk.map_le_is_cycle SimpleGraph.Walk.mapLe_isCycle
-alias mapLe_isCycle ↔ IsCycle.of_mapLe IsCycle.mapLe
+alias ⟨IsCycle.of_mapLe, IsCycle.mapLe⟩ := mapLe_isCycle
#align simple_graph.walk.is_cycle.of_map_le SimpleGraph.Walk.IsCycle.of_mapLe
#align simple_graph.walk.is_cycle.map_le SimpleGraph.Walk.IsCycle.mapLe
@@ -2422,6 +2422,17 @@ theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
variable (G) [DecidableEq V]
+/-- Walks of length two from `u` to `v` correspond bijectively to common neighbours of `u` and `v`.
+Note that `u` and `v` may be the same. -/
+@[simps]
+def walkLengthTwoEquivCommonNeighbors (u v : V) :
+ {p : G.Walk u v // p.length = 2} ≃ G.commonNeighbors u v where
+ toFun p := ⟨p.val.getVert 1, match p with
+ | ⟨.cons _ (.cons _ .nil), hp⟩ => ⟨‹G.Adj u _›, ‹G.Adj _ v›.symm⟩⟩
+ invFun w := ⟨w.prop.1.toWalk.concat w.prop.2.symm, rfl⟩
+ left_inv | ⟨.cons _ (.cons _ .nil), hp⟩ => by rfl
+ right_inv _ := rfl
+
section LocallyFinite
variable [LocallyFinite G]
@@ -2474,6 +2485,9 @@ instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype {p : G.Walk u v | p.
rw [← Finset.mem_coe, coe_finsetWalkLength_eq]
#align simple_graph.fintype_set_walk_length SimpleGraph.fintypeSetWalkLength
+instance fintypeSubtypeWalkLength (u v : V) (n : ℕ) : Fintype {p : G.Walk u v // p.length = n} :=
+ fintypeSetWalkLength G u v n
+
theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
{p : G.Walk u v | p.length = n}.toFinset = G.finsetWalkLength n u v := by
ext p
Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.
The intent of this PR is to make autoImplicit
opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true
in the few files that rely on it.
That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.
I claim that many of the uses of autoImplicit
in these files are accidental; situations such as:
variables
are in scope, but pasting the lemma in the wrong sectionHaving set_option autoImplicit false
as the default prevents these types of mistake being made in the 90% of files where autoImplicit
s are not used at all, and causes them to be caught by CI during review.
I think there were various points during the port where we encouraged porters to delete the universes u v
lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.
A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18
as the no:dontcare:yes
vote ratio.
While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true
has been placed locally within a section, rather than at the top of the file.
@@ -67,6 +67,8 @@ walks, trails, paths, circuits, cycles, bridge edges
-/
+set_option autoImplicit true
+
open Function
(Replaces [mathlib#18454](https://github.com/leanprover-community/mathlib/pull/18454).)
Co-authored-by: Rémi Bottinelli <remi.bottinelli@bluewin.ch>
@@ -52,9 +52,6 @@ counterparts in [Chou1994].
on simple graphs for whether every vertex can be reached from every other,
and in the latter case, whether the vertex type is nonempty.
-* `SimpleGraph.Subgraph.Connected` gives subgraphs the connectivity
- predicate via `SimpleGraph.subgraph.coe`.
-
* `SimpleGraph.ConnectedComponent` is the type of connected components of
a given graph.
@@ -1986,6 +1983,10 @@ protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
+@[mono]
+protected lemma Reachable.mono {G G' : SimpleGraph V} (h : G ≤ G') (Guv : G.Reachable u v) :
+ G'.Reachable u v := Guv.map (SimpleGraph.Hom.mapSpanningSubgraphs h)
+
theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
@@ -2015,6 +2016,13 @@ theorem Preconnected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H)
hf.forall₂.2 fun _ _ => Nonempty.map (Walk.map _) <| hG _ _
#align simple_graph.preconnected.map SimpleGraph.Preconnected.map
+@[mono]
+protected lemma Preconnected.mono {G G' : SimpleGraph V} (h : G ≤ G') (hG : G.Preconnected) :
+ G'.Preconnected := fun u v => (hG u v).mono h
+
+lemma top_preconnected : (⊤ : SimpleGraph V).Preconnected := fun x y => by
+ if h : x = y then rw [h] else exact Adj.reachable h
+
theorem Iso.preconnected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
G.Preconnected ↔ H.Preconnected :=
⟨Preconnected.map e.toHom e.toEquiv.surjective,
@@ -2032,6 +2040,14 @@ structure Connected : Prop where
protected [nonempty : Nonempty V]
#align simple_graph.connected SimpleGraph.Connected
+lemma connected_iff_exists_forall_reachable : G.Connected ↔ ∃ v, ∀ w, G.Reachable v w := by
+ rw [connected_iff]
+ constructor
+ · rintro ⟨hp, ⟨v⟩⟩
+ exact ⟨v, fun w => hp v w⟩
+ · rintro ⟨v, h⟩
+ exact ⟨fun u w => (h u).symm.trans (h w), ⟨v⟩⟩
+
instance : CoeFun G.Connected fun _ => ∀ u v : V, G.Reachable u v := ⟨fun h => h.preconnected⟩
theorem Connected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (hf : Surjective f)
@@ -2040,6 +2056,15 @@ theorem Connected.map {G : SimpleGraph V} {H : SimpleGraph V'} (f : G →g H) (h
⟨hG.preconnected.map f hf⟩
#align simple_graph.connected.map SimpleGraph.Connected.map
+@[mono]
+protected lemma Connected.mono {G G' : SimpleGraph V} (h : G ≤ G')
+ (hG : G.Connected) : G'.Connected where
+ preconnected := hG.preconnected.mono h
+ nonempty := hG.nonempty
+
+lemma top_connected [Nonempty V] : (⊤ : SimpleGraph V).Connected where
+ preconnected := top_preconnected
+
theorem Iso.connected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
G.Connected ↔ H.Connected :=
⟨Connected.map e.toHom e.toEquiv.surjective, Connected.map e.symm.toHom e.symm.toEquiv.surjective⟩
@@ -2257,28 +2282,6 @@ def isoEquivSupp (φ : G ≃g G') (C : G.ConnectedComponent) :
end ConnectedComponent
-/-- A subgraph is connected if it is connected as a simple graph. -/
-abbrev Subgraph.Connected (H : G.Subgraph) : Prop :=
- H.coe.Connected
-#align simple_graph.subgraph.connected SimpleGraph.Subgraph.Connected
-
-theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
- constructor
- rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [singletonSubgraph_verts, Set.mem_singleton_iff] at ha hb
- subst_vars
- rfl
-#align simple_graph.singleton_subgraph_connected SimpleGraph.singletonSubgraph_connected
-
-@[simp]
-theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
- constructor
- rintro ⟨a, ha⟩ ⟨b, hb⟩
- simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
- obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
- first | rfl | (apply Adj.reachable; simp)
-#align simple_graph.subgraph_of_adj_connected SimpleGraph.subgraphOfAdj_connected
-
theorem Preconnected.set_univ_walk_nonempty (hconn : G.Preconnected) (u v : V) :
(Set.univ : Set (G.Walk u v)).Nonempty := by
rw [← Set.nonempty_iff_univ_nonempty]
@@ -2316,6 +2319,12 @@ theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w
simp [ih, or_assoc, this]
#align simple_graph.walk.mem_verts_to_subgraph SimpleGraph.Walk.mem_verts_toSubgraph
+lemma start_mem_verts_toSubgraph (p : G.Walk u v) : u ∈ p.toSubgraph.verts := by
+ simp [mem_verts_toSubgraph]
+
+lemma end_mem_verts_toSubgraph (p : G.Walk u v) : v ∈ p.toSubgraph.verts := by
+ simp [mem_verts_toSubgraph]
+
@[simp]
theorem verts_toSubgraph (p : G.Walk u v) : p.toSubgraph.verts = { w | w ∈ p.support } :=
Set.ext fun _ => p.mem_verts_toSubgraph
@@ -2370,6 +2379,11 @@ theorem finite_neighborSet_toSubgraph (p : G.Walk u v) : (p.toSubgraph.neighborS
apply Set.toFinite
#align simple_graph.walk.finite_neighbor_set_to_subgraph SimpleGraph.Walk.finite_neighborSet_toSubgraph
+lemma toSubgraph_le_induce_support (p : G.Walk u v) :
+ p.toSubgraph ≤ (⊤ : G.Subgraph).induce {v | v ∈ p.support} := by
+ convert Subgraph.le_induce_top_verts
+ exact p.verts_toSubgraph.symm
+
end Walk
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -438,7 +438,7 @@ theorem length_eq_zero_iff {u : V} {p : G.Walk u u} : p.length = 0 ↔ p = nil :
section ConcatRec
-variable {motive : ∀ u v : V, G.Walk u v → Sort _} (Hnil : ∀ {u : V}, motive u u nil)
+variable {motive : ∀ u v : V, G.Walk u v → Sort*} (Hnil : ∀ {u : V}, motive u u nil)
(Hconcat : ∀ {u v w : V} (p : G.Walk u v) (h : G.Adj v w), motive u v p → motive u w (p.concat h))
/-- Auxiliary definition for `SimpleGraph.Walk.concatRec` -/
@@ -857,7 +857,7 @@ lemma not_nil_iff {p : G.Walk v w} :
cases p <;> simp [*]
@[elab_as_elim]
-def notNilRec {motive : {u w : V} → (p : G.Walk u w) → (h : ¬ p.Nil) → Sort _}
+def notNilRec {motive : {u w : V} → (p : G.Walk u w) → (h : ¬ p.Nil) → Sort*}
(cons : {u v w : V} → (h : G.Adj u v) → (q : G.Walk v w) → motive (cons h q) not_nil_cons)
(p : G.Walk u w) : (hp : ¬ p.Nil) → motive p hp :=
match p with
@@ -2099,13 +2099,13 @@ theorem connectedComponentMk_eq_of_adj {v w : V} (a : G.Adj v w) :
/-- The `ConnectedComponent` specialization of `Quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
-protected def lift {β : Sort _} (f : V → β)
+protected def lift {β : Sort*} (f : V → β)
(h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w) : G.ConnectedComponent → β :=
Quot.lift f fun v w (h' : G.Reachable v w) => h'.elim_path fun hp => h v w hp hp.2
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
@[simp]
-protected theorem lift_mk {β : Sort _} {f : V → β}
+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 :=
rfl
Port/review of [mathlib#18638](https://github.com/leanprover-community/mathlib/pull/18638) directly to Mathlib4.
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@@ -556,6 +556,7 @@ theorem support_reverse {u v : V} (p : G.Walk u v) : p.reverse.support = p.suppo
induction p <;> simp [support_append, *]
#align simple_graph.walk.support_reverse SimpleGraph.Walk.support_reverse
+@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ [] := by cases p <;> simp
#align simple_graph.walk.support_ne_nil SimpleGraph.Walk.support_ne_nil
@@ -825,6 +826,81 @@ theorem edges_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.N
exact ⟨fun h' => h.1 (fst_mem_support_of_mem_edges p' h'), ih h.2⟩
#align simple_graph.walk.edges_nodup_of_support_nodup SimpleGraph.Walk.edges_nodup_of_support_nodup
+/-- Predicate for the empty walk.
+
+Solves the dependent type problem where `p = G.Walk.nil` typechecks
+only if `p` has defeq endpoints. -/
+inductive Nil : {v w : V} → G.Walk v w → Prop
+ | nil {u : V} : Nil (nil : G.Walk u u)
+
+@[simp] lemma nil_nil : (nil : G.Walk u u).Nil := Nil.nil
+
+@[simp] lemma not_nil_cons {h : G.Adj u v} {p : G.Walk v w} : ¬ (cons h p).Nil := fun.
+
+instance (p : G.Walk v w) : Decidable p.Nil :=
+ match p with
+ | nil => isTrue .nil
+ | cons _ _ => isFalse fun.
+
+protected lemma Nil.eq {p : G.Walk v w} : p.Nil → v = w | .nil => rfl
+
+lemma not_nil_of_ne {p : G.Walk v w} : v ≠ w → ¬ p.Nil := mt Nil.eq
+
+lemma nil_iff_support_eq {p : G.Walk v w} : p.Nil ↔ p.support = [v] := by
+ cases p <;> simp
+
+lemma nil_iff_length_eq {p : G.Walk v w} : p.Nil ↔ p.length = 0 := by
+ cases p <;> simp
+
+lemma not_nil_iff {p : G.Walk v w} :
+ ¬ p.Nil ↔ ∃ (u : V) (h : G.Adj v u) (q : G.Walk u w), p = cons h q := by
+ cases p <;> simp [*]
+
+@[elab_as_elim]
+def notNilRec {motive : {u w : V} → (p : G.Walk u w) → (h : ¬ p.Nil) → Sort _}
+ (cons : {u v w : V} → (h : G.Adj u v) → (q : G.Walk v w) → motive (cons h q) not_nil_cons)
+ (p : G.Walk u w) : (hp : ¬ p.Nil) → motive p hp :=
+ match p with
+ | nil => fun hp => absurd .nil hp
+ | .cons h q => fun _ => cons h q
+
+/-- The second vertex along a non-nil walk. -/
+def sndOfNotNil (p : G.Walk v w) (hp : ¬ p.Nil) : V :=
+ p.notNilRec (@fun _ u _ _ _ => u) hp
+
+@[simp] lemma adj_sndOfNotNil {p : G.Walk v w} (hp : ¬ p.Nil) :
+ G.Adj v (p.sndOfNotNil hp) :=
+ p.notNilRec (fun h _ => h) hp
+
+/-- The walk obtained by removing the first dart of a non-nil walk. -/
+def tail (p : G.Walk x y) (hp : ¬ p.Nil) : G.Walk (p.sndOfNotNil hp) y :=
+ p.notNilRec (fun _ q => q) hp
+
+/-- The first dart of a walk. -/
+@[simps]
+def firstDart (p : G.Walk v w) (hp : ¬ p.Nil) : G.Dart where
+ fst := v
+ snd := p.sndOfNotNil hp
+ is_adj := p.adj_sndOfNotNil hp
+
+lemma edge_firstDart (p : G.Walk v w) (hp : ¬ p.Nil) :
+ (p.firstDart hp).edge = ⟦(v, p.sndOfNotNil hp)⟧ := rfl
+
+@[simp] lemma cons_tail_eq (p : G.Walk x y) (hp : ¬ p.Nil) :
+ cons (p.adj_sndOfNotNil hp) (p.tail hp) = p :=
+ p.notNilRec (fun _ _ => rfl) hp
+
+@[simp] lemma cons_support_tail (p : G.Walk x y) (hp : ¬ p.Nil) :
+ x :: (p.tail hp).support = p.support := by
+ rw [← support_cons, cons_tail_eq]
+
+@[simp] lemma length_tail_add_one {p : G.Walk x y} (hp : ¬ p.Nil) :
+ (p.tail hp).length + 1 = p.length := by
+ rw [← length_cons, cons_tail_eq]
+
+@[simp] lemma nil_copy {p : G.Walk x y} (hx : x = x') (hy : y = y') :
+ (p.copy hx hy).Nil = p.Nil := by
+ subst_vars; rfl
/-! ### Trails, paths, circuits, cycles -/
@@ -972,6 +1048,10 @@ theorem cons_isPath_iff {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
constructor <;> simp (config := { contextual := true }) [isPath_def]
#align simple_graph.walk.cons_is_path_iff SimpleGraph.Walk.cons_isPath_iff
+protected lemma IsPath.cons (hp : p.IsPath) (hu : u ∉ p.support) {h : G.Adj u v} :
+ (cons h p).IsPath :=
+ (cons_isPath_iff _ _).2 ⟨hp, hu⟩
+
@[simp]
theorem isPath_iff_eq_nil {u : V} (p : G.Walk u u) : p.IsPath ↔ p = nil := by
cases p <;> simp [IsPath.nil]
@@ -1011,6 +1091,10 @@ theorem cons_isCycle_iff {u v : V} (p : G.Walk v u) (h : G.Adj u v) :
tauto
#align simple_graph.walk.cons_is_cycle_iff SimpleGraph.Walk.cons_isCycle_iff
+lemma IsPath.tail {p : G.Walk u v} (hp : p.IsPath) (hp' : ¬ p.Nil) : (p.tail hp').IsPath := by
+ rw [Walk.isPath_def] at hp ⊢
+ rw [← cons_support_tail _ hp', List.nodup_cons] at hp
+ exact hp.2
/-! ### About paths -/
Various adaptations to changes when Fin
API was moved to Std. One notable change is that many lemmas are now stated in terms of i ≠ 0
(for i : Fin n
) rather then i.1 ≠ 0
, and as a consequence many Fin.vne_of_ne
applications have been added or removed, mostly removed.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Wojciech Nawrocki <wjnawrocki@protonmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -1754,7 +1754,7 @@ theorem transfer_append (q : G.Walk v w) (hpq) :
@[simp]
theorem reverse_transfer (hp) :
(p.transfer H hp).reverse =
- p.reverse.transfer H (by simp only [edges_reverse, List.mem_reverse']; exact hp) := by
+ p.reverse.transfer H (by simp only [edges_reverse, List.mem_reverse]; exact hp) := by
induction p with
| nil => simp
| cons _ _ ih => simp only [transfer_append, Walk.transfer, reverse_nil, reverse_cons, ih]
@@ -2486,7 +2486,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- so they both contain the edge ⟦(v, w)⟧, but that's a contradiction since c is a trail.
have hbq := hb (pvu.append puw)
have hpq' := hb pwv.reverse
- rw [Walk.edges_reverse, List.mem_reverse'] at hpq'
+ rw [Walk.edges_reverse, List.mem_reverse] at hpq'
rw [Walk.isTrail_def, this, Walk.edges_append, Walk.edges_append, List.nodup_append_comm,
← List.append_assoc, ← Walk.edges_append] at hc
exact List.disjoint_of_nodup_append hc hbq hpq'
@@ -1481,7 +1481,7 @@ theorem map_map : (p.map f).map f' = p.map (f'.comp f) := by
#align simple_graph.walk.map_map SimpleGraph.Walk.map_map
/-- Unlike categories, for graphs vertex equality is an important notion, so needing to be able to
-to work with equality of graph homomorphisms is a necessary evil. -/
+work with equality of graph homomorphisms is a necessary evil. -/
theorem map_eq_of_eq {f : G →g G'} (f' : G →g G') (h : f = f') :
p.map f = (p.map f').copy (h ▸ rfl) (h ▸ rfl) := by
subst_vars
@@ -2,16 +2,13 @@
Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit b99e2d58a5e6861833fa8de11e51a81144258db4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Data.List.Rotate
+#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4"
+
/-!
# Graph connectivity
@@ -671,7 +671,7 @@ theorem chain'_dartAdj_darts {u v : V} : ∀ (p : G.Walk u v), List.Chain' G.Dar
It is written in this form (rather than using `⊆`) to avoid unsightly coercions. -/
theorem edges_subset_edgeSet {u v : V} :
∀ (p : G.Walk u v) ⦃e : Sym2 V⦄, e ∈ p.edges → e ∈ G.edgeSet
- | cons h' p', e, h => by
+ | cons h' p', e, h => by
cases h
· exact h'
next h' => exact edges_subset_edgeSet p' h'
@@ -1699,7 +1699,7 @@ theorem edges_transfer (hp) : (p.transfer H hp).edges = p.edges := by
#align simple_graph.walk.edges_transfer SimpleGraph.Walk.edges_transfer
@[simp]
-theorem support_transfer (hp) : (p.transfer H hp).support = p.support := by
+theorem support_transfer (hp) : (p.transfer H hp).support = p.support := by
induction p <;> simp [*]
#align simple_graph.walk.support_transfer SimpleGraph.Walk.support_transfer
@@ -166,7 +166,7 @@ theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v)
#align simple_graph.walk.cons_copy SimpleGraph.Walk.cons_copy
theorem exists_eq_cons_of_ne {u v : V} (hne : u ≠ v) :
- ∀ (p : G.Walk u v), ∃ (w : V)(h : G.Adj u w)(p' : G.Walk w v), p = cons h p'
+ ∀ (p : G.Walk u v), ∃ (w : V) (h : G.Adj u w) (p' : G.Walk w v), p = cons h p'
| nil => (hne rfl).elim
| cons h p' => ⟨_, h, p', rfl⟩
#align simple_graph.walk.exists_eq_cons_of_ne SimpleGraph.Walk.exists_eq_cons_of_ne
@@ -300,7 +300,7 @@ theorem concat_append {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk
/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
- ∃ (x : V)(q : G.Walk u x)(h' : G.Adj x w), cons h p = q.concat h' := by
+ ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.concat h' := by
induction p generalizing u with
| nil => exact ⟨_, nil, h, rfl⟩
| cons h' p ih =>
@@ -312,7 +312,7 @@ theorem exists_cons_eq_concat {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
/-- A non-trivial `concat` walk is representable as a `cons` walk. -/
theorem exists_concat_eq_cons {u v w : V} :
∀ (p : G.Walk u v) (h : G.Adj v w),
- ∃ (x : V)(h' : G.Adj u x)(q : G.Walk x w), p.concat h = cons h' q
+ ∃ (x : V) (h' : G.Adj u x) (q : G.Walk x w), p.concat h = cons h' q
| nil, h => ⟨_, h, nil, rfl⟩
| cons h' p, h => ⟨_, h', Walk.concat p h, concat_cons _ _ _⟩
#align simple_graph.walk.exists_concat_eq_cons SimpleGraph.Walk.exists_concat_eq_cons
@@ -1072,7 +1072,7 @@ theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
#align simple_graph.walk.take_spec SimpleGraph.Walk.take_spec
theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
- {p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w)(r : G.Walk w v), p = q.append r := by
+ {p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r := by
classical
constructor
· exact fun h => ⟨_, _, (p.take_spec h).symm⟩
@@ -2498,7 +2498,7 @@ theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
-- porting note: the unused variable checker helped eliminate a good amount of this proof (!)
theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
G.Adj v w ∧ (G \ fromEdgeSet {⟦(v, w)⟧}).Reachable v w ↔
- ∃ (u : V)(p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges := by
+ ∃ (u : V) (p : G.Walk u u), p.IsCycle ∧ ⟦(v, w)⟧ ∈ p.edges := by
classical
rw [reachable_delete_edges_iff_exists_walk]
constructor
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -2315,7 +2315,7 @@ theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
cases' p with _ _ w _ huw pwv
· simp [eq_comm]
· simp only [Nat.succ_eq_add_one, Set.mem_setOf_eq, Walk.length_cons, add_left_inj,
- Set.mem_unionᵢ, Set.mem_image, exists_prop]
+ Set.mem_iUnion, Set.mem_image, exists_prop]
constructor
· rintro rfl
exact ⟨w, huw, pwv, rfl, rfl⟩
@@ -2343,7 +2343,7 @@ def finsetWalkLength (n : ℕ) (u v : V) : Finset (G.Walk u v) :=
exact {Walk.nil}
else ∅
| n + 1 =>
- Finset.univ.bunionᵢ fun (w : G.neighborSet u) =>
+ Finset.univ.biUnion fun (w : G.neighborSet u) =>
(finsetWalkLength n w v).map ⟨fun p => Walk.cons w.property p, fun _ _ => by simp⟩
#align simple_graph.finset_walk_length SimpleGraph.finsetWalkLength
@@ -2351,11 +2351,11 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
(G.finsetWalkLength n u v : Set (G.Walk u v)) = {p : G.Walk u v | p.length = n} := by
induction' n with n ih generalizing u v
· obtain rfl | huv := eq_or_ne u v <;> simp [finsetWalkLength, set_walk_length_zero_eq_of_ne, *]
- · simp only [finsetWalkLength, set_walk_length_succ_eq, Finset.coe_bunionᵢ, Finset.mem_coe,
- Finset.mem_univ, Set.unionᵢ_true]
+ · simp only [finsetWalkLength, set_walk_length_succ_eq, Finset.coe_biUnion, Finset.mem_coe,
+ Finset.mem_univ, Set.iUnion_true]
ext p
- simp only [mem_neighborSet, Finset.coe_map, Embedding.coeFn_mk, Set.unionᵢ_coe_set,
- Set.mem_unionᵢ, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq]
+ simp only [mem_neighborSet, Finset.coe_map, Embedding.coeFn_mk, Set.iUnion_coe_set,
+ Set.mem_iUnion, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq]
congr!
rename_i w _ q
have := Set.ext_iff.mp (ih w v) q
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -1887,8 +1887,8 @@ protected theorem Reachable.trans {u v w : V} (huv : G.Reachable u v) (hvw : G.R
huv.elim fun puv => hvw.elim fun pvw => ⟨puv.append pvw⟩
#align simple_graph.reachable.trans SimpleGraph.Reachable.trans
-theorem reachable_iff_reflTransGen (u v : V) : G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v :=
- by
+theorem reachable_iff_reflTransGen (u v : V) :
+ G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v := by
constructor
· rintro ⟨h⟩
induction h with
@@ -2521,9 +2521,8 @@ theorem adj_and_reachable_delete_edges_iff_exists_cycle {v w : V} :
rwa [(Walk.rotate_edges c hvc).mem_iff, Sym2.eq_swap]
#align simple_graph.adj_and_reachable_delete_edges_iff_exists_cycle SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle
-theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} :
- G.IsBridge ⟦(v, w)⟧ ↔ G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → ⟦(v, w)⟧ ∉ p.edges :=
- by
+theorem isBridge_iff_adj_and_forall_cycle_not_mem {v w : V} : G.IsBridge ⟦(v, w)⟧ ↔
+ G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → ⟦(v, w)⟧ ∉ p.edges := by
rw [isBridge_iff, and_congr_right_iff]
intro h
rw [← not_iff_not]
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit e876965f7ee86f683b44e2f462ab5bfb47f993b3
+! leanprover-community/mathlib commit b99e2d58a5e6861833fa8de11e51a81144258db4
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -1905,6 +1905,16 @@ protected theorem Reachable.map {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G
h.elim fun p => ⟨p.map f⟩
#align simple_graph.reachable.map SimpleGraph.Reachable.map
+theorem Iso.reachable_iff {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u v : V} :
+ G'.Reachable (φ u) (φ v) ↔ G.Reachable u v :=
+ ⟨fun r => φ.left_inv u ▸ φ.left_inv v ▸ r.map φ.symm.toHom, Reachable.map φ.toHom⟩
+#align simple_graph.iso.reachable_iff SimpleGraph.Iso.reachable_iff
+
+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) := by
+ rw [← Iso.reachable_iff, RelIso.apply_symm_apply]
+#align simple_graph.iso.symm_apply_reachable SimpleGraph.Iso.symm_apply_reachable
+
variable (G)
theorem reachable_is_equivalence : Equivalence G.Reachable :=
@@ -2001,6 +2011,11 @@ protected theorem eq {v w : V} :
@Quotient.eq' _ G.reachableSetoid _ _
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
+theorem connectedComponentMk_eq_of_adj {v w : V} (a : G.Adj v w) :
+ G.connectedComponentMk v = G.connectedComponentMk w :=
+ ConnectedComponent.sound a.reachable
+#align simple_graph.connected_component.connected_component_mk_eq_of_adj SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj
+
/-- The `ConnectedComponent` specialization of `Quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
protected def lift {β : Sort _} (f : V → β)
@@ -2055,6 +2070,110 @@ theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'')
exact fun _ => rfl
#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_comp
+variable {φ : G ≃g G'} {v : V} {v' : V'}
+
+@[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 := by
+ refine' C.ind fun u => _
+ simp only [Iso.reachable_iff, ConnectedComponent.map_mk, RelEmbedding.coe_toRelHom,
+ RelIso.coe_toRelEmbedding, ConnectedComponent.eq]
+#align simple_graph.connected_component.iso_image_comp_eq_map_iff_eq_comp SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
+
+@[simp]
+theorem iso_inv_image_comp_eq_iff_eq_map {C : G.ConnectedComponent} :
+ G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = C.map φ := by
+ refine' C.ind fun u => _
+ simp only [Iso.symm_apply_reachable, ConnectedComponent.eq, ConnectedComponent.map_mk,
+ RelEmbedding.coe_toRelHom, RelIso.coe_toRelEmbedding]
+#align simple_graph.connected_component.iso_inv_image_comp_eq_iff_eq_map SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map
+
+end ConnectedComponent
+
+namespace Iso
+
+/-- An isomorphism of graphs induces a bijection of connected components. -/
+@[simps]
+def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent where
+ toFun := ConnectedComponent.map φ
+ invFun := ConnectedComponent.map φ.symm
+ left_inv C := ConnectedComponent.ind
+ (fun v => congr_arg G.connectedComponentMk (Equiv.left_inv φ.toEquiv v)) C
+ right_inv C := ConnectedComponent.ind
+ (fun v => congr_arg G'.connectedComponentMk (Equiv.right_inv φ.toEquiv v)) C
+#align simple_graph.iso.connected_component_equiv SimpleGraph.Iso.connectedComponentEquiv
+
+@[simp]
+theorem connectedComponentEquiv_refl :
+ (Iso.refl : G ≃g G).connectedComponentEquiv = Equiv.refl _ := by
+ ext ⟨v⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_refl SimpleGraph.Iso.connectedComponentEquiv_refl
+
+@[simp]
+theorem connectedComponentEquiv_symm (φ : G ≃g G') :
+ φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm := by
+ ext ⟨_⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_symm SimpleGraph.Iso.connectedComponentEquiv_symm
+
+@[simp]
+theorem connectedComponentEquiv_trans (φ : G ≃g G') (φ' : G' ≃g G'') :
+ connectedComponentEquiv (φ.trans φ') =
+ φ.connectedComponentEquiv.trans φ'.connectedComponentEquiv := by
+ ext ⟨_⟩
+ rfl
+#align simple_graph.iso.connected_component_equiv_trans SimpleGraph.Iso.connectedComponentEquiv_trans
+
+end Iso
+
+namespace ConnectedComponent
+
+/-- The set of vertices in a connected component of a graph. -/
+def supp (C : G.ConnectedComponent) :=
+ { v | G.connectedComponentMk v = C }
+#align simple_graph.connected_component.supp SimpleGraph.ConnectedComponent.supp
+
+@[ext]
+theorem supp_injective :
+ Function.Injective (ConnectedComponent.supp : G.ConnectedComponent → Set V) := by
+ refine' ConnectedComponent.ind₂ _
+ intro v w
+ simp only [ConnectedComponent.supp, Set.ext_iff, ConnectedComponent.eq, Set.mem_setOf_eq]
+ intro h
+ rw [reachable_comm, h]
+#align simple_graph.connected_component.supp_injective SimpleGraph.ConnectedComponent.supp_injective
+
+@[simp]
+theorem supp_inj {C D : G.ConnectedComponent} : C.supp = D.supp ↔ C = D :=
+ ConnectedComponent.supp_injective.eq_iff
+#align simple_graph.connected_component.supp_inj SimpleGraph.ConnectedComponent.supp_inj
+
+instance : SetLike G.ConnectedComponent V where
+ coe := ConnectedComponent.supp
+ coe_injective' := ConnectedComponent.supp_injective
+
+@[simp]
+theorem mem_supp_iff (C : G.ConnectedComponent) (v : V) :
+ v ∈ C.supp ↔ G.connectedComponentMk v = C :=
+ Iff.rfl
+#align simple_graph.connected_component.mem_supp_iff SimpleGraph.ConnectedComponent.mem_supp_iff
+
+theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v :=
+ rfl
+#align simple_graph.connected_component.connected_component_mk_mem SimpleGraph.ConnectedComponent.connectedComponentMk_mem
+
+/-- 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 where
+ toFun v := ⟨φ v, ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp.mpr v.prop⟩
+ invFun v' := ⟨φ.symm v', ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map.mpr v'.prop⟩
+ left_inv v := Subtype.ext_val (φ.toEquiv.left_inv ↑v)
+ right_inv v := Subtype.ext_val (φ.toEquiv.right_inv ↑v)
+#align simple_graph.connected_component.iso_equiv_supp SimpleGraph.ConnectedComponent.isoEquivSupp
+
end ConnectedComponent
/-- A subgraph is connected if it is connected as a simple graph. -/
SHA-only updates:
CategoryTheory.Sites.Sheaf
already uses aesop_cat
at this location, nothing to port.Topology.FiberBundle.Trivialization
, is already in mathlib4.FunLike
change to Data.PEquiv
is already in mathlib4.Substantative forward port:
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
! This file was ported from Lean 3 source module combinatorics.simple_graph.connectivity
-! leanprover-community/mathlib commit 13cd3e89b30352d5b1b7349f5537ea18ba878e40
+! leanprover-community/mathlib commit e876965f7ee86f683b44e2f462ab5bfb47f993b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -1963,104 +1963,99 @@ def ConnectedComponent := Quot G.Reachable
def connectedComponentMk (v : V) : G.ConnectedComponent := Quot.mk G.Reachable v
#align simple_graph.connected_component_mk SimpleGraph.connectedComponentMk
+variable {G G' G''}
+
+namespace ConnectedComponent
+
@[simps]
-instance ConnectedComponent.inhabited [Inhabited V] : Inhabited G.ConnectedComponent :=
+instance inhabited [Inhabited V] : Inhabited G.ConnectedComponent :=
⟨G.connectedComponentMk default⟩
#align simple_graph.connected_component.inhabited SimpleGraph.ConnectedComponent.inhabited
-section connectedComponent
-
-variable {G}
-
@[elab_as_elim]
-protected theorem ConnectedComponent.ind {β : G.ConnectedComponent → Prop}
+protected theorem ind {β : G.ConnectedComponent → Prop}
(h : ∀ v : V, β (G.connectedComponentMk v)) (c : G.ConnectedComponent) : β c :=
Quot.ind h c
#align simple_graph.connected_component.ind SimpleGraph.ConnectedComponent.ind
@[elab_as_elim]
-protected theorem ConnectedComponent.ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
+protected theorem ind₂ {β : G.ConnectedComponent → G.ConnectedComponent → Prop}
(h : ∀ v w : V, β (G.connectedComponentMk v) (G.connectedComponentMk w))
(c d : G.ConnectedComponent) : β c d :=
Quot.induction_on₂ c d h
#align simple_graph.connected_component.ind₂ SimpleGraph.ConnectedComponent.ind₂
-protected theorem ConnectedComponent.sound {v w : V} :
+protected theorem sound {v w : V} :
G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w :=
Quot.sound
#align simple_graph.connected_component.sound SimpleGraph.ConnectedComponent.sound
-protected theorem ConnectedComponent.exact {v w : V} :
+protected theorem exact {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w → G.Reachable v w :=
@Quotient.exact _ G.reachableSetoid _ _
#align simple_graph.connected_component.exact SimpleGraph.ConnectedComponent.exact
@[simp]
-protected theorem ConnectedComponent.eq {v w : V} :
+protected theorem eq {v w : V} :
G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w :=
@Quotient.eq' _ G.reachableSetoid _ _
#align simple_graph.connected_component.eq SimpleGraph.ConnectedComponent.eq
/-- The `ConnectedComponent` specialization of `Quot.lift`. Provides the stronger
assumption that the vertices are connected by a path. -/
-protected def ConnectedComponent.lift {β : Sort _} (f : V → β)
+protected def lift {β : Sort _} (f : V → β)
(h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w) : G.ConnectedComponent → β :=
Quot.lift f fun v w (h' : G.Reachable v w) => h'.elim_path fun hp => h v w hp hp.2
#align simple_graph.connected_component.lift SimpleGraph.ConnectedComponent.lift
@[simp]
-protected theorem ConnectedComponent.lift_mk {β : Sort _} {f : V → β}
+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 :=
rfl
#align simple_graph.connected_component.lift_mk SimpleGraph.ConnectedComponent.lift_mk
-protected theorem ConnectedComponent.exists {p : G.ConnectedComponent → Prop} :
+protected theorem «exists» {p : G.ConnectedComponent → Prop} :
(∃ c : G.ConnectedComponent, p c) ↔ ∃ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).exists
#align simple_graph.connected_component.exists SimpleGraph.ConnectedComponent.exists
-protected theorem ConnectedComponent.forall {p : G.ConnectedComponent → Prop} :
+protected theorem «forall» {p : G.ConnectedComponent → Prop} :
(∀ c : G.ConnectedComponent, p c) ↔ ∀ v, p (G.connectedComponentMk v) :=
(surjective_quot_mk G.Reachable).forall
#align simple_graph.connected_component.forall SimpleGraph.ConnectedComponent.forall
-theorem Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
+theorem _root_.SimpleGraph.Preconnected.subsingleton_connectedComponent (h : G.Preconnected) :
Subsingleton G.ConnectedComponent :=
⟨ConnectedComponent.ind₂ fun v w => ConnectedComponent.sound (h v w)⟩
#align simple_graph.preconnected.subsingleton_connected_component SimpleGraph.Preconnected.subsingleton_connectedComponent
/-- The map on connected components induced by a graph homomorphism. -/
-def ConnectedComponent.map {V : Type _} {G : SimpleGraph V} {V' : Type _} {G' : SimpleGraph V'}
- (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
+def map (φ : G →g G') (C : G.ConnectedComponent) : G'.ConnectedComponent :=
C.lift (fun v => G'.connectedComponentMk (φ v)) fun _ _ p _ =>
ConnectedComponent.eq.mpr (p.map φ).reachable
#align simple_graph.connected_component.map SimpleGraph.ConnectedComponent.map
@[simp]
-theorem ConnectedComponent.map_mk {V : Type _} {G : SimpleGraph V} {V' : Type _}
- {G' : SimpleGraph V'} (φ : G →g G') (v : V) :
+theorem map_mk (φ : G →g G') (v : V) :
(G.connectedComponentMk v).map φ = G'.connectedComponentMk (φ v) :=
rfl
#align simple_graph.connected_component.map_mk SimpleGraph.ConnectedComponent.map_mk
@[simp]
-theorem ConnectedComponent.map_id (C : ConnectedComponent G) : C.map Hom.id = C := by
+theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C := by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_id SimpleGraph.ConnectedComponent.map_id
@[simp]
-theorem ConnectedComponent.map_comp {V' : Type _} {G' : SimpleGraph V'} {V'' : Type _}
- {G'' : SimpleGraph V''} (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
+theorem map_comp (C : G.ConnectedComponent) (φ : G →g G') (ψ : G' →g G'') :
(C.map φ).map ψ = C.map (ψ.comp φ) := by
refine' C.ind _
exact fun _ => rfl
#align simple_graph.connected_component.map_comp SimpleGraph.ConnectedComponent.map_comp
-end connectedComponent
-
-variable {G}
+end ConnectedComponent
/-- A subgraph is connected if it is connected as a simple graph. -/
abbrev Subgraph.Connected (H : G.Subgraph) : Prop :=
@@ -2100,7 +2095,7 @@ theorem Connected.set_univ_walk_nonempty (hconn : G.Connected) (u v : V) :
namespace Walk
-variable {G'} {u v w : V}
+variable {u v w : V}
/-- The subgraph consisting of the vertices and edges of the walk. -/
@[simp]
Notably incorporates https://github.com/leanprover/std4/pull/98 and https://github.com/leanprover/std4/pull/109.
https://github.com/leanprover/std4/pull/98 moves a number of lemmas from Mathlib to Std, so the bump requires deleting them in Mathlib. I did check on each lemma whether its attributes were kept in the move (and gave attribute markings in Mathlib if they were not present in Std), but a reviewer may wish to re-check.
List.mem_map
changed statement from b ∈ l.map f ↔ ∃ a, a ∈ l ∧ b = f a
to b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b
. Similarly for List.exists_of_mem_map
. This was a deliberate change, so I have simply adjusted proofs (many become simpler, which supports the change). I also deleted List.mem_map'
, List.exists_of_mem_map'
, which were temporary versions in Mathlib while waiting for this change (replacing their uses with the unprimed versions).
Also, the lemma sublist_nil_iff_eq_nil
seems to have been renamed to sublist_nil
during the move, so I added an alias for the old name.
(another issue fixed during review by @digama0) List.Sublist.filter
had an argument change from explicit to implicit. This appears to have been an oversight (cc @JamesGallicchio). I have temporarily introduced List.Sublist.filter'
with the argument explicit, and replaced Mathlib uses of Sublist.filter
with Sublist.filter'
. Later we can fix the argument in Std, and then delete List.Sublist.filter'
.
@@ -798,7 +798,7 @@ theorem dart_snd_mem_support_of_mem_darts {u v : V} (p : G.Walk u v) {d : G.Dart
theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : ⟦(t, u)⟧ ∈ p.edges) :
t ∈ p.support := by
obtain ⟨d, hd, he⟩ := List.mem_map.mp he
- rw [eq_comm, dart_edge_eq_mk'_iff'] at he
+ rw [dart_edge_eq_mk'_iff'] at he
rcases he with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
· exact dart_fst_mem_support_of_mem_darts _ hd
· exact dart_snd_mem_support_of_mem_darts _ hd
@@ -2338,7 +2338,7 @@ theorem reachable_delete_edges_iff_exists_walk {v w : V} :
constructor
· rintro ⟨p⟩
use p.map (Hom.mapSpanningSubgraphs (by simp))
- simp_rw [Walk.edges_map, List.mem_map', Hom.mapSpanningSubgraphs_apply, Sym2.map_id', id.def]
+ simp_rw [Walk.edges_map, List.mem_map, Hom.mapSpanningSubgraphs_apply, Sym2.map_id', id.def]
rintro ⟨e, h, rfl⟩
simpa using p.edges_subset_edgeSet h
· rintro ⟨p, h⟩
congr!
and improvement to convert
(#2566)
This introduces a tactic congr!
that is an analogue to mathlib 3's congr'
. It is a more insistent version of congr
that makes use of more congruence lemmas (including user congruence lemmas), propext
, funext
, and Subsingleton
instances. It also has a feature to lift reflexive relations to equalities. Along with funext
, the tactic does intros
, allowing congr!
to get access to function bodies; the introduced variables can be named using rename_i
if needed.
This also modifies convert
to use congr!
rather than congr
, which makes it work more like the mathlib3 version of the tactic.
@@ -2242,10 +2242,8 @@ theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
ext p
simp only [mem_neighborSet, Finset.coe_map, Embedding.coeFn_mk, Set.unionᵢ_coe_set,
Set.mem_unionᵢ, Set.mem_image, Finset.mem_coe, Set.mem_setOf_eq]
- -- porting note: using `apply iff_of_eq` to help `congr`
- apply iff_of_eq; congr with w
- apply iff_of_eq; congr with h
- apply iff_of_eq; congr with q
+ congr!
+ rename_i w _ q
have := Set.ext_iff.mp (ih w v) q
simp only [Finset.mem_coe, Set.mem_setOf_eq] at this
rw [← this]
The unported dependencies are