theoremscalarHierarchy_compress (n : ℕ) {r : ℕ} (e : Fin r →Fin n)
(he : StrictMono e) (m v : Fin n →ℝ)
(hv : ∀ t, (∀ j, e j ≠ t) → v t = 0) (f : ℝ→ℝ) :
scalarHierarchy n m v f = scalarHierarchy r (m ∘ e) (v ∘ e) f :=by
proof · 63
lines
induction n generalizing r f with
| zero =>
cases r with
| zero => rfl
| succ r => exact Fin.elim0 (e 0)
| succ n ih =>
cases r with
| zero =>havehlast : v (Fin.last n) = 0:= hv _ (fun j =>Fin.elim0 j)
simp only [scalarHierarchy,hlast,scalarStep_zero]
exact ih (fun j =>Fin.elim0 j) (fun a =>Fin.elim0 a)
(fun i => m i.castSucc) (fun i => v i.castSucc)
(fun t _ => hv t.castSucc (fun j =>Fin.elim0 j)) f
| succ r =>by_cases hlast : e (Fin.last r) = Fin.last n
· have hlt (i : Fin r) : (e i.castSucc).val < n :=byhaveH:= he (Fin.castSucc_lt_last i)
rw [hlast] at H
exact Hlete' : Fin r →Fin n :=fun i => ⟨(e i.castSucc).val,hlt i⟩
have hcast (i : Fin r) : (e' i).castSucc = e i.castSucc :=Fin.ext rfl
havehe' : StrictMono e' :=by
intro a b hab
exact he (show a.castSucc < b.castSucc from hab)
have hv' (t : Fin n) (ht : ∀ j, e' j ≠ t) : v t.castSucc = 0:=by
apply hv
intro j
refine Fin.lastCases ?_ (fun i => ?_) j
· rw [hlast]
exact (Fin.castSucc_ne_last t).symm
· intro h
exact ht i (Fin.ext (congrArg (funz : Fin (n+1) => z.val) h))
rw [scalarHierarchy,scalarHierarchy,← hlast]
haveH:= ih e' he' (fun i => m i.castSucc) (fun i => v i.castSucc) hv'
(scalarStep (m (e (Fin.last r))) (v (e (Fin.last r))) f)
simpa only [Function.comp_def,hcast] usingH
· have hlt (i : Fin (r+1)) : (e i).val < n :=byhaveH:= he.monotone (Fin.le_last i)
haveH' : (e (Fin.last r)).val < n :=byhaveH'':= (e (Fin.last r)).isLt
haveHne : (e (Fin.last r)).val ≠ n :=by
intro h
exact hlast (Fin.ext h)
omega
exact lt_of_le_of_lt HH'lete' : Fin (r+1) →Fin n :=fun i => ⟨(e i).val,hlt i⟩
have hcast (i : Fin (r+1)) : (e' i).castSucc = e i :=Fin.ext rfl
havehe' : StrictMono e' :=by
intro a b hab
exact he hab
havehzero : v (Fin.last n) = 0:=by
apply hv
intro j h
haveH:= hlt j
rw [h] at H
exact (lt_irrefl n) Hhave hv' (t : Fin n) (ht : ∀ j, e' j ≠ t) : v t.castSucc = 0:=by
apply hv
intro j h
exact ht j (Fin.ext (congrArg (funz : Fin (n+1) => z.val) h))
rw [scalarHierarchy,hzero,scalarStep_zero]
haveH:= ih e' he' (fun i => m i.castSucc) (fun i => v i.castSucc) hv' f
simpa only [Function.comp_def,hcast] usingH