l3lab/ntp-mathlib huggingface dataset:
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    

Proof state:
case mp.intro
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)

Next tactic:
cases' h : repr y with a f
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    

Proof state:
case mp.intro.mk
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)

Next tactic:
use a, fun i j => (f i j).val
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    

Proof state:
case h
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i j => ↑(f i j) } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p ↑(f i j)

Next tactic:
constructor
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · 

Proof state:
case h.left
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i j => ↑(f i j) }

Next tactic:
rw [← hy, ← abs_repr y, h, ← abs_map]
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; 

Proof state:
case h.left
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
⊢ abs ((fun i => Subtype.val) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => ↑(f i j) }

Next tactic:
rfl
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← 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
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p ↑(f i j)

Next tactic:
intro i j
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
    intro i j
    

Proof state:
case h.right
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
y : F fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => Subtype p
h : repr y = { fst := a, snd := f }
i : Fin2 n
j : MvPFunctor.B (P F) a i
⊢ p ↑(f i j)

Next tactic:
apply (f i j).property
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
    intro i j
    apply (f i j).property
  

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

Next tactic:
rintro ⟨a, f, h₀, h₁⟩
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
    intro i j
    apply (f i j).property
  rintro ⟨a, f, h₀, 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
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
h₀ : x = abs { fst := a, snd := f }
h₁ : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)
⊢ LiftP p x

Next tactic:
use abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
    intro i j
    apply (f i j).property
  rintro ⟨a, f, h₀, h₁⟩
  use abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩
  

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

Next tactic:
rw [← abs_map, h₀]
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : repr y with a f
    use a, fun i j => (f i j).val
    constructor
    · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
    intro i j
    apply (f i j).property
  rintro ⟨a, f, h₀, h₁⟩
  use abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩
  rw [← abs_map, h₀]; 

Proof state:
case h
n : ℕ
F : TypeVec.{u} n → Type u_1
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : F α
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ α
h₀ : x = abs { fst := a, snd := f }
h₁ : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)
⊢ abs ((fun i => Subtype.val) <$$> { fst := a, snd := fun i j => { val := f i j, property := (_ : p (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
  

Proof state:
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 α
⊢ LiftR (fun {i} => r) x y ↔
    ∃ a f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧
        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)

Next tactic:
constructor
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
  · 

Proof state:
case mp
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 α
⊢ LiftR (fun {i} => r) x y →
    ∃ a f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧
        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)

Next tactic:
rintro ⟨u, xeq, yeq⟩
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⟩
    

Proof state:
case mp.intro.intro
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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
⊢ ∃ a f₀ f₁,
    x = abs { fst := a, snd := f₀ } ∧
      y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)

Next tactic:
cases' h : repr u with a f
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
    

Proof state:
case mp.intro.intro.mk
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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ ∃ a f₀ f₁,
    x = abs { fst := a, snd := f₀ } ∧
      y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)

Next tactic:
use a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd
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
    

Proof state:
case h
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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i j => (↑(f i j)).1 } ∧
    y = abs { fst := a, snd := fun i j => (↑(f i j)).2 } ∧
      ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
constructor
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
    · 

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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ x = abs { fst := a, snd := fun i j => (↑(f i j)).1 }

Next tactic:
rw [← xeq, ← abs_repr u, h, ← 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]; 

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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ abs ((fun i t => (↑t).1) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => (↑(f i j)).1 }

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
    

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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ y = abs { fst := a, snd := fun i j => (↑(f i j)).2 } ∧
    ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
constructor
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
    · 

Proof state:
case h.right.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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ y = abs { fst := a, snd := fun i j => (↑(f i j)).2 }

Next tactic:
rw [← yeq, ← abs_repr u, h, ← 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]; 

Proof state:
case h.right.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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ abs ((fun i t => (↑t).2) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => (↑(f i j)).2 }

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
    

Proof state:
case h.right.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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
intro i j
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
    

Proof state:
case h.right.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 α
u : F fun i => { p // (fun {i} => r) p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : (P F).A
f : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.1 p.2 }
h : repr u = { fst := a, snd := f }
i : Fin2 n
j : MvPFunctor.B (P F) a i
⊢ r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
exact (f i j).property
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
  

Proof state:
case mpr
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 f₀ f₁,
      x = abs { fst := a, snd := f₀ } ∧
        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)) →
    LiftR (fun {i} => r) x y

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

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
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)
⊢ LiftR (fun {i} => r) x y

Next tactic:
use abs ⟨a, fun i j => ⟨(f₀ i j, f₁ i j), h i j⟩⟩
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⟩⟩
  

Proof state:
case h
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).1) <$$>
        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =
      x ∧
    (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:
dsimp
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; 

Proof state:
case h
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).1) <$$>
        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =
      x ∧
    (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:
constructor
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
  · 

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)
⊢ (fun i t => (↑t).1) <$$>
      abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =
    x

Next tactic:
rw [xeq, ← abs_map]