[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ id <$> x = x
[PROOFSTEP]
rw [← abs_repr x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ id <$> abs (repr x) = abs (repr x)
[PROOFSTEP]
cases' repr x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ id <$> abs { fst := a, snd := f } = abs { fst := a, snd := f }
[PROOFSTEP]
rw [← abs_map]
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ abs (id <$> { fst := a, snd := f }) = abs { fst := a, snd := f }
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f : α → β
g : β → γ
x : F α
⊢ (g ∘ f) <$> x = g <$> f <$> x
[PROOFSTEP]
rw [← abs_repr x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f : α → β
g : β → γ
x : F α
⊢ (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)
[PROOFSTEP]
cases' repr x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f✝ : α → β
g : β → γ
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ (g ∘ f✝) <$> abs { fst := a, snd := f } = g <$> f✝ <$> abs { fst := a, snd := f }
[PROOFSTEP]
rw [← abs_map, ← abs_map, ← abs_map]
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f✝ : α → β
g : β → γ
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ abs ((g ∘ f✝) <$> { fst := a, snd := f }) = abs (g <$> f✝ <$> { fst := a, snd := f })
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ Liftp p x ↔ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ Liftp p x → ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
rintro ⟨y, hy⟩
[GOAL]
case mp.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
cases' h : repr y with a f
[GOAL]
case mp.intro.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
use a, fun i => (f i).val
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i => ↑(f i) } ∧ ∀ (i : PFunctor.B (P F) a), p ↑(f i)
[PROOFSTEP]
constructor
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i => ↑(f i) }
[PROOFSTEP]
rw [← hy, ← abs_repr y, h, ← abs_map]
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs (Subtype.val <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => ↑(f i) }
[PROOFSTEP]
rfl
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∀ (i : PFunctor.B (P F) a), p ↑(f i)
[PROOFSTEP]
intro i
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
i : PFunctor.B (P F) a
⊢ p ↑(f i)
[PROOFSTEP]
apply (f i).property
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → Liftp p x
[PROOFSTEP]
rintro ⟨a, f, h₀, h₁⟩
[GOAL]
case mpr.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : x = abs { fst := a, snd := f }
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ Liftp p x
[PROOFSTEP]
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : x = abs { fst := a, snd := f }
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ Subtype.val <$> abs { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } } = x
[PROOFSTEP]
rw [← abs_map, h₀]
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : x = abs { fst := a, snd := f }
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ abs (Subtype.val <$> { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } }) =
    abs { fst := a, snd := f }
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ Liftp p x ↔ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ Liftp p x → ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)
[PROOFSTEP]
rintro ⟨y, hy⟩
[GOAL]
case mp.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
⊢ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)
[PROOFSTEP]
cases' h : repr y with a f
[GOAL]
case mp.intro.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)
[PROOFSTEP]
use⟨a, fun i => (f i).val⟩
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs { fst := a, snd := fun i => ↑(f i) } = x ∧
    ∀ (i : PFunctor.B (P F) { fst := a, snd := fun i => ↑(f i) }.fst),
      p (Sigma.snd { fst := a, snd := fun i => ↑(f i) } i)
[PROOFSTEP]
dsimp
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs { fst := a, snd := fun i => ↑(f i) } = x ∧ ∀ (i : PFunctor.B (P F) a), p ↑(f i)
[PROOFSTEP]
constructor
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs { fst := a, snd := fun i => ↑(f i) } = x
[PROOFSTEP]
rw [← hy, ← abs_repr y, h, ← abs_map]
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs { fst := a, snd := fun i => ↑(f i) } = abs (Subtype.val <$> { fst := a, snd := f })
[PROOFSTEP]
rfl
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∀ (i : PFunctor.B (P F) a), p ↑(f i)
[PROOFSTEP]
intro i
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
y : F (Subtype p)
hy : Subtype.val <$> y = x
a : (P F).A
f : PFunctor.B (P F) a → Subtype p
h : repr y = { fst := a, snd := f }
i : PFunctor.B (P F) a
⊢ p ↑(f i)
[PROOFSTEP]
apply (f i).property
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
⊢ (∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)) → Liftp p x
[PROOFSTEP]
rintro ⟨⟨a, f⟩, h₀, h₁⟩
[GOAL]
case mpr.intro.mk.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : abs { fst := a, snd := f } = x
h₁ : ∀ (i : PFunctor.B (P F) { fst := a, snd := f }.fst), p (Sigma.snd { fst := a, snd := f } i)
⊢ Liftp p x
[PROOFSTEP]
dsimp at *
[GOAL]
case mpr.intro.mk.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : abs { fst := a, snd := f } = x
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ Liftp p x
[PROOFSTEP]
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : abs { fst := a, snd := f } = x
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ Subtype.val <$> abs { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } } = x
[PROOFSTEP]
rw [← abs_map, ← h₀]
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
p : α → Prop
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
h₀ : abs { fst := a, snd := f } = x
h₁ : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ abs (Subtype.val <$> { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } }) =
    abs { fst := a, snd := f }
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
⊢ Liftr r x y ↔
    ∃ a f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
⊢ Liftr r x y →
    ∃ a f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
[PROOFSTEP]
rintro ⟨u, xeq, yeq⟩
[GOAL]
case mp.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
⊢ ∃ a f₀ f₁,
    x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
[PROOFSTEP]
cases' h : repr u with a f
[GOAL]
case mp.intro.intro.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ ∃ a f₀ f₁,
    x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
[PROOFSTEP]
use a, fun i => (f i).val.fst, fun i => (f i).val.snd
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i => (↑(f i)).fst } ∧
    y = abs { fst := a, snd := fun i => (↑(f i)).snd } ∧ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd
[PROOFSTEP]
constructor
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i => (↑(f i)).fst }
[PROOFSTEP]
rw [← xeq, ← abs_repr u, h, ← abs_map]
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ abs ((fun t => (↑t).fst) <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => (↑(f i)).fst }
[PROOFSTEP]
rfl
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ y = abs { fst := a, snd := fun i => (↑(f i)).snd } ∧ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd
[PROOFSTEP]
constructor
[GOAL]
case h.right.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ y = abs { fst := a, snd := fun i => (↑(f i)).snd }
[PROOFSTEP]
rw [← yeq, ← abs_repr u, h, ← abs_map]
[GOAL]
case h.right.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ abs ((fun t => (↑t).snd) <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => (↑(f i)).snd }
[PROOFSTEP]
rfl
[GOAL]
case h.right.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
⊢ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd
[PROOFSTEP]
intro i
[GOAL]
case h.right.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
u : F { p // r p.fst p.snd }
xeq : (fun t => (↑t).fst) <$> u = x
yeq : (fun t => (↑t).snd) <$> u = y
a : (P F).A
f : PFunctor.B (P F) a → { p // r p.fst p.snd }
h : repr u = { fst := a, snd := f }
i : PFunctor.B (P F) a
⊢ r (↑(f i)).fst (↑(f i)).snd
[PROOFSTEP]
exact (f i).property
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
⊢ (∃ a f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)) →
    Liftr r x y
[PROOFSTEP]
rintro ⟨a, f₀, f₁, xeq, yeq, h⟩
[GOAL]
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ Liftr r x y
[PROOFSTEP]
use abs ⟨a, fun i => ⟨(f₀ i, f₁ i), h i⟩⟩
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ (fun t => (↑t).fst) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =
      x ∧
    (fun t => (↑t).snd) <$>
        abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =
      y
[PROOFSTEP]
constructor
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ (fun t => (↑t).fst) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =
    x
[PROOFSTEP]
rw [xeq, ← abs_map]
[GOAL]
case h.left
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ abs
      ((fun t => (↑t).fst) <$>
        { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } }) =
    abs { fst := a, snd := f₀ }
[PROOFSTEP]
rfl
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ (fun t => (↑t).snd) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =
    y
