Theorem: SimpleGraph.isAcyclic_of_path_unique
File: Mathlib/Combinatorics/SimpleGraph/Acyclic.lean

tactic: intro v c hc
state_before: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
⊢ G.IsAcyclic
state_after: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v : V
c : G.Walk v v
hc : c.IsCycle
⊢ False

tactic: simp only [Walk.isCycle_def, Ne] at hc
state_before: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v : V
c : G.Walk v v
hc : c.IsCycle
⊢ False
state_after: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v : V
c : G.Walk v v
hc : c.IsTrail ∧ ¬c = nil ∧ c.support.tail.Nodup
⊢ False

tactic: cases c with
| nil => cases hc.2.1 rfl
| cons ha c' =>
  simp only [Walk.cons_isTrail_iff, Walk.support_cons, List.tail_cons, true_and_iff] at hc
  specialize h _ _ ⟨c', by simp only [Walk.isPath_def, hc.2]⟩ (Path.singleton ha.symm)
  rw [Path.singleton, Subtype.mk.injEq] at h
  simp [h] at hc
state_before: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v : V
c : G.Walk v v
hc : c.IsTrail ∧ ¬c = nil ∧ c.support.tail.Nodup
⊢ False
state_after: no goals

tactic: cases hc.2.1 rfl
state_before: case nil
V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v : V
hc : nil.IsTrail ∧ ¬nil = nil ∧ nil.support.tail.Nodup
⊢ False
state_after: no goals

tactic: simp only [Walk.cons_isTrail_iff, Walk.support_cons, List.tail_cons, true_and_iff] at hc
state_before: case cons
V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (cons ha c').IsTrail ∧ ¬cons ha c' = nil ∧ (cons ha c').support.tail.Nodup
⊢ False
state_after: case cons
V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
⊢ False

tactic: specialize h _ _ ⟨c', by simp only [Walk.isPath_def, hc.2]⟩ (Path.singleton ha.symm)
state_before: case cons
V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
⊢ False
state_after: case cons
V : Type u
G : SimpleGraph V
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
h : ⟨c', ⋯⟩ = Path.singleton ⋯
⊢ False

tactic: rw [Path.singleton, Subtype.mk.injEq] at h
state_before: case cons
V : Type u
G : SimpleGraph V
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
h : ⟨c', ⋯⟩ = Path.singleton ⋯
⊢ False
state_after: case cons
V : Type u
G : SimpleGraph V
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
h : c' = cons ⋯ nil
⊢ False

tactic: simp [h] at hc
state_before: case cons
V : Type u
G : SimpleGraph V
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
h : c' = cons ⋯ nil
⊢ False
state_after: no goals

tactic: simp only [Walk.isPath_def, hc.2]
state_before: V : Type u
G : SimpleGraph V
h : ∀ (v w : V) (p q : G.Path v w), p = q
v v✝ : V
ha : G.Adj v v✝
c' : G.Walk v✝ v
hc : (c'.IsTrail ∧ s(v, v✝) ∉ c'.edges) ∧ ¬False ∧ c'.support.Nodup
⊢ c'.IsPath
state_after: no goals