Theorem: Quiver.Path.comp_inj
File: Mathlib/Combinatorics/Quiver/Path.lean

tactic: refine ⟨fun h => ?_, by rintro ⟨rfl, rfl⟩; rfl⟩
state_before: V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
q₁ q₂ : Path b c
hq : q₁.length = q₂.length
⊢ p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂
state_after: V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
q₁ q₂ : Path b c
hq : q₁.length = q₂.length
h : p₁.comp q₁ = p₂.comp q₂
⊢ p₁ = p₂ ∧ q₁ = q₂

tactic: induction' q₁ with d₁ e₁ q₁ f₁ ih <;> obtain _ | ⟨q₂, f₂⟩ := q₂
state_before: V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
q₁ q₂ : Path b c
hq : q₁.length = q₂.length
h : p₁.comp q₁ = p₂.comp q₂
⊢ p₁ = p₂ ∧ q₁ = q₂
state_after: case nil.nil
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
hq : nil.length = nil.length
h : p₁.comp nil = p₂.comp nil
⊢ p₁ = p₂ ∧ nil = nil

case nil.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ b
hq : nil.length = (q₂.cons f₂).length
h : p₁.comp nil = p₂.comp (q₂.cons f₂)
⊢ p₁ = p₂ ∧ nil = q₂.cons f₂

case cons.nil
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ : V
q₁ : Path b d₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
f₁ : d₁ ⟶ b
hq : (q₁.cons f₁).length = nil.length
h : p₁.comp (q₁.cons f₁) = p₂.comp nil
⊢ p₁ = p₂ ∧ q₁.cons f₁ = nil

case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : p₁.comp (q₁.cons f₁) = p₂.comp (q₂.cons f₂)
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂

tactic: rintro ⟨rfl, rfl⟩
state_before: V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
q₁ q₂ : Path b c
hq : q₁.length = q₂.length
⊢ p₁ = p₂ ∧ q₁ = q₂ → p₁.comp q₁ = p₂.comp q₂
state_after: case intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
q₁ : Path b c
hq : q₁.length = q₁.length
⊢ p₁.comp q₁ = p₁.comp q₁

tactic: rfl
state_before: case intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
q₁ : Path b c
hq : q₁.length = q₁.length
⊢ p₁.comp q₁ = p₁.comp q₁
state_after: no goals

tactic: exact ⟨h, rfl⟩
state_before: case nil.nil
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
hq : nil.length = nil.length
h : p₁.comp nil = p₂.comp nil
⊢ p₁ = p₂ ∧ nil = nil
state_after: no goals

tactic: cases hq
state_before: case nil.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ b
hq : nil.length = (q₂.cons f₂).length
h : p₁.comp nil = p₂.comp (q₂.cons f₂)
⊢ p₁ = p₂ ∧ nil = q₂.cons f₂
state_after: no goals

tactic: cases hq
state_before: case cons.nil
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ : V
q₁ : Path b d₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
f₁ : d₁ ⟶ b
hq : (q₁.cons f₁).length = nil.length
h : p₁.comp (q₁.cons f₁) = p₂.comp nil
⊢ p₁ = p₂ ∧ q₁.cons f₁ = nil
state_after: no goals

tactic: simp only [comp_cons, cons.injEq] at h
state_before: case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : p₁.comp (q₁.cons f₁) = p₂.comp (q₂.cons f₂)
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂
state_after: case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : d₁ = b✝ ∧ HEq (p₁.comp q₁) (p₂.comp q₂) ∧ HEq f₁ f₂
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂

tactic: obtain rfl := h.1
state_before: case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
b✝ : V
q₂ : Path b b✝
f₂ : b✝ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : d₁ = b✝ ∧ HEq (p₁.comp q₁) (p₂.comp q₂) ∧ HEq f₁ f₂
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂
state_after: case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
q₂ : Path b d₁
f₂ : d₁ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₂.comp q₂) ∧ HEq f₁ f₂
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂

tactic: obtain ⟨rfl, rfl⟩ := ih (Nat.succ.inj hq) h.2.1.eq
state_before: case cons.cons
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ p₂ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₂.comp q₂ → p₁ = p₂ ∧ q₁ = q₂
q₂ : Path b d₁
f₂ : d₁ ⟶ e₁
hq : (q₁.cons f₁).length = (q₂.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₂.comp q₂) ∧ HEq f₁ f₂
⊢ p₁ = p₂ ∧ q₁.cons f₁ = q₂.cons f₂
state_after: case cons.cons.intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ f₂ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₁.comp q₂ → p₁ = p₁ ∧ q₁ = q₂
hq : (q₁.cons f₁).length = (q₁.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₁.comp q₁) ∧ HEq f₁ f₂
⊢ p₁ = p₁ ∧ q₁.cons f₁ = q₁.cons f₂

tactic: rw [h.2.2.eq]
state_before: case cons.cons.intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ f₂ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₁.comp q₂ → p₁ = p₁ ∧ q₁ = q₂
hq : (q₁.cons f₁).length = (q₁.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₁.comp q₁) ∧ HEq f₁ f₂
⊢ p₁ = p₁ ∧ q₁.cons f₁ = q₁.cons f₂
state_after: case cons.cons.intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ f₂ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₁.comp q₂ → p₁ = p₁ ∧ q₁ = q₂
hq : (q₁.cons f₁).length = (q₁.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₁.comp q₁) ∧ HEq f₁ f₂
⊢ p₁ = p₁ ∧ q₁.cons f₂ = q₁.cons f₂

tactic: exact ⟨rfl, rfl⟩
state_before: case cons.cons.intro
V : Type u
inst✝ : Quiver V
a b c d : V
p₁ : Path a b
d₁ e₁ : V
q₁ : Path b d₁
f₁ f₂ : d₁ ⟶ e₁
ih : ∀ {q₂ : Path b d₁}, q₁.length = q₂.length → p₁.comp q₁ = p₁.comp q₂ → p₁ = p₁ ∧ q₁ = q₂
hq : (q₁.cons f₁).length = (q₁.cons f₂).length
h : d₁ = d₁ ∧ HEq (p₁.comp q₁) (p₁.comp q₁) ∧ HEq f₁ f₂
⊢ p₁ = p₁ ∧ q₁.cons f₂ = q₁.cons f₂
state_after: no goals