l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem const.mk_get (x : const n A α) : const.mk n (const.get x) = x := by
  cases x
  

Proof state:
case mk
n m : ℕ
P : MvPFunctor.{u} n
A : Type u
α β : TypeVec.{u} n
fst✝ : (const n A).A
snd✝ : B (const n A) fst✝ ⟹ α
⊢ mk n (get { fst := fst✝, snd := snd✝ }) = { fst := fst✝, snd := snd✝ }

Next tactic:
dsimp [const.get, const.mk]
@[simp]
theorem const.mk_get (x : const n A α) : const.mk n (const.get x) = x := by
  cases x
  dsimp [const.get, const.mk]
  

Proof state:
case mk
n m : ℕ
P : MvPFunctor.{u} n
A : Type u
α β : TypeVec.{u} n
fst✝ : (const n A).A
snd✝ : B (const n A) fst✝ ⟹ α
⊢ { fst := fst✝, snd := fun x a => PEmpty.elim a } = { fst := fst✝, snd := snd✝ }

Next tactic:
congr with (_⟨⟩)
theorem comp.get_map (f : α ⟹ β) (x : comp P Q α) :
    comp.get (f <$$> x) = (fun i (x : Q i α) => f <$$> x) <$$> comp.get x := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α β : TypeVec.{u} m
f : α ⟹ β
x : ↑(comp P Q) α
⊢ get (f <$$> x) = (fun i x => f <$$> x) <$$> get x

Next tactic:
rfl
@[simp]
theorem comp.get_mk (x : P (fun i => Q i α)) : comp.get (comp.mk x) = x := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α β : TypeVec.{u} m
x : ↑P fun i => ↑(Q i) α
⊢ get (mk x) = x

Next tactic:
rfl
@[simp]
theorem comp.mk_get (x : comp P Q α) : comp.mk (comp.get x) = x := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α β : TypeVec.{u} m
x : ↑(comp P Q) α
⊢ mk (get x) = x

