l3lab/ntp-mathlib huggingface dataset:
theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
    LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : repr u with a f
    use a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd
    constructor
    · rw [← xeq, ← abs_repr u, h, ← abs_map]; rfl
    constructor
    · rw [← yeq, ← abs_repr u, h, ← abs_map]; rfl
    intro i j
    exact (f i j).property
  rintro ⟨a, f₀, f₁, xeq, yeq, h⟩
  use abs ⟨a, fun i j => ⟨(f₀ i j, f₁ i j), h i j⟩⟩
  dsimp; constructor
  · rw [xeq, ← abs_map]; 

Proof state:
case h.left
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
r : {i : Fin2 n} → α i → α i → Prop
x y : F α
a : (P F).A
f₀ f₁ : MvPFunctor.B (P F) a ⟹ α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)
⊢ abs
      ((fun i t => (↑t).1) <$$>
        { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } }) =
    abs { fst := a, snd := f₀ }

Next tactic:
rfl
theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
    LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : repr u with a f
    use a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd
    constructor
    · rw [← xeq, ← abs_repr u, h, ← abs_map]; rfl
    constructor
    · rw [← yeq, ← abs_repr u, h, ← abs_map]; rfl
    intro i j
    exact (f i j).property
  rintro ⟨a, f₀, f₁, xeq, yeq, h⟩
  use abs ⟨a, fun i j => ⟨(f₀ i j, f₁ i j), h i j⟩⟩
  dsimp; constructor
  · rw [xeq, ← abs_map]; rfl
  

Proof state:
case h.right
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
r : {i : Fin2 n} → α i → α i → Prop
x y : F α
a : (P F).A
f₀ f₁ : MvPFunctor.B (P F) a ⟹ α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)
⊢ (fun i t => (↑t).2) <$$>
      abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =
    y

Next tactic:
rw [yeq, ← abs_map]
theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
    LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : repr u with a f
    use a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd
    constructor
    · rw [← xeq, ← abs_repr u, h, ← abs_map]; rfl
    constructor
    · rw [← yeq, ← abs_repr u, h, ← abs_map]; rfl
    intro i j
    exact (f i j).property
  rintro ⟨a, f₀, f₁, xeq, yeq, h⟩
  use abs ⟨a, fun i j => ⟨(f₀ i j, f₁ i j), h i j⟩⟩
  dsimp; constructor
  · rw [xeq, ← abs_map]; rfl
  rw [yeq, ← abs_map]; 

Proof state:
case h.right
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
r : {i : Fin2 n} → α i → α i → Prop
x y : F α
a : (P F).A
f₀ f₁ : MvPFunctor.B (P F) a ⟹ α
xeq : x = abs { fst := a, snd := f₀ }
yeq : y = abs { fst := a, snd := f₁ }
h : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)
⊢ abs
      ((fun i t => (↑t).2) <$$>
        { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } }) =
    abs { fst := a, snd := f₁ }

Next tactic:
rfl
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  

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

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

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

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

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

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

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

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

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

Next tactic:
have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact mem_image_of_mem _ (mem_univ _)
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i : Fin2 n
u : α i
h : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
haf : abs { fst := a, snd := f } = x
⊢ LiftP (fun i u => u ∈ f i '' univ) x

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

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i : Fin2 n
u : α i
h : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
haf : abs { fst := a, snd := f } = x
⊢ ∃ a_1 f_1, x = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_1 i), f_1 i j ∈ f i '' univ

Next tactic:
refine' ⟨a, f, haf.symm, _⟩
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      

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

Next tactic:
intro i u
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      

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

Next tactic:
exact mem_image_of_mem _ (mem_univ _)
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact mem_image_of_mem _ (mem_univ _)
    

Proof state:
case mp
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i : Fin2 n
u : α i
h : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
haf : abs { fst := a, snd := f } = x
this : LiftP (fun i u => u ∈ f i '' univ) x
⊢ u ∈ f i '' univ

Next tactic:
exact h this
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact mem_image_of_mem _ (mem_univ _)
    exact h this
  

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

Next tactic:
intro h p
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact mem_image_of_mem _ (mem_univ _)
    exact h this
  intro h p; 

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

Next tactic:
rw [liftP_iff]
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact mem_image_of_mem _ (mem_univ _)
    exact h this
  intro h p; rw [liftP_iff]
  

Proof state:
case mpr
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i : Fin2 n
u : α i
h : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ 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)) → p i u

Next tactic:
rintro ⟨a, f, xeq, h'⟩
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact 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
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i : Fin2 n
u : α i
h : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ 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)
⊢ p i u

Next tactic:
rcases h a f xeq.symm with ⟨i, _, hi⟩
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact 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
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i✝ : Fin2 n
u : α i✝
h : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ 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 : MvPFunctor.B (P F) a i✝
left✝ : i ∈ univ
hi : f i✝ i = u
⊢ p i✝ u

Next tactic:
rw [← hi]
theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ := by
  rw [supp]; dsimp; constructor
  · intro h a f haf
    have : LiftP (fun i u => u ∈ f i '' univ) x := by
      rw [liftP_iff]
      refine' ⟨a, f, haf.symm, _⟩
      intro i u
      exact 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
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
i✝ : Fin2 n
u : α i✝
h : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ 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 : MvPFunctor.B (P F) a i✝
left✝ : i ∈ univ
hi : f i✝ i = u
⊢ p i✝ (f i✝ i)

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

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

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

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

Next tactic:
apply 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
  

Proof state:
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
⊢ (∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u) ↔
    ∃ 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

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
  · 

Proof state:
case mp
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : F α
⊢ (∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ supp x i, p i u) →
    ∃ 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

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
    

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

Next tactic:
have : LiftP (supp x) x := by rw [h]; introv; exact id
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 

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
⊢ LiftP (supp x) x

Next tactic:
rw [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]; 

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
⊢ ∀ (i : Fin2 n), ∀ u ∈ supp x i, supp x i u

Next tactic:
introv
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; 

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
i : Fin2 n
u : α i
⊢ u ∈ supp x i → supp x i u

Next tactic:
exact id
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
    

Proof state:
case mp
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
this : LiftP (supp x) x
⊢ ∃ 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

Next tactic:
rw [liftP_iff] at this
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
    

Proof state:
case mp
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
this : ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)
⊢ ∃ 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

Next tactic:
rcases this with ⟨a, f, xeq, 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'⟩
    

Proof state:
case mp.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 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

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, _⟩
    

Proof state:
case mp.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)
⊢ ∀ (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

Next tactic:
intro a' f' 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''
    

Proof state:
case mp.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' ⟹ α
⊢ abs { fst := f', snd := h'' } = x → f a' '' univ ⊆ h'' a' '' univ

Next tactic:
rintro hu u ⟨j, _h₂, 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⟩
    

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
⊢ u ∈ h'' a' '' univ

Next tactic:
have hh : u ∈ supp x a' := by rw [← hfi]; apply h'