File size: 5,462 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 | import OAI.Probability.GaussianRegression.Stream
import OAI.Probability.GaussianRegression.Sphere
namespace OAI
/-!
Spherical cap mass bounds along sequential routes.
-/
open MeasureTheory ProbabilityTheory Set Filter
open scoped ENNReal NNReal RealInnerProductSpace Topology
open InnerProductSpace
open scoped Pointwise
noncomputable section
universe u
namespace NoiselessRegression
section StreamCaps
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E]
[FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] [Nontrivial E]
variable {J : Type*} [Fintype J] [MeasurableSpace J] [MeasurableSingletonClass J] [Nonempty J]
def capWeight (y : E) (Ξ΅ : β) : E β ββ₯0β :=
(Metric.closedBall y Ξ΅).indicator (fun _ => 1)
omit [InnerProductSpace β E] [FiniteDimensional β E] [Nontrivial E] in
lemma measurable_capWeight (y : E) (Ξ΅ : β) : Measurable (capWeight y Ξ΅) :=
measurable_const.indicator Metric.isClosed_closedBall.measurableSet
omit [InnerProductSpace β E] [FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] [Nontrivial E] in
lemma capWeight_le_one (y s : E) (Ξ΅ : β) : capWeight y Ξ΅ s β€ 1 := by
classical
simp only [capWeight, Set.indicator_apply]
split <;> simp
lemma capWeight_mass (y : E) {Ξ΅ : β} (hΞ΅ : 0 < Ξ΅) (a : β)
(ha : 2*a β€ Module.finrank β E - 1) :
PolynomialMass ((ambientSphereLaw (E := E)).withDensity (capWeight y Ξ΅)) a
(ENNReal.ofReal ((3 : β)*4^Module.finrank β E) * ENNReal.ofReal (Ξ΅^a)) := by
change PolynomialMass ((ambientSphereLaw (E := E)).withDensity ((Metric.closedBall y Ξ΅).indicator 1)) a _
rw [withDensity_indicator_one Metric.isClosed_closedBall.measurableSet]
exact fun z r hr => terminal_cap_mass y z hΞ΅ hr a ha
lemma ambient_mass_bound {f : E β ββ₯0β} {a : β} {C : ββ₯0β}
(h : PolynomialMass ((ambientSphereLaw (E := E)).withDensity f) a C) :
(β«β» s, f s βambientSphereLaw) β€ C := by
rw [β setLIntegral_univ, β withDensity_apply _ MeasurableSet.univ]
apply (measure_mono_ae ?_).trans (by simpa using h 0 1 zero_lt_one)
filter_upwards [(withDensity_absolutelyContinuous (ambientSphereLaw (E := E)) f).ae_le
(ambientSphereLaw_ae_norm (E := E))] with s hs
intro _
change dist s 0 β€ 1
simp [dist_zero_right, hs]
lemma continuation_cap_integral_bound {Ξ΄ : β β J β (E Γ β) β J}
(hΞ΄ : β n j, Measurable (Ξ΄ n j)) (y : β β J β E)
{Ξ΅ : β} (hΞ΅ : 0 < Ξ΅) {a q : β} (ha : 2*a β€ Module.finrank β E - 1)
(hq : 2 β€ q) (hqa : 2*q β€ a) (n k : β) (j : J) :
(β«β» s, continuation Ξ΄ (fun n j => capWeight (y n j) Ξ΅) n k j s βambientSphereLaw) β€
(ENNReal.ofReal ((3 : β)*4^Module.finrank β E) * ENNReal.ofReal (Ξ΅^a)) *
streamFactor (E := E) (J := J) q ^ (k/q+1) := by
apply ambient_mass_bound
apply continuation_mass_bound _ hΞ΄ (fun n j => measurable_capWeight _ _)
(fun n j s => capWeight_le_one _ _ _)
(mul_ne_zero (by positivity) (by positivity)) (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ENNReal.ofReal_ne_top)
(fun n j => capWeight_mass (y n j) hΞ΅ a ha)
(Module.finrank_pos (R := β) (M := E)) (by omega) hq hqa
lemma route_cap_bound {Ξ΄ : β β J β (E Γ β) β J}
(hΞ΄ : β n j, Measurable (Ξ΄ n j)) (y : J β E)
{Ξ΅ : β} (hΞ΅ : 0 < Ξ΅) {a q : β} (ha : 2*a β€ Module.finrank β E - 1)
(hq : 2 β€ q) (hqa : 2*q β€ a) (k : β) (j : J) :
((sphereLaw (E := E)).prod (Measure.pi (fun _ : Fin k => stdGaussian E)))
{z | dist z.1.val (y (streamRoute Ξ΄ 0 k j (z.2,fun i => βͺz.1.val,z.2 iβ«))) β€ Ξ΅} β€
(ENNReal.ofReal ((3 : β)*4^Module.finrank β E) * ENNReal.ofReal (Ξ΅^a)) *
streamFactor (E := E) (J := J) q ^ (k/q+1) := by
let w : β β J β E β ββ₯0β := fun _ j => capWeight (y j) Ξ΅
have hV := measurable_continuation (w := w) hΞ΄ (fun _ j => measurable_capWeight (y j) Ξ΅) 0 k j
have he (s : E) : continuation Ξ΄ w 0 k j s =
β«β» A : Fin k β E, capWeight (y (streamRoute Ξ΄ 0 k j (A,fun i => βͺs,A iβ«))) Ξ΅ s
βMeasure.pi (fun _ => stdGaussian E) := by
simpa [w, blockValue, continuation] using continuation_unroll (w := w) hΞ΄ 0 k 0 j s
let S : Set ((Metric.sphere (0 : E) 1) Γ (Fin k β E)) :=
{z | dist z.1.val (y (streamRoute Ξ΄ 0 k j (z.2,fun i => βͺz.1.val,z.2 iβ«))) β€ Ξ΅}
have hS : MeasurableSet S := by
apply measurableSet_le _ measurable_const
exact measurable_subtype_coe.comp measurable_fst |>.dist
((measurable_of_finite y).comp ((measurable_streamRoute hΞ΄ 0 k j).comp (by fun_prop)))
change ((sphereLaw (E := E)).prod _) S β€ _
rw [β one_mul (((sphereLaw (E := E)).prod _) S), β lintegral_indicator_const hS 1,
lintegral_prod _ (measurable_const.indicator hS).aemeasurable]
have hf : β s : Metric.sphere (0 : E) 1,
(β«β» A, S.indicator (fun _ => (1 : ββ₯0β)) (s,A) βMeasure.pi (fun _ => stdGaussian E)) =
continuation Ξ΄ w 0 k j s.val := by
intro s
rw [he]
apply lintegral_congr
intro A
classical
change (if dist s.val (y (streamRoute Ξ΄ 0 k j (A,fun i => βͺs.val,A iβ«))) β€ Ξ΅ then 1 else 0) = _
unfold capWeight
rw [Set.indicator_apply]
rfl
simp_rw [hf]
rw [β lintegral_map hV measurable_subtype_coe]
exact continuation_cap_integral_bound hΞ΄ (fun _ => y) hΞ΅ ha hq hqa 0 k j
end StreamCaps
end NoiselessRegression
end
end OAI
|