Download data/lean/OAI/Probability/SKBarriers/Calculus/ParameterGrowth.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.55 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKBarriers/Calculus/ParameterGrowth.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/SKBarriers/Calculus/ParameterGrowth.lean
-
curl -L -o ParameterGrowth.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKBarriers/Calculus/ParameterGrowth.lean
6.55 kB
| import Mathlib | |
| import OAI.Probability.SKBarriers.Gaussian.LocalGaussian | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open scoped BigOperators | |
| open MeasureTheory ProbabilityTheory Filter | |
| namespace SK.Analytic | |
| def ParamExpGrowth {P E F : Type} [Norm P] [Norm E] [Norm F] | |
| (f : P Γ E β F) : Prop := | |
| β R : β, β C M : β, 0 β€ C β§ 0 β€ M β§ | |
| β p e, βpβ β€ R β βf (p,e)β β€ C*Real.exp (M*βeβ) | |
| def ParamLinearGrowth {P E : Type} [Norm P] [Norm E] | |
| (f : P Γ E β β) : Prop := | |
| β R : β, β C : β, 0 β€ C β§ | |
| β p e, βpβ β€ R β |f (p,e)| β€ C*(1+βeβ) | |
| theorem ParamExpGrowth.of_norm_le {P E F G : Type} [Norm P] [Norm E] [Norm F] [Norm G] | |
| {f : P Γ E β F} (hf : ParamExpGrowth f) | |
| {g : P Γ E β G} {K : β} (hK : 0 β€ K) (hg : β z, βg zβ β€ K*βf zβ) : | |
| ParamExpGrowth g := by | |
| intro R | |
| obtain β¨C,M,hC,hM,hfβ© := hf R | |
| refine β¨K*C,M,mul_nonneg hK hC,hM,?_β© | |
| intro p e hp | |
| exact (hg (p,e)).trans ((mul_le_mul_of_nonneg_left (hf p e hp) hK).trans_eq (mul_assoc _ _ _).symm) | |
| section ParameterGrowth | |
| variable {P E F G : Type} [NormedAddCommGroup P] [NormedAddCommGroup E] | |
| [NormedAddCommGroup F] [NormedAddCommGroup G] | |
| theorem ParamExpGrowth.of_bounded {f : P Γ E β F} {C : β} (hC : 0 β€ C) | |
| (hf : β z, βf zβ β€ C) : ParamExpGrowth f := by | |
| intro R | |
| refine β¨C,0,hC,le_rfl,?_β© | |
| intro p e _ | |
| simpa only [zero_mul,Real.exp_zero,mul_one] using hf (p,e) | |
| theorem ParamExpGrowth.add {f g : P Γ E β F} (hf : ParamExpGrowth f) | |
| (hg : ParamExpGrowth g) : ParamExpGrowth (fun z => f z+g z) := by | |
| intro R | |
| obtain β¨C,M,hC,hM,hfβ© := hf R | |
| obtain β¨D,L,hD,hL,hgβ© := hg R | |
| refine β¨C+D,max M L,add_nonneg hC hD,(le_max_left M L).trans' hM,?_β© | |
| intro p e hp | |
| calc | |
| _ β€ βf (p,e)β+βg (p,e)β := norm_add_le _ _ | |
| _ β€ C*Real.exp (M*βeβ)+D*Real.exp (L*βeβ) := add_le_add (hf p e hp) (hg p e hp) | |
| _ β€ C*Real.exp (max M L*βeβ)+D*Real.exp (max M L*βeβ) := by | |
| gcongr <;> first | exact le_max_left _ _ | exact le_max_right _ _ | |
| _ = _ := by ring | |
| theorem ParamExpGrowth.mul {f g : P Γ E β β} (hf : ParamExpGrowth f) | |
| (hg : ParamExpGrowth g) : ParamExpGrowth (fun z => f z*g z) := by | |
| intro R | |
| obtain β¨C,M,hC,hM,hfβ© := hf R | |
| obtain β¨D,L,hD,hL,hgβ© := hg R | |
| refine β¨C*D,M+L,mul_nonneg hC hD,add_nonneg hM hL,?_β© | |
| intro p e hp | |
| calc | |
| βf (p,e)*g (p,e)β = βf (p,e)β*βg (p,e)β := norm_mul _ _ | |
| _ β€ (C*Real.exp (M*βeβ))*(D*Real.exp (L*βeβ)) := | |
| mul_le_mul (hf p e hp) (hg p e hp) (norm_nonneg _) (by positivity) | |
| _ = _ := by rw [add_mul,Real.exp_add]; ring | |
| theorem ParamExpGrowth.norm {f : P Γ E β F} (hf : ParamExpGrowth f) : | |
| ParamExpGrowth (fun z => βf zβ) := by | |
| apply hf.of_norm_le (K := 1) (by norm_num) | |
| intro z | |
| simp | |
| theorem ParamLinearGrowth.exp_mul {f : P Γ E β β} (hf : ParamLinearGrowth f) (m : β) : | |
| ParamExpGrowth (fun z => Real.exp (m*f z)) := by | |
| intro R | |
| obtain β¨C,hC,hfβ© := hf R | |
| refine β¨Real.exp (|m| *C),|m| *C,(Real.exp_pos _).le,mul_nonneg (abs_nonneg _) hC,?_β© | |
| intro p e hp | |
| rw [Real.norm_eq_abs,abs_of_pos (Real.exp_pos _),β Real.exp_add] | |
| apply Real.exp_le_exp.2 | |
| calc | |
| m*f (p,e) β€ |m*f (p,e)| := le_abs_self _ | |
| _ = |m| *|f (p,e)| := abs_mul _ _ | |
| _ β€ |m| *(C*(1+βeβ)) := mul_le_mul_of_nonneg_left (hf p e hp) (abs_nonneg m) | |
| _ = _ := by ring | |
| theorem ParamLinearGrowth.expGrowth {f : P Γ E β β} (hf : ParamLinearGrowth f) : | |
| ParamExpGrowth f := by | |
| intro R | |
| obtain β¨C,hC,hfβ© := hf R | |
| refine β¨C,1,hC,by norm_num,?_β© | |
| intro p e hp | |
| rw [one_mul,Real.norm_eq_abs] | |
| exact (hf p e hp).trans (mul_le_mul_of_nonneg_left (by have h := Real.add_one_le_exp βeβ; linarith) hC) | |
| theorem ParamExpGrowth.locallyDominated {f : P Γ (E Γ β) β F} (hf : ParamExpGrowth f) : | |
| GaussianLocallyDominated (fun z : (P Γ E) Γ β => f (z.1.1,(z.1.2,z.2))) := by | |
| intro R | |
| obtain β¨C,M,hC,hM,hfβ© := hf R | |
| refine β¨fun y => C*Real.exp (M*R)*Real.exp (M*|y|), | |
| (integrable_exp_mul_abs_gaussian M).const_mul _,?_β© | |
| rintro β¨p,eβ© y hpe | |
| have hp : βpβ β€ R := (le_max_left _ _).trans hpe | |
| have he : βeβ β€ R := (le_max_right _ _).trans hpe | |
| apply (hf p (e,y) hp).trans | |
| change C*Real.exp (M*β(e,y)β) β€ C*Real.exp (M*R)*Real.exp (M*|y|) | |
| rw [mul_assoc,β Real.exp_add,β mul_add] | |
| apply mul_le_mul_of_nonneg_left _ hC | |
| apply Real.exp_le_exp.2 | |
| apply mul_le_mul_of_nonneg_left _ hM | |
| rw [Prod.norm_def,Real.norm_eq_abs] | |
| exact max_le (he.trans (le_add_of_nonneg_right (abs_nonneg _))) | |
| (le_add_of_nonneg_left ((norm_nonneg e).trans he)) | |
| variable [NormedSpace β F] [NormedSpace β G] | |
| theorem ParamExpGrowth.clm {f : P Γ E β F} (hf : ParamExpGrowth f) (L : F βL[β] G) : | |
| ParamExpGrowth (fun z => L (f z)) := hf.of_norm_le (norm_nonneg L) (fun z => L.le_opNorm (f z)) | |
| theorem ParamExpGrowth.smul {f : P Γ E β β} {g : P Γ E β F} | |
| (hf : ParamExpGrowth f) (hg : ParamExpGrowth g) : ParamExpGrowth (fun z => f z β’ g z) := by | |
| apply (hf.norm.mul hg.norm).of_norm_le (K := 1) (by norm_num) | |
| intro z | |
| simp only [norm_smul,Real.norm_eq_abs,abs_mul,abs_abs,abs_of_nonneg (norm_nonneg _),one_mul] | |
| exact le_rfl | |
| theorem ParamExpGrowth.gaussian_integral {f : P Γ (E Γ β) β F} | |
| (hf : ParamExpGrowth f) : | |
| ParamExpGrowth (fun z : P Γ E => β« y, f (z.1,(z.2,y)) βgaussianReal 0 1) := by | |
| intro R | |
| obtain β¨C,M,hC,hM,hfβ© := hf R | |
| let B := β« y : β, Real.exp (M*|y|) βgaussianReal 0 1 | |
| have hB : 0 β€ B := integral_nonneg (fun y => (Real.exp_pos _).le) | |
| refine β¨C*B,M,mul_nonneg hC hB,hM,?_β© | |
| intro p e hp | |
| have hb : β y, βf (p,(e,y))β β€ C*Real.exp (M*βeβ)*Real.exp (M*|y|) := by | |
| intro y | |
| apply (hf p (e,y) hp).trans | |
| rw [mul_assoc,β Real.exp_add,β mul_add] | |
| apply mul_le_mul_of_nonneg_left _ hC | |
| apply Real.exp_le_exp.2 | |
| apply mul_le_mul_of_nonneg_left _ hM | |
| rw [Prod.norm_def,Real.norm_eq_abs] | |
| exact max_le_add_of_nonneg (norm_nonneg e) (abs_nonneg y) | |
| calc | |
| _ β€ β« y, βf (p,(e,y))β βgaussianReal 0 1 := norm_integral_le_integral_norm _ | |
| _ β€ β« y, C*Real.exp (M*βeβ)*Real.exp (M*|y|) βgaussianReal 0 1 := | |
| integral_mono_of_nonneg (ae_of_all _ (fun _ => norm_nonneg _)) | |
| ((integrable_exp_mul_abs_gaussian M).const_mul _) (ae_of_all _ hb) | |
| _ = _ := by rw [integral_const_mul]; dsimp [B]; ring | |
| end ParameterGrowth | |
| end SK.Analytic | |
| end | |
| end | |
| end | |
| end OAI | |