Theorem: PFunctor.Approx.head_succ'
File: Mathlib/Data/PFunctor/Univariate/M.lean

Proof steps:
state_before: F : PFunctor.{u}
X : Type w
f : X → ↑F X
n m : ℕ
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
⊢ head' (x n.succ) = head' (x m.succ)
state_after: F : PFunctor.{u}
X : Type w
f : X → ↑F X
n m : ℕ
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
⊢ ∀ (n : ℕ), head' (x n.succ) = head' (x 1)
tactic: suffices ∀ n, head' (x (succ n)) = head' (x 1) by simp [this]
state_before: F : PFunctor.{u}
X : Type w
f : X → ↑F X
n m : ℕ
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
⊢ ∀ (n : ℕ), head' (x n.succ) = head' (x 1)
state_after: F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
⊢ ∀ (n : ℕ), head' (x n.succ) = head' (x 1)
tactic: clear m n
state_before: F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
⊢ ∀ (n : ℕ), head' (x n.succ) = head' (x 1)
state_after: F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
⊢ head' (x n.succ) = head' (x 1)
tactic: intro n
state_before: F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
⊢ head' (x n.succ) = head' (x 1)
state_after: case intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
⊢ head' (CofixA.intro i₀ f₀) = head' (x 1)
tactic: cases' h₀ : x (succ n) with _ i₀ f₀
state_before: case intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
⊢ head' (CofixA.intro i₀ f₀) = head' (x 1)
state_after: case intro.intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
⊢ head' (CofixA.intro i₀ f₀) = head' (CofixA.intro i₁ f₁)
tactic: cases' h₁ : x 1 with _ i₁ f₁
state_before: case intro.intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
⊢ head' (CofixA.intro i₀ f₀) = head' (CofixA.intro i₁ f₁)
state_after: case intro.intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
⊢ (match n, CofixA.intro i₀ f₀ with
    | x, CofixA.intro i a => i) =
    match 0, CofixA.intro i₁ f₁ with
    | x, CofixA.intro i a => i
tactic: dsimp only [head']
state_before: case intro.intro
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
n : ℕ
i₀ : F.A
f₀ : F.B i₀ → CofixA F n
h₀ : x n.succ = CofixA.intro i₀ f₀
i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
⊢ (match n, CofixA.intro i₀ f₀ with
    | x, CofixA.intro i a => i) =
    match 0, CofixA.intro i₁ f₁ with
    | x, CofixA.intro i a => i
state_after: case intro.intro.zero
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
i₀ i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
f₀ : F.B i₀ → CofixA F 0
h₀ : x (succ 0) = CofixA.intro i₀ f₀
⊢ (match 0, CofixA.intro i₀ f₀ with
    | x, CofixA.intro i a => i) =
    match 0, CofixA.intro i₁ f₁ with
    | x, CofixA.intro i a => i

case intro.intro.succ
F : PFunctor.{u}
X : Type w
f : X → ↑F X
x : (n : ℕ) → CofixA F n
Hconsistent : AllAgree x
i₀ i₁ : F.A
f₁ : F.B i₁ → CofixA F 0
h₁ : x 1 = CofixA.intro i₁ f₁
n : ℕ
n_ih :
  ∀ (f₀ : F.B i₀ → CofixA F n),
    x n.succ = CofixA.intro i₀ f₀ →
      (match n, CofixA.intro i₀ f₀ with
        | x, CofixA.intro i a => i) =
        match 0, CofixA.intro i₁ f₁ with
        | x, CofixA.intro i a => i
f₀ : F.B i₀ → CofixA F (n + 1)
h₀ : x (n + 1).succ = CofixA.intro i₀ f₀
⊢ (match n + 1, CofixA.intro i₀ f₀ with
    | x, CofixA.intro i a => i) =
    match 0, CofixA.intro i₁ f₁ with
    | x, CofixA.intro i a => i
tactic: induction' n with n n_ih