l3lab/ntp-mathlib huggingface dataset:
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by 

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
h : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => α i
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)
a' : Fin2 n
f' : (P F).A
h'' : MvPFunctor.B (P F) f' ⟹ α
hu : abs { fst := f', snd := h'' } = x
u : α a'
j : MvPFunctor.B (P F) a a'
_h₂ : j ∈ univ
hfi : f a' j = u
⊢ u ∈ supp x a'

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

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
h : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => α i
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)
a' : Fin2 n
f' : (P F).A
h'' : MvPFunctor.B (P F) f' ⟹ α
hu : abs { fst := f', snd := h'' } = x
u : α a'
j : MvPFunctor.B (P F) a a'
_h₂ : j ∈ univ
hfi : f a' j = u
⊢ f a' j ∈ supp x a'

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

Proof state:
case mp.intro.intro.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
h : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => α i
xeq : x = abs { fst := a, snd := f }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)
a' : Fin2 n
f' : (P F).A
h'' : MvPFunctor.B (P F) f' ⟹ α
hu : abs { fst := f', snd := h'' } = x
u : α a'
j : MvPFunctor.B (P F) a a'
_h₂ : j ∈ univ
hfi : f a' j = u
hh : u ∈ supp x a'
⊢ u ∈ h'' a' '' univ

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

Proof state:
case mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
⊢ (∃ a f,
      abs { fst := a, snd := f } = x ∧
        ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
          abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ) →
    ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u

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

Proof state:
case mpr.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
⊢ LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u

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

Proof state:
case mpr.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) ↔
    ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u

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

Proof state:
case mpr.intro.intro.intro.mp
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) →
    ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u

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

Proof state:
case mpr.intro.intro.intro.mp.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
a' : (P F).A
f' : MvPFunctor.B (P F) a' ⟹ fun i => α i
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)
i : Fin2 n
u : α i
usuppx : u ∈ supp x i
⊢ p i u

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

Proof state:
case mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
a' : (P F).A
f' : MvPFunctor.B (P F) a' ⟹ fun i => α i
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)
i✝ : Fin2 n
u : α i✝
usuppx : u ∈ supp x i✝
i : MvPFunctor.B (P F) a' i✝
left✝ : i ∈ univ
f'ieq : f' i✝ i = u
⊢ p i✝ u

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

Proof state:
case mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
a' : (P F).A
f' : MvPFunctor.B (P F) a' ⟹ fun i => α i
xeq' : x = abs { fst := a', snd := f' }
h' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)
i✝ : Fin2 n
u : α i✝
usuppx : u ∈ supp x i✝
i : MvPFunctor.B (P F) a' i✝
left✝ : i ∈ univ
f'ieq : f' i✝ i = u
⊢ p i✝ (f' i✝ i)

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

Proof state:
case mpr.intro.intro.intro.mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
⊢ (∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u) →
    ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)

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

Proof state:
case mpr.intro.intro.intro.mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)

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

Proof state:
case mpr.intro.intro.intro.mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)

