l3lab/ntp-mathlib huggingface dataset:
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      

Proof state:
case cons.nil.h
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' w : V
h' : Adj G v' w
v✝ w✝ : V
p✝ : Walk G v✝ w✝
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝ v'},
    concat p✝ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝ (_ : v✝ = v✝) hv = p'
h : Adj G w✝ w
h✝ : Adj G v' v✝
he : v✝ = w ∧ HEq (concat p✝ h) nil
⊢ False

Next tactic:
obtain ⟨rfl, he⟩ := he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      

Proof state:
case cons.nil.h.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' v✝ w✝ : V
p✝ : Walk G v✝ w✝
h✝ h' : Adj G v' v✝
ih :
  ∀ {h : Adj G w✝ v✝} {p' : Walk G v✝ v'},
    concat p✝ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝ (_ : v✝ = v✝) hv = p'
h : Adj G w✝ v✝
he : HEq (concat p✝ h) nil
⊢ False

Next tactic:
rw [heq_iff_eq] at he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      

Proof state:
case cons.nil.h.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' v✝ w✝ : V
p✝ : Walk G v✝ w✝
h✝ h' : Adj G v' v✝
ih :
  ∀ {h : Adj G w✝ v✝} {p' : Walk G v✝ v'},
    concat p✝ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝ (_ : v✝ = v✝) hv = p'
h : Adj G w✝ v✝
he : concat p✝ h = nil
⊢ False

Next tactic:
exact concat_ne_nil _ _ he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      exact concat_ne_nil _ _ he
    · 

Proof state:
case cons.cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' w : V
h' : Adj G v' w
u✝ v✝¹ w✝ : V
h✝¹ : Adj G u✝ v✝¹
p✝¹ : Walk G v✝¹ w✝
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝¹ v'},
    concat p✝¹ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝¹ (_ : v✝¹ = v✝¹) hv = p'