[PROOFSTEP]
rw [yeq, ← abs_map]
[GOAL]
case h.right
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
r : α → α → Prop
x y : F α
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ abs
      ((fun t => (↑t).snd) <$>
        { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } }) =
    abs { fst := a, snd := f₁ }
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : PFunctor.W (P F)
⊢ recF g x = g (abs (recF g <$> PFunctor.W.dest x))
[PROOFSTEP]
cases x
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
a✝ : (P F).A
f✝ : PFunctor.B (P F) a✝ → WType (P F).B
⊢ recF g (WType.mk a✝ f✝) = g (abs (recF g <$> PFunctor.W.dest (WType.mk a✝ f✝)))
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
⊢ Wequiv x y → recF u x = recF u y
[PROOFSTEP]
intro h
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
h : Wequiv x y
⊢ recF u x = recF u y
[PROOFSTEP]
induction h
[GOAL]
case ind
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ f'✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f✝ x) (f'✝ x)
a_ih✝ : ∀ (x : PFunctor.B (P F) a✝¹), recF u (f✝ x) = recF u (f'✝ x)
⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a✝¹ f'✝)
case abs
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a'✝ : (P F).A
f'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)
a✝ : abs { fst := a✝¹, snd := f✝ } = abs { fst := a'✝, snd := f'✝ }
⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a'✝ f'✝)
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : recF u u✝ = recF u v✝
a_ih✝ : recF u v✝ = recF u w✝
⊢ recF u u✝ = recF u w✝
[PROOFSTEP]
case ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a : (P F).A
f f' : PFunctor.B (P F) a → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)
ih : ∀ (x : PFunctor.B (P F) a), recF u (f x) = recF u (f' x)
⊢ recF u (WType.mk a f) = recF u (WType.mk a f')
[PROOFSTEP]
case ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a : (P F).A
f f' : PFunctor.B (P F) a → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)
ih : ∀ (x : PFunctor.B (P F) a), recF u (f x) = recF u (f' x)
⊢ recF u (WType.mk a f) = recF u (WType.mk a f')
[PROOFSTEP]
simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
[GOAL]
case abs
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a'✝ : (P F).A
f'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)
a✝ : abs { fst := a✝¹, snd := f✝ } = abs { fst := a'✝, snd := f'✝ }
⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a'✝ f'✝)
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : recF u u✝ = recF u v✝
a_ih✝ : recF u v✝ = recF u w✝
⊢ recF u u✝ = recF u w✝
[PROOFSTEP]
case abs a f a' f' h => simp only [recF_eq', abs_map, h]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
a' : (P F).A
f' : PFunctor.B (P F) a' → PFunctor.W (P F)
h : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
⊢ recF u (WType.mk a f) = recF u (WType.mk a' f')
[PROOFSTEP]
case abs a f a' f' h => simp only [recF_eq', abs_map, h]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y : PFunctor.W (P F)
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
a' : (P F).A
f' : PFunctor.B (P F) a' → PFunctor.W (P F)
h : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
⊢ recF u (WType.mk a f) = recF u (WType.mk a' f')
[PROOFSTEP]
simp only [recF_eq', abs_map, h]
[GOAL]
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : recF u u✝ = recF u v✝
a_ih✝ : recF u v✝ = recF u w✝
⊢ recF u u✝ = recF u w✝
[PROOFSTEP]
case trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x✝ y✝ x y z : PFunctor.W (P F)
a✝¹ : Wequiv x y
a✝ : Wequiv y z
ih₁ : recF u x = recF u y
ih₂ : recF u y = recF u z
⊢ recF u x = recF u z
[PROOFSTEP]
case trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
u : F α → α
x✝ y✝ x y z : PFunctor.W (P F)
a✝¹ : Wequiv x y
a✝ : Wequiv y z
ih₁ : recF u x = recF u y
ih₂ : recF u y = recF u z
⊢ recF u x = recF u z
[PROOFSTEP]
exact Eq.trans ih₁ ih₂
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
h : Qpf.abs (PFunctor.W.dest x) = Qpf.abs (PFunctor.W.dest y)
⊢ Wequiv x y
[PROOFSTEP]
cases x
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
y : PFunctor.W (P F)
a✝ : (P F).A
f✝ : PFunctor.B (P F) a✝ → WType (P F).B
h : Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝)) = Qpf.abs (PFunctor.W.dest y)
⊢ Wequiv (WType.mk a✝ f✝) y
[PROOFSTEP]
cases y
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a✝¹ : (P F).A
f✝¹ : PFunctor.B (P F) a✝¹ → WType (P F).B
a✝ : (P F).A
f✝ : PFunctor.B (P F) a✝ → WType (P F).B
h : Qpf.abs (PFunctor.W.dest (WType.mk a✝¹ f✝¹)) = Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝))
⊢ Wequiv (WType.mk a✝¹ f✝¹) (WType.mk a✝ f✝)
[PROOFSTEP]
apply Wequiv.abs
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a✝¹ : (P F).A
f✝¹ : PFunctor.B (P F) a✝¹ → WType (P F).B
a✝ : (P F).A
f✝ : PFunctor.B (P F) a✝ → WType (P F).B
h : Qpf.abs (PFunctor.W.dest (WType.mk a✝¹ f✝¹)) = Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝))
⊢ Qpf.abs { fst := a✝¹, snd := f✝¹ } = Qpf.abs { fst := a✝, snd := f✝ }
[PROOFSTEP]
apply h
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : PFunctor.W (P F)
⊢ Wequiv x x
[PROOFSTEP]
cases' x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
⊢ Wequiv (WType.mk a f) (WType.mk a f)
[PROOFSTEP]
exact Wequiv.abs a f a f rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
⊢ Wequiv x y → Wequiv y x
[PROOFSTEP]
intro h
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
h : Wequiv x y
⊢ Wequiv y x
[PROOFSTEP]
induction h
[GOAL]
case ind
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ f'✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f✝ x) (f'✝ x)
a_ih✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f'✝ x) (f✝ x)
⊢ Wequiv (WType.mk a✝¹ f'✝) (WType.mk a✝¹ f✝)
case abs
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a'✝ : (P F).A
f'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)
a✝ : Qpf.abs { fst := a✝¹, snd := f✝ } = Qpf.abs { fst := a'✝, snd := f'✝ }
⊢ Wequiv (WType.mk a'✝ f'✝) (WType.mk a✝¹ f✝)
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : Wequiv v✝ u✝
a_ih✝ : Wequiv w✝ v✝
⊢ Wequiv w✝ u✝
[PROOFSTEP]
case ind a f f' _ ih => exact Wequiv.ind _ _ _ ih
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a : (P F).A
f f' : PFunctor.B (P F) a → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)
ih : ∀ (x : PFunctor.B (P F) a), Wequiv (f' x) (f x)
⊢ Wequiv (WType.mk a f') (WType.mk a f)
[PROOFSTEP]
case ind a f f' _ ih => exact Wequiv.ind _ _ _ ih
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a : (P F).A
f f' : PFunctor.B (P F) a → PFunctor.W (P F)
a✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)
ih : ∀ (x : PFunctor.B (P F) a), Wequiv (f' x) (f x)
⊢ Wequiv (WType.mk a f') (WType.mk a f)
[PROOFSTEP]
exact Wequiv.ind _ _ _ ih
[GOAL]
case abs
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a✝¹ : (P F).A
f✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)
a'✝ : (P F).A
f'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)
a✝ : Qpf.abs { fst := a✝¹, snd := f✝ } = Qpf.abs { fst := a'✝, snd := f'✝ }
⊢ Wequiv (WType.mk a'✝ f'✝) (WType.mk a✝¹ f✝)
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : Wequiv v✝ u✝
a_ih✝ : Wequiv w✝ v✝
⊢ Wequiv w✝ u✝
[PROOFSTEP]
case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
a' : (P F).A
f' : PFunctor.B (P F) a' → PFunctor.W (P F)
h : Qpf.abs { fst := a, snd := f } = Qpf.abs { fst := a', snd := f' }
⊢ Wequiv (WType.mk a' f') (WType.mk a f)
[PROOFSTEP]
case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.W (P F)
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
a' : (P F).A
f' : PFunctor.B (P F) a' → PFunctor.W (P F)
h : Qpf.abs { fst := a, snd := f } = Qpf.abs { fst := a', snd := f' }
⊢ Wequiv (WType.mk a' f') (WType.mk a f)
[PROOFSTEP]
exact Wequiv.abs _ _ _ _ h.symm
[GOAL]
case trans
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y u✝ v✝ w✝ : PFunctor.W (P F)
a✝¹ : Wequiv u✝ v✝
a✝ : Wequiv v✝ w✝
a_ih✝¹ : Wequiv v✝ u✝
a_ih✝ : Wequiv w✝ v✝
⊢ Wequiv w✝ u✝
[PROOFSTEP]
case trans x y z _ _ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ y✝ x y z : PFunctor.W (P F)
a✝¹ : Wequiv x y
a✝ : Wequiv y z
ih₁ : Wequiv y x
ih₂ : Wequiv z y
⊢ Wequiv z x
[PROOFSTEP]
case trans x y z _ _ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ y✝ x y z : PFunctor.W (P F)
a✝¹ : Wequiv x y
a✝ : Wequiv y z
ih₁ : Wequiv y x
ih₂ : Wequiv z y
⊢ Wequiv z x
[PROOFSTEP]
exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : PFunctor.W (P F)
⊢ Wequiv (Wrepr x) x
[PROOFSTEP]
induction' x with a f ih
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ Wequiv (Wrepr (WType.mk a f)) (WType.mk a f)
[PROOFSTEP]
apply Wequiv.trans
[GOAL]
case mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ Wequiv (Wrepr (WType.mk a f)) ?mk.v
[PROOFSTEP]
change Wequiv (Wrepr ⟨a, f⟩) (PFunctor.W.mk (Wrepr <$> ⟨a, f⟩))
[GOAL]
case mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ Wequiv (Wrepr (WType.mk a f)) (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f }))
[PROOFSTEP]
apply Wequiv.abs'
[GOAL]
case mk.a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ abs (PFunctor.W.dest (Wrepr (WType.mk a f))) =
    abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))
[PROOFSTEP]
have : Wrepr ⟨a, f⟩ = PFunctor.W.mk (repr (abs (Wrepr <$> ⟨a, f⟩))) := rfl
[GOAL]
case mk.a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
this : Wrepr (WType.mk a f) = PFunctor.W.mk (repr (abs (Wrepr <$> { fst := a, snd := f })))
⊢ abs (PFunctor.W.dest (Wrepr (WType.mk a f))) =
    abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))
