Theorem: QPF.Fix.ind_aux
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: have : Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr ⟨a, f⟩⟧ := by
  apply Quot.sound; apply Wequiv.abs'
  rw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]
  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
  rfl
state_before: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦WType.mk a f⟧
state_after: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦WType.mk a f⟧

tactic: rw [this]
state_before: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦WType.mk a f⟧
state_after: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ ⟦Wrepr (WType.mk a f)⟧ = ⟦WType.mk a f⟧

tactic: apply Quot.sound
state_before: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ ⟦Wrepr (WType.mk a f)⟧ = ⟦WType.mk a f⟧
state_after: case a
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ Setoid.r (Wrepr (WType.mk a f)) (WType.mk a f)

tactic: apply Wrepr_equiv
state_before: case a
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
this : mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
⊢ Setoid.r (Wrepr (WType.mk a f)) (WType.mk a f)
state_after: no goals

tactic: apply Quot.sound
state_before: F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr (WType.mk a f)⟧
state_after: case a
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ Setoid.r (PFunctor.W.mk ((P F).map fixToW (repr (abs ⟨a, fun x => ⟦f x⟧⟩)))) (Wrepr (WType.mk a f))

tactic: apply Wequiv.abs'
state_before: case a
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ Setoid.r (PFunctor.W.mk ((P F).map fixToW (repr (abs ⟨a, fun x => ⟦f x⟧⟩)))) (Wrepr (WType.mk a f))
state_after: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs (PFunctor.W.mk ((P F).map fixToW (repr (abs ⟨a, fun x => ⟦f x⟧⟩)))).dest = abs (Wrepr (WType.mk a f)).dest

tactic: rw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]
state_before: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs (PFunctor.W.mk ((P F).map fixToW (repr (abs ⟨a, fun x => ⟦f x⟧⟩)))).dest = abs (Wrepr (WType.mk a f)).dest
state_after: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs ⟨a, fixToW ∘ fun x => ⟦f x⟧⟩ = abs (Wrepr (WType.mk a f)).dest

tactic: simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
state_before: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs ⟨a, fixToW ∘ fun x => ⟦f x⟧⟩ = abs (Wrepr (WType.mk a f)).dest
state_after: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs ⟨a, fun x => fixToW ⟦f x⟧⟩ =
    abs ((P F).map (recF fun x => PFunctor.W.mk (repr x)) (PFunctor.W.dest (WType.mk a f)))

tactic: rfl
state_before: case a.h
F : Type u → Type u
q : QPF F
a : (P F).A
f : (P F).B a → (P F).W
⊢ abs ⟨a, fun x => fixToW ⟦f x⟧⟩ =
    abs ((P F).map (recF fun x => PFunctor.W.mk (repr x)) (PFunctor.W.dest (WType.mk a f)))
state_after: no goals