l3lab/ntp-mathlib huggingface dataset:
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
⊢ WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) y → recF u (MvPFunctor.wMk (P F) a₀ f'₀ f₀) = recF u y

Next tactic:
apply q.P.w_cases _ y
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α),
    WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a f' f) →
      recF u (MvPFunctor.wMk (P F) a₀ f'₀ f₀) = recF u (MvPFunctor.wMk (P F) a f' f)

Next tactic:
intro a₁ f'₁ f₁
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
⊢ WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁) →
    recF u (MvPFunctor.wMk (P F) a₀ f'₀ f₀) = recF u (MvPFunctor.wMk (P F) a₁ f'₁ f₁)

Next tactic:
intro h
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
⊢ recF u (MvPFunctor.wMk (P F) a₀ f'₀ f₀) = recF u (MvPFunctor.wMk (P F) a₁ f'₁ f₁)

Next tactic:
refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · 

Proof state:
case refine'_1
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α)
    (a_1 : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)),
    (∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
        (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))) →
      (fun a a' x => recF u a = recF u a') (MvPFunctor.wMk (P F) a f' f₀) (MvPFunctor.wMk (P F) a f' f₁)
        (_ : WEquiv (MvPFunctor.wMk (P F) a f' f₀) (MvPFunctor.wMk (P F) a f' f₁))

Next tactic:
intros a f' f₀ f₁ _h ih
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; 

Proof state:
case refine'_1
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
⊢ recF u (MvPFunctor.wMk (P F) a f' f₀) = recF u (MvPFunctor.wMk (P F) a f' f₁)

Next tactic:
simp only [recF_eq, Function.comp]
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    

