l3lab/ntp-mathlib huggingface dataset:
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
p : Walk G u v
⊢ IsPath (bypass p)

Next tactic:
induction p with
  | nil => simp!
  | cons _ p' ih =>
    simp only [bypass]
    split_ifs with hs
    · exact ih.dropUntil hs
    · simp [*, cons_isPath_iff]
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ IsPath (bypass nil)

Next tactic:
| nil => simp!
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ IsPath (bypass nil)

Next tactic:
simp!
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => simp!
  

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : IsPath (bypass p')
⊢ IsPath (bypass (cons h✝ p'))

Next tactic:
| cons _ p' ih =>
    simp only [bypass]
    split_ifs with hs
    · exact ih.dropUntil hs
    · simp [*, cons_isPath_iff]
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => simp!
  | cons _ p' ih =>
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : IsPath (bypass p')
⊢ IsPath (bypass (cons h✝ p'))

Next tactic:
simp only [bypass]
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => simp!
  | cons _ p' ih =>
    simp only [bypass]
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : IsPath (bypass p')
⊢ IsPath (if hs : u✝ ∈ support (bypass p') then dropUntil (bypass p') u✝ hs else cons h✝ (bypass p'))

Next tactic:
split_ifs with hs
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => simp!
  | cons _ p' ih =>
    simp only [bypass]
    split_ifs with hs
    · 

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : IsPath (bypass p')
hs : u✝ ∈ support (bypass p')
⊢ IsPath (dropUntil (bypass p') u✝ hs)

Next tactic:
exact ih.dropUntil hs
theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath := by
  induction p with
  | nil => simp!
  | cons _ p' ih =>
    simp only [bypass]
    split_ifs with hs
    · exact ih.dropUntil hs
    · 

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : IsPath (bypass p')
hs : u✝ ∉ support (bypass p')
⊢ IsPath (cons h✝ (bypass p'))

Next tactic:
simp [*, cons_isPath_iff]
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
p : Walk G u v
⊢ length (bypass p) ≤ length p

Next tactic:
induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      rw [length_cons]
      exact le_add_right ih
    · rw [length_cons, length_cons]
      exact add_le_add_right ih 1
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ length (bypass nil) ≤ length nil

Next tactic:
| nil => rfl
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ length (bypass nil) ≤ length nil

Next tactic:
rfl
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
⊢ length (bypass (cons h✝ p✝)) ≤ length (cons h✝ p✝)

Next tactic:
| cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      rw [length_cons]
      exact le_add_right ih
    · rw [length_cons, length_cons]
      exact add_le_add_right ih 1
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
⊢ length (bypass (cons h✝ p✝)) ≤ length (cons h✝ p✝)

Next tactic:
simp only [bypass]
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
⊢ length (if hs : u✝ ∈ support (bypass p✝) then dropUntil (bypass p✝) u✝ hs else cons h✝ (bypass p✝)) ≤
    length (cons h✝ p✝)

Next tactic:
split_ifs
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · 

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ length (dropUntil (bypass p✝) u✝ h✝) ≤ length (cons h✝¹ p✝)

Next tactic:
trans
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ length (dropUntil (bypass p✝) u✝ h✝) ≤ ?m.402712
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ ?m.402712 ≤ length (cons h✝¹ p✝)
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ ℕ

Next tactic:
apply length_dropUntil_le
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ length (bypass p✝) ≤ length (cons h✝¹ p✝)

Next tactic:
rw [length_cons]
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      rw [length_cons]
      

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ length (bypass p✝) ≤ length p✝ + 1

Next tactic:
exact le_add_right ih
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      rw [length_cons]
      exact le_add_right ih
    · 

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ length (cons h✝¹ (bypass p✝)) ≤ length (cons h✝¹ p✝)

Next tactic:
rw [length_cons, length_cons]
theorem length_bypass_le {u v : V} (p : G.Walk u v) : p.bypass.length ≤ p.length := by
  induction p with
  | nil => rfl
  | cons _ _ ih =>
    simp only [bypass]
    split_ifs
    · trans
      apply length_dropUntil_le
      rw [length_cons]
      exact le_add_right ih
    · rw [length_cons, length_cons]
      

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : length (bypass p✝) ≤ length p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ length (bypass p✝) + 1 ≤ length p✝ + 1

Next tactic:
exact add_le_add_right ih 1
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
p : Walk G u v
⊢ support (bypass p) ⊆ support p

Next tactic:
induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      assumption
    · rw [support_cons]
      apply List.cons_subset_cons
      assumption
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ support (bypass nil) ⊆ support nil

Next tactic:
| nil => simp!
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ support (bypass nil) ⊆ support nil

Next tactic:
simp!
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
⊢ support (bypass (cons h✝ p✝)) ⊆ support (cons h✝ p✝)

Next tactic:
| cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      assumption
    · rw [support_cons]
      apply List.cons_subset_cons
      assumption
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
⊢ support (bypass (cons h✝ p✝)) ⊆ support (cons h✝ p✝)

Next tactic:
simp! only
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
⊢ support (if hs : u✝ ∈ support (bypass p✝) then dropUntil (bypass p✝) u✝ hs else cons h✝ (bypass p✝)) ⊆
    u✝ :: support p✝

Next tactic:
split_ifs
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · 

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ support (dropUntil (bypass p✝) u✝ h✝) ⊆ u✝ :: support p✝

Next tactic:
apply List.Subset.trans (support_dropUntil_subset _ _)
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ support (bypass p✝) ⊆ u✝ :: support p✝

Next tactic:
apply List.subset_cons_of_subset
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      

Proof state:
case pos.a
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ support (bypass p✝) ⊆ support p✝

Next tactic:
assumption
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      assumption
    · 

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ support (cons h✝¹ (bypass p✝)) ⊆ u✝ :: support p✝

Next tactic:
rw [support_cons]
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      assumption
    · rw [support_cons]
      

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ u✝ :: support (bypass p✝) ⊆ u✝ :: support p✝

Next tactic:
apply List.cons_subset_cons
theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (support_dropUntil_subset _ _)
      apply List.subset_cons_of_subset
      assumption
    · rw [support_cons]
      apply List.cons_subset_cons
      

Proof state:
case neg.s
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : support (bypass p✝) ⊆ support p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ support (bypass p✝) ⊆ support p✝

Next tactic:
assumption
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
p : Walk G u v
⊢ darts (bypass p) ⊆ darts p

Next tactic:
induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (darts_dropUntil_subset _ _)
      apply List.subset_cons_of_subset _ ih
    · rw [darts_cons]
      exact List.cons_subset_cons _ ih
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ darts (bypass nil) ⊆ darts nil

Next tactic:
| nil => simp!
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ : V
⊢ darts (bypass nil) ⊆ darts nil

Next tactic:
simp!
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
⊢ darts (bypass (cons h✝ p✝)) ⊆ darts (cons h✝ p✝)

Next tactic:
| cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (darts_dropUntil_subset _ _)
      apply List.subset_cons_of_subset _ ih
    · rw [darts_cons]
      exact List.cons_subset_cons _ ih
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
⊢ darts (bypass (cons h✝ p✝)) ⊆ darts (cons h✝ p✝)

Next tactic:
simp! only
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    

Proof state:
case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
⊢ darts (if hs : u✝ ∈ support (bypass p✝) then dropUntil (bypass p✝) u✝ hs else cons h✝ (bypass p✝)) ⊆
    { toProd := (u✝, v✝), is_adj := h✝ } :: darts p✝

Next tactic:
split_ifs
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · 

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ darts (dropUntil (bypass p✝) u✝ h✝) ⊆ { toProd := (u✝, v✝), is_adj := h✝¹ } :: darts p✝

Next tactic:
apply List.Subset.trans (darts_dropUntil_subset _ _)
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (darts_dropUntil_subset _ _)
      

Proof state:
case pos
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
h✝ : u✝ ∈ support (bypass p✝)
⊢ darts (bypass p✝) ⊆ { toProd := (u✝, v✝), is_adj := h✝¹ } :: darts p✝

Next tactic:
apply List.subset_cons_of_subset _ ih
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (darts_dropUntil_subset _ _)
      apply List.subset_cons_of_subset _ ih
    · 

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ darts (cons h✝¹ (bypass p✝)) ⊆ { toProd := (u✝, v✝), is_adj := h✝¹ } :: darts p✝

Next tactic:
rw [darts_cons]
theorem darts_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.darts ⊆ p.darts := by
  induction p with
  | nil => simp!
  | cons _ _ ih =>
    simp! only
    split_ifs
    · apply List.Subset.trans (darts_dropUntil_subset _ _)
      apply List.subset_cons_of_subset _ ih
    · rw [darts_cons]
      

Proof state:
case neg
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v u✝ v✝ w✝ : V
h✝¹ : Adj G u✝ v✝
p✝ : Walk G v✝ w✝
ih : darts (bypass p✝) ⊆ darts p✝
h✝ : u✝ ∉ support (bypass p✝)
⊢ { toProd := (u✝, v✝), is_adj := h✝¹ } :: darts (bypass p✝) ⊆ { toProd := (u✝, v✝), is_adj := h✝¹ } :: darts p✝

Next tactic:
exact List.cons_subset_cons _ ih
@[simp]
theorem map_copy (hu : u = u') (hv : v = v') :
    (p.copy hu hv).map f = (p.map f).copy (hu ▸ rfl) (hv ▸ rfl) := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' : V
p : Walk G u v
hu : u = u'
hv : v = v'
⊢ Walk.map f (Walk.copy p hu hv) = Walk.copy (Walk.map f p) (_ : f u = f u') (_ : f v = f v')

Next tactic:
subst_vars
@[simp]
theorem map_copy (hu : u = u') (hv : v = v') :
    (p.copy hu hv).map f = (p.map f).copy (hu ▸ rfl) (hv ▸ rfl) := by
  subst_vars
  

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

Next tactic:
rfl
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by
  

Proof state:
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' : V
p✝ p : Walk G u v
⊢ Walk.map Hom.id p = p

Next tactic:
induction p with
  | nil => rfl
  | cons _ p' ih => simp [ih p']
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by
  induction p with
  

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' u✝ : V
p : Walk G u✝ u✝
⊢ Walk.map Hom.id nil = nil

Next tactic:
| nil => rfl
@[simp]
theorem map_id (p : G.Walk u v) : p.map Hom.id = p := by
  induction p with
  | nil => 

Proof state:
case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' u✝ : V
p : Walk G u✝ u✝
⊢ Walk.map Hom.id nil = nil

Next tactic:
rfl