Download data/lean/OAI/MathematicalPhysics/AlternatingFlow/ConstructiveBounds.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 19.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/AlternatingFlow/ConstructiveBounds.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MathematicalPhysics/AlternatingFlow/ConstructiveBounds.lean
-
curl -L -o ConstructiveBounds.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/AlternatingFlow/ConstructiveBounds.lean
19.7 kB
| import OAI.MathematicalPhysics.AlternatingFlow.DecoderNames | |
| import OAI.MathematicalPhysics.AlternatingFlow.RecursiveBounds | |
| namespace OAI | |
| section ConstructiveBoundsDevelopment | |
| open scoped BigOperators Topology ContDiff | |
| open Filter | |
| namespace AlternatingNS.Effective | |
| attribute [local instance] Arithmetic.rationalCoding | |
| variable {A : Type*} [Primcodable A] | |
| lemma Scaled.nat {s : A β β β β} (hs : β a n, 0 β€ s a n) | |
| (c : A β β) (hc : Computable c) : Scaled s (fun a _ (_ : β) => (c a : β)) := | |
| Scaled.const hs _ c hc (by intro a n; simp) | |
| lemma Scaled.cmul {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| {s : A β β β β} (hs : β a n, 0 β€ s a n) {f : A β β β E β β} | |
| (hf : Scaled s f) (c : β) (B : β) (hc : |c| β€ B) : | |
| Scaled s (fun a n x => c * f a n x) := | |
| hf.smul hs (fun _ _ => c) (fun _ => B) (Computable.const B) (fun _ _ => hc) | |
| lemma Scaled.affine {s : A β β β β} (hs : β a n, 0 β€ s a n) | |
| {f : A β β β β} (hf : Scaled (fun _ _ => 1) (fun a _ => f a)) | |
| (c d : A β β β β) (B : A β β) (hB : Computable B) | |
| (hc : β a n, |c a n| β€ (B a : β) * s a n) : | |
| Scaled s (fun a n x => f a (c a n * x + d a n)) := by | |
| obtain β¨sf,C,hC,hfCβ© := hf | |
| refine β¨fun a n => (sf a 0).comp (contDiff_const.mul contDiff_id |>.add contDiff_const), | |
| fun z => C z * B z.1 ^ z.2, | |
| Primrec.nat_mul.to_comp.comp hC (nat_pow.to_comp.comp (hB.comp Computable.fst) Computable.snd), | |
| fun a r n x => ?_β© | |
| change βiteratedFDeriv β r ((fun y => f a (y + d a n)) β | |
| (c a n β’ ContinuousLinearMap.id β β)) xβ β€ _ | |
| apply (Bounds.norm_comp_linear _ ((sf a 0).comp (contDiff_id.add contDiff_const)) _ r x).trans | |
| change βiteratedFDeriv β r (fun y => f a (y + d a n)) (c a n * x)β * | |
| βc a n β’ ContinuousLinearMap.id β ββ ^ r β€ _ | |
| rw [iteratedFDeriv_comp_add_right] | |
| simp only [norm_smul, Real.norm_eq_abs, ContinuousLinearMap.norm_id, mul_one] | |
| push_cast | |
| calc | |
| _ β€ (C (a,r) : β) * ((B a : β) * s a n) ^ r := by | |
| rw [mul_comm, mul_comm (C (a,r) : β)] | |
| exact mul_le_mul (pow_le_pow_leftβ (abs_nonneg _) (hc a n) r) | |
| (by simpa using hfC a r 0 (c a n * x + d a n)) (norm_nonneg _) | |
| (pow_nonneg (mul_nonneg (Nat.cast_nonneg _) (hs a n)) r) | |
| _ = _ := by ring | |
| lemma transition_scaled : Scaled (fun _ : Unit => fun _ => 1) | |
| (fun _ _ => Real.smoothTransition) := | |
| β¨fun _ _ => Real.smoothTransition.contDiff, fun z => Quantitative.transitionBound z.2, | |
| transitionBound.to_comp.comp Computable.snd, by intro _ r n x; simpa using Quantitative.transition_jet_bound r xβ© | |
| lemma selector_scaled (b a : A β β) (hB : Computable b) : | |
| Scaled (fun _ _ => 1) (fun p _ => Profiles.selector (b p) (a p)) := by | |
| have hT := transition_scaled.param (fun _ : A => ()) (Computable.const ()) | |
| have hβ := hT.affine (fun _ _ => zero_le_one) (fun p _ => 8 * (b p : β)) | |
| (fun p _ => 2 - 16 * (a p : β)) (fun p => 8 * b p) | |
| (Primrec.nat_mul.to_comp.comp (Computable.const 8) hB) (by intro p n; simp) | |
| have hβ := hT.affine (fun _ _ => zero_le_one) (fun p _ => -(8 * (b p : β))) | |
| (fun p _ => 16 * (a p : β) + 10) (fun p => 8 * b p) | |
| (Primrec.nat_mul.to_comp.comp (Computable.const 8) hB) (by intro p n; simp) | |
| exact (hβ.mul (fun _ _ => zero_le_one) hβ).congr (by intros; dsimp [Profiles.selector]; congr 2 <;> ring) | |
| lemma decoder_scaled : Scaled (fun _ : Machine => fun _ => 1) | |
| (fun M _ => Profiles.decoder M.base) := by | |
| refine β¨fun M _ => Profiles.decoder_smooth M.base (by have := M.base_ge_four; omega), | |
| fun z => Quantitative.decoderBound z.1.base z.2, | |
| decoderBound.to_comp.comp (base.to_comp.comp Computable.fst) Computable.snd, ?_β© | |
| intro M r n x | |
| simp only [one_pow, mul_one] | |
| exact Quantitative.decoder_jet_bound M.base (by have := M.base_ge_four; omega) r x | |
| lemma read_scaled (M : A β Machine) (N : A β β) (hM : Computable M) | |
| (k : A β β β β) (hk : β a n, k a n β€ Scales.s (N a) n + 1 + Scales.K (N a) n) : | |
| Scaled (fun a => Bounds.readScale (M a) (N a)) | |
| (fun a n D => Profiles.decoder (M a).base (((M a).base : β) ^ k a n * D)) := by | |
| apply (decoder_scaled.param M hM).comp_scaled_linear (fun a => Bounds.readScale_nonneg _ _) | |
| (fun a n => ((M a).base : β) ^ k a n β’ ContinuousLinearMap.id β β) | |
| intro a n | |
| have hb : (1 : β) β€ (M a).base := by have := (M a).base_ge_four; exact_mod_cast (by omega : 1 β€ (M a).base) | |
| simpa only [norm_smul, Real.norm_eq_abs, abs_of_nonneg (pow_nonneg (le_trans zero_le_one hb) _), | |
| ContinuousLinearMap.norm_id, mul_one, Bounds.readScale] using pow_le_pow_rightβ hb (hk a n) | |
| lemma readC_scaled (M : A β Machine) (N : A β β) (hM : Computable M) : | |
| Scaled (fun a => Bounds.readScale (M a) (N a)) (fun a => LocalRule.readC (M a) (N a)) := | |
| read_scaled M N hM (fun a => Scales.s (N a)) (by intros; omega) | |
| lemma readB_scaled (M : A β Machine) (N : A β β) (hM : Computable M) : | |
| Scaled (fun a => Bounds.readScale (M a) (N a)) (fun a => LocalRule.readB (M a) (N a)) := | |
| read_scaled M N hM _ (by intros; rfl) | |
| lemma readA_scaled (M : A β Machine) (N : A β β) (hM : Computable M) : | |
| Scaled (fun a => Bounds.readScale (M a) (N a)) (fun a => LocalRule.readA (M a) (N a)) := | |
| (read_scaled M N hM (fun a n => Scales.s (N a) n + 1) (by intros; omega)).sub | |
| ((readB_scaled M N hM).smul (fun a => Bounds.readScale_nonneg _ _) _ | |
| (fun _ => 1) (Computable.const 1) (fun a n => by simpa using Bounds.inverse_power_bound (M a) (Scales.K (N a) n))) | |
| lemma updates_scaled (M : A β Machine) (N a l : A β β) (r : A β Rule) | |
| (hM : Computable M) (ha : Computable a) (hl : Computable l) (hr : Computable r) : | |
| Scaled (fun p => Bounds.readScale (M p) (N p)) | |
| (fun p n D => LocalRule.updateLeft (M p).base (a p) (l p) (r p) | |
| (LocalRule.readA (M p) (N p) n D) (LocalRule.readB (M p) (N p) n D)) β§ | |
| Scaled (fun p => Bounds.readScale (M p) (N p)) | |
| (fun p n D => LocalRule.updateRight (M p).base (a p) (l p) (r p) | |
| (LocalRule.readA (M p) (N p) n D) (LocalRule.readB (M p) (N p) n D)) := by | |
| let s := fun p => Bounds.readScale (M p) (N p) | |
| have hs : β p n, 0 β€ s p n := fun p => Bounds.readScale_nonneg _ _ | |
| have hhA := readA_scaled M N hM | |
| have hhB := readB_scaled M N hM | |
| have cb := base.to_comp.comp hM | |
| have hrw := Computable.fst.comp (Computable.snd.comp hr) | |
| have hb (p : A) (n : β) : |((M p).base : β)| β€ ((M p).base : β) := by simp | |
| have hdiv {f : A β β β β β β} (hf : Scaled s f) : | |
| Scaled s (fun p n D => f p n D / (M p).base) := by | |
| have h := hf.smul hs (fun p _ => ((M p).base : β)β»ΒΉ) (fun _ => 1) (Computable.const 1) | |
| (fun p _ => by simpa using Bounds.inverse_power_bound (M p) 1) | |
| exact h.congr (by intros; simp [div_eq_mul_inv, mul_comm]) | |
| have h2l := Scaled.nat hs (fun p => 2 * l p) (Primrec.nat_mul.to_comp.comp (Computable.const 2) hl) | |
| have h2a := Scaled.nat hs (fun p => 2 * a p) (Primrec.nat_mul.to_comp.comp (Computable.const 2) ha) | |
| have h2w := Scaled.nat hs (fun p => 2 * (r p).2.1) (Primrec.nat_mul.to_comp.comp (Computable.const 2) hrw) | |
| have hLeft := ((hhA.smul hs (fun p _ => ((M p).base : β)) (fun p => (M p).base) cb hb).sub h2l).ite hs | |
| (hhA.ite hs (hdiv (h2w.add hhA)) (fun p _ => (r p).2.2 = 1)) (fun p _ => (r p).2.2 = 0) | |
| have hR := (hhB.smul hs (fun p _ => ((M p).base : β)) (fun p => (M p).base) cb hb).sub h2a | |
| have hRight := (hdiv (h2l.add (hdiv (h2w.add hR)))).ite hs | |
| ((hdiv (h2w.add hR)).ite hs hR (fun p _ => (r p).2.2 = 1)) (fun p _ => (r p).2.2 = 0) | |
| constructor | |
| Β· exact hLeft.congr (by intro p n x; dsimp [LocalRule.updateLeft]; push_cast; split_ifs <;> rfl) | |
| Β· exact hRight.congr (by intro p n x; dsimp [LocalRule.updateRight]; push_cast; split_ifs <;> rfl) | |
| lemma branchNumerator_scaled (M : A β Machine) (N a l : A β β) (r : A β Rule) | |
| (hM : Computable M) (ha : Computable a) (hl : Computable l) (hr : Computable r) : | |
| Scaled (fun p => Bounds.readScale (M p) (N p)) | |
| (fun p n D => LocalRule.branchNumerator (M p).base (Scales.K (N p) (n+1)) (a p) (l p) (r p) | |
| (LocalRule.readA (M p) (N p) n D) (LocalRule.readB (M p) (N p) n D)) := by | |
| have hs := fun p => Bounds.readScale_nonneg (M p) (N p) | |
| obtain β¨hl',hr'β© := updates_scaled M N a l r hM ha hl hr | |
| exact ((Scaled.nat hs (fun p => 2 * (r p).1) | |
| (Primrec.nat_mul.to_comp.comp (Computable.const 2) (Computable.fst.comp hr))).add hl').add | |
| (hr'.smul hs (fun p n => (((M p).base : β) ^ Scales.K (N p) (n+1))β»ΒΉ) | |
| (fun _ => 1) (Computable.const 1) (fun p n => by simpa using Bounds.inverse_power_bound (M p) (Scales.K (N p) (n+1)))) | |
| attribute [local irreducible] LocalRule.readA LocalRule.readB LocalRule.readC | |
| Profiles.selector LocalRule.branchNumerator | |
| lemma branch_scaled (M : A β Machine) (N q a : A β β) | |
| (hM : Computable M) (hq : Computable q) (ha : Computable a) : | |
| Scaled (fun p => Bounds.readScale (M p) (N p)) | |
| (fun p n D => LocalRule.branch (M p) (N p) n (q p) (a p) | |
| (LocalRule.readA (M p) (N p) n D) (LocalRule.readB (M p) (N p) n D)) := by | |
| have hs := fun p => Bounds.readScale_nonneg (M p) (N p) | |
| let r := fun p => (M p).command (q p) (a p) | |
| have hr : Computable r := command.to_comp.comp (hM.pair (hq.pair ha)) | |
| have hb := base.to_comp.comp hM | |
| have hread := (readA_scaled M N hM).param | |
| (Prod.fst : A Γ β β A) Computable.fst | |
| have hout : Scaled (fun _ : A Γ β => fun _ => (1:β)) (fun p _ => Profiles.selector (M p.1).base p.2) := selector_scaled (fun p : A Γ β => (M p.1).base) Prod.snd (hb.comp Computable.fst) | |
| have hsel : Scaled (fun p : A Γ β => Bounds.readScale (M p.1) (N p.1)) | |
| (fun p n => Profiles.selector (M p.1).base p.2 β LocalRule.readA (M p.1) (N p.1) n) := | |
| Scaled.comp (A := A Γ β) (E := β) (F := β) (G := β) | |
| (s := fun p => Bounds.readScale (M p.1) (N p.1)) | |
| (f := fun p => LocalRule.readA (M p.1) (N p.1)) | |
| (g := fun p => Profiles.selector (M p.1).base p.2) (fun p => hs p.1) hread hout | |
| have hnum := branchNumerator_scaled (fun p : A Γ β => M p.1) (fun p => N p.1) | |
| (fun p => a p.1) Prod.snd (fun p => r p.1) (hM.comp Computable.fst) | |
| (ha.comp Computable.fst) Computable.snd (hr.comp Computable.fst) | |
| let S := fun (p : A Γ β) n => Profiles.selector (M p.1).base p.2 β LocalRule.readA (M p.1) (N p.1) n | |
| let V := fun (p : A Γ β) n D => LocalRule.branchNumerator (M p.1).base (Scales.K (N p.1) (n+1)) (a p.1) p.2 (r p.1) | |
| (LocalRule.readA (M p.1) (N p.1) n D) (LocalRule.readB (M p.1) (N p.1) n D) | |
| have hprod : Scaled (fun p : A Γ β => Bounds.readScale (M p.1) (N p.1)) (fun p n D => S p n D * V p n D) := | |
| Scaled.mul (A := A Γ β) (E := β) (s := fun p => Bounds.readScale (M p.1) (N p.1)) (f := S) (g := V) (fun p => hs p.1) hsel hnum | |
| have hsum := hprod.sum_range hs | |
| (fun p => (M p).alphabet) (alphabet.to_comp.comp hM) | |
| exact (hsum.ite hs (branchNumerator_scaled M N a (fun _ => 0) r hM ha (Computable.const 0) hr) | |
| (fun p _ => (r p).2.2 = 0)).congr (by intros; simp only [LocalRule.branch, S, V, r, Function.comp_apply, ite_apply]) | |
| attribute [local irreducible] LocalRule.branch | |
| lemma writeCore_scaled : Scaled (fun p : Machine Γ β => Bounds.readScale p.1 p.2) | |
| (fun p => Bounds.writeCore p.1 p.2) := by | |
| let A := ((Machine Γ β) Γ β) Γ β | |
| let M := fun p : A => p.1.1.1 | |
| let N := fun p : A => p.1.1.2 | |
| let q := fun p : A => p.1.2 | |
| let a := fun p : A => p.2 | |
| have hM : Computable M := Computable.fst.comp (Computable.fst.comp Computable.fst) | |
| have hq : Computable q := Computable.snd.comp Computable.fst | |
| have ha : Computable a := Computable.snd | |
| have hs := fun p => Bounds.readScale_nonneg (M p) (N p) | |
| have hC := (readC_scaled M N hM).comp (A := A) (E := β) (F := β) (G := β) (s := fun p => Bounds.readScale (M p) (N p)) (g := fun p => Profiles.selector (M p).base (q p)) hs (selector_scaled (fun p => (M p).base) q (base.to_comp.comp hM)) | |
| have hB := (readB_scaled M N hM).comp (A := A) (E := β) (F := β) (G := β) (s := fun p => Bounds.readScale (M p) (N p)) (g := fun p => Profiles.selector (M p).base (a p)) hs (selector_scaled (fun p => (M p).base) a (base.to_comp.comp hM)) | |
| have hsum := ((hC.mul (E := β) hs hB).mul (E := β) hs (branch_scaled M N q a hM hq ha)).sum_range | |
| (fun p : (Machine Γ β) Γ β => Bounds.readScale_nonneg p.1.1 p.1.2) | |
| (fun p => p.1.1.alphabet) (alphabet.to_comp.comp (Computable.fst.comp Computable.fst)) | |
| have hsum' := hsum.sum_range (fun p : Machine Γ β => Bounds.readScale_nonneg p.1 p.2) | |
| (fun p => p.1.states + 1) (Computable.succ.comp (states.to_comp.comp Computable.fst)) | |
| exact (hsum'.smul (A := Machine Γ β) (E := β) (F := β) (fun p => Bounds.readScale_nonneg p.1 p.2) (fun p _ => 1 / (p.1.base : β)) | |
| (fun _ => 1) (Computable.const 1) (fun p _ => by simpa using Bounds.inverse_power_bound p.1 1)).congr | |
| (by intros; rfl) | |
| lemma haltWeight_scaled : Scaled (fun p : Machine Γ β => Bounds.readScale p.1 p.2) | |
| (fun p => LocalRule.haltWeight p.1 p.2) := by | |
| have hs := fun p : (Machine Γ β) Γ β => Bounds.readScale_nonneg p.1.1 p.1.2 | |
| have h := (readC_scaled (fun p : (Machine Γ β) Γ β => p.1.1) (fun p => p.1.2) | |
| (Computable.fst.comp Computable.fst)).comp (A := (Machine Γ β) Γ β) (s := fun p => Bounds.readScale p.1.1 p.1.2) (E := β) (F := β) (G := β) (g := fun p : (Machine Γ β) Γ β => Profiles.selector p.1.1.base p.2) hs | |
| (selector_scaled (fun p : (Machine Γ β) Γ β => p.1.1.base) Prod.snd (base.to_comp.comp (Computable.fst.comp Computable.fst))) | |
| have hzero : Scaled (fun p : (Machine Γ β) Γ β => Bounds.readScale p.1.1 p.1.2) | |
| (fun _ _ (_ : β) => (0 : β)) := Scaled.const hs _ (fun _ => 0) (Computable.const 0) (by intros; simp) | |
| have hi := (h.ite (A := (Machine Γ β) Γ β) (E := β) (F := β) hs hzero (fun p _ => p.2 = p.1.1.states β¨ p.2 β p.1.1.haltingStates)).sum_range (A := Machine Γ β) (E := β) (F := β) | |
| (fun p => Bounds.readScale_nonneg p.1 p.2) (fun p => p.1.states + 1) | |
| (Computable.succ.comp (states.to_comp.comp Computable.fst)) | |
| exact hi.congr (by intros; simp only [LocalRule.haltWeight, Function.comp_apply, ite_apply]) | |
| lemma Scaled.coord {s : A β β β β} (hs : β a n, 0 β€ s a n) | |
| {f : A β β β β β β} (hf : Scaled s f) (idx : A β β β Fin 3) : | |
| Scaled s (fun a n (x : Space) => f a n (x (idx a n))) := by | |
| apply hf.comp_linear (E := β) (F := β) (G := Space) hs | |
| (fun a n => PiLp.proj 2 (π := β) (fun _ : Fin 3 => β) (idx a n)) | |
| (fun _ => 1) (Computable.const 1) | |
| intro a n | |
| simp only [Nat.cast_one] | |
| apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one | |
| intro x | |
| simpa only [one_mul, PiLp.proj_apply] using PiLp.norm_apply_le x (idx a n) | |
| lemma cutoff_scaled : Scaled (fun _ : Unit => fun _ => 1) (fun _ _ => Spatial.cutoff) := by | |
| have hβ := transition_scaled.affine (fun _ _ => zero_le_one) | |
| (fun _ _ => -1) (fun _ _ => 3) (fun _ => 1) (Computable.const 1) (by intros; norm_num) | |
| have hβ := transition_scaled.affine (fun _ _ => zero_le_one) | |
| (fun _ _ => 1) (fun _ _ => 3) (fun _ => 1) (Computable.const 1) (by intros; norm_num) | |
| have h := hβ.mul (E := β) (fun _ _ => zero_le_one) hβ | |
| have hi (i : Fin 3) := h.coord (fun _ _ => zero_le_one) (fun _ _ => i) | |
| exact (((hi 0).mul (E := Space) (fun _ _ => zero_le_one) (hi 1)).mul | |
| (E := Space) (fun _ _ => zero_le_one) (hi 2)).congr | |
| (by intro p n x; simp [Spatial.cutoff, Fin.prod_univ_succ, mul_assoc, sub_eq_add_neg, | |
| add_comm]) | |
| lemma coord_jet_on_box (i : Fin 3) (r : β) (x : Space) (hx : x β Spatial.box) : | |
| βiteratedFDeriv β r (fun x : Space => x i) xβ β€ 3 := by | |
| cases r with | |
| | zero => simpa using hx i | |
| | succ r => | |
| let L := PiLp.proj 2 (π := β) (fun _ : Fin 3 => β) i | |
| have hd : fderiv β (fun x : Space => x i) = fun _ => L := by | |
| funext x; exact (Spatial.coord_hasFDeriv i x).fderiv | |
| rw [β norm_iteratedFDeriv_fderiv, hd] | |
| cases r with | |
| | zero => | |
| simp only [norm_iteratedFDeriv_zero] | |
| have hL : βLβ β€ 1 := ContinuousLinearMap.opNorm_le_bound _ zero_le_one | |
| (fun y => by simpa only [L, PiLp.proj_apply, one_mul] using PiLp.norm_apply_le y i) | |
| linarith | |
| | succ r => rw [iteratedFDeriv_const_of_ne (Nat.succ_ne_zero _), Pi.zero_apply, norm_zero]; norm_num | |
| lemma cutoff_coordinate_scaled (idx : A β β β Fin 3) : | |
| Scaled (fun _ _ => 1) (fun a n (x : Space) => Spatial.cutoff x * x (idx a n)) := by | |
| obtain β¨_,B,hB,hcutβ© := cutoff_scaled | |
| have hc : Computable (fun r => B ((),r)) := hB.comp ((Computable.const ()).pair Computable.id) | |
| let C := fun r => β i β Finset.range (r+1), r.choose i * B ((),i) * 3 | |
| have hi : Computableβ (fun r i : β => r.choose i * B ((),i) * 3) := | |
| Primrec.nat_mul.to_comp.comp (Primrec.nat_mul.to_comp.comp | |
| (choose.to_comp.comp Computable.fst Computable.snd) (hc.comp Computable.snd)) (Computable.const 3) | |
| have hC : Computable C := (nat_sum_range hi).comp Computable.id Computable.succ | |
| refine β¨fun a n => Spatial.cutoff_smooth.mul (Spatial.coord_smooth (idx a n)), | |
| fun z => C z.2, hC.comp Computable.snd, fun a r n x => ?_β© | |
| simp only [one_pow, mul_one] | |
| by_cases hx : x β Spatial.box | |
| Β· apply (norm_iteratedFDeriv_mul_le Spatial.cutoff_smooth (Spatial.coord_smooth (idx a n)) x | |
| (WithTop.coe_le_coe.mpr le_top : (r : ββΟ) β€ β)).trans | |
| simp only [C, Nat.cast_sum, Nat.cast_mul, Nat.cast_ofNat] | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| exact mul_le_mul (mul_le_mul_of_nonneg_left (by simpa using hcut () i 0 x) (Nat.cast_nonneg _)) | |
| (coord_jet_on_box _ _ _ hx) (norm_nonneg _) (by positivity) | |
| Β· have hn : x β tsupport (fun x : Space => Spatial.cutoff x * x (idx a n)) := | |
| fun h => hx (Spatial.cutoff_support (tsupport_mul_subset_left h)) | |
| rw [image_eq_zero_of_notMem_tsupport (fun h => hn (tsupport_iteratedFDeriv_subset r h)), norm_zero] | |
| positivity | |
| lemma fixedPotential_scaled : Scaled (fun _ : Unit => fun _ => 1) (fun _ => Bounds.fixedPotential) := | |
| ((cutoff_coordinate_scaled (fun _ : Unit => Construction.receiverIndex)).cmul | |
| (fun _ _ => zero_le_one) (-1) 1 (by norm_num)).congr (by intros; simp [Bounds.fixedPotential]) | |
| lemma Scaled.grow {E F : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedAddCommGroup F] [NormedSpace β F] | |
| {s : A β β β β} (hs : β a n, 1 β€ s a n) {f : A β β β E β F} | |
| (hf : Scaled (fun _ _ => 1) f) : Scaled s f := by | |
| obtain β¨sf,B,hB,hfBβ© := hf | |
| refine β¨sf,B,hB,fun a r n x => ?_β© | |
| have h : βiteratedFDeriv β r (f a n) xβ β€ (B (a,r) : β) := by simpa using hfB a r n x | |
| exact h.trans (le_mul_of_one_le_right (Nat.cast_nonneg _) (one_le_powβ (hs a n))) | |
| lemma corePotential_scaled : Scaled (fun p : Machine Γ β => Bounds.readScale p.1 p.2) | |
| (fun p => Bounds.corePotential p.1 p.2) := by | |
| have hs := fun p : Machine Γ β => Bounds.readScale_nonneg p.1 p.2 | |
| have h (idx : (Machine Γ β) β β β Fin 3) := | |
| (cutoff_coordinate_scaled idx).grow (A := Machine Γ β) (E := Space) (F := β) (s := fun p => Bounds.readScale p.1 p.2) (fun p => Bounds.readScale_ge_one p.1 p.2) | |
| have hw := writeCore_scaled.coord hs (fun _ => Construction.donorIndex) | |
| have hh := (haltWeight_scaled.coord hs (fun _ => Construction.donorIndex)).cmul hs 2 2 (by norm_num) | |
| exact ((h (fun _ _ => 0)).mul (E := Space) hs hw).sub | |
| ((h (fun _ => Construction.receiverIndex)).mul (E := Space) hs hh) | |
| end AlternatingNS.Effective | |
| end ConstructiveBoundsDevelopment | |
| end OAI | |