Theorem: PFunctor.M.corec_def
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: dsimp only [M.corec, M.mk]
state_before: F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
⊢ M.corec f x₀ = M.mk (F.map (M.corec f) (f x₀))
state_after: F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
⊢ { approx := sCorec f x₀, consistent := ⋯ } = { approx := Approx.sMk (F.map (M.corec f) (f x₀)), consistent := ⋯ }

tactic: congr with n
state_before: F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
⊢ { approx := sCorec f x₀, consistent := ⋯ } = { approx := Approx.sMk (F.map (M.corec f) (f x₀)), consistent := ⋯ }
state_after: case e_approx.h
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ sCorec f x₀ n = Approx.sMk (F.map (M.corec f) (f x₀)) n

tactic: cases' n with n
state_before: case e_approx.h
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ sCorec f x₀ n = Approx.sMk (F.map (M.corec f) (f x₀)) n
state_after: case e_approx.h.zero
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
⊢ sCorec f x₀ 0 = Approx.sMk (F.map (M.corec f) (f x₀)) 0

case e_approx.h.succ
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ sCorec f x₀ (n + 1) = Approx.sMk (F.map (M.corec f) (f x₀)) (n + 1)

tactic: dsimp only [sCorec, Approx.sMk]
state_before: case e_approx.h.zero
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
⊢ sCorec f x₀ 0 = Approx.sMk (F.map (M.corec f) (f x₀)) 0
state_after: no goals

tactic: dsimp only [sCorec, Approx.sMk]
state_before: case e_approx.h.succ
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ sCorec f x₀ (n + 1) = Approx.sMk (F.map (M.corec f) (f x₀)) (n + 1)
state_after: case e_approx.h.succ
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ (CofixA.intro (f x₀).fst fun i => sCorec f ((f x₀).snd i) n) =
    CofixA.intro (F.map (M.corec f) (f x₀)).fst fun i => ((F.map (M.corec f) (f x₀)).snd i).approx n

tactic: cases f x₀
state_before: case e_approx.h.succ
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
⊢ (CofixA.intro (f x₀).fst fun i => sCorec f ((f x₀).snd i) n) =
    CofixA.intro (F.map (M.corec f) (f x₀)).fst fun i => ((F.map (M.corec f) (f x₀)).snd i).approx n
state_after: case e_approx.h.succ.mk
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
fst✝ : F.A
snd✝ : F.B fst✝ → X
⊢ (CofixA.intro ⟨fst✝, snd✝⟩.fst fun i => sCorec f (⟨fst✝, snd✝⟩.snd i) n) =
    CofixA.intro (F.map (M.corec f) ⟨fst✝, snd✝⟩).fst fun i => ((F.map (M.corec f) ⟨fst✝, snd✝⟩).snd i).approx n

tactic: dsimp only [PFunctor.map]
state_before: case e_approx.h.succ.mk
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
fst✝ : F.A
snd✝ : F.B fst✝ → X
⊢ (CofixA.intro ⟨fst✝, snd✝⟩.fst fun i => sCorec f (⟨fst✝, snd✝⟩.snd i) n) =
    CofixA.intro (F.map (M.corec f) ⟨fst✝, snd✝⟩).fst fun i => ((F.map (M.corec f) ⟨fst✝, snd✝⟩).snd i).approx n
state_after: case e_approx.h.succ.mk
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
fst✝ : F.A
snd✝ : F.B fst✝ → X
⊢ (CofixA.intro fst✝ fun i => sCorec f (snd✝ i) n) = CofixA.intro fst✝ fun i => ((M.corec f ∘ snd✝) i).approx n

tactic: congr
state_before: case e_approx.h.succ.mk
F : PFunctor.{u}
X✝ : Type u_1
f✝ : X✝ → ↑F X✝
X : Type u_2
f : X → ↑F X
x₀ : X
n : ℕ
fst✝ : F.A
snd✝ : F.B fst✝ → X
⊢ (CofixA.intro fst✝ fun i => sCorec f (snd✝ i) n) = CofixA.intro fst✝ fun i => ((M.corec f ∘ snd✝) i).approx n
state_after: no goals