Theorem: MvQPF.recF_eq_of_wEquiv
File: Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean

tactic: apply q.P.w_cases _ x
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
β : Type u
u : F (α ::: β) → β
x y : MvPFunctor.W (P F) α
⊢ WEquiv x y → recF u x = recF u y

tactic: intro a₀ f'₀ f₀
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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

tactic: apply q.P.w_cases _ y
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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

tactic: intro a₁ f'₁ f₁
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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)

tactic: intro h
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁)

tactic: refine' @WEquiv.recOn _ _ _ _ _ (λ a a' _ => recF u a = recF u a') _ _ h _ _ _
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁)

tactic: intros a f' f₀ f₁ _h ih
state_before: case refine'_1
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁))

tactic: simp only [recF_eq, Function.comp]
state_before: case refine'_1
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁)

tactic: congr
state_before: case refine'_1
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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) })

tactic: funext
state_before: case refine'_1.e_a.e_a.e_snd
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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)

tactic: congr
state_before: case refine'_1.e_a.e_a.e_snd.h.h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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✝

tactic: funext
state_before: case refine'_1.e_a.e_a.e_snd.h.h.e_g
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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)

tactic: apply ih
state_before: case refine'_1.e_a.e_a.e_snd.h.h.e_g.h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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✝)

tactic: intros a₀ f'₀ f₀ a₁ f'₁ f₁ h
state_before: case refine'_2
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁))

tactic: simp only [recF_eq', abs_map, MvPFunctor.wDest'_wMk, h]
state_before: case refine'_2
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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₁)

tactic: intros x y z _e₁ _e₂ ih₁ ih₂
state_before: case refine'_3
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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)

tactic: exact Eq.trans ih₁ ih₂
state_before: case refine'_3
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec 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