Download data/lean/OAI/Probability/MemoryPrecision/PointwiseMain.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.09 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MemoryPrecision/PointwiseMain.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/MemoryPrecision/PointwiseMain.lean
-
curl -L -o PointwiseMain.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MemoryPrecision/PointwiseMain.lean
6.09 kB
| import Mathlib | |
| import OAI.Probability.GaussianRegression.Main | |
| import OAI.Probability.MemoryPrecision.DensityUniqueness | |
| namespace OAI | |
| open MeasureTheory ProbabilityTheory Set Filter EuclideanGeometry | |
| open scoped ENNReal NNReal RealInnerProductSpace Topology Pointwise | |
| noncomputable section | |
| universe u v | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal NNReal RealInnerProductSpace Topology Pointwise | |
| namespace MemoryPrecision | |
| open NoiselessRegression | |
| def RadialMixtureRepresentation (m : β) : Prop := | |
| β Ξ΄ : β, 0 < Ξ΄ β | |
| (β r : β, 0 < r β 0 β€ RadialMixture m Ξ΄ r) β§ | |
| Measurable (RadialMixture m Ξ΄) β§ | |
| (β« r in Set.Ioi 0, RadialMixture m Ξ΄ r) = 1 β§ | |
| (β y : Space m, GaussianKernel m Ξ΄ y = | |
| β« r in Set.Ioi βyβ, RadialMixture m Ξ΄ r / (UnitBallVolume m * r^m)) | |
| def FullRankDensityFormula {d : β} | |
| (ΞΌ : (Space d) | |
| (WithLp.measurableSpace | |
| (.ofNat ββ₯0β 2 | |
| ( ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))) (Fin d β β))) | |
| (m : β) : Prop := | |
| let exponent : ββ₯0β := .ofNat ββ₯0β 2 | |
| ( ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0))) | |
| β A : Fin m β Space d, | |
| (Fin m) β (Space d) A Real.commRing.toSemiring | |
| (WithLp.instAddCommGroup exponent (Fin d β β)).toAddCommMonoid | |
| (WithLp.instModule (p := exponent) (K := β) (V := Fin d β β)) β | |
| (volume : Measure (Fin m β β)).withDensity | |
| (fun y => ENNReal.ofReal (PointwiseDensity ΞΌ m (A,y))) = | |
| .map (Space d) (Fin m β β) | |
| (WithLp.measurableSpace exponent (Fin d β β)) inferInstance | |
| (fun signal => fun index => @inner β (Space d) | |
| (.toInner β (Space d) _ | |
| (PiLp.seminormedAddCommGroup exponent (fun _ : Fin d => β)) | |
| (PiLp.innerProductSpace (π := β) (fun _ : Fin d => β))) | |
| signal (A index)) ΞΌ | |
| def PointwiseDensityProperties {d : β} | |
| (ΞΌ : (Space d) | |
| (WithLp.measurableSpace | |
| (.ofNat ββ₯0β 2 | |
| ( ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))) (Fin d β β))) | |
| (m p : β) (H Ξ² R : β) : Prop := | |
| letI : MeasurableSpace (Space d) := WithLp.measurableSpace | |
| (.ofNat ββ₯0β 2 | |
| ( ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))) (Fin d β β) | |
| let reference : Measure ((Fin m β Space d) Γ (Fin m β β)) := MatrixLabelReference d m | |
| RadialMixtureRepresentation m β§ | |
| (β x, 0 β€ PointwiseDensity ΞΌ m x) β§ | |
| Measurable (PointwiseDensity ΞΌ m) β§ | |
| FullRankDensityFormula ΞΌ m β§ | |
| reference.withDensity (fun x => ENNReal.ofReal (PointwiseDensity ΞΌ m x)) = | |
| ProjectionLaw ΞΌ m β§ | |
| (β F : ((Fin m β Space d) Γ (Fin m β β)) β β, | |
| Measurable F β (β x, 0 β€ F x) β | |
| reference.withDensity (fun x => ENNReal.ofReal (F x)) = | |
| ProjectionLaw ΞΌ m β PointwiseDensity ΞΌ m =α΅[reference] F) β§ | |
| (β«β» x, ENNReal.ofReal (PointwiseDensity ΞΌ m x)^p βreference) β€ | |
| ENNReal.ofReal (ProjectionNormScale m p H Ξ² R)^p | |
| def PointwiseDensityStatement : Prop := | |
| let two : β := .ofNat β 2 ( β 2 Real.commRing.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0))) | |
| let exponent : ββ₯0β := .ofNat ββ₯0β 2 | |
| ( ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast | |
| (Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0))) | |
| β d m p : β, 2 β€ d β 1 β€ m β m < d β 2 β€ p β | |
| β Ξ² H R : β, (m : β)+(p : β)-two < Ξ² β 0 < H β 0 < R β | |
| β z : Space d, | |
| β ΞΌ : (Space d) (WithLp.measurableSpace exponent (Fin d β β)), | |
| IsFiniteMeasure ΞΌ β | |
| .support (Space d) | |
| (PiLp.topologicalSpace (p := exponent) (Ξ² := fun _ : Fin d => β)) | |
| (WithLp.measurableSpace exponent (Fin d β β)) ΞΌ β | |
| .closedBall (Space d) | |
| (PiLp.instPseudoMetricSpace (p := exponent) (Ξ² := fun _ : Fin d => β)) z R β | |
| AmbientBallBound ΞΌ H Ξ² β | |
| ΞΌ βͺ UniformSphere d β PointwiseDensityProperties ΞΌ m p H Ξ² R | |
| theorem pointwise_density : PointwiseDensityStatement := by | |
| intro d m p hd hm hmd hp Ξ² H R hgap hH hR z ΞΌ hΞΌ hs hb hac | |
| let : IsFiniteMeasure ΞΌ := hΞΌ | |
| obtain β¨F,hFm,hF0,hden,hFs,hFnormβ© := | |
| exact_finite_density d m p hp hm Ξ² H R hgap hH hR z ΞΌ hs hb | |
| have he := pointwiseDensity_ae_eq hm ΞΌ F hFm hF0 hden | |
| refine β¨?_, PointwiseDensity_nonneg ΞΌ m, measurable_PointwiseDensity ΞΌ m, | |
| ?_, ?_, pointwiseDensity_ae_eq hm ΞΌ, ?_β© | |
| Β· intro Ξ΄ hΞ΄ | |
| exact β¨fun r hr => radialMixture_nonneg m Ξ΄ hr, radialMixture_measurable m Ξ΄, | |
| radialMixture_integral m hm hΞ΄, radialMixture_tail m hm hΞ΄β© | |
| Β· intro A hA | |
| exact pointwiseDensity_fullRank hd hm hmd ΞΌ hac A hA | |
| Β· exact (withDensity_congr_ae (he.fun_comp ENNReal.ofReal)).trans hden | |
| Β· have hp0 : (p:β) β 0 := by exact_mod_cast (by omega : p β 0) | |
| have hpE : (p:ββ₯0β) β 0 := by exact_mod_cast (by omega : p β 0) | |
| have hpow := ENNReal.rpow_le_rpow hFnorm (show 0 β€ (p:β) by positivity) | |
| rw [eLpNorm_eq_lintegral_rpow_enorm_toReal hpE (by finiteness) | |
| hFm.aestronglyMeasurable] at hpow | |
| simp only [ENNReal.toReal_natCast] at hpow | |
| rw [β ENNReal.rpow_mul, one_div_mul_cancel hp0, ENNReal.rpow_one] at hpow | |
| simp only [ENNReal.rpow_natCast] at hpow | |
| have hi : (fun x => ENNReal.ofReal (PointwiseDensity ΞΌ m x)^p) =α΅[MatrixLabelReference d m] | |
| (fun x => βF xββ^p) := by | |
| filter_upwards [he] with x hx | |
| rw [hx, Real.enorm_eq_ofReal (hF0 x)] | |
| rw [lintegral_congr_ae hi] | |
| exact hpow | |
| end MemoryPrecision | |
| end | |
| end OAI | |