Theorem: Digraph.Walk.length_append (GraphProjects/DigraphConnectivity.lean)

State before:
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
⊢ length (append p q) = length p + length q
Tactic:
induction p with
| nil => simp
| cons _ _ ih => simp [ih, add_comm, add_left_comm, add_assoc]
State after:
no goals

State before:
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
⊢ length (append nil q) = length nil + length q
Tactic:
simp
State after:
no goals

State before:
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✝
ih : ∀ (q : Walk G w✝ w), length (append p✝ q) = length p✝ + length q
q : Walk G w✝ w
⊢ length (append (cons h✝ p✝) q) = length (cons h✝ p✝) + length q
Tactic:
simp [ih, add_comm, add_left_comm, add_assoc]
State after:
no goals