Theorem: Qpf.liftp_iff'
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: constructor
state_before: 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)

tactic: rintro ⟨⟨a, f⟩, h₀, h₁⟩
state_before: 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

tactic: dsimp at *
state_before: 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

tactic: use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
state_before: 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

tactic: rw [← abs_map, ← h₀]
state_before: 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)
⊢ Subtype.val <$> abs { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } } = x

tactic: rfl
state_before: 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)
⊢ abs (Subtype.val <$> { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } }) =
    abs { fst := a, snd := f }

tactic: rintro ⟨y, hy⟩
state_before: 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)

tactic: cases' h : repr y with a f
state_before: 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)

tactic: use ⟨a, fun i => (f i).val⟩
state_before: 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)

tactic: dsimp
state_before: 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 }
⊢ 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)

tactic: constructor
state_before: 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 }
⊢ abs { fst := a, snd := fun i => ↑(f i) } = x ∧ ∀ (i : PFunctor.B (P F) a), p ↑(f i)

tactic: intro i
state_before: case mp.intro.mk.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)

tactic: apply (f i).property
state_before: case mp.intro.mk.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)

tactic: rw [← hy, ← abs_repr y, h, ← abs_map]
state_before: case mp.intro.mk.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

tactic: rfl
state_before: case mp.intro.mk.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 })