url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.coe_support_append
[535, 1]
[537, 55]
rw [support_append, ← Multiset.coe_add, coe_support]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v p' : Walk G v w ⊢ ↑(support (append p p')) = {u} + ↑(List.tail (support p)) + ↑(List.tail (support p'))
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.coe_support_append'
[540, 1]
[545, 49]
rw [support_append, ← Multiset.coe_add]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ ↑(support (append p p')) = ↑(support p) + ↑(support p') - {v}
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ ↑(support p) + ↑(List.tail (support p')) = ↑(support p) + ↑(support p') - {v}
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.coe_support_append'
[540, 1]
[545, 49]
simp only [coe_support]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ ↑(support p) + ↑(List.tail (support p')) = ↑(support p) + ↑(support p') - {v}
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) = {u} + ↑(List.tail (support p)) + ({v} + ↑(List.tail (support p'))) - {v}
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.coe_support_append'
[540, 1]
[545, 49]
rw [add_comm ({v} : Multiset V)]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) = {u} + ↑(List.tail (support p)) + ({v} + ↑(List.tail (support p'))) - {v}
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) = {u} + ↑(List.tail (support p)) + (↑(List.tail (support p')) + {v}) - {v}
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.coe_support_append'
[540, 1]
[545, 49]
simp only [← add_assoc, add_tsub_cancel_right]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G u v p' : Walk G v w ⊢ {u} + ↑(List.tail (support p)) + ↑(List.tail (support p')) = {u} + ↑(List.tail (support p)) + (↑(List.tail (support p')) + {v}) - {v}
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_subset_edgeSet
[561, 1]
[566, 48]
cases h
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h' : G.Adj u v✝ p' : Walk G v✝ v e : V × V h : e ∈ edges (cons h' p') ⊢ e ∈ edgeSet G
case head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h' : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝) ∈ edgeSet G case tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h' : G.Adj u v✝ p' : Walk G v✝ v e : V × V a✝ : List.Mem e (edges p') ⊢ e ∈ edgeSet G
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_subset_edgeSet
[561, 1]
[566, 48]
next h' => exact edges_subset_edgeSet p' h'
case tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h' : G.Adj u v✝ p' : Walk G v✝ v e : V × V a✝ : List.Mem e (edges p') ⊢ e ∈ edgeSet G
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_subset_edgeSet
[561, 1]
[566, 48]
exact h'
case head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h' : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝) ∈ edgeSet G
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_subset_edgeSet
[561, 1]
[566, 48]
exact edges_subset_edgeSet p' h'
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h'✝ : G.Adj u v✝ p' : Walk G v✝ v e : V × V h' : List.Mem e (edges p') ⊢ e ∈ edgeSet G
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_concat
[579, 1]
[581, 39]
induction p <;> simp [*, concat_nil]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v h : G.Adj v w ⊢ edges (concat p h) = List.concat (edges p) (v, w)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_copy
[584, 1]
[587, 6]
subst_vars
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u' v' : V p : Walk G u v hu : u = u' hv : v = v' ⊢ edges (Walk.copy p hu hv) = edges p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ edges (Walk.copy p (_ : u' = u') (_ : v' = v')) = edges p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_copy
[584, 1]
[587, 6]
rfl
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ edges (Walk.copy p (_ : u' = u') (_ : v' = v')) = edges p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_append
[590, 1]
[592, 27]
induction p <;> simp [*]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v p' : Walk G v w ⊢ edges (append p p') = edges p ++ edges p'
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_map_snd_edges
[594, 1]
[595, 28]
induction p <;> simp! [*]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ u :: List.map (fun x => x.snd) (edges p) = support p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.map_snd_edges
[597, 1]
[598, 57]
simpa using congr_arg List.tail (cons_map_snd_edges p)
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ List.map (fun x => x.snd) (edges p) = List.tail (support p)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.map_fst_edges_append
[600, 1]
[602, 28]
induction p <;> simp! [*]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ List.map (fun x => x.fst) (edges p) ++ [v] = support p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.map_fst_darts
[604, 1]
[605, 64]
simpa! using congr_arg List.dropLast (map_fst_edges_append p)
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ List.map (fun x => x.fst) (edges p) = List.dropLast (support p)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.length_support
[609, 1]
[610, 27]
induction p <;> simp [*]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ List.length (support p) = length p + 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.length_edges
[614, 1]
[615, 27]
induction p <;> simp [*]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v ⊢ List.length (edges p) = length p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_fst_mem_support_of_mem_darts
[617, 1]
[623, 61]
simp only [support_cons, edges_cons, List.mem_cons] at hd ⊢
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges (cons h p') ⊢ d.fst ∈ support (cons h p')
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d = (u, v✝) ∨ d ∈ edges p' ⊢ d.fst = u ∨ d.fst ∈ support p'
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_fst_mem_support_of_mem_darts
[617, 1]
[623, 61]
rcases hd with (rfl | hd)
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d = (u, v✝) ∨ d ∈ edges p' ⊢ d.fst = u ∨ d.fst ∈ support p'
case inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝).fst = u ∨ (u, v✝).fst ∈ support p' case inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges p' ⊢ d.fst = u ∨ d.fst ∈ support p'
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_fst_mem_support_of_mem_darts
[617, 1]
[623, 61]
exact Or.inl rfl
case inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝).fst = u ∨ (u, v✝).fst ∈ support p'
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_fst_mem_support_of_mem_darts
[617, 1]
[623, 61]
exact Or.inr (edges_fst_mem_support_of_mem_darts _ hd)
case inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges p' ⊢ d.fst = u ∨ d.fst ∈ support p'
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_snd_mem_support_of_mem_darts
[625, 1]
[631, 61]
simp only [support_cons, edges_cons, List.mem_cons] at hd ⊢
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges (cons h p') ⊢ d.snd ∈ support (cons h p')
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d = (u, v✝) ∨ d ∈ edges p' ⊢ d.snd = u ∨ d.snd ∈ support p'
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_snd_mem_support_of_mem_darts
[625, 1]
[631, 61]
rcases hd with (rfl | hd)
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d = (u, v✝) ∨ d ∈ edges p' ⊢ d.snd = u ∨ d.snd ∈ support p'
case inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝).snd = u ∨ (u, v✝).snd ∈ support p' case inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges p' ⊢ d.snd = u ∨ d.snd ∈ support p'
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_snd_mem_support_of_mem_darts
[625, 1]
[631, 61]
simp
case inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v ⊢ (u, v✝).snd = u ∨ (u, v✝).snd ∈ support p'
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_snd_mem_support_of_mem_darts
[625, 1]
[631, 61]
exact Or.inr (edges_snd_mem_support_of_mem_darts _ hd)
case inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v v✝ : V h : G.Adj u v✝ p' : Walk G v✝ v d : V × V hd : d ∈ edges p' ⊢ d.snd = u ∨ d.snd ∈ support p'
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.fst_mem_support_of_mem_edges
[633, 1]
[635, 48]
exact edges_fst_mem_support_of_mem_darts _ he
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' t u v w : V p : Walk G v w he : (t, u) ∈ edges p ⊢ t ∈ support p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.snd_mem_support_of_mem_edges
[637, 1]
[639, 48]
exact edges_snd_mem_support_of_mem_darts _ he
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' t u v w : V p : Walk G v w he : (t, u) ∈ edges p ⊢ u ∈ support p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_nodup_of_support_nodup
[641, 1]
[647, 77]
induction p with | nil => simp | cons _ p' ih => simp only [edges_cons, support_cons, List.nodup_cons] at h ⊢ exact ⟨fun h' => h.1 (edges_fst_mem_support_of_mem_darts p' h'), ih h.2⟩
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G u v h : List.Nodup (support p) ⊢ List.Nodup (edges p)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_nodup_of_support_nodup
[641, 1]
[647, 77]
simp
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u✝ : V h : List.Nodup (support nil) ⊢ List.Nodup (edges nil)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_nodup_of_support_nodup
[641, 1]
[647, 77]
simp only [edges_cons, support_cons, List.nodup_cons] at h ⊢
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p' : Walk G v✝ w✝ ih : List.Nodup (support p') → List.Nodup (edges p') h : List.Nodup (support (cons h✝ p')) ⊢ List.Nodup (edges (cons h✝ p'))
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p' : Walk G v✝ w✝ ih : List.Nodup (support p') → List.Nodup (edges p') h : ¬u✝ ∈ support p' ∧ List.Nodup (support p') ⊢ ¬(u✝, v✝) ∈ edges p' ∧ List.Nodup (edges p')
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.edges_nodup_of_support_nodup
[641, 1]
[647, 77]
exact ⟨fun h' => h.1 (edges_fst_mem_support_of_mem_darts p' h'), ih h.2⟩
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p' : Walk G v✝ w✝ ih : List.Nodup (support p') → List.Nodup (edges p') h : ¬u✝ ∈ support p' ∧ List.Nodup (support p') ⊢ ¬(u✝, v✝) ∈ edges p' ∧ List.Nodup (edges p')
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isTrail_copy
[691, 1]
[694, 6]
subst_vars
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u' v' : V p : Walk G u v hu : u = u' hv : v = v' ⊢ IsTrail (Walk.copy p hu hv) ↔ IsTrail p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ IsTrail (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsTrail p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isTrail_copy
[691, 1]
[694, 6]
rfl
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ IsTrail (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsTrail p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isPath_copy
[706, 1]
[709, 6]
subst_vars
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v u' v' : V p : Walk G u v hu : u = u' hv : v = v' ⊢ IsPath (Walk.copy p hu hv) ↔ IsPath p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ IsPath (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsPath p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isPath_copy
[706, 1]
[709, 6]
rfl
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' v' : V p : Walk G u' v' ⊢ IsPath (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsPath p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isCircuit_copy
[717, 1]
[720, 6]
subst_vars
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u u' : V p : Walk G u u hu : u = u' ⊢ IsCircuit (Walk.copy p hu hu) ↔ IsCircuit p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' : V p : Walk G u' u' ⊢ IsCircuit (Walk.copy p (_ : u' = u') (_ : u' = u')) ↔ IsCircuit p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isCircuit_copy
[717, 1]
[720, 6]
rfl
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' : V p : Walk G u' u' ⊢ IsCircuit (Walk.copy p (_ : u' = u') (_ : u' = u')) ↔ IsCircuit p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isCycle_copy
[729, 1]
[732, 6]
subst_vars
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u u' : V p : Walk G u u hu : u = u' ⊢ IsCycle (Walk.copy p hu hu) ↔ IsCycle p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' : V p : Walk G u' u' ⊢ IsCycle (Walk.copy p (_ : u' = u') (_ : u' = u')) ↔ IsCycle p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isCycle_copy
[729, 1]
[732, 6]
rfl
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u' : V p : Walk G u' u' ⊢ IsCycle (Walk.copy p (_ : u' = u') (_ : u' = u')) ↔ IsCycle p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.nil
[736, 1]
[737, 20]
simp [edges]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u : V ⊢ List.Nodup (edges Walk.nil)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.of_cons
[740, 1]
[741, 60]
simp [isTrail_def]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V h : G.Adj u v p : Walk G v w ⊢ IsTrail (cons h p) → IsTrail p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_isTrail_iff
[745, 1]
[746, 89]
simp [isTrail_def, and_comm]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V h : G.Adj u v p : Walk G v w ⊢ IsTrail (cons h p) ↔ IsTrail p ∧ ¬(u, v) ∈ edges p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.of_append_left
[749, 1]
[752, 14]
rw [isTrail_def, edges_append, List.nodup_append] at h
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : IsTrail (append p q) ⊢ IsTrail p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : List.Nodup (edges p) ∧ List.Nodup (edges q) ∧ List.Disjoint (edges p) (edges q) ⊢ IsTrail p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.of_append_left
[749, 1]
[752, 14]
exact ⟨h.1⟩
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : List.Nodup (edges p) ∧ List.Nodup (edges q) ∧ List.Disjoint (edges p) (edges q) ⊢ IsTrail p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.of_append_right
[755, 1]
[758, 16]
rw [isTrail_def, edges_append, List.nodup_append] at h
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : IsTrail (append p q) ⊢ IsTrail q
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : List.Nodup (edges p) ∧ List.Nodup (edges q) ∧ List.Disjoint (edges p) (edges q) ⊢ IsTrail q
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.of_append_right
[755, 1]
[758, 16]
exact ⟨h.2.1⟩
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w h : List.Nodup (edges p) ∧ List.Nodup (edges q) ∧ List.Disjoint (edges p) (edges q) ⊢ IsTrail q
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.List.count_prod_eq
[764, 1]
[770, 17]
congr!
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e : V × V ⊢ List.count e xs = List.count e xs
case h.e'_2 V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e : V × V ⊢ instBEqProd = instBEq
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.List.count_prod_eq
[764, 1]
[770, 17]
ext p q
case h.e'_2 V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e : V × V ⊢ instBEqProd = instBEq
case h.e'_2.beq.h.h V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e p q : V × V ⊢ (p == q) = (p == q)
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.List.count_prod_eq
[764, 1]
[770, 17]
cases p
case h.e'_2.beq.h.h V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e p q : V × V ⊢ (p == q) = (p == q)
case h.e'_2.beq.h.h.mk V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e q : V × V fst✝ snd✝ : V ⊢ ((fst✝, snd✝) == q) = ((fst✝, snd✝) == q)
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.List.count_prod_eq
[764, 1]
[770, 17]
cases q
case h.e'_2.beq.h.h.mk V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e q : V × V fst✝ snd✝ : V ⊢ ((fst✝, snd✝) == q) = ((fst✝, snd✝) == q)
case h.e'_2.beq.h.h.mk.mk V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e : V × V fst✝¹ snd✝¹ fst✝ snd✝ : V ⊢ ((fst✝¹, snd✝¹) == (fst✝, snd✝)) = ((fst✝¹, snd✝¹) == (fst✝, snd✝))
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.List.count_prod_eq
[764, 1]
[770, 17]
simp [BEq.beq]
case h.e'_2.beq.h.h.mk.mk V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V xs : List (V × V) e : V × V fst✝¹ snd✝¹ fst✝ snd✝ : V ⊢ ((fst✝¹, snd✝¹) == (fst✝, snd✝)) = ((fst✝¹, snd✝¹) == (fst✝, snd✝))
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.count_edges_le_one
[772, 1]
[774, 61]
simpa using List.nodup_iff_count_le_one.mp h.edges_nodup e
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v : V p : Walk G u v h : IsTrail p e : V × V ⊢ List.count e (edges p) ≤ 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsTrail.count_edges_eq_one
[776, 1]
[778, 56]
simpa using List.count_eq_one_of_mem h.edges_nodup he
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v : V p : Walk G u v h : IsTrail p e : V × V he : e ∈ edges p ⊢ List.count e (edges p) = 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.nil
[780, 1]
[780, 82]
constructor <;> simp
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u : V ⊢ IsPath Walk.nil
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_cons
[783, 1]
[784, 57]
simp [isPath_def]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V h : G.Adj u v p : Walk G v w ⊢ IsPath (cons h p) → IsPath p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_isPath_iff
[788, 1]
[790, 71]
constructor <;> simp (config := { contextual := true }) [isPath_def]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V h : G.Adj u v p : Walk G v w ⊢ IsPath (cons h p) ↔ IsPath p ∧ ¬u ∈ support p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.isPath_iff_eq_nil
[794, 1]
[795, 32]
cases p <;> simp [IsPath.nil]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u : V p : Walk G u u ⊢ IsPath p ↔ p = nil
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_append_left
[798, 1]
[801, 34]
simp only [isPath_def, support_append]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w ⊢ IsPath (append p q) → IsPath p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w ⊢ List.Nodup (support p ++ List.tail (support q)) → List.Nodup (support p)
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_append_left
[798, 1]
[801, 34]
exact List.Nodup.of_append_left
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w ⊢ List.Nodup (support p ++ List.tail (support q)) → List.Nodup (support p)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_append_right
[804, 1]
[808, 46]
induction p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w : V p : Walk G u v q : Walk G v w ⊢ IsPath (append p q) → IsPath q
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w u✝ : V q : Walk G u✝ w ⊢ IsPath (append Walk.nil q) → IsPath q case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ {q : Walk G w✝ w}, IsPath (append p✝ q) → IsPath q q : Walk G w✝ w ⊢ IsPath (append (cons h✝ p✝) q) → IsPath q
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_append_right
[804, 1]
[808, 46]
exact id
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w u✝ : V q : Walk G u✝ w ⊢ IsPath (append Walk.nil q) → IsPath q
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.of_append_right
[804, 1]
[808, 46]
simp (config := {contextual := true}) [*]
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ {q : Walk G w✝ w}, IsPath (append p✝ q) → IsPath q q : Walk G w✝ w ⊢ IsPath (append (cons h✝ p✝) q) → IsPath q
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_isCycle_iff
[814, 1]
[819, 8]
simp only [Walk.isCycle_def, Walk.isPath_def, Walk.isTrail_def, edges_cons, List.nodup_cons, support_cons, List.tail_cons]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G v u h : G.Adj u v ⊢ IsCycle (cons h p) ↔ IsPath p ∧ ¬(u, v) ∈ edges p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G v u h : G.Adj u v ⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔ List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_isCycle_iff
[814, 1]
[819, 8]
have : p.support.Nodup → p.edges.Nodup := edges_nodup_of_support_nodup
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G v u h : G.Adj u v ⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔ List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G v u h : G.Adj u v this : List.Nodup (support p) → List.Nodup (edges p) ⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔ List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.cons_isCycle_iff
[814, 1]
[819, 8]
tauto
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' u v : V p : Walk G v u h : G.Adj u v this : List.Nodup (support p) → List.Nodup (edges p) ⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔ List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.length_lt
[828, 1]
[831, 40]
rw [Nat.lt_iff_add_one_le, ← length_support]
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : Fintype V u v : V p : Walk G u v hp : IsPath p ⊢ length p < Fintype.card V
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : Fintype V u v : V p : Walk G u v hp : IsPath p ⊢ List.length (support p) ≤ Fintype.card V
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.IsPath.length_lt
[828, 1]
[831, 40]
exact hp.support_nodup.length_le_card
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : Fintype V u v : V p : Walk G u v hp : IsPath p ⊢ List.length (support p) ≤ Fintype.card V
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
induction p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p ⊢ append (takeUntil p u h) (dropUntil p u h) = p
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h : u ∈ support nil ⊢ append (takeUntil nil u h) (dropUntil nil u h) = nil case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ h : u ∈ support (cons h✝ p✝) ⊢ append (takeUntil (cons h✝ p✝) u h) (dropUntil (cons h✝ p✝) u h) = cons h✝ p✝
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
rw [mem_support_nil_iff] at h
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h : u ∈ support nil ⊢ append (takeUntil nil u h) (dropUntil nil u h) = nil
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h✝ : u ∈ support nil h : u = u✝ ⊢ append (takeUntil nil u h✝) (dropUntil nil u h✝) = nil
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
subst u
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h✝ : u ∈ support nil h : u = u✝ ⊢ append (takeUntil nil u h✝) (dropUntil nil u h✝) = nil
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w u✝ : V h : u✝ ∈ support nil ⊢ append (takeUntil nil u✝ h) (dropUntil nil u✝ h) = nil
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
rfl
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w u✝ : V h : u✝ ∈ support nil ⊢ append (takeUntil nil u✝ h) (dropUntil nil u✝ h) = nil
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
cases h
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ h : u ∈ support (cons h✝ p✝) ⊢ append (takeUntil (cons h✝ p✝) u h) (dropUntil (cons h✝ p✝) u h) = cons h✝ p✝
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w v✝ w✝ : V p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ h✝ : G.Adj u v✝ ⊢ append (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝))) (dropUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝))) = cons h✝ p✝ case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ a✝ : List.Mem u (support p✝) ⊢ append (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝))) (dropUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝))) = cons h✝ p✝
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
simp!
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w v✝ w✝ : V p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ h✝ : G.Adj u v✝ ⊢ append (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝))) (dropUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝))) = cons h✝ p✝
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
simp! only
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ a✝ : List.Mem u (support p✝) ⊢ append (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝))) (dropUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝))) = cons h✝ p✝
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ a✝ : List.Mem u (support p✝) ⊢ append (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G u✝ x) (fun h => nil) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else cons h✝ (takeUntil p✝ u (_ : u ∈ support p✝))) (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G x w✝) (fun h => cons h✝ p✝) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else dropUntil p✝ u (_ : u ∈ support p✝)) = cons h✝ p✝
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.take_spec
[866, 1]
[875, 52]
split_ifs with h' <;> subst_vars <;> simp [*]
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), append (takeUntil p✝ u h) (dropUntil p✝ u h) = p✝ a✝ : List.Mem u (support p✝) ⊢ append (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G u✝ x) (fun h => nil) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else cons h✝ (takeUntil p✝ u (_ : u ∈ support p✝))) (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G x w✝) (fun h => cons h✝ p✝) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else dropUntil p✝ u (_ : u ∈ support p✝)) = cons h✝ p✝
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.mem_support_iff_exists_append
[878, 1]
[884, 88]
constructor
V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V p : Walk G u v ⊢ w ∈ support p ↔ ∃ q r, p = append q r
case mp V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V p : Walk G u v ⊢ w ∈ support p → ∃ q r, p = append q r case mpr V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V p : Walk G u v ⊢ (∃ q r, p = append q r) → w ∈ support p
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.mem_support_iff_exists_append
[878, 1]
[884, 88]
exact fun h => ⟨_, _, (p.take_spec h).symm⟩
case mp V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V p : Walk G u v ⊢ w ∈ support p → ∃ q r, p = append q r
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.mem_support_iff_exists_append
[878, 1]
[884, 88]
rintro ⟨q, r, rfl⟩
case mpr V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V p : Walk G u v ⊢ (∃ q r, p = append q r) → w ∈ support p
case mpr.intro.intro V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V q : Walk G u w r : Walk G w v ⊢ w ∈ support (append q r)
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.mem_support_iff_exists_append
[878, 1]
[884, 88]
simp only [mem_support_append_iff, end_mem_support, start_mem_support, or_self_iff]
case mpr.intro.intro V✝ : Type u V' : Type v V'' : Type w G✝ : Digraph V✝ G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V✝ V : Type u G : Digraph V u v w : V q : Walk G u w r : Walk G w v ⊢ w ∈ support (append q r)
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
induction p
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p ⊢ List.count u (support (takeUntil p u h)) = 1
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h : u ∈ support nil ⊢ List.count u (support (takeUntil nil u h)) = 1 case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 h : u ∈ support (cons h✝ p✝) ⊢ List.count u (support (takeUntil (cons h✝ p✝) u h)) = 1
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
rw [mem_support_nil_iff] at h
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h : u ∈ support nil ⊢ List.count u (support (takeUntil nil u h)) = 1
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h✝ : u ∈ support nil h : u = u✝ ⊢ List.count u (support (takeUntil nil u h✝)) = 1
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
subst u
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ : V h✝ : u ∈ support nil h : u = u✝ ⊢ List.count u (support (takeUntil nil u h✝)) = 1
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w u✝ : V h : u✝ ∈ support nil ⊢ List.count u✝ (support (takeUntil nil u✝ h)) = 1
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
simp!
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w u✝ : V h : u✝ ∈ support nil ⊢ List.count u✝ (support (takeUntil nil u✝ h)) = 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
cases h
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 h : u ∈ support (cons h✝ p✝) ⊢ List.count u (support (takeUntil (cons h✝ p✝) u h)) = 1
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w v✝ w✝ : V p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 h✝ : G.Adj u v✝ ⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝)))) = 1 case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 a✝ : List.Mem u (support p✝) ⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝)))) = 1
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
simp!
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w v✝ w✝ : V p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 h✝ : G.Adj u v✝ ⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u :: support p✝)))) = 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
simp! only
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 a✝ : List.Mem u (support p✝) ⊢ List.count u (support (takeUntil (cons h✝ p✝) u (_ : List.Mem u (u✝ :: support p✝)))) = 1
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 a✝ : List.Mem u (support p✝) ⊢ List.count u (support (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G u✝ x) (fun h => nil) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else cons h✝ (takeUntil p✝ u (_ : u ∈ support p✝)))) = 1
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_support_takeUntil_eq_one
[888, 1]
[897, 93]
split_ifs with h' <;> rw [eq_comm] at h' <;> subst_vars <;> simp! [*, List.count_cons]
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w u✝ v✝ w✝ : V h✝ : G.Adj u✝ v✝ p✝ : Walk G v✝ w✝ p_ih✝ : ∀ (h : u ∈ support p✝), List.count u (support (takeUntil p✝ u h)) = 1 a✝ : List.Mem u (support p✝) ⊢ List.count u (support (if h : u✝ = u then Eq.rec (motive := fun x x_1 => x ∈ u✝ :: support p✝ → Walk G u✝ x) (fun h => nil) (_ : u✝ = u) (_ : List.Mem u (u✝ :: support p✝)) else cons h✝ (takeUntil p✝ u (_ : u ∈ support p✝)))) = 1
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
induction' p with u' u' v' w' ha p' ih
V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x : V ⊢ List.count (u, x) (edges (takeUntil p u h)) = 0
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝ : u ∈ support p x u' : V h : u ∈ support nil ⊢ List.count (u, x) (edges (takeUntil nil u h)) = 0 case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝ : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 h : u ∈ support (cons ha p') ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u h)) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
rw [mem_support_nil_iff] at h
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝ : u ∈ support p x u' : V h : u ∈ support nil ⊢ List.count (u, x) (edges (takeUntil nil u h)) = 0
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝¹ : u ∈ support p x u' : V h✝ : u ∈ support nil h : u = u' ⊢ List.count (u, x) (edges (takeUntil nil u h✝)) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
subst u
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝¹ : u ∈ support p x u' : V h✝ : u ∈ support nil h : u = u' ⊢ List.count (u, x) (edges (takeUntil nil u h✝)) = 0
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w : V p : Walk G v w x u' : V h✝ : u' ∈ support p h : u' ∈ support nil ⊢ List.count (u', x) (edges (takeUntil nil u' h)) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
simp!
case nil V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w : V p : Walk G v w x u' : V h✝ : u' ∈ support p h : u' ∈ support nil ⊢ List.count (u', x) (edges (takeUntil nil u' h)) = 0
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
cases h
case cons V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h✝ : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 h : u ∈ support (cons ha p') ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u h)) = 0
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x v' w' : V p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 ha : G.Adj u v' ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u (_ : List.Mem u (u :: support p')))) = 0 case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u (_ : List.Mem u (u' :: support p')))) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
simp!
case cons.head V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x v' w' : V p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 ha : G.Adj u v' ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u (_ : List.Mem u (u :: support p')))) = 0
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
simp! only
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') ⊢ List.count (u, x) (edges (takeUntil (cons ha p') u (_ : List.Mem u (u' :: support p')))) = 0
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') ⊢ List.count (u, x) (edges (if h : u' = u then Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u) (_ : List.Mem u (u' :: support p')) else cons ha (takeUntil p' u (_ : u ∈ support p')))) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
split_ifs with h'
case cons.tail V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') ⊢ List.count (u, x) (edges (if h : u' = u then Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u) (_ : List.Mem u (u' :: support p')) else cons ha (takeUntil p' u (_ : u ∈ support p')))) = 0
case cons.tail.inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') h' : u' = u ⊢ List.count (u, x) (edges (Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u) (_ : List.Mem u (u' :: support p')))) = 0 case cons.tail.inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') h' : ¬u' = u ⊢ List.count (u, x) (edges (cons ha (takeUntil p' u (_ : u ∈ support p')))) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
subst h'
case cons.tail.inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') h' : u' = u ⊢ List.count (u, x) (edges (Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u) (_ : List.Mem u (u' :: support p')))) = 0
case cons.tail.inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w : V p : Walk G v w x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' h : u' ∈ support p ih : ∀ (h : u' ∈ support p'), List.count (u', x) (edges (takeUntil p' u' h)) = 0 a✝ : List.Mem u' (support p') ⊢ List.count (u', x) (edges (Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u') (_ : List.Mem u' (u' :: support p')))) = 0
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
simp
case cons.tail.inl V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V v w : V p : Walk G v w x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' h : u' ∈ support p ih : ∀ (h : u' ∈ support p'), List.count (u', x) (edges (takeUntil p' u' h)) = 0 a✝ : List.Mem u' (support p') ⊢ List.count (u', x) (edges (Eq.rec (motive := fun x x_1 => x ∈ u' :: support p' → Walk G u' x) (fun h => nil) (_ : u' = u') (_ : List.Mem u' (u' :: support p')))) = 0
no goals
https://github.com/kmill/msri2023_graphs.git
c87c12d835cabc843f7f9c83d4c947c11d8ff043
GraphProjects/DigraphConnectivity.lean
Digraph.Walk.count_edges_takeUntil_eq_zero
[900, 1]
[919, 19]
rw [edges_cons]
case cons.tail.inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') h' : ¬u' = u ⊢ List.count (u, x) (edges (cons ha (takeUntil p' u (_ : u ∈ support p')))) = 0
case cons.tail.inr V : Type u V' : Type v V'' : Type w G : Digraph V G' : Digraph V' G'' : Digraph V'' inst✝ : DecidableEq V u v w : V p : Walk G v w h : u ∈ support p x u' v' w' : V ha : G.Adj u' v' p' : Walk G v' w' ih : ∀ (h : u ∈ support p'), List.count (u, x) (edges (takeUntil p' u h)) = 0 a✝ : List.Mem u (support p') h' : ¬u' = u ⊢ List.count (u, x) ((u', v') :: edges (takeUntil p' u (_ : u ∈ support p'))) = 0