File size: 6,085 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 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 : β}
(ΞΌ : @Measure (Space d)
(WithLp.measurableSpace
(@OfNat.ofNat ββ₯0β 2
(@instOfNatAtLeastTwo ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast
(Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))) (Fin d β β)))
(m : β) : Prop :=
let exponent : ββ₯0β := @OfNat.ofNat ββ₯0β 2
(@instOfNatAtLeastTwo ββ₯0β 2 ENNReal.instAddCommMonoidWithOne.toNatCast
(Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))
β A : Fin m β Space d,
@LinearIndependent (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))) =
@Measure.map (Space d) (Fin m β β)
(WithLp.measurableSpace exponent (Fin d β β)) inferInstance
(fun signal => fun index => @inner β (Space d)
(@InnerProductSpace.toInner β (Space d) _
(PiLp.seminormedAddCommGroup exponent (fun _ : Fin d => β))
(PiLp.innerProductSpace (π := β) (fun _ : Fin d => β)))
signal (A index)) ΞΌ
def PointwiseDensityProperties {d : β}
(ΞΌ : @Measure (Space d)
(WithLp.measurableSpace
(@OfNat.ofNat ββ₯0β 2
(@instOfNatAtLeastTwo ββ₯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.ofNat ββ₯0β 2
(@instOfNatAtLeastTwo ββ₯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.ofNat β 2 (@instOfNatAtLeastTwo β 2 Real.commRing.toNatCast
(Mathlib.Meta.NormNum.instAtLeastTwo (nat_lit 0)))
let exponent : ββ₯0β := @OfNat.ofNat ββ₯0β 2
(@instOfNatAtLeastTwo ββ₯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,
β ΞΌ : @Measure (Space d) (WithLp.measurableSpace exponent (Fin d β β)),
IsFiniteMeasure ΞΌ β
@Measure.support (Space d)
(PiLp.topologicalSpace (p := exponent) (Ξ² := fun _ : Fin d => β))
(WithLp.measurableSpace exponent (Fin d β β)) ΞΌ β
@Metric.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
|