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

tactic: apply Quot.ind
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
⊢ ∀ (x : Fix F α), g₁ x = g₂ x
state_after: case mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
⊢ ∀ (a : (P F).W α), g₁ (Quot.mk Setoid.r a) = g₂ (Quot.mk Setoid.r a)

tactic: intro x
state_before: case mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
⊢ ∀ (a : (P F).W α), g₁ (Quot.mk Setoid.r a) = g₂ (Quot.mk Setoid.r a)
state_after: case mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
⊢ g₁ (Quot.mk Setoid.r x) = g₂ (Quot.mk Setoid.r x)

tactic: apply q.P.w_ind _ x
state_before: case mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
⊢ g₁ (Quot.mk Setoid.r x) = g₂ (Quot.mk Setoid.r x)
state_after: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
⊢ ∀ (a : (P F).A) (f' : (P F).drop.B a ⟹ α) (f : (P F).last.B a → (P F).W α),
    (∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))) →
      g₁ (Quot.mk Setoid.r ((P F).wMk a f' f)) = g₂ (Quot.mk Setoid.r ((P F).wMk a f' f))

tactic: intro a f' f ih
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
⊢ ∀ (a : (P F).A) (f' : (P F).drop.B a ⟹ α) (f : (P F).last.B a → (P F).W α),
    (∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))) →
      g₁ (Quot.mk Setoid.r ((P F).wMk a f' f)) = g₂ (Quot.mk Setoid.r ((P F).wMk a f' f))
state_after: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ (Quot.mk Setoid.r ((P F).wMk a f' f)) = g₂ (Quot.mk Setoid.r ((P F).wMk a f' f))

tactic: show g₁ ⟦q.P.wMk a f' f⟧ = g₂ ⟦q.P.wMk a f' f⟧
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ (Quot.mk Setoid.r ((P F).wMk a f' f)) = g₂ (Quot.mk Setoid.r ((P F).wMk a f' f))
state_after: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ ⟦(P F).wMk a f' f⟧ = g₂ ⟦(P F).wMk a f' f⟧

tactic: rw [← Fix.ind_aux a f' f]
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ ⟦(P F).wMk a f' f⟧ = g₂ ⟦(P F).wMk a f' f⟧
state_after: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ (mk (abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩)) = g₂ (mk (abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩))

tactic: apply h
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ g₁ (mk (abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩)) = g₂ (mk (abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩))
state_after: case a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ (TypeVec.id ::: g₁) <$$> abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩ =
    (TypeVec.id ::: g₂) <$$> abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩

tactic: rw [← abs_map, ← abs_map, MvPFunctor.map_eq, MvPFunctor.map_eq]
state_before: case a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ (TypeVec.id ::: g₁) <$$> abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩ =
    (TypeVec.id ::: g₂) <$$> abs ⟨a, (P F).appendContents f' fun x => ⟦f x⟧⟩
state_after: case a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ abs ⟨a, (TypeVec.id ::: g₁) ⊚ (P F).appendContents f' fun x => ⟦f x⟧⟩ =
    abs ⟨a, (TypeVec.id ::: g₂) ⊚ (P F).appendContents f' fun x => ⟦f x⟧⟩

tactic: congr 2
state_before: case a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ abs ⟨a, (TypeVec.id ::: g₁) ⊚ (P F).appendContents f' fun x => ⟦f x⟧⟩ =
    abs ⟨a, (TypeVec.id ::: g₂) ⊚ (P F).appendContents f' fun x => ⟦f x⟧⟩
state_after: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ ((TypeVec.id ::: g₁) ⊚ (P F).appendContents f' fun x => ⟦f x⟧) =
    (TypeVec.id ::: g₂) ⊚ (P F).appendContents f' fun x => ⟦f x⟧

tactic: rw [MvPFunctor.appendContents, appendFun, appendFun, ← splitFun_comp, ← splitFun_comp]
state_before: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ ((TypeVec.id ::: g₁) ⊚ (P F).appendContents f' fun x => ⟦f x⟧) =
    (TypeVec.id ::: g₂) ⊚ (P F).appendContents f' fun x => ⟦f x⟧
state_after: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ splitFun (TypeVec.id ⊚ f') (g₁ ∘ fun x => ⟦f x⟧) = splitFun (TypeVec.id ⊚ f') (g₂ ∘ fun x => ⟦f x⟧)

tactic: have : (g₁ ∘ fun x => ⟦f x⟧) = g₂ ∘ fun x => ⟦f x⟧ := by
  ext x
  exact ih x
state_before: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ splitFun (TypeVec.id ⊚ f') (g₁ ∘ fun x => ⟦f x⟧) = splitFun (TypeVec.id ⊚ f') (g₂ ∘ fun x => ⟦f x⟧)
state_after: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
this : (g₁ ∘ fun x => ⟦f x⟧) = g₂ ∘ fun x => ⟦f x⟧
⊢ splitFun (TypeVec.id ⊚ f') (g₁ ∘ fun x => ⟦f x⟧) = splitFun (TypeVec.id ⊚ f') (g₂ ∘ fun x => ⟦f x⟧)

tactic: rw [this]
state_before: case a.e_a.e_snd
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
this : (g₁ ∘ fun x => ⟦f x⟧) = g₂ ∘ fun x => ⟦f x⟧
⊢ splitFun (TypeVec.id ⊚ f') (g₁ ∘ fun x => ⟦f x⟧) = splitFun (TypeVec.id ⊚ f') (g₂ ∘ fun x => ⟦f x⟧)
state_after: no goals

tactic: ext x
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
⊢ (g₁ ∘ fun x => ⟦f x⟧) = g₂ ∘ fun x => ⟦f x⟧
state_after: case h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x✝ : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
x : (P F).last.B a
⊢ (g₁ ∘ fun x => ⟦f x⟧) x = (g₂ ∘ fun x => ⟦f x⟧) x

tactic: exact ih x
state_before: case h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g₁ g₂ : Fix F α → β
h : ∀ (x : F (α ::: Fix F α)), (TypeVec.id ::: g₁) <$$> x = (TypeVec.id ::: g₂) <$$> x → g₁ (mk x) = g₂ (mk x)
x✝ : (P F).W α
a : (P F).A
f' : (P F).drop.B a ⟹ α
f : (P F).last.B a → (P F).W α
ih : ∀ (i : (P F).last.B a), g₁ (Quot.mk Setoid.r (f i)) = g₂ (Quot.mk Setoid.r (f i))
x : (P F).last.B a
⊢ (g₁ ∘ fun x => ⟦f x⟧) x = (g₂ ∘ fun x => ⟦f x⟧) x
state_after: no goals