Next tactic:
intro j y
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by rw [← hfi]; apply h'
    refine' (mem_supp x _ u).mp hh _ _ hu
  rintro ⟨a, f, xeq, h⟩ p; rw [liftP_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ i u usuppx
    rcases (mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩
    rw [← f'ieq]
    apply h'
  intro h'
  refine' ⟨a, f, xeq.symm, _⟩; intro j y
  

Proof state:
case mpr.intro.intro.intro.mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
j : Fin2 n
y : MvPFunctor.B (P F) a j
⊢ p j (f j y)

Next tactic:
apply h'
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by rw [← hfi]; apply h'
    refine' (mem_supp x _ u).mp hh _ _ hu
  rintro ⟨a, f, xeq, h⟩ p; rw [liftP_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ i u usuppx
    rcases (mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩
    rw [← f'ieq]
    apply h'
  intro h'
  refine' ⟨a, f, xeq.symm, _⟩; intro j y
  apply h'; 

Proof state:
case mpr.intro.intro.intro.mpr.a
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
j : Fin2 n
y : MvPFunctor.B (P F) a j
⊢ f j y ∈ supp x j

Next tactic:
rw [mem_supp]
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by rw [← hfi]; apply h'
    refine' (mem_supp x _ u).mp hh _ _ hu
  rintro ⟨a, f, xeq, h⟩ p; rw [liftP_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ i u usuppx
    rcases (mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩
    rw [← f'ieq]
    apply h'
  intro h'
  refine' ⟨a, f, xeq.symm, _⟩; intro j y
  apply h'; rw [mem_supp]
  

Proof state:
case mpr.intro.intro.intro.mpr.a
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
j : Fin2 n
y : MvPFunctor.B (P F) a j
⊢ ∀ (a : (P F).A) (f_1 : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f_1 } = x → f j y ∈ f_1 j '' univ

Next tactic:
intro a' f' xeq'
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by rw [← hfi]; apply h'
    refine' (mem_supp x _ u).mp hh _ _ hu
  rintro ⟨a, f, xeq, h⟩ p; rw [liftP_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ i u usuppx
    rcases (mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩
    rw [← f'ieq]
    apply h'
  intro h'
  refine' ⟨a, f, xeq.symm, _⟩; intro j y
  apply h'; rw [mem_supp]
  intro a' f' xeq'
  

Proof state:
case mpr.intro.intro.intro.mpr.a
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
j : Fin2 n
y : MvPFunctor.B (P F) a j
a' : (P F).A
f' : MvPFunctor.B (P F) a' ⟹ α
xeq' : abs { fst := a', snd := f' } = x
⊢ f j y ∈ f' j '' univ

Next tactic:
apply h _ a' f' xeq'
theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
  constructor
  · intro h
    have : LiftP (supp x) x := by rw [h]; introv; exact id
    rw [liftP_iff] at this
    rcases this with ⟨a, f, xeq, h'⟩
    refine' ⟨a, f, xeq.symm, _⟩
    intro a' f' h''
    rintro hu u ⟨j, _h₂, hfi⟩
    have hh : u ∈ supp x a' := by rw [← hfi]; apply h'
    refine' (mem_supp x _ u).mp hh _ _ hu
  rintro ⟨a, f, xeq, h⟩ p; rw [liftP_iff]; constructor
  · rintro ⟨a', f', xeq', h'⟩ i u usuppx
    rcases (mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩
    rw [← f'ieq]
    apply h'
  intro h'
  refine' ⟨a, f, xeq.symm, _⟩; intro j y
  apply h'; rw [mem_supp]
  intro a' f' xeq'
  apply h _ a' f' xeq'
  

Proof state:
case mpr.intro.intro.intro.mpr.a.a
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
xeq : abs { fst := a, snd := f } = x
h :
  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),
    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ
p : (i : Fin2 n) → α i → Prop
h' : ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u
j : Fin2 n
y : MvPFunctor.B (P F) a j
a' : (P F).A
f' : MvPFunctor.B (P F) a' ⟹ α
xeq' : abs { fst := a', snd := f' } = x
⊢ f j y ∈ f j '' univ

Next tactic:
apply mem_image_of_mem _ (mem_univ _)
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ := by
  

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
h : IsUniform
α : TypeVec.{u} n
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
⊢ ∀ (i : Fin2 n), supp (abs { fst := a, snd := f }) i = f i '' univ

Next tactic:
intro
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ := by
  intro; 

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
h : IsUniform
α : TypeVec.{u} n
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
i✝ : Fin2 n
⊢ supp (abs { fst := a, snd := f }) i✝ = f i✝ '' univ

Next tactic:
ext u
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ := by
  intro; ext u; 

Proof state:
case h
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
h : IsUniform
α : TypeVec.{u} n
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
i✝ : Fin2 n
u : α i✝
⊢ u ∈ supp (abs { fst := a, snd := f }) i✝ ↔ u ∈ f i✝ '' univ

Next tactic:
rw [mem_supp]
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ := by
  intro; ext u; rw [mem_supp]; 

Proof state:
case h
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
h : IsUniform
α : TypeVec.{u} n
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
i✝ : Fin2 n
u : α i✝
⊢ (∀ (a_1 : (P F).A) (f_1 : MvPFunctor.B (P F) a_1 ⟹ α),
      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 i✝ '' univ) ↔
    u ∈ f i✝ '' univ

Next tactic:
constructor