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

tactic: dsimp only [M.mk, PFunctor.M.cases, dest, head, Approx.sMk, head']
state_before: F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
x : ↑F F.M
f : (x : ↑F F.M) → r (M.mk x)
⊢ M.cases f (M.mk x) = f x
state_after: F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
x : ↑F F.M
f : (x : ↑F F.M) → r (M.mk x)
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro x.fst fun i => (x.snd i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk x, consistent := ⋯ } i⟩) =
    f x

tactic: cases x
state_before: F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
x : ↑F F.M
f : (x : ↑F F.M) → r (M.mk x)
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro x.fst fun i => (x.snd i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk x, consistent := ⋯ } i⟩) =
    f x
state_after: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro ⟨fst✝, snd✝⟩.fst fun i => (⟨fst✝, snd✝⟩.snd i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩) =
    f ⟨fst✝, snd✝⟩

tactic: dsimp only [Approx.sMk]
state_before: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro ⟨fst✝, snd✝⟩.fst fun i => (⟨fst✝, snd✝⟩.snd i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩) =
    f ⟨fst✝, snd✝⟩
state_after: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro fst✝ fun i => (snd✝ i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩) =
    f ⟨fst✝, snd✝⟩

tactic: simp only [Eq.mpr]
state_before: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ ⋯.mpr
      (f
        ⟨match 0, CofixA.intro fst✝ fun i => (snd✝ i).approx 0 with
          | x, CofixA.intro i a => i,
          fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩) =
    f ⟨fst✝, snd✝⟩
state_after: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ f
      ⟨match 0, CofixA.intro fst✝ fun i => (snd✝ i).approx 0 with
        | x, CofixA.intro i a => i,
        fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩ =
    f ⟨fst✝, snd✝⟩

tactic: apply congrFun
state_before: case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ f
      ⟨match 0, CofixA.intro fst✝ fun i => (snd✝ i).approx 0 with
        | x, CofixA.intro i a => i,
        fun i => children { approx := Approx.sMk ⟨fst✝, snd✝⟩, consistent := ⋯ } i⟩ =
    f ⟨fst✝, snd✝⟩
state_after: case mk.h
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ f = f

tactic: rfl
state_before: case mk.h
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
r : F.M → Sort u_2
f : (x : ↑F F.M) → r (M.mk x)
fst✝ : F.A
snd✝ : F.B fst✝ → F.M
⊢ f = f
state_after: no goals