Theorem: FreeGroup.Red.cons_cons_iff
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

tactic: generalize eq₁ : (p :: L₁ : List _) = LL₁
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
⊢ Red (p :: L₁) (p :: L₂) → Red L₁ L₂
state_after: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
⊢ Red LL₁ (p :: L₂) → Red L₁ L₂

tactic: generalize eq₂ : (p :: L₂ : List _) = LL₂
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
⊢ Red LL₁ (p :: L₂) → Red L₁ L₂
state_after: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
LL₂ : List (α × Bool)
eq₂ : p :: L₂ = LL₂
⊢ Red LL₁ LL₂ → Red L₁ L₂

tactic: intro h
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
LL₂ : List (α × Bool)
eq₂ : p :: L₂ = LL₂
⊢ Red LL₁ LL₂ → Red L₁ L₂
state_after: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
LL₂ : List (α × Bool)
eq₂ : p :: L₂ = LL₂
h : Red LL₁ LL₂
⊢ Red L₁ L₂

tactic: induction' h using Relation.ReflTransGen.head_induction_on
  with L₁ L₂ h₁₂ h ih
  generalizing L₁ L₂
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ : List (α × Bool)
eq₁ : p :: L₁ = LL₁
LL₂ : List (α × Bool)
eq₂ : p :: L₂ = LL₂
h : Red LL₁ LL₂
⊢ Red L₁ L₂
state_after: case refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ LL₂ L₁ L₂ : List (α × Bool)
eq₁ : p :: L₁ = LL₂
eq₂ : p :: L₂ = LL₂
⊢ Red L₁ L₂

case head
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ LL₂ L₁✝ L₂✝ : List (α × Bool)
h₁₂ : Step L₁✝ L₂✝
h : ReflTransGen Step L₂✝ LL₂
ih : ∀ {L₁ L₂ : List (α × Bool)}, p :: L₁ = L₂✝ → p :: L₂ = LL₂ → Red L₁ L₂
L₁ L₂ : List (α × Bool)
eq₁ : p :: L₁ = L₁✝
eq₂ : p :: L₂ = LL₂
⊢ Red L₁ L₂

tactic: subst_vars
state_before: case refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ LL₂ L₁ L₂ : List (α × Bool)
eq₁ : p :: L₁ = LL₂
eq₂ : p :: L₂ = LL₂
⊢ Red L₁ L₂
state_after: case refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₁ L₂ : List (α × Bool)
eq₂ : p :: L₂ = p :: L₁
⊢ Red L₁ L₂

tactic: cases eq₂
state_before: case refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₁ L₂ : List (α × Bool)
eq₂ : p :: L₂ = p :: L₁
⊢ Red L₁ L₂
state_after: case refl.refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₁ : List (α × Bool)
⊢ Red L₁ L₁

tactic: constructor
state_before: case refl.refl
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₁ : List (α × Bool)
⊢ Red L₁ L₁
state_after: no goals

tactic: subst_vars
state_before: case head
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ LL₂ L₁✝ L₂✝ : List (α × Bool)
h₁₂ : Step L₁✝ L₂✝
h : ReflTransGen Step L₂✝ LL₂
ih : ∀ {L₁ L₂ : List (α × Bool)}, p :: L₁ = L₂✝ → p :: L₂ = LL₂ → Red L₁ L₂
L₁ L₂ : List (α × Bool)
eq₁ : p :: L₁ = L₁✝
eq₂ : p :: L₂ = LL₂
⊢ Red L₁ L₂
state_after: case head
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₂✝ L₁ L₂ : List (α × Bool)
h : ReflTransGen Step L₂✝ (p :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, p :: L₁ = L₂✝ → p :: L₂_1 = p :: L₂ → Red L₁ L₂_1
h₁₂ : Step (p :: L₁) L₂✝
⊢ Red L₁ L₂

tactic: cases' p with a b
state_before: case head
α : Type u
L L₃ L₄ : List (α × Bool)
p : α × Bool
LL₁ L₂✝ L₁ L₂ : List (α × Bool)
h : ReflTransGen Step L₂✝ (p :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, p :: L₁ = L₂✝ → p :: L₂_1 = p :: L₂ → Red L₁ L₂_1
h₁₂ : Step (p :: L₁) L₂✝
⊢ Red L₁ L₂
state_after: case head.mk
α : Type u
L L₃ L₄ LL₁ L₂✝ L₁ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
h₁₂ : Step ((a, b) :: L₁) L₂✝
⊢ Red L₁ L₂

tactic: rw [Step.cons_left_iff] at h₁₂
state_before: case head.mk
α : Type u
L L₃ L₄ LL₁ L₂✝ L₁ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
h₁₂ : Step ((a, b) :: L₁) L₂✝
⊢ Red L₁ L₂
state_after: case head.mk
α : Type u
L L₃ L₄ LL₁ L₂✝ L₁ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
h₁₂ : (∃ L, Step L₁ L ∧ L₂✝ = (a, b) :: L) ∨ L₁ = (a, !b) :: L₂✝
⊢ Red L₁ L₂

tactic: rcases h₁₂ with (⟨L, h₁₂, rfl⟩ | rfl)
state_before: case head.mk
α : Type u
L L₃ L₄ LL₁ L₂✝ L₁ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
h₁₂ : (∃ L, Step L₁ L ∧ L₂✝ = (a, b) :: L) ∨ L₁ = (a, !b) :: L₂✝
⊢ Red L₁ L₂
state_after: case head.mk.inl.intro.intro
α : Type u
L✝ L₃ L₄ LL₁ L₁ L₂ : List (α × Bool)
a : α
b : Bool
L : List (α × Bool)
h₁₂ : Step L₁ L
h : ReflTransGen Step ((a, b) :: L) ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = (a, b) :: L → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
⊢ Red L₁ L₂

case head.mk.inr
α : Type u
L L₃ L₄ LL₁ L₂✝ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
⊢ Red ((a, !b) :: L₂✝) L₂

tactic: exact (ih rfl rfl).head h₁₂
state_before: case head.mk.inl.intro.intro
α : Type u
L✝ L₃ L₄ LL₁ L₁ L₂ : List (α × Bool)
a : α
b : Bool
L : List (α × Bool)
h₁₂ : Step L₁ L
h : ReflTransGen Step ((a, b) :: L) ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = (a, b) :: L → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
⊢ Red L₁ L₂
state_after: no goals

tactic: exact (cons_cons h).tail Step.cons_not_rev
state_before: case head.mk.inr
α : Type u
L L₃ L₄ LL₁ L₂✝ L₂ : List (α × Bool)
a : α
b : Bool
h : ReflTransGen Step L₂✝ ((a, b) :: L₂)
ih : ∀ {L₁ L₂_1 : List (α × Bool)}, (a, b) :: L₁ = L₂✝ → (a, b) :: L₂_1 = (a, b) :: L₂ → Red L₁ L₂_1
⊢ Red ((a, !b) :: L₂✝) L₂
state_after: no goals