l3lab/ntp-mathlib huggingface dataset:
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; 

Proof state:
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

Next tactic:
dsimp
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; 

Proof state:
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

Next tactic:
constructor
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · 

Proof state:
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

Next tactic:
intro h a f haf
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    

Proof state:
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

Next tactic:
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 _)⟩
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : Liftp (fun u => u ∈ f '' univ) x := by
      

Proof state:
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

Next tactic:
rw [liftp_iff]
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : Liftp (fun u => u ∈ f '' univ) x := by
      rw [liftp_iff]
      

Proof state:
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

Next tactic:
refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    

Proof state:
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

Next tactic:
exact h this
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  

Proof state:
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

Next tactic:
intro h p
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  intro h p; 

Proof state:
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

Next tactic:
rw [liftp_iff]
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  intro h p; rw [liftp_iff]
  

Proof state:
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

Next tactic:
rintro ⟨a, f, xeq, h'⟩
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  intro h p; rw [liftp_iff]
  rintro ⟨a, f, xeq, h'⟩
  

Proof state:
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

Next tactic:
rcases h a f xeq.symm with ⟨i, _, hi⟩
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  intro h p; rw [liftp_iff]
  rintro ⟨a, f, xeq, h'⟩
  rcases h a f xeq.symm with ⟨i, _, hi⟩
  

Proof state:
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

Next tactic:
rw [← hi]
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    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 _)⟩
    exact h this
  intro h p; rw [liftp_iff]
  rintro ⟨a, f, xeq, h'⟩
  rcases h a f xeq.symm with ⟨i, _, hi⟩
  rw [← hi]; 

Proof state:
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)

Next tactic:
apply h'
theorem supp_eq {α : Type u} (x : F α) :
    supp x = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ } := by
  

Proof state:
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}

Next tactic:
ext
theorem supp_eq {α : Type u} (x : F α) :
    supp x = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ } := by
  ext
  

Proof state:
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}

Next tactic:
apply mem_supp
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ 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

Next tactic:
constructor
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · 

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ 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

Next tactic:
intro h
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ 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

Next tactic:
have : Liftp (supp x) x := by rw [h]; intro u; exact id
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by 

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
⊢ Liftp (supp x) x

Next tactic:
rw [h]
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; 

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
⊢ ∀ u ∈ supp x, supp x u

Next tactic:
intro u
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; 

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
u : α
⊢ u ∈ supp x → supp x u

Next tactic:
exact id
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ 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

Next tactic:
rw [liftp_iff] at this
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
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

Next tactic:
rcases this with ⟨a, f, xeq, h'⟩
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    

Proof state:
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 ∈ supp x, p u
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

Next tactic:
refine' ⟨a, f, xeq.symm, _⟩
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    

Proof state:
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 ∈ supp x, p u
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

Next tactic:
intro a' f' h''
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    

Proof state:
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 ∈ supp x, p u
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

Next tactic:
rintro u ⟨i, _, hfi⟩
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    

Proof state:
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 ∈ supp x, p u
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

Next tactic:
have : u ∈ supp x := by rw [← hfi]; apply h'
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by 

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
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

Next tactic:
rw [← hfi]
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; 

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
α : Type u
x : F α
h : ∀ (p : α → Prop), Liftp p x ↔ ∀ u ∈ supp x, p u
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

Next tactic:
apply h'
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    

Proof state:
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 ∈ supp x, p u
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

Next tactic:
exact (mem_supp x u).mp this _ _ h''
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    exact (mem_supp x u).mp this _ _ h''
  

Proof state:
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 ∈ supp x, p u

Next tactic:
rintro ⟨a, f, xeq, h⟩ p
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    exact (mem_supp x u).mp this _ _ h''
  rintro ⟨a, f, xeq, h⟩ p; 

Proof state:
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 ∈ supp x, p u

Next tactic:
rw [liftp_iff]
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    exact (mem_supp x u).mp this _ _ h''
  rintro ⟨a, f, xeq, h⟩ p; rw [liftp_iff]; 

Proof state:
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 ∈ supp x, p u

Next tactic:
constructor
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    exact (mem_supp x u).mp this _ _ h''
  rintro ⟨a, f, xeq, h⟩ p; rw [liftp_iff]; constructor
  · 

Proof state:
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 ∈ supp x, p u

Next tactic:
rintro ⟨a', f', xeq', h'⟩ u usuppx
theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ := by
  constructor
  · intro h
    have : Liftp (supp x) x := by rw [h]; intro u; exact id
    rw [liftp_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro u ⟨i, _, hfi⟩
    have : u ∈ supp x := by rw [← hfi]; apply h'
    exact (mem_supp x u).mp this _ _ h''
  rintro ⟨a, f, xeq, h⟩ p; rw [liftp_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ u usuppx
    

Proof state:
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

Next tactic:
rcases (mem_supp x u).mp usuppx a' f' xeq'.symm with ⟨i, _, f'ieq⟩