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 ↔ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f 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 α
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → Liftp p x

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

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

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

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 (Subtype.val <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => ↑(f i) }