Next tactic:
rfl
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
⊢ LiftP p x ↔ ∃ a f, x = { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

Next tactic:
constructor
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · 

Proof state:
case mp
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
⊢ LiftP p x → ∃ a f, x = { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

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

Proof state:
case mp.intro
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
y : ↑P fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
⊢ ∃ a f, x = { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

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

Proof state:
case mp.intro.mk
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
y : ↑P fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : P.A
f : B P a ⟹ fun i => Subtype p
h : y = { fst := a, snd := f }
⊢ ∃ a f, x = { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

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

Proof state:
case mp.intro.mk
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
y : ↑P fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : P.A
f : B P a ⟹ fun i => Subtype p
h : y = { fst := a, snd := f }
⊢ x = { fst := a, snd := fun i j => ↑(f i j) }

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

Proof state:
case mp.intro.mk
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
y : ↑P fun i => Subtype p
hy : (fun i => Subtype.val) <$$> y = x
a : P.A
f : B P a ⟹ fun i => Subtype p
h : y = { fst := a, snd := f }
⊢ { fst := a, snd := (fun i => Subtype.val) ⊚ f } = { fst := a, snd := fun i j => ↑(f i j) }

Next tactic:
rfl
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : y with a f
    refine' ⟨a, fun i j => (f i j).val, _, fun i j => (f i j).property⟩
    rw [← hy, h, map_eq]
    rfl
  

Proof state:
case mpr
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
⊢ (∃ a f, x = { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : B P a i), p (f i j)) → LiftP p x

Next tactic:
rintro ⟨a, f, xeq, pf⟩
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : y with a f
    refine' ⟨a, fun i j => (f i j).val, _, fun i j => (f i j).property⟩
    rw [← hy, h, map_eq]
    rfl
  rintro ⟨a, f, xeq, pf⟩
  

Proof state:
case mpr.intro.intro.intro
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
a : P.A
f : B P a ⟹ α
xeq : x = { fst := a, snd := f }
pf : ∀ (i : Fin2 n) (j : B P a i), p (f i j)
⊢ LiftP p x

Next tactic:
use ⟨a, fun i j => ⟨f i j, pf i j⟩⟩
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by
  constructor
  · rintro ⟨y, hy⟩
    cases' h : y with a f
    refine' ⟨a, fun i j => (f i j).val, _, fun i j => (f i j).property⟩
    rw [← hy, h, map_eq]
    rfl
  rintro ⟨a, f, xeq, pf⟩
  use ⟨a, fun i j => ⟨f i j, pf i j⟩⟩
  

Proof state:
case h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
a : P.A
f : B P a ⟹ α
xeq : x = { fst := a, snd := f }
pf : ∀ (i : Fin2 n) (j : B P a i), p (f i j)
⊢ (fun i => Subtype.val) <$$> { fst := a, snd := fun i j => { val := f i j, property := (_ : p (f i j)) } } = x

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

Proof state:
case h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
x : ↑P α
a : P.A
f : B P a ⟹ α
xeq : x = { fst := a, snd := f }
pf : ∀ (i : Fin2 n) (j : B P a i), p (f i j)
⊢ (fun i => Subtype.val) <$$> { fst := a, snd := fun i j => { val := f i j, property := (_ : p (f i j)) } } =
    { fst := a, snd := f }

Next tactic:
rfl
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
⊢ LiftP p { fst := a, snd := f } ↔ ∀ (i : Fin2 n) (x : B P a i), p (f i x)

Next tactic:
simp only [liftP_iff, Sigma.mk.inj_iff]
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; 

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
⊢ (∃ a_1 f_1, { fst := a, snd := f } = { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_1 i), p (f_1 i j)) ↔
    ∀ (i : Fin2 n) (x : B P a i), p (f i x)

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · 

Proof state:
case mp
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
⊢ (∃ a_1 f_1, { fst := a, snd := f } = { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_1 i), p (f_1 i j)) →
    ∀ (i : Fin2 n) (x : B P a i), p (f i x)

Next tactic:
rintro ⟨_, _, ⟨⟩, _⟩
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    

Proof state:
case mp.intro.intro.intro.refl
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
right✝ : ∀ (i : Fin2 n) (j : B P a i), p (f i j)
⊢ ∀ (i : Fin2 n) (x : B P a i), p (f i x)

Next tactic:
assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · 

Proof state:
case mpr
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
⊢ (∀ (i : Fin2 n) (x : B P a i), p (f i x)) →
    ∃ a_2 f_1, { fst := a, snd := f } = { fst := a_2, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_2 i), p (f_1 i j)

Next tactic:
intro
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    

Proof state:
case mpr
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∃ a_1 f_1, { fst := a, snd := f } = { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_1 i), p (f_1 i j)

Next tactic:
repeat' first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' 

Proof state:
case mpr
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∃ a_1 f_1, { fst := a, snd := f } = { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_1 i), p (f_1 i j)

Next tactic:
first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |

Proof state:
case mpr
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∃ a_1 f_1, { fst := a, snd := f } = { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P a_1 i), p (f_1 i j)

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' 

Proof state:
case mpr.h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∃ f_1, { fst := a, snd := f } = { fst := ?mpr.w, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P ?mpr.w i), p (f_1 i j)

Next tactic:
first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |

Proof state:
case mpr.h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∃ f_1, { fst := a, snd := f } = { fst := ?mpr.w, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : B P ?mpr.w i), p (f_1 i j)

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' 

Proof state:
case mpr.h.h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ { fst := a, snd := f } = { fst := ?mpr.w, snd := ?mpr.h.w } ∧ ∀ (i : Fin2 n) (j : B P ?mpr.w i), p (?mpr.h.w i j)

Next tactic:
first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |

Proof state:
case mpr.h.h
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ { fst := a, snd := f } = { fst := ?mpr.w, snd := ?mpr.h.w } ∧ ∀ (i : Fin2 n) (j : B P ?mpr.w i), p (?mpr.h.w i j)

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' 

Proof state:
case mpr.h.h.left
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ { fst := a, snd := f } = { fst := ?mpr.w, snd := ?mpr.h.w }

Next tactic:
first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |

Proof state:
case mpr.h.h.left
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ { fst := a, snd := f } = { fst := ?mpr.w, snd := ?mpr.h.w }

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' 

Proof state:
case mpr.h.h.right
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

Next tactic:
first |constructor|assumption
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |

Proof state:
case mpr.h.h.right
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

Next tactic:
constructor
theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by
  simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
  · rintro ⟨_, _, ⟨⟩, _⟩
    assumption
  · intro
    repeat' first |constructor|

Proof state:
case mpr.h.h.right
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
p : ⦃i : Fin2 n⦄ → α i → Prop
a : P.A
f : B P a ⟹ α
a✝ : ∀ (i : Fin2 n) (x : B P a i), p (f i x)
⊢ ∀ (i : Fin2 n) (j : B P a i), p (f i j)

Next tactic:
assumption
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  

Proof state:
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
⊢ LiftR r x y ↔
    ∃ a f₀ f₁,
      x = { fst := a, snd := f₀ } ∧ y = { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : B P a i), r (f₀ i j) (f₁ i j)

Next tactic:
constructor
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · 

Proof state:
case mp
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
⊢ LiftR r x y →
    ∃ a f₀ f₁,
      x = { fst := a, snd := f₀ } ∧ y = { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : B P a i), r (f₀ i j) (f₁ i j)

Next tactic:
rintro ⟨u, xeq, yeq⟩
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    

Proof state:
case mp.intro.intro
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // 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 = { fst := a, snd := f₀ } ∧ y = { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : B P a i), r (f₀ i j) (f₁ i j)

Next tactic:
cases' h : u with a f
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : u with a f
    

Proof state:
case mp.intro.intro.mk
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ ∃ a f₀ f₁,
    x = { fst := a, snd := f₀ } ∧ y = { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : B P 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 → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : 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 m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ x = { fst := a, snd := fun i j => (↑(f i j)).1 } ∧
    y = { fst := a, snd := fun i j => (↑(f i j)).2 } ∧ ∀ (i : Fin2 n) (j : B P a i), r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
constructor
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : 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 m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ x = { fst := a, snd := fun i j => (↑(f i j)).1 }

Next tactic:
rw [← xeq, h]
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : 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, h]
      

Proof state:
case h.left
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ (fun i t => (↑t).1) <$$> { fst := a, snd := f } = { fst := a, snd := fun i j => (↑(f i j)).1 }

Next tactic:
rfl
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : 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, h]
      rfl
    

Proof state:
case h.right
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ y = { fst := a, snd := fun i j => (↑(f i j)).2 } ∧ ∀ (i : Fin2 n) (j : B P a i), r (↑(f i j)).1 (↑(f i j)).2

Next tactic:
constructor
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
  constructor
  · rintro ⟨u, xeq, yeq⟩
    cases' h : 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, h]
      rfl
    constructor
    · 

Proof state:
case h.right.left
n m : ℕ
P : MvPFunctor.{u} n
Q : Fin2 n → MvPFunctor.{u} m
α✝ β : TypeVec.{u} m
α : TypeVec.{u} n
r : ⦃i : Fin2 n⦄ → α i → α i → Prop
x y : ↑P α
u : ↑P fun i => { p // r p.1 p.2 }
xeq : (fun i t => (↑t).1) <$$> u = x
yeq : (fun i t => (↑t).2) <$$> u = y
a : P.A
f : B P a ⟹ fun i => { p // r p.1 p.2 }
h : u = { fst := a, snd := f }
⊢ y = { fst := a, snd := fun i j => (↑(f i j)).2 }

Next tactic:
rw [← yeq, h]