Proof state:
case refine'_1
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
⊢ u (abs { fst := a, snd := splitFun f' fun x => recF u (f₀ x) }) =
    u (abs { fst := a, snd := splitFun f' fun x => recF u (f₁ x) })

Next tactic:
congr
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; 

Proof state:
case refine'_1.e_a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
⊢ (splitFun f' fun x => recF u (f₀ x)) = splitFun f' fun x => recF u (f₁ x)

Next tactic:
funext
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; 

Proof state:
case refine'_1.e_a.e_a.e_snd.h.h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
x✝¹ : Fin2 (n + 1)
x✝ : MvPFunctor.B (P F) a x✝¹
⊢ splitFun f' (fun x => recF u (f₀ x)) x✝¹ x✝ = splitFun f' (fun x => recF u (f₁ x)) x✝¹ x✝

Next tactic:
congr
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; 

Proof state:
case refine'_1.e_a.e_a.e_snd.h.h.e_g
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
x✝¹ : Fin2 (n + 1)
x✝ : MvPFunctor.B (P F) a x✝¹
⊢ (fun x => recF u (f₀ x)) = fun x => recF u (f₁ x)

Next tactic:
funext
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; funext; 

Proof state:
case refine'_1.e_a.e_a.e_snd.h.h.e_g.h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀✝) (MvPFunctor.wMk (P F) a₁ f'₁ f₁✝)
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f₀ f₁ : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
_h : ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a), WEquiv (f₀ x) (f₁ x)
ih :
  ∀ (x : PFunctor.B (MvPFunctor.last (P F)) a),
    (fun a a' x => recF u a = recF u a') (f₀ x) (f₁ x) (_ : WEquiv (f₀ x) (f₁ x))
x✝² : Fin2 (n + 1)
x✝¹ : MvPFunctor.B (P F) a x✝²
x✝ : last (MvPFunctor.B (P F) a)
⊢ recF u (f₀ x✝) = recF u (f₁ x✝)

Next tactic:
apply ih
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; funext; apply ih
  · 

Proof state:
case refine'_2
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
⊢ ∀ (a₀ : (P F).A) (f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α)
    (f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α) (a₁ : (P F).A)
    (f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α)
    (f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α)
    (a :
      abs { fst := a₀, snd := MvPFunctor.appendContents (P F) f'₀ f₀ } =
        abs { fst := a₁, snd := MvPFunctor.appendContents (P F) f'₁ f₁ }),
    (fun a a' x => recF u a = recF u a') (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
      (_ : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁))

Next tactic:
intros a₀ f'₀ f₀ a₁ f'₁ f₁ h
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; funext; apply ih
  · intros a₀ f'₀ f₀ a₁ f'₁ f₁ h; 

Proof state:
case refine'_2
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀✝ : (P F).A
f'₀✝ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀✝ ⟹ α
f₀✝ : PFunctor.B (MvPFunctor.last (P F)) a₀✝ → MvPFunctor.W (P F) α
a₁✝ : (P F).A
f'₁✝ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁✝ ⟹ α
f₁✝ : PFunctor.B (MvPFunctor.last (P F)) a₁✝ → MvPFunctor.W (P F) α
h✝ : WEquiv (MvPFunctor.wMk (P F) a₀✝ f'₀✝ f₀✝) (MvPFunctor.wMk (P F) a₁✝ f'₁✝ f₁✝)
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h :
  abs { fst := a₀, snd := MvPFunctor.appendContents (P F) f'₀ f₀ } =
    abs { fst := a₁, snd := MvPFunctor.appendContents (P F) f'₁ f₁ }
⊢ recF u (MvPFunctor.wMk (P F) a₀ f'₀ f₀) = recF u (MvPFunctor.wMk (P F) a₁ f'₁ f₁)

Next tactic:
simp only [recF_eq', abs_map, MvPFunctor.wDest'_wMk, h]
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; funext; apply ih
  · intros a₀ f'₀ f₀ a₁ f'₁ f₁ h; simp only [recF_eq', abs_map, MvPFunctor.wDest'_wMk, h]
  · 

Proof state:
case refine'_3
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
⊢ ∀ (u_1 v w : MvPFunctor.W (P F) α) (a : WEquiv u_1 v) (a_1 : WEquiv v w),
    (fun a a' x => recF u a = recF u a') u_1 v a →
      (fun a a' x => recF u a = recF u a') v w a_1 → (fun a a' x => recF u a = recF u a') u_1 w (_ : WEquiv u_1 w)

Next tactic:
intros x y z _e₁ _e₂ ih₁ ih₂
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y := by
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  intro h
  -- porting note: induction on h doesn't work.
  refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
  · intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
    congr; funext; congr; funext; apply ih
  · intros a₀ f'₀ f₀ a₁ f'₁ f₁ h; simp only [recF_eq', abs_map, MvPFunctor.wDest'_wMk, h]
  · intros x y z _e₁ _e₂ ih₁ ih₂; 

Proof state:
case refine'_3
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
u : F (α ::: β) → β
x✝ y✝ : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
h : WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)
x y z : MvPFunctor.W (P F) α
_e₁ : WEquiv x y
_e₂ : WEquiv y z
ih₁ : recF u x = recF u y
ih₂ : recF u y = recF u z
⊢ recF u x = recF u z

Next tactic:
exact Eq.trans ih₁ ih₂
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
h : abs (MvPFunctor.wDest' (P F) x) = abs (MvPFunctor.wDest' (P F) y)
⊢ WEquiv x y

Next tactic:
revert h
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  revert h
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
⊢ abs (MvPFunctor.wDest' (P F) x) = abs (MvPFunctor.wDest' (P F) y) → WEquiv x y

Next tactic:
apply q.P.w_cases _ x
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  revert h
  apply q.P.w_cases _ x
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α),
    abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a f' f)) = abs (MvPFunctor.wDest' (P F) y) →
      WEquiv (MvPFunctor.wMk (P F) a f' f) y

Next tactic:
intro a₀ f'₀ f₀
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  revert h
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
⊢ abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a₀ f'₀ f₀)) = abs (MvPFunctor.wDest' (P F) y) →
    WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) y

Next tactic:
apply q.P.w_cases _ y
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  revert h
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α),
    abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a₀ f'₀ f₀)) =
        abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a f' f)) →
      WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a f' f)

Next tactic:
intro a₁ f'₁ f₁
theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y := by
  revert h
  apply q.P.w_cases _ x
  intro a₀ f'₀ f₀
  apply q.P.w_cases _ y
  intro a₁ f'₁ f₁
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
a₀ : (P F).A
f'₀ : MvPFunctor.B (MvPFunctor.drop (P F)) a₀ ⟹ α
f₀ : PFunctor.B (MvPFunctor.last (P F)) a₀ → MvPFunctor.W (P F) α
a₁ : (P F).A
f'₁ : MvPFunctor.B (MvPFunctor.drop (P F)) a₁ ⟹ α
f₁ : PFunctor.B (MvPFunctor.last (P F)) a₁ → MvPFunctor.W (P F) α
⊢ abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a₀ f'₀ f₀)) =
      abs (MvPFunctor.wDest' (P F) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)) →
    WEquiv (MvPFunctor.wMk (P F) a₀ f'₀ f₀) (MvPFunctor.wMk (P F) a₁ f'₁ f₁)

Next tactic:
apply WEquiv.abs
theorem wEquiv.refl {α : TypeVec n} (x : q.P.W α) : WEquiv x x := by
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : MvPFunctor.W (P F) α
⊢ WEquiv x x

Next tactic:
apply q.P.w_cases _ x
theorem wEquiv.refl {α : TypeVec n} (x : q.P.W α) : WEquiv x x := by
  apply q.P.w_cases _ x; 

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : MvPFunctor.W (P F) α
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α),
    WEquiv (MvPFunctor.wMk (P F) a f' f) (MvPFunctor.wMk (P F) a f' f)

Next tactic:
intro a f' f
theorem wEquiv.refl {α : TypeVec n} (x : q.P.W α) : WEquiv x x := by
  apply q.P.w_cases _ x; intro a f' f; 

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
⊢ WEquiv (MvPFunctor.wMk (P F) a f' f) (MvPFunctor.wMk (P F) a f' f)

Next tactic:
exact WEquiv.abs a f' f a f' f rfl
theorem wEquiv.symm {α : TypeVec n} (x y : q.P.W α) : WEquiv x y → WEquiv y x := by
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
x y : MvPFunctor.W (P F) α
⊢ WEquiv x y → WEquiv y x

Next tactic:
intro h