[PROOFSTEP]
rw [this, PFunctor.W.dest_mk, abs_repr]
[GOAL]
case mk.a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
this : Wrepr (WType.mk a f) = PFunctor.W.mk (repr (abs (Wrepr <$> { fst := a, snd := f })))
⊢ abs (Wrepr <$> { fst := a, snd := f }) = abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))
[PROOFSTEP]
rfl
[GOAL]
case mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ Wequiv (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })) (WType.mk a f)
[PROOFSTEP]
apply Wequiv.ind
[GOAL]
case mk.a.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)
⊢ ∀ (x : PFunctor.B (P F) a), Wequiv ((Wrepr ∘ f) x) (f x)
[PROOFSTEP]
exact ih
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
⊢ rec g (mk x) = g (rec g <$> x)
[PROOFSTEP]
have : recF g ∘ fixToW = Fix.rec g := by
  apply funext
  apply Quotient.ind
  intro x
  apply recF_eq_of_Wequiv
  rw [fixToW]
  apply Wrepr_equiv
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
⊢ recF g ∘ fixToW = rec g
[PROOFSTEP]
apply funext
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
⊢ ∀ (x : Fix F), (recF g ∘ fixToW) x = rec g x
[PROOFSTEP]
apply Quotient.ind
[GOAL]
case h.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
⊢ ∀ (a : PFunctor.W (P F)), (recF g ∘ fixToW) (Quotient.mk Wsetoid a) = rec g (Quotient.mk Wsetoid a)
[PROOFSTEP]
intro x
[GOAL]
case h.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x✝ : F (Fix F)
x : PFunctor.W (P F)
⊢ (recF g ∘ fixToW) (Quotient.mk Wsetoid x) = rec g (Quotient.mk Wsetoid x)
[PROOFSTEP]
apply recF_eq_of_Wequiv
[GOAL]
case h.a.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x✝ : F (Fix F)
x : PFunctor.W (P F)
⊢ Wequiv (fixToW (Quotient.mk Wsetoid x)) x
[PROOFSTEP]
rw [fixToW]
[GOAL]
case h.a.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x✝ : F (Fix F)
x : PFunctor.W (P F)
⊢ Wequiv
    (Quotient.lift Wrepr
      (_ :
        ∀ (x y : PFunctor.W (P F)),
          Wequiv x y → recF (fun x => PFunctor.W.mk (repr x)) x = recF (fun x => PFunctor.W.mk (repr x)) y)
      (Quotient.mk Wsetoid x))
    x
[PROOFSTEP]
apply Wrepr_equiv
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
⊢ rec g (mk x) = g (rec g <$> x)
[PROOFSTEP]
conv =>
  lhs
  rw [Fix.rec, Fix.mk]
  dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
| rec g (mk x) = g (rec g <$> x)
[PROOFSTEP]
  lhs
  rw [Fix.rec, Fix.mk]
  dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
| rec g (mk x) = g (rec g <$> x)
[PROOFSTEP]
  lhs
  rw [Fix.rec, Fix.mk]
  dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
| rec g (mk x) = g (rec g <$> x)
[PROOFSTEP]
lhs
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
| rec g (mk x)
[PROOFSTEP]
rw [Fix.rec, Fix.mk]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
| Quot.lift (recF g) (_ : ∀ (x y : PFunctor.W (P F)), Wequiv x y → recF g x = recF g y)
    (Quot.mk Setoid.r (PFunctor.W.mk (fixToW <$> repr x)))
[PROOFSTEP]
dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
⊢ recF g (PFunctor.W.mk (fixToW <$> repr x)) = g (rec g <$> x)
[PROOFSTEP]
cases' h : repr x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
x : F (Fix F)
this : recF g ∘ fixToW = rec g
a : (P F).A
f : PFunctor.B (P F) a → Fix F
h : repr x = { fst := a, snd := f }
⊢ recF g (PFunctor.W.mk (fixToW <$> { fst := a, snd := f })) = g (rec g <$> x)
[PROOFSTEP]
rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map, ← h, abs_repr, this]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (WType.mk a f)
[PROOFSTEP]
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]
  conv =>
    rhs
    simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))
[PROOFSTEP]
apply Quot.sound
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
⊢ Setoid.r (PFunctor.W.mk (fixToW <$> repr (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })))
    (Wrepr (WType.mk a f))
[PROOFSTEP]
apply Wequiv.abs'
[GOAL]
case a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
⊢ abs
      (PFunctor.W.dest
        (PFunctor.W.mk (fixToW <$> repr (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })))) =
    abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
rw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]
[GOAL]
case a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
⊢ abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
conv =>
  rhs
  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
  rhs
  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
  rhs
  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
rhs
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
| abs (PFunctor.W.dest (Wrepr (WType.mk a f)))
[PROOFSTEP]
simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
this : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))
⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (WType.mk a f)
[PROOFSTEP]
rw [this]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
this : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))
⊢ Quotient.mk Wsetoid (Wrepr (WType.mk a f)) = Quotient.mk Wsetoid (WType.mk a f)
[PROOFSTEP]
apply Quot.sound
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → PFunctor.W (P F)
this : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))
⊢ Setoid.r (Wrepr (WType.mk a f)) (WType.mk a f)
[PROOFSTEP]
apply Wrepr_equiv
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
⊢ ∀ (x : Fix F), g₁ x = g₂ x
[PROOFSTEP]
apply Quot.ind
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
⊢ ∀ (a : PFunctor.W (P F)), g₁ (Quot.mk Setoid.r a) = g₂ (Quot.mk Setoid.r a)
[PROOFSTEP]
intro x
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
x : PFunctor.W (P F)
⊢ g₁ (Quot.mk Setoid.r x) = g₂ (Quot.mk Setoid.r x)
[PROOFSTEP]
induction' x with a f ih
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
⊢ g₁ (Quot.mk Setoid.r (WType.mk a f)) = g₂ (Quot.mk Setoid.r (WType.mk a f))
[PROOFSTEP]
change g₁ ⟦⟨a, f⟩⟧ = g₂ ⟦⟨a, f⟩⟧
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
⊢ g₁ (Quotient.mk Wsetoid (WType.mk a f)) = g₂ (Quotient.mk Wsetoid (WType.mk a f))
[PROOFSTEP]
rw [← Fix.ind_aux a f]
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
⊢ g₁ (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })) =
    g₂ (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }))
[PROOFSTEP]
apply h
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
⊢ g₁ <$> abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) } =
    g₂ <$> abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }
[PROOFSTEP]
rw [← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
⊢ abs { fst := a, snd := g₁ ∘ fun x => Quotient.mk Wsetoid (f x) } =
    abs { fst := a, snd := g₂ ∘ fun x => Quotient.mk Wsetoid (f x) }
[PROOFSTEP]
congr with x
[GOAL]
case mk.mk.a.e_a.e_snd.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g₁ g₂ : Fix F → α
h : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))
x : PFunctor.B (P F) a
⊢ (g₁ ∘ fun x => Quotient.mk Wsetoid (f x)) x = (g₂ ∘ fun x => Quotient.mk Wsetoid (f x)) x
[PROOFSTEP]
apply ih
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
⊢ rec g = h
[PROOFSTEP]
ext x
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x : Fix F
⊢ rec g x = h x
[PROOFSTEP]
apply Fix.ind_rec
[GOAL]
case h.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x : Fix F
⊢ ∀ (x : F (Fix F)), rec g <$> x = (fun x => h x) <$> x → rec g (mk x) = h (mk x)
[PROOFSTEP]
intro x hyp'
[GOAL]
case h.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x✝ : Fix F
x : F (Fix F)
hyp' : rec g <$> x = (fun x => h x) <$> x
⊢ rec g (mk x) = h (mk x)
[PROOFSTEP]
rw [hyp, ← hyp', Fix.rec_eq]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : Fix F
⊢ mk (dest x) = x
[PROOFSTEP]
change (Fix.mk ∘ Fix.dest) x = id x
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : Fix F
⊢ (mk ∘ dest) x = id x
[PROOFSTEP]
apply Fix.ind_rec (mk ∘ dest) id
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : Fix F
⊢ ∀ (x : F (Fix F)), (mk ∘ dest) <$> x = id <$> x → (mk ∘ dest) (mk x) = id (mk x)
[PROOFSTEP]
intro x
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ : Fix F
x : F (Fix F)
⊢ (mk ∘ dest) <$> x = id <$> x → (mk ∘ dest) (mk x) = id (mk x)
[PROOFSTEP]
rw [Function.comp_apply, id_eq, Fix.dest, Fix.rec_eq, id_map, comp_map]
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ : Fix F
x : F (Fix F)
⊢ mk <$> rec (Functor.map mk) <$> x = x → mk (mk <$> rec (Functor.map mk) <$> x) = mk x
[PROOFSTEP]
intro h
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ : Fix F
x : F (Fix F)
h : mk <$> rec (Functor.map mk) <$> x = x
⊢ mk (mk <$> rec (Functor.map mk) <$> x) = mk x
[PROOFSTEP]
rw [h]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ dest (mk x) = x
[PROOFSTEP]
unfold Fix.dest
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ rec (Functor.map mk) (mk x) = x
[PROOFSTEP]
rw [Fix.rec_eq, ← Fix.dest, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ (mk ∘ dest) <$> x = x
[PROOFSTEP]
conv =>
  rhs
  rw [← id_map x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
| (mk ∘ dest) <$> x = x
[PROOFSTEP]
  rhs
  rw [← id_map x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
| (mk ∘ dest) <$> x = x
[PROOFSTEP]
  rhs
  rw [← id_map x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
| (mk ∘ dest) <$> x = x
[PROOFSTEP]
rhs
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
| x
[PROOFSTEP]
rw [← id_map x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ (mk ∘ dest) <$> x = id <$> x
[PROOFSTEP]
congr with x
[GOAL]
case e_a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ : F (Fix F)
x : Fix F
⊢ (mk ∘ dest) x = id x
[PROOFSTEP]
apply Fix.mk_dest
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
⊢ ∀ (x : Fix F), p x
[PROOFSTEP]
apply Quot.ind
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
⊢ ∀ (a : PFunctor.W (P F)), p (Quot.mk Setoid.r a)
[PROOFSTEP]
intro x
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
x : PFunctor.W (P F)
⊢ p (Quot.mk Setoid.r x)
[PROOFSTEP]
induction' x with a f ih
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ p (Quot.mk Setoid.r (WType.mk a f))
[PROOFSTEP]
change p ⟦⟨a, f⟩⟧
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ p (Quotient.mk Wsetoid (WType.mk a f))
[PROOFSTEP]
rw [← Fix.ind_aux a f]
[GOAL]
case mk.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ p (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }))
[PROOFSTEP]
apply h
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ Liftp p (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })
[PROOFSTEP]
rw [liftp_iff]
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ ∃ a_1 f_1,
    abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) } = abs { fst := a_1, snd := f_1 } ∧
      ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)
