-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem mem_supp {α : Type u} (x : F α) (u : α) :
    u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ

Proof state:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
⊢ u ∈ f '' univ

Tactic:
have : Liftp (fun u => u ∈ f '' univ) x := by
  rw [liftp_iff]
  exact ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩

Result:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
this : Liftp (fun u => u ∈ f '' univ) x
⊢ u ∈ f '' univ

Proof state:
case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ) → ∀ ⦃p : α → Prop⦄, Liftp p x → p u

Tactic:
intro h p

Result:
case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
⊢ Liftp p x → p u

Proof state:
case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
⊢ (∃ a f, x = abs ⟨a, f⟩ ∧ ∀ (i : (P F).B a), p (f i)) → p u

Tactic:
rintro ⟨a, f, xeq, h'⟩

Result:
case mpr.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
⊢ p u

Proof state:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ u ∈ {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y} ↔ ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Tactic:
dsimp

Result:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) ↔ ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Proof state:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) ↔ ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Tactic:
constructor

Result:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) → ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ) → ∀ ⦃p : α → Prop⦄, Liftp p x → p u

Proof state:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ u ∈ supp x ↔ ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Tactic:
rw [supp]

Result:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ u ∈ {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y} ↔ ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Proof state:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
this : Liftp (fun u => u ∈ f '' univ) x
⊢ u ∈ f '' univ

Tactic:
exact h this

Result:
no goals

Proof state:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
⊢ ∃ a_1 f_1, x = abs ⟨a_1, f_1⟩ ∧ ∀ (i : (P F).B a_1), f_1 i ∈ f '' univ

Tactic:
exact ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩

Result:
no goals

Proof state:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) → ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ

Tactic:
intro h a f haf

Result:
case mp
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
⊢ u ∈ f '' univ

Proof state:
case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
⊢ Liftp p x → p u

Tactic:
rw [liftp_iff]

Result:
case mpr
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
⊢ (∃ a f, x = abs ⟨a, f⟩ ∧ ∀ (i : (P F).B a), p (f i)) → p u

Proof state:
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
i : (P F).B a
left✝ : i ∈ univ
hi : f i = u
⊢ p (f i)

Tactic:
apply h'

Result:
no goals

Proof state:
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
i : (P F).B a
left✝ : i ∈ univ
hi : f i = u
⊢ p u

Tactic:
rw [← hi]

Result:
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
i : (P F).B a
left✝ : i ∈ univ
hi : f i = u
⊢ p (f i)

Proof state:
case mpr.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
⊢ p u

Tactic:
rcases h a f xeq.symm with ⟨i, _, hi⟩

Result:
case mpr.intro.intro.intro.intro.intro
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ (a : (P F).A) (f : (P F).B a → α), abs ⟨a, f⟩ = x → u ∈ f '' univ
p : α → Prop
a : (P F).A
f : (P F).B a → α
xeq : x = abs ⟨a, f⟩
h' : ∀ (i : (P F).B a), p (f i)
i : (P F).B a
left✝ : i ∈ univ
hi : f i = u
⊢ p u

Proof state:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
⊢ Liftp (fun u => u ∈ f '' univ) x

Tactic:
rw [liftp_iff]

Result:
F : Type u → Type u
q : QPF F
α : Type u
x : F α
u : α
h : ∀ ⦃p : α → Prop⦄, Liftp p x → p u
a : (P F).A
f : (P F).B a → α
haf : abs ⟨a, f⟩ = x
⊢ ∃ a_1 f_1, x = abs ⟨a_1, f_1⟩ ∧ ∀ (i : (P F).B a_1), f_1 i ∈ f '' univ