h : Adj G w✝ w
v✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ v'
he : cons h✝¹ (concat p✝¹ h) = concat (cons h✝ p✝) h'
⊢ ∃ (hv : w✝ = v'), Walk.copy (cons h✝¹ p✝¹) (_ : u✝ = u✝) hv = cons h✝ p✝

Next tactic:
rw [concat_cons, cons.injEq] at he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      exact concat_ne_nil _ _ he
    · rw [concat_cons, cons.injEq] at he
      

Proof state:
case cons.cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' w : V
h' : Adj G v' w
u✝ v✝¹ w✝ : V
h✝¹ : Adj G u✝ v✝¹
p✝¹ : Walk G v✝¹ w✝
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝¹ v'},
    concat p✝¹ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝¹ (_ : v✝¹ = v✝¹) hv = p'
h : Adj G w✝ w
v✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ v'
he : v✝¹ = v✝ ∧ HEq (concat p✝¹ h) (concat p✝ h')
⊢ ∃ (hv : w✝ = v'), Walk.copy (cons h✝¹ p✝¹) (_ : u✝ = u✝) hv = cons h✝ p✝

Next tactic:
obtain ⟨rfl, he⟩ := he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      exact concat_ne_nil _ _ he
    · rw [concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      

Proof state:
case cons.cons.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' w : V
h' : Adj G v' w
u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝¹ : Walk G v✝ w✝
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝ v'},
    concat p✝¹ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝¹ (_ : v✝ = v✝) hv = p'
h : Adj G w✝ w
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ v'
he : HEq (concat p✝¹ h) (concat p✝ h')
⊢ ∃ (hv : w✝ = v'), Walk.copy (cons h✝¹ p✝¹) (_ : u✝ = u✝) hv = cons h✝ p✝

Next tactic:
rw [heq_iff_eq] at he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      exact concat_ne_nil _ _ he
    · rw [concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      

Proof state:
case cons.cons.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v' w : V
h' : Adj G v' w
u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝¹ : Walk G v✝ w✝
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝ v'},
    concat p✝¹ h = concat p' h' → ∃ (hv : w✝ = v'), Walk.copy p✝¹ (_ : v✝ = v✝) hv = p'
h : Adj G w✝ w
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ v'
he : concat p✝¹ h = concat p✝ h'
⊢ ∃ (hv : w✝ = v'), Walk.copy (cons h✝¹ p✝¹) (_ : u✝ = u✝) hv = cons h✝ p✝

Next tactic:
obtain ⟨rfl, rfl⟩ := ih he
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
  induction p with
  | nil =>
    cases p'
    · exact ⟨rfl, rfl⟩
    · exfalso
      simp only [concat_nil, concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      simp only [heq_iff_eq] at he
      exact concat_ne_nil _ _ he.symm
  | cons _ _ ih =>
    rw [concat_cons] at he
    cases p'
    · exfalso
      simp only [concat_nil, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      exact concat_ne_nil _ _ he
    · rw [concat_cons, cons.injEq] at he
      obtain ⟨rfl, he⟩ := he
      rw [heq_iff_eq] at he
      obtain ⟨rfl, rfl⟩ := ih he
      

Proof state:
case cons.cons.intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
h : Adj G w✝ w
h✝ : Adj G u✝ v✝
h' : Adj G w✝ w
ih :
  ∀ {h : Adj G w✝ w} {p' : Walk G v✝ w✝},
    concat p✝ h = concat p' h' → ∃ (hv : w✝ = w✝), Walk.copy p✝ (_ : v✝ = v✝) hv = p'
he : concat p✝ h = concat (Walk.copy p✝ (_ : v✝ = v✝) (_ : w✝ = w✝)) h'
⊢ ∃ (hv : w✝ = w✝), Walk.copy (cons h✝¹ p✝) (_ : u✝ = u✝) hv = cons h✝ (Walk.copy p✝ (_ : v✝ = v✝) (_ : w✝ = w✝))

Next tactic:
exact ⟨rfl, rfl⟩
@[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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
h : Adj G v w
⊢ support (concat p h) = List.concat (support p) w

Next tactic:
induction p
@[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 <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ : V
h : Adj G u✝ w
⊢ support (concat nil h) = List.concat (support nil) w

Next tactic:
simp [*, concat_nil]
@[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 <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (h : Adj G w✝ w), support (concat p✝ h) = List.concat (support p✝) w
h : Adj G w✝ w
⊢ support (concat (cons h✝ p✝) h) = List.concat (support (cons h✝ p✝)) w

Next tactic:
simp [*, concat_nil]
@[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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : Walk G u v
hu : u = u'
hv : v = v'
⊢ support (Walk.copy p hu hv) = support p

Next tactic:
subst_vars
@[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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : Walk G u' v'
⊢ support (Walk.copy p (_ : u' = u') (_ : v' = v')) = support p

Next tactic:
rfl
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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ support (append p p') = support p ++ List.tail (support p')

Next tactic:
induction p
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 <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ : V
p' : Walk G u✝ w
⊢ support (append nil p') = support nil ++ List.tail (support p')

Next tactic:
cases p'
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 <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : ∀ (p' : Walk G w✝ w), support (append p✝ p') = support p✝ ++ List.tail (support p')
p' : Walk G w✝ w
⊢ support (append (cons h✝ p✝) p') = support (cons h✝ p✝) ++ List.tail (support p')

Next tactic:
cases p'
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' <;> 

Proof state:
case nil.nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
⊢ support (append nil nil) = support nil ++ List.tail (support nil)

Next tactic:
simp [*]
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' <;> 

Proof state:
case nil.cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w
⊢ support (append nil (cons h✝ p✝)) = support nil ++ List.tail (support (cons h✝ p✝))

Next tactic:
simp [*]
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' <;> 

Proof state:
case cons.nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w
p_ih✝ : ∀ (p' : Walk G w w), support (append p✝ p') = support p✝ ++ List.tail (support p')
⊢ support (append (cons h✝ p✝) nil) = support (cons h✝ p✝) ++ List.tail (support nil)

Next tactic:
simp [*]
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' <;> 

Proof state:
case cons.cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w u✝ v✝¹ w✝ : V
h✝¹ : Adj G u✝ v✝¹
p✝¹ : Walk G v✝¹ w✝
p_ih✝ : ∀ (p' : Walk G w✝ w), support (append p✝¹ p') = support p✝¹ ++ List.tail (support p')
v✝ : V
h✝ : Adj G w✝ v✝
p✝ : Walk G v✝ w
⊢ support (append (cons h✝¹ p✝¹) (cons h✝ p✝)) = support (cons h✝¹ p✝¹) ++ List.tail (support (cons h✝ p✝))

Next tactic:
simp [*]
@[simp]
theorem support_reverse {u v : V} (p : G.Walk u v) : p.reverse.support = p.support.reverse := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ support (reverse p) = List.reverse (support p)

Next tactic:
induction p
@[simp]
theorem support_reverse {u v : V} (p : G.Walk u v) : p.reverse.support = p.support.reverse := by
  induction p <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ : V
⊢ support (reverse nil) = List.reverse (support nil)

Next tactic:
simp [support_append, *]
@[simp]
theorem support_reverse {u v : V} (p : G.Walk u v) : p.reverse.support = p.support.reverse := by
  induction p <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : support (reverse p✝) = List.reverse (support p✝)
⊢ support (reverse (cons h✝ p✝)) = List.reverse (support (cons h✝ p✝))

Next tactic:
simp [support_append, *]
@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ [] := by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ support p ≠ []

Next tactic:
cases p
@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ [] := by cases p <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u : V
⊢ support nil ≠ []

Next tactic:
simp
@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ [] := by cases p <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h✝ : Adj G u v✝
p✝ : Walk G v✝ v
⊢ support (cons h✝ p✝) ≠ []

Next tactic:
simp
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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ List.tail (support (append p p')) = List.tail (support p) ++ List.tail (support p')

Next tactic:
rw [support_append, List.tail_append_of_ne_nil _ _ (support_ne_nil _)]
theorem support_eq_cons {u v : V} (p : G.Walk u v) : p.support = u :: p.support.tail := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ support p = u :: List.tail (support p)

Next tactic:
cases p
theorem support_eq_cons {u v : V} (p : G.Walk u v) : p.support = u :: p.support.tail := by
  cases p <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u : V
⊢ support nil = u :: List.tail (support nil)

Next tactic:
simp
theorem support_eq_cons {u v : V} (p : G.Walk u v) : p.support = u :: p.support.tail := by
  cases p <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h✝ : Adj G u v✝
p✝ : Walk G v✝ v
⊢ support (cons h✝ p✝) = u :: List.tail (support (cons h✝ p✝))

Next tactic:
simp
@[simp]
theorem start_mem_support {u v : V} (p : G.Walk u v) : u ∈ p.support := by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ u ∈ support p

Next tactic:
cases p
@[simp]
theorem start_mem_support {u v : V} (p : G.Walk u v) : u ∈ p.support := by cases p <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u : V
⊢ u ∈ support nil

Next tactic:
simp
@[simp]
theorem start_mem_support {u v : V} (p : G.Walk u v) : u ∈ p.support := by cases p <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h✝ : Adj G u v✝
p✝ : Walk G v✝ v
⊢ u ∈ support (cons h✝ p✝)

Next tactic:
simp
@[simp]
theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support := by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ v ∈ support p

Next tactic:
induction p
@[simp]
theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support := by induction p <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ : V
⊢ u✝ ∈ support nil

Next tactic:
simp [*]
@[simp]
theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support := by induction p <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
p_ih✝ : w✝ ∈ support p✝
⊢ w✝ ∈ support (cons h✝ p✝)

Next tactic:
simp [*]
@[simp]
theorem support_nonempty {u v : V} (p : G.Walk u v) : { w | w ∈ p.support }.Nonempty :=
  ⟨u, by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ u ∈ {w | w ∈ support p}

Next tactic:
simp
theorem mem_support_iff {u v w : V} (p : G.Walk u v) : w ∈ p.support ↔ w = u ∨ w ∈ p.support.tail :=
  by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
⊢ w ∈ support p ↔ w = u ∨ w ∈ List.tail (support p)

Next tactic:
cases p
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 <;> 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u w : V
⊢ w ∈ support nil ↔ w = u ∨ w ∈ List.tail (support nil)

Next tactic:
simp
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 <;> 

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w v✝ : V
h✝ : Adj G u v✝
p✝ : Walk G v✝ v
⊢ w ∈ support (cons h✝ p✝) ↔ w = u ∨ w ∈ List.tail (support (cons h✝ p✝))

Next tactic:
simp
theorem mem_support_nil_iff {u v : V} : u ∈ (nil : G.Walk v v).support ↔ u = v := by 

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
⊢ u ∈ support nil ↔ u = v

Next tactic:
simp
@[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
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : Walk G u v
p' : Walk G v w
⊢ t ∈ List.tail (support (append p p')) ↔ t ∈ List.tail (support p) ∨ t ∈ List.tail (support p')

Next tactic:
rw [tail_support_append, List.mem_append]
@[simp]
theorem end_mem_tail_support_of_ne {u v : V} (h : u ≠ v) (p : G.Walk u v) : v ∈ p.support.tail := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
h : u ≠ v
p : Walk G u v
⊢ v ∈ List.tail (support p)

Next tactic:
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
  

Proof state:
case intro.intro.intro
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
h : u ≠ v
w✝² : V
w✝¹ : Adj G u w✝²
w✝ : Walk G w✝² v
⊢ v ∈ List.tail (support (cons w✝¹ w✝))

Next tactic:
simp
@[simp, nolint unusedHavesSuffices]
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 := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : Walk G u v
p' : Walk G v w
⊢ t ∈ support (append p p') ↔ t ∈ support p ∨ t ∈ support p'

Next tactic:
simp only [mem_support_iff, mem_tail_support_append_iff]
@[simp, nolint unusedHavesSuffices]
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 := by
  simp only [mem_support_iff, mem_tail_support_append_iff]
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u v w : V
p : Walk G u v
p' : Walk G v w
⊢ t = u ∨ t ∈ List.tail (support p) ∨ t ∈ List.tail (support p') ↔
    (t = u ∨ t ∈ List.tail (support p)) ∨ t = v ∨ t ∈ List.tail (support p')

Next tactic:
obtain rfl | h := eq_or_ne t v
@[simp, nolint unusedHavesSuffices]
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 := by
  simp only [mem_support_iff, mem_tail_support_append_iff]
  obtain rfl | h := eq_or_ne t v <;> 

Proof state:
case inl
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
t u w : V
p : Walk G u t
p' : Walk G t w
⊢ t = u ∨ t ∈ List.tail (support p) ∨ t ∈ List.tail (support p') ↔
    (t = u ∨ t ∈ List.tail (support p)) ∨ t = t ∨ t ∈ List.tail (support p')

Next tactic:
obtain rfl | h' := eq_or_ne t u