[PROOFSTEP]
refine' ⟨_, _, rfl, _⟩
[GOAL]
case mk.mk.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
p : Fix F → Prop
h : ∀ (x : F (Fix F)), Liftp p x → p (mk x)
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
ih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))
⊢ ∀ (i : PFunctor.B (P F) a), p (Quotient.mk Wsetoid (f i))
[PROOFSTEP]
convert ih
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
⊢ PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x)
[PROOFSTEP]
rw [corecF, PFunctor.M.dest_corec]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ ∀ (a b : PFunctor.M (P F)),
    Mcongr a b →
      (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) a = (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) b
[PROOFSTEP]
rintro x y ⟨r, pr, rxy⟩
[GOAL]
case intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
⊢ (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) x = (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) y
[PROOFSTEP]
dsimp
[GOAL]
case intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest x) = Quot.mk Mcongr <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
have : ∀ x y, r x y → Mcongr x y := by
  intro x y h
  exact ⟨r, pr, h⟩
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
⊢ ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
[PROOFSTEP]
intro x y h
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ y✝ : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x✝ y✝
x y : PFunctor.M (P F)
h : r x y
⊢ Mcongr x y
[PROOFSTEP]
exact ⟨r, pr, h⟩
[GOAL]
case intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest x) = Quot.mk Mcongr <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
rw [← Quot.factor_mk_eq _ _ this]
[GOAL]
case intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
⊢ (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =
    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
conv =>
  lhs
  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =
    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
  lhs
  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =
    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
  lhs
  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =
    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)
[PROOFSTEP]
lhs
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x y : PFunctor.M (P F)
r : PFunctor.M (P F) → PFunctor.M (P F) → Prop
pr : IsPrecongr r
rxy : r x y
this : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y
| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x)
[PROOFSTEP]
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
⊢ dest (corec g x) = corec g <$> g x
[PROOFSTEP]
conv =>
  lhs
  rw [Cofix.dest, Cofix.corec];
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
| dest (corec g x) = corec g <$> g x
[PROOFSTEP]
  lhs
  rw [Cofix.dest, Cofix.corec];
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
| dest (corec g x) = corec g <$> g x
[PROOFSTEP]
  lhs
  rw [Cofix.dest, Cofix.corec];
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
| dest (corec g x) = corec g <$> g x
[PROOFSTEP]
lhs
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
| dest (corec g x)
[PROOFSTEP]
rw [Cofix.dest, Cofix.corec]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
⊢ Quot.lift (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x))
      (_ :
        ∀ (x y : PFunctor.M (P F)),
          Mcongr x y →
            (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) x =
              (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) y)
      (Quot.mk Mcongr (corecF g x)) =
    corec g <$> g x
[PROOFSTEP]
dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest (corecF g x)) = corec g <$> g x
[PROOFSTEP]
rw [corecF_eq, abs_map, abs_repr, ← comp_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : α → F α
x : α
⊢ (Quot.mk Mcongr ∘ corecF g) <$> g x = corec g <$> g x
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
⊢ ∀ (x y : Cofix F), r x y → x = y
[PROOFSTEP]
intro x
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : Cofix F
⊢ ∀ (y : Cofix F), r x y → x = y
[PROOFSTEP]
apply Quot.inductionOn (motive := _) x
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : Cofix F
⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y
[PROOFSTEP]
clear x
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y
[PROOFSTEP]
intro x y
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
y : Cofix F
⊢ r (Quot.mk Mcongr x) y → Quot.mk Mcongr x = y
[PROOFSTEP]
apply Quot.inductionOn (motive := _) y
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
y : Cofix F
⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a
[PROOFSTEP]
clear y
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a
[PROOFSTEP]
intro y rxy
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Quot.mk Mcongr x = Quot.mk Mcongr y
[PROOFSTEP]
apply Quot.sound
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Mcongr x y
[PROOFSTEP]
let r' x y := r (Quot.mk _ x) (Quot.mk _ y)
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Mcongr x y
[PROOFSTEP]
have : IsPrecongr r' := by
  intro a b r'ab
  have h₀ :
    Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) =
      Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=
    h _ _ r'ab
  have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v :=
    by
    intro u v cuv
    apply Quot.sound
    simp only
    rw [Quot.sound cuv]
    apply h'
  let f : Quot r → Quot r' :=
    Quot.lift (Quot.lift (Quot.mk r') h₁)
      (by
        intro c; apply Quot.inductionOn (motive := _) c; clear c
        intro c d; apply Quot.inductionOn (motive := _) d; clear d
        intro d rcd; apply Quot.sound; apply rcd)
  have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
  rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map, h₀]
  rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ IsPrecongr r'
[PROOFSTEP]
intro a b r'ab
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)
[PROOFSTEP]
have h₀ :
  Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=
  h _ _ r'ab
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)
[PROOFSTEP]
have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v :=
  by
  intro u v cuv
  apply Quot.sound
  simp only
  rw [Quot.sound cuv]
  apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
⊢ ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
[PROOFSTEP]
intro u v cuv
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ Quot.mk r' u = Quot.mk r' v
[PROOFSTEP]
apply Quot.sound
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r' u v
[PROOFSTEP]
simp only
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r (Quot.mk Mcongr u) (Quot.mk Mcongr v)
[PROOFSTEP]
rw [Quot.sound cuv]
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r (Quot.mk Mcongr v) (Quot.mk Mcongr v)
[PROOFSTEP]
apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)
[PROOFSTEP]
let f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (by
      intro c; apply Quot.inductionOn (motive := _) c; clear c
      intro c d; apply Quot.inductionOn (motive := _) d; clear d
      intro d rcd; apply Quot.sound; apply rcd)
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ ∀ (a b : Cofix F), r a b → Quot.lift (Quot.mk r') h₁ a = Quot.lift (Quot.mk r') h₁ b
[PROOFSTEP]
intro c
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : Cofix F
⊢ ∀ (b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b
[PROOFSTEP]
apply Quot.inductionOn (motive := _) c
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : Cofix F
⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),
    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b
[PROOFSTEP]
clear c
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),
    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b
[PROOFSTEP]
intro c d
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
d : Cofix F
⊢ r (Quot.mk Mcongr c) d → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ d
[PROOFSTEP]
apply Quot.inductionOn (motive := _) d
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
d : Cofix F
⊢ ∀ (a : PFunctor.M (P F)),
    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →
      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)
[PROOFSTEP]
clear d
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
⊢ ∀ (a : PFunctor.M (P F)),
    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →
      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)
[PROOFSTEP]
intro d rcd
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c d : PFunctor.M (P F)
rcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)
⊢ Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr d)
[PROOFSTEP]
apply Quot.sound
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c d : PFunctor.M (P F)
rcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)
⊢ r' c d
[PROOFSTEP]
apply rcd
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)
[PROOFSTEP]
have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
this : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)
[PROOFSTEP]
rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map, h₀]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
this : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'
⊢ f <$> Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) =
    abs ((f ∘ Quot.mk r ∘ Quot.mk Mcongr) <$> PFunctor.M.dest b)
[PROOFSTEP]
rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
this : IsPrecongr r'
⊢ Mcongr x y
[PROOFSTEP]
refine' ⟨r', this, rxy⟩
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
⊢ ∀ (x y : Cofix F), r x y → x = y
[PROOFSTEP]
let r' (x y) := x = y ∨ r x y
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
⊢ ∀ (x y : Cofix F), r x y → x = y
[PROOFSTEP]
intro x y rxy
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x y : Cofix F
rxy : r x y
⊢ x = y
[PROOFSTEP]
apply Cofix.bisim_aux r'
[GOAL]
case h'
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x y : Cofix F
rxy : r x y
⊢ ∀ (x : Cofix F), r' x x
[PROOFSTEP]
intro x
[GOAL]
case h'
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y : Cofix F
rxy : r x✝ y
x : Cofix F
⊢ r' x x
[PROOFSTEP]
left
[GOAL]
case h'.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y : Cofix F
rxy : r x✝ y
x : Cofix F
⊢ x = x
[PROOFSTEP]
rfl
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x y : Cofix F
rxy : r x y
⊢ ∀ (x y : Cofix F), r' x y → Quot.mk r' <$> dest x = Quot.mk r' <$> dest y
[PROOFSTEP]
intro x y r'xy
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r' x y
⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y
[PROOFSTEP]
cases' r'xy with r'xy r'xy
[GOAL]
case h.inl
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : x = y
⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y
[PROOFSTEP]
rw [r'xy]
[GOAL]
case h.inr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r x y
⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y
[PROOFSTEP]
have : ∀ x y, r x y → r' x y := fun x y h => Or.inr h
[GOAL]
case h.inr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r x y
this : ∀ (x y : Cofix F), r x y → r' x y
⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y
[PROOFSTEP]
rw [← Quot.factor_mk_eq _ _ this]
[GOAL]
case h.inr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r x y
this : ∀ (x y : Cofix F), r x y → r' x y
⊢ (Quot.factor (fun x y => r x y) (fun x y => r' x y) this ∘ Quot.mk fun x y => r x y) <$> dest x =
    (Quot.factor (fun x y => r x y) (fun x y => r' x y) this ∘ Quot.mk fun x y => r x y) <$> dest y
[PROOFSTEP]
dsimp
[GOAL]
case h.inr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r x y
this : ∀ (x y : Cofix F), r x y → r' x y
⊢ (Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this ∘ Quot.mk fun x y => r x y) <$> dest x =
    (Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this ∘ Quot.mk fun x y => r x y) <$> dest y
[PROOFSTEP]
rw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]
[GOAL]
case h.inr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x✝ y✝ : Cofix F
rxy : r x✝ y✝
x y : Cofix F
r'xy : r x y
this : ∀ (x y : Cofix F), r x y → r' x y
⊢ Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this <$> Quot.mk r <$> dest x =
    Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this <$> Quot.mk r <$> dest y
[PROOFSTEP]
rw [h _ _ r'xy]
[GOAL]
case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x y : Cofix F
rxy : r x y
⊢ r' x y
[PROOFSTEP]
right
[GOAL]
case a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
r' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y
x y : Cofix F
rxy : r x y
⊢ r x y
[PROOFSTEP]
exact rxy
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
⊢ ∀ (x y : Cofix F), r x y → x = y
[PROOFSTEP]
apply Cofix.bisim_rel
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
⊢ ∀ (x y : Cofix F), r x y → (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y
[PROOFSTEP]
intro x y rxy
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
x y : Cofix F
rxy : r x y
⊢ (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y
[PROOFSTEP]
rcases(liftr_iff r _ _).mp (h x y rxy) with ⟨a, f₀, f₁, dxeq, dyeq, h'⟩
[GOAL]
case h.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
x y : Cofix F
rxy : r x y
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → Cofix F
dxeq : dest x = abs { fst := a, snd := f₀ }
dyeq : dest y = abs { fst := a, snd := f₁ }
h' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y
[PROOFSTEP]
rw [dxeq, dyeq, ← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]
[GOAL]
case h.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
x y : Cofix F
rxy : r x y
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → Cofix F
dxeq : dest x = abs { fst := a, snd := f₀ }
dyeq : dest y = abs { fst := a, snd := f₁ }
h' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
⊢ abs { fst := a, snd := (Quot.mk fun x y => r x y) ∘ f₀ } = abs { fst := a, snd := (Quot.mk fun x y => r x y) ∘ f₁ }
[PROOFSTEP]
congr 2 with i
[GOAL]
case h.intro.intro.intro.intro.intro.e_a.e_snd.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
x y : Cofix F
rxy : r x y
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → Cofix F
dxeq : dest x = abs { fst := a, snd := f₀ }
dyeq : dest y = abs { fst := a, snd := f₁ }
h' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
i : PFunctor.B (P F) a
⊢ ((Quot.mk fun x y => r x y) ∘ f₀) i = ((Quot.mk fun x y => r x y) ∘ f₁) i
[PROOFSTEP]
apply Quot.sound
[GOAL]
case h.intro.intro.intro.intro.intro.e_a.e_snd.h.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)
x y : Cofix F
rxy : r x y
a : (P F).A
f₀ f₁ : PFunctor.B (P F) a → Cofix F
dxeq : dest x = abs { fst := a, snd := f₀ }
dyeq : dest y = abs { fst := a, snd := f₁ }
h' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)
i : PFunctor.B (P F) a
⊢ r (f₀ i) (f₁ i)
[PROOFSTEP]
apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u_1
Q : α → Prop
u v : α → Cofix F
h :
  ∀ (x : α),
    Q x →
      ∃ a f f',
        dest (u x) = abs { fst := a, snd := f } ∧
          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'
x✝¹ : α
Qx : Q x✝¹
R : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'
x y : Cofix F
x✝ : R x y
x' : α
Qx' : Q x'
xeq : x = u x'
yeq : y = v x'
⊢ Liftr R (dest x) (dest y)
[PROOFSTEP]
rcases h x' Qx' with ⟨a, f, f', ux'eq, vx'eq, h'⟩
[GOAL]
case intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u_1
Q : α → Prop
u v : α → Cofix F
h :
  ∀ (x : α),
    Q x →
      ∃ a f f',
        dest (u x) = abs { fst := a, snd := f } ∧
          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'
x✝¹ : α
Qx : Q x✝¹
R : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'
x y : Cofix F
x✝ : R x y
x' : α
Qx' : Q x'
xeq : x = u x'
yeq : y = v x'
a : (P F).A
f f' : PFunctor.B (P F) a → Cofix F
ux'eq : dest (u x') = abs { fst := a, snd := f }
vx'eq : dest (v x') = abs { fst := a, snd := f' }
h' : ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'
⊢ Liftr R (dest x) (dest y)
[PROOFSTEP]
rw [liftr_iff]
[GOAL]
case intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u_1
Q : α → Prop
u v : α → Cofix F
h :
  ∀ (x : α),
    Q x →
      ∃ a f f',
        dest (u x) = abs { fst := a, snd := f } ∧
          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'
x✝¹ : α
Qx : Q x✝¹
R : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'
x y : Cofix F
x✝ : R x y
x' : α
Qx' : Q x'
xeq : x = u x'
yeq : y = v x'
a : (P F).A
f f' : PFunctor.B (P F) a → Cofix F
ux'eq : dest (u x') = abs { fst := a, snd := f }
vx'eq : dest (v x') = abs { fst := a, snd := f' }
h' : ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'
⊢ ∃ a f₀ f₁,
    dest x = abs { fst := a, snd := f₀ } ∧
      dest y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), R (f₀ i) (f₁ i)
[PROOFSTEP]
refine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α → Functor.Comp F₂ F₁ α
[PROOFSTEP]
dsimp [Functor.Comp]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α → F₂ (F₁ α)
[PROOFSTEP]
intro p
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
p : PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α
⊢ F₂ (F₁ α)
[PROOFSTEP]
exact abs ⟨p.1.1, fun x => abs ⟨p.1.2 x, fun y => p.2 ⟨x, y⟩⟩⟩
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ Functor.Comp F₂ F₁ α → PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α
[PROOFSTEP]
dsimp [Functor.Comp]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ F₂ (F₁ α) → PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α
[PROOFSTEP]
intro y
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
y : F₂ (F₁ α)
⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α
[PROOFSTEP]
refine' ⟨⟨(repr y).1, fun u => (repr ((repr y).2 u)).1⟩, _⟩
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
y : F₂ (F₁ α)
⊢ PFunctor.B (PFunctor.comp (P F₂) (P F₁)) { fst := (repr y).fst, snd := fun u => (repr (Sigma.snd (repr y) u)).fst } →
    α
[PROOFSTEP]
dsimp [PFunctor.comp]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
y : F₂ (F₁ α)
⊢ (u : PFunctor.B (P F₂) (repr y).fst) × PFunctor.B (P F₁) (repr (Sigma.snd (repr y) u)).fst → α
[PROOFSTEP]
intro x
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
y : F₂ (F₁ α)
x : (u : PFunctor.B (P F₂) (repr y).fst) × PFunctor.B (P F₁) (repr (Sigma.snd (repr y) u)).fst
⊢ α
[PROOFSTEP]
exact (repr ((repr y).2 x.1)).snd x.2
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ ∀ (x : Functor.Comp F₂ F₁ α),
    (fun {α} =>
          id fun p =>
            abs
              { fst := p.fst.fst,
                snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })
        ((fun {α} =>
            id fun y =>
              { fst := { fst := (repr y).fst, snd := fun u => (repr (Sigma.snd (repr y) u)).fst },
                snd := id fun x => Sigma.snd (repr (Sigma.snd (repr y) x.fst)) x.snd })
          x) =
      x
[PROOFSTEP]
dsimp [Functor.Comp]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
⊢ ∀ (x : F₂ (F₁ α)),
    abs
        { fst := (repr x).fst,
          snd := fun x_1 =>
            abs
              { fst := (repr (Sigma.snd (repr x) x_1)).fst,
                snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
      x
[PROOFSTEP]
intro x
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
⊢ abs
      { fst := (repr x).fst,
        snd := fun x_1 =>
          abs
            { fst := (repr (Sigma.snd (repr x) x_1)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
    x
[PROOFSTEP]
conv =>
  rhs
  rw [← abs_repr x]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
| abs
      { fst := (repr x).fst,
        snd := fun x_1 =>
          abs
            { fst := (repr (Sigma.snd (repr x) x_1)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
    x
[PROOFSTEP]
  rhs
  rw [← abs_repr x]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
| abs
      { fst := (repr x).fst,
        snd := fun x_1 =>
          abs
            { fst := (repr (Sigma.snd (repr x) x_1)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
    x
[PROOFSTEP]
  rhs
  rw [← abs_repr x]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
| abs
      { fst := (repr x).fst,
        snd := fun x_1 =>
          abs
            { fst := (repr (Sigma.snd (repr x) x_1)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
    x
[PROOFSTEP]
rhs
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
| x
[PROOFSTEP]
rw [← abs_repr x]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
⊢ abs
      { fst := (repr x).fst,
        snd := fun x_1 =>
          abs
            { fst := (repr (Sigma.snd (repr x) x_1)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =
    abs (repr x)
[PROOFSTEP]
cases' h : repr x with a f
[GOAL]
case mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
a : (P F₂).A
f : PFunctor.B (P F₂) a → F₁ α
h : repr x = { fst := a, snd := f }
⊢ abs
      { fst := { fst := a, snd := f }.fst,
        snd := fun x =>
          abs
            { fst := (repr (Sigma.snd { fst := a, snd := f } x)).fst,
              snd := fun y => Sigma.snd (repr (Sigma.snd { fst := a, snd := f } x)) y } } =
    abs { fst := a, snd := f }
[PROOFSTEP]
dsimp
[GOAL]
case mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x : F₂ (F₁ α)
a : (P F₂).A
f : PFunctor.B (P F₂) a → F₁ α
h : repr x = { fst := a, snd := f }
⊢ abs { fst := a, snd := fun x => abs { fst := (repr (f x)).fst, snd := fun y => Sigma.snd (repr (f x)) y } } =
    abs { fst := a, snd := f }
[PROOFSTEP]
congr with x
[GOAL]
case mk.e_a.e_snd.h
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x✝ : F₂ (F₁ α)
a : (P F₂).A
f : PFunctor.B (P F₂) a → F₁ α
h : repr x✝ = { fst := a, snd := f }
x : PFunctor.B (P F₂) a
⊢ abs { fst := (repr (f x)).fst, snd := fun y => Sigma.snd (repr (f x)) y } = f x
[PROOFSTEP]
cases' h' : repr (f x) with b g
[GOAL]
case mk.e_a.e_snd.h.mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x✝ : F₂ (F₁ α)
a : (P F₂).A
f : PFunctor.B (P F₂) a → F₁ α
h : repr x✝ = { fst := a, snd := f }
x : PFunctor.B (P F₂) a
b : (P F₁).A
g : PFunctor.B (P F₁) b → α
h' : repr (f x) = { fst := b, snd := g }
⊢ abs { fst := { fst := b, snd := g }.fst, snd := fun y => Sigma.snd { fst := b, snd := g } y } = f x
[PROOFSTEP]
dsimp
[GOAL]
case mk.e_a.e_snd.h.mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α : Type u
x✝ : F₂ (F₁ α)
a : (P F₂).A
f : PFunctor.B (P F₂) a → F₁ α
h : repr x✝ = { fst := a, snd := f }
x : PFunctor.B (P F₂) a
b : (P F₁).A
g : PFunctor.B (P F₁) b → α
h' : repr (f x) = { fst := b, snd := g }
⊢ abs { fst := b, snd := fun y => g y } = f x
[PROOFSTEP]
rw [← h', abs_repr]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
⊢ ∀ (p : PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α),
    (fun {α} =>
          id fun p =>
            abs
              { fst := p.fst.fst,
                snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })
        (f <$> p) =
      f <$>
        (fun {α} =>
            id fun p =>
              abs
                { fst := p.fst.fst,
                  snd := fun x =>
                    abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })
          p
[PROOFSTEP]
dsimp [Functor.Comp, PFunctor.comp]
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
⊢ ∀
    (p :
      PFunctor.Obj
        { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
          B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
        α),
    abs
        { fst := (f <$> p).fst.fst,
          snd := fun x =>
            abs { fst := Sigma.snd (f <$> p).fst x, snd := fun y => Sigma.snd (f <$> p) { fst := x, snd := y } } } =
      f <$>
        abs
          { fst := p.fst.fst,
            snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } }
[PROOFSTEP]
intro p
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
p :
  PFunctor.Obj
    { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
    α
⊢ abs
      { fst := (f <$> p).fst.fst,
        snd := fun x =>
          abs { fst := Sigma.snd (f <$> p).fst x, snd := fun y => Sigma.snd (f <$> p) { fst := x, snd := y } } } =
    f <$>
      abs
        { fst := p.fst.fst,
          snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } }
[PROOFSTEP]
cases' p with a g
[GOAL]
case mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
a :
  { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }.A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      a →
    α
⊢ abs
      { fst := (f <$> { fst := a, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := a, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := a, snd := g }) { fst := x, snd := y } } } =
    f <$>
      abs
        { fst := { fst := a, snd := g }.fst.fst,
          snd := fun x =>
            abs
              { fst := Sigma.snd { fst := a, snd := g }.fst x,
                snd := fun y => Sigma.snd { fst := a, snd := g } { fst := x, snd := y } } }
[PROOFSTEP]
dsimp
[GOAL]
case mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
a :
  { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }.A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      a →
    α
⊢ abs
      { fst := (f <$> { fst := a, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := a, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := a, snd := g }) { fst := x, snd := y } } } =
    f <$> abs { fst := a.fst, snd := fun x => abs { fst := Sigma.snd a x, snd := fun y => g { fst := x, snd := y } } }
[PROOFSTEP]
cases' a with b h
[GOAL]
case mk.mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } } =
    f <$>
      abs
        { fst := { fst := b, snd := h }.fst,
          snd := fun x => abs { fst := Sigma.snd { fst := b, snd := h } x, snd := fun y => g { fst := x, snd := y } } }
[PROOFSTEP]
dsimp
[GOAL]
case mk.mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } } =
    f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }
[PROOFSTEP]
symm
[GOAL]
case mk.mk
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =
    abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
trans
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } = ?m.45227
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ ?m.45227 =
    abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ F₂ (F₁ β)
[PROOFSTEP]
symm
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ ?a = f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ ?a =
    abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
apply abs_map
[GOAL]
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ abs
      ((fun x x_1 => x <$> x_1) f <$>
        { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }) =
    abs
      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
        snd := fun x =>
          abs
            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
congr
[GOAL]
case e_a
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ (fun x x_1 => x <$> x_1) f <$>
      { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =
    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
      snd := fun x =>
        abs
          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
rw [PFunctor.map_eq]
[GOAL]
case e_a
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ { fst := b,
      snd := (fun x x_1 => x <$> x_1) f ∘ fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =
    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
      snd := fun x =>
        abs
          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
dsimp [Function.comp]
[GOAL]
case e_a
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ { fst := b, snd := fun x => f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =
    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,
      snd := fun x =>
        abs
          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }
[PROOFSTEP]
congr
[GOAL]
case e_a.e_snd
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
⊢ (fun x => f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } }) = fun x =>
    abs
      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }
[PROOFSTEP]
ext x
[GOAL]
case e_a.e_snd.h
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
x : PFunctor.B (P F₂) b
⊢ f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } } =
    abs
      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }
[PROOFSTEP]
rw [← abs_map]
[GOAL]
case e_a.e_snd.h
F₂ : Type u → Type u
inst✝¹ : Functor F₂
q₂ : Qpf F₂
F₁ : Type u → Type u
inst✝ : Functor F₁
q₁ : Qpf F₁
α β : Type u
f : α → β
b : (P F₂).A
h : PFunctor.B (P F₂) b → (P F₁).A
g :
  PFunctor.B
      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),
        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }
      { fst := b, snd := h } →
    α
x : PFunctor.B (P F₂) b
⊢ abs (f <$> { fst := h x, snd := fun y => g { fst := x, snd := y } }) =
    abs
      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,
        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }
[PROOFSTEP]
rfl
[GOAL]
F : Type u → Type u
inst✝¹ : Functor F
q : Qpf F
G : Type u → Type u
inst✝ : Functor G
FG_abs : {α : Type u} → F α → G α
FG_repr : {α : Type u} → G α → F α
FG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x
FG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x
α : Type u
x : G α
⊢ (fun {α} p => FG_abs (abs p)) ((fun {α} x => repr (FG_repr x)) x) = x
[PROOFSTEP]
simp only
[GOAL]
F : Type u → Type u
inst✝¹ : Functor F
q : Qpf F
G : Type u → Type u
inst✝ : Functor G
FG_abs : {α : Type u} → F α → G α
FG_repr : {α : Type u} → G α → F α
FG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x
FG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x
α : Type u
x : G α
⊢ FG_abs (abs (repr (FG_repr x))) = x
[PROOFSTEP]
rw [abs_repr, FG_abs_repr]
[GOAL]
F : Type u → Type u
inst✝¹ : Functor F
q : Qpf F
G : Type u → Type u
inst✝ : Functor G
FG_abs : {α : Type u} → F α → G α
FG_repr : {α : Type u} → G α → F α
FG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x
FG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x
α β : Type u
f : α → β
x : PFunctor.Obj (P F) α
⊢ (fun {α} p => FG_abs (abs p)) (f <$> x) = f <$> (fun {α} p => FG_abs (abs p)) x
[PROOFSTEP]
simp only
[GOAL]
F : Type u → Type u
inst✝¹ : Functor F
q : Qpf F
G : Type u → Type u
inst✝ : Functor G
FG_abs : {α : Type u} → F α → G α
FG_repr : {α : Type u} → G α → F α
FG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x
FG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x
α β : Type u
f : α → β
x : PFunctor.Obj (P F) α
⊢ FG_abs (abs (f <$> x)) = f <$> FG_abs (abs x)
[PROOFSTEP]
rw [abs_map, FG_abs_map]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
⊢ u ∈ supp x ↔ ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
[PROOFSTEP]
rw [supp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
⊢ u ∈ {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y} ↔
    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
[PROOFSTEP]
dsimp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) ↔
    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) →
    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
[PROOFSTEP]
intro h a f haf
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : PFunctor.B (P F) a → α
haf : abs { fst := a, snd := f } = x
⊢ u ∈ f '' univ
[PROOFSTEP]
have : Liftp (fun u => u ∈ f '' univ) x := by
  rw [liftp_iff]
  refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : PFunctor.B (P F) a → α
haf : abs { fst := a, snd := f } = x
⊢ Liftp (fun u => u ∈ f '' univ) x
[PROOFSTEP]
rw [liftp_iff]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : PFunctor.B (P F) a → α
haf : abs { fst := a, snd := f } = x
⊢ ∃ a_1 f_1, x = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), f_1 i ∈ f '' univ
[PROOFSTEP]
refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : PFunctor.B (P F) a → α
haf : abs { fst := a, snd := f } = x
this : Liftp (fun u => u ∈ f '' univ) x
⊢ u ∈ f '' univ
[PROOFSTEP]
exact h this
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
⊢ (∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ) →
    ∀ ⦃p : α → Prop⦄, Liftp p x → p u
[PROOFSTEP]
intro h p
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
p : α → Prop
⊢ Liftp p x → p u
[PROOFSTEP]
rw [liftp_iff]
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
p : α → Prop
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → p u
[PROOFSTEP]
rintro ⟨a, f, xeq, h'⟩
[GOAL]
case mpr.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), p (f i)
⊢ p u
[PROOFSTEP]
rcases h a f xeq.symm with ⟨i, _, hi⟩
[GOAL]
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), p (f i)
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hi : f i = u
⊢ p u
[PROOFSTEP]
rw [← hi]
[GOAL]
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), p (f i)
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hi : f i = u
⊢ p (f i)
[PROOFSTEP]
apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ supp x = {u | ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ}
[PROOFSTEP]
ext
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
x✝ : α
⊢ x✝ ∈ supp x ↔ x✝ ∈ {u | ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ}
[PROOFSTEP]
apply mem_supp
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u) ↔
    ∃ a f,
      abs { fst := a, snd := f } = x ∧
        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u) →
    ∃ a f,
      abs { fst := a, snd := f } = x ∧
        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
intro h
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
⊢ ∃ a f,
    abs { fst := a, snd := f } = x ∧
      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
have : Liftp (supp x) x := by rw [h]; intro u; exact id
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
⊢ Liftp (supp x) x
[PROOFSTEP]
rw [h]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
⊢ ∀ (u : α), u ∈ supp x → supp x u
[PROOFSTEP]
intro u
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
u : α
⊢ u ∈ supp x → supp x u
[PROOFSTEP]
exact id
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
⊢ ∃ a f,
    abs { fst := a, snd := f } = x ∧
      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
rw [liftp_iff] at this 
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this✝ : Liftp (supp x) x
this : ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), supp x (f i)
⊢ ∃ a f,
    abs { fst := a, snd := f } = x ∧
      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
rcases this with ⟨a, f, xeq, h'⟩
[GOAL]
case mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
⊢ ∃ a f,
    abs { fst := a, snd := f } = x ∧
      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
refine' ⟨a, f, xeq.symm, _⟩
[GOAL]
case mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
⊢ ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
[PROOFSTEP]
intro a' f' h''
[GOAL]
case mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
a' : (P F).A
f' : PFunctor.B (P F) a' → α
h'' : abs { fst := a', snd := f' } = x
⊢ f '' univ ⊆ f' '' univ
[PROOFSTEP]
rintro u ⟨i, _, hfi⟩
[GOAL]
case mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
a' : (P F).A
f' : PFunctor.B (P F) a' → α
h'' : abs { fst := a', snd := f' } = x
u : α
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hfi : f i = u
⊢ u ∈ f' '' univ
[PROOFSTEP]
have : u ∈ supp x := by rw [← hfi]; apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
a' : (P F).A
f' : PFunctor.B (P F) a' → α
h'' : abs { fst := a', snd := f' } = x
u : α
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hfi : f i = u
⊢ u ∈ supp x
[PROOFSTEP]
rw [← hfi]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
a' : (P F).A
f' : PFunctor.B (P F) a' → α
h'' : abs { fst := a', snd := f' } = x
u : α
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hfi : f i = u
⊢ f i ∈ supp x
[PROOFSTEP]
apply h'
[GOAL]
case mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
this✝ : Liftp (supp x) x
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : PFunctor.B (P F) a), supp x (f i)
a' : (P F).A
f' : PFunctor.B (P F) a' → α
h'' : abs { fst := a', snd := f' } = x
u : α
i : PFunctor.B (P F) a
left✝ : i ∈ univ
hfi : f i = u
this : u ∈ supp x
⊢ u ∈ f' '' univ
[PROOFSTEP]
exact (mem_supp x u).mp this _ _ h''
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
⊢ (∃ a f,
      abs { fst := a, snd := f } = x ∧
        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ) →
    ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
[PROOFSTEP]
rintro ⟨a, f, xeq, h⟩ p
[GOAL]
case mpr.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
⊢ Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
[PROOFSTEP]
rw [liftp_iff]
[GOAL]
case mpr.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) ↔ ∀ (u : α), u ∈ supp x → p u
[PROOFSTEP]
constructor
[GOAL]
case mpr.intro.intro.intro.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → ∀ (u : α), u ∈ supp x → p u
[PROOFSTEP]
rintro ⟨a', f', xeq', h'⟩ u usuppx
[GOAL]
case mpr.intro.intro.intro.mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
a' : (P F).A
f' : PFunctor.B (P F) a' → α
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
usuppx : u ∈ supp x
⊢ p u
[PROOFSTEP]
rcases(mem_supp x u).mp usuppx a' f' xeq'.symm with ⟨i, _, f'ieq⟩
[GOAL]
case mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
a' : (P F).A
f' : PFunctor.B (P F) a' → α
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
usuppx : u ∈ supp x
i : PFunctor.B (P F) a'
left✝ : i ∈ univ
f'ieq : f' i = u
⊢ p u
[PROOFSTEP]
rw [← f'ieq]
[GOAL]
case mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
a' : (P F).A
f' : PFunctor.B (P F) a' → α
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
usuppx : u ∈ supp x
i : PFunctor.B (P F) a'
left✝ : i ∈ univ
f'ieq : f' i = u
⊢ p (f' i)
[PROOFSTEP]
apply h'
[GOAL]
case mpr.intro.intro.intro.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
⊢ (∀ (u : α), u ∈ supp x → p u) → ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
intro h'
[GOAL]
case mpr.intro.intro.intro.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
refine' ⟨a, f, xeq.symm, _⟩
[GOAL]
case mpr.intro.intro.intro.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
⊢ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
intro i
[GOAL]
case mpr.intro.intro.intro.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
i : PFunctor.B (P F) a
⊢ p (f i)
[PROOFSTEP]
apply h'
[GOAL]
case mpr.intro.intro.intro.mpr.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
i : PFunctor.B (P F) a
⊢ f i ∈ supp x
[PROOFSTEP]
rw [mem_supp]
[GOAL]
case mpr.intro.intro.intro.mpr.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
i : PFunctor.B (P F) a
⊢ ∀ (a : (P F).A) (f_1 : PFunctor.B (P F) a → α), abs { fst := a, snd := f_1 } = x → f i ∈ f_1 '' univ
[PROOFSTEP]
intro a' f' xeq'
[GOAL]
case mpr.intro.intro.intro.mpr.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
i : PFunctor.B (P F) a
a' : (P F).A
f' : PFunctor.B (P F) a' → α
xeq' : abs { fst := a', snd := f' } = x
⊢ f i ∈ f' '' univ
[PROOFSTEP]
apply h a' f' xeq'
[GOAL]
case mpr.intro.intro.intro.mpr.a.a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
xeq : abs { fst := a, snd := f } = x
h : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ
p : α → Prop
h' : ∀ (u : α), u ∈ supp x → p u
i : PFunctor.B (P F) a
a' : (P F).A
f' : PFunctor.B (P F) a' → α
xeq' : abs { fst := a', snd := f' } = x
⊢ f i ∈ f '' univ
[PROOFSTEP]
apply mem_image_of_mem _ (mem_univ _)
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = f '' univ
[PROOFSTEP]
ext u
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
⊢ u ∈ supp (abs { fst := a, snd := f }) ↔ u ∈ f '' univ
[PROOFSTEP]
rw [mem_supp]
[GOAL]
case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
⊢ (∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),
      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ) ↔
    u ∈ f '' univ
[PROOFSTEP]
constructor
[GOAL]
case h.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
⊢ (∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),
      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ) →
    u ∈ f '' univ
[PROOFSTEP]
intro h'
[GOAL]
case h.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
h' :
  ∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),
    abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ
⊢ u ∈ f '' univ
[PROOFSTEP]
apply h' _ _ rfl
[GOAL]
case h.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
⊢ u ∈ f '' univ →
    ∀ (a_2 : (P F).A) (f_1 : PFunctor.B (P F) a_2 → α),
      abs { fst := a_2, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ
[PROOFSTEP]
intro h' a' f' e
[GOAL]
case h.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
h' : u ∈ f '' univ
a' : (P F).A
f' : PFunctor.B (P F) a' → α
e : abs { fst := a', snd := f' } = abs { fst := a, snd := f }
⊢ u ∈ f' '' univ
[PROOFSTEP]
rw [← h _ _ _ _ e.symm]
[GOAL]
case h.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
u : α
h' : u ∈ f '' univ
a' : (P F).A
f' : PFunctor.B (P F) a' → α
e : abs { fst := a', snd := f' } = abs { fst := a, snd := f }
⊢ u ∈ f '' univ
[PROOFSTEP]
apply h'
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
⊢ Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u
[PROOFSTEP]
rw [liftp_iff, ← abs_repr x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
⊢ (∃ a f, abs (repr x) = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) ↔
    ∀ (u : α), u ∈ supp (abs (repr x)) → p u
[PROOFSTEP]
cases' repr x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ (∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)) ↔
    ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u
[PROOFSTEP]
constructor
[GOAL]
case mk.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ (∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)) →
    ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u
[PROOFSTEP]
rintro ⟨a', f', abseq, hf⟩ u
[GOAL]
case mk.mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
a' : (P F).A
f' : PFunctor.B (P F) a' → α
abseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
hf : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
⊢ u ∈ supp (abs { fst := a, snd := f }) → p u
[PROOFSTEP]
rw [supp_eq_of_isUniform h, h _ _ _ _ abseq]
[GOAL]
case mk.mp.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
a' : (P F).A
f' : PFunctor.B (P F) a' → α
abseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
hf : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
⊢ u ∈ f' '' univ → p u
[PROOFSTEP]
rintro ⟨i, _, hi⟩
[GOAL]
case mk.mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
a' : (P F).A
f' : PFunctor.B (P F) a' → α
abseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
hf : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
i : PFunctor.B (P F) a'
left✝ : i ∈ univ
hi : f' i = u
⊢ p u
[PROOFSTEP]
rw [← hi]
[GOAL]
case mk.mp.intro.intro.intro.intro.intro
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
a' : (P F).A
f' : PFunctor.B (P F) a' → α
abseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
hf : ∀ (i : PFunctor.B (P F) a'), p (f' i)
u : α
i : PFunctor.B (P F) a'
left✝ : i ∈ univ
hi : f' i = u
⊢ p (f' i)
[PROOFSTEP]
apply hf
[GOAL]
case mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ (∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u) →
    ∃ a_2 f_1, abs { fst := a, snd := f } = abs { fst := a_2, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_2), p (f_1 i)
[PROOFSTEP]
intro h'
[GOAL]
case mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u
⊢ ∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)
[PROOFSTEP]
refine' ⟨a, f, rfl, fun i => h' _ _⟩
[GOAL]
case mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u
i : PFunctor.B (P F) a
⊢ f i ∈ supp (abs { fst := a, snd := f })
[PROOFSTEP]
rw [supp_eq_of_isUniform h]
[GOAL]
case mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
x : F α
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u
i : PFunctor.B (P F) a
⊢ f i ∈ f '' univ
[PROOFSTEP]
exact ⟨i, mem_univ i, rfl⟩
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α β : Type u
g : α → β
x : F α
⊢ supp (g <$> x) = g '' supp x
[PROOFSTEP]
rw [← abs_repr x]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α β : Type u
g : α → β
x : F α
⊢ supp (g <$> abs (repr x)) = g '' supp (abs (repr x))
[PROOFSTEP]
cases' repr x with a f
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α β : Type u
g : α → β
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (g <$> abs { fst := a, snd := f }) = g '' supp (abs { fst := a, snd := f })
[PROOFSTEP]
rw [← abs_map, PFunctor.map_eq]
[GOAL]
case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α β : Type u
g : α → β
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := g ∘ f }) = g '' supp (abs { fst := a, snd := f })
[PROOFSTEP]
rw [supp_eq_of_isUniform h, supp_eq_of_isUniform h, image_comp]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ SuppPreservation ↔ IsUniform
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ SuppPreservation → IsUniform
[PROOFSTEP]
intro h α a a' f f' h'
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : SuppPreservation
α : Type u
a a' : (P F).A
f : PFunctor.B (P F) a → α
f' : PFunctor.B (P F) a' → α
h' : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
⊢ f '' univ = f' '' univ
[PROOFSTEP]
rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ IsUniform → SuppPreservation
[PROOFSTEP]
rintro h α ⟨a, f⟩
[GOAL]
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }
[PROOFSTEP]
rwa [supp_eq_of_isUniform, PFunctor.supp_eq]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ SuppPreservation ↔ LiftpPreservation
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ SuppPreservation → LiftpPreservation
[PROOFSTEP]
intro h
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ LiftpPreservation → SuppPreservation
[PROOFSTEP]
intro h
[GOAL]
case mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : SuppPreservation
⊢ LiftpPreservation
[PROOFSTEP]
rintro α p ⟨a, f⟩
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }
[PROOFSTEP]
have h' := h
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : SuppPreservation
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }
[PROOFSTEP]
rw [suppPreservation_iff_uniform] at h' 
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }
[PROOFSTEP]
dsimp only [SuppPreservation, supp] at h 
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }
[PROOFSTEP]
rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (u : α), u ∈ f '' univ → p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
simp only [image_univ, mem_range, exists_imp]
[GOAL]
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
constructor
[GOAL]
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) → ∀ (i : PFunctor.B (P F) a), p (f i)
[PROOFSTEP]
intros
[GOAL]
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (i : PFunctor.B (P F) a), p (f i)) → ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u
[PROOFSTEP]
intros
[GOAL]
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u
i✝ : PFunctor.B (P F) a
⊢ p (f i✝)
[PROOFSTEP]
subst_vars
[GOAL]
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝¹ : ∀ (i : PFunctor.B (P F) a), p (f i)
u✝ : α
x✝ : PFunctor.B (P F) a
a✝ : f x✝ = u✝
⊢ p u✝
[PROOFSTEP]
subst_vars
[GOAL]
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u
i✝ : PFunctor.B (P F) a
⊢ p (f i✝)
[PROOFSTEP]
solve_by_elim
[GOAL]
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h :
  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),
    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (i : PFunctor.B (P F) a), p (f i)
x✝ : PFunctor.B (P F) a
⊢ p (f x✝)
[PROOFSTEP]
solve_by_elim
[GOAL]
case mpr
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : LiftpPreservation
⊢ SuppPreservation
[PROOFSTEP]
rintro α ⟨a, f⟩
[GOAL]
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : LiftpPreservation
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }
[PROOFSTEP]
simp only [LiftpPreservation] at h 
[GOAL]
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
h : ∀ ⦃α : Type u⦄ (p : α → Prop) (x : PFunctor.Obj (P F) α), Liftp p (abs x) ↔ Liftp p x
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }
[PROOFSTEP]
simp only [supp, h]
[GOAL]
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
⊢ LiftpPreservation ↔ IsUniform
[PROOFSTEP]
rw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_uniform]
