File size: 3,835 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
import OAI.Probability.GaussianRegression.Observation
import OAI.Probability.GaussianRegression.Caps
import OAI.Probability.GaussianRegression.Execution

namespace OAI

/-!
Prefix integration and transfer between almost-everywhere equal transitions.
-/

open MeasureTheory ProbabilityTheory Set Filter
open scoped ENNReal NNReal RealInnerProductSpace Topology
open InnerProductSpace
open scoped Pointwise

noncomputable section

universe u

namespace NoiselessRegression

section StreamTransfer
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]

omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] [BorelSpace E] in
lemma measurePreserving_pi_prefix (Ξ½ : Measure E) [IsProbabilityMeasure Ξ½]
    {t T : β„•} (ht : t ≀ T) :
    MeasurePreserving (fun x : Fin T β†’ E => fun i : Fin t => x (Fin.castLE ht i))
      (Measure.pi (fun _ => Ξ½)) (Measure.pi (fun _ => Ξ½)) := by
  refine ⟨by fun_prop, ?_⟩
  apply Measure.ext_of_lintegral
  intro f hf
  rw [lintegral_map hf (by fun_prop)]
  exact lintegral_pi_prefix Ξ½ ht f hf

lemma sphere_sample_observation_quasi [Nontrivial E] (hd : 3 ≀ Module.finrank ℝ E)
    {T : β„•} (i : Fin T) :
    Measure.QuasiMeasurePreserving
      (fun z : (Metric.sphere (0 : E) 1) Γ— (Fin T β†’ E) => (z.2 i, βŸͺz.1.val,z.2 i⟫))
      ((sphereLaw (E := E)).prod (Measure.pi (fun _ => stdGaussian E)))
      ((stdGaussian E).prod volume) := by
  exact (sphere_observation_quasi hd).comp
    ((MeasurePreserving.id (sphereLaw (E := E))).prod
      (measurePreserving_eval (fun _ : Fin T => stdGaussian E) i)).quasiMeasurePreserving

omit [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
  [MeasurableSpace E] [BorelSpace E] in
lemma streamRoute_congr {J : Type*} (Ξ΄ Ξ΄' : β„• β†’ J β†’ (E Γ— ℝ) β†’ J)
    (n k : β„•) (j : J) (A : Fin k β†’ E) (b : Fin k β†’ ℝ)
    (h : βˆ€ t j i, Ξ΄ t j (A i,b i) = Ξ΄' t j (A i,b i)) :
    streamRoute Ξ΄ n k j (A,b) = streamRoute Ξ΄' n k j (A,b) := by
  induction k generalizing n j with
  | zero => rfl
  | succ k ih =>
    rw [streamRoute, streamRoute, h]
    exact ih (n+1) _ (Fin.tail A) (Fin.tail b) (fun t j i => h t j i.succ)

lemma prefix_route_cap_bound [Nontrivial E]
    {J : Type*} [Fintype J] [MeasurableSpace J] [MeasurableSingletonClass J] [Nonempty J]
    {Ξ΄ : β„• β†’ 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 T : β„•} (hk : k ≀ T) (j : J) :
    ((sphereLaw (E := E)).prod (Measure.pi (fun _ : Fin T => stdGaussian E)))
      {z | dist z.1.val (y (streamRoute Ξ΄ 0 k j
        ((fun i => z.2 (Fin.castLE hk i)),fun i => βŸͺz.1.val,z.2 (Fin.castLE hk i)⟫))) ≀ Ξ΅} ≀
      (ENNReal.ofReal ((3 : ℝ)*4^Module.finrank ℝ E) * ENNReal.ofReal (Ξ΅^a)) *
        streamFactor (E := E) (J := J) q ^ (T/q+1) := by
  have hp := (MeasurePreserving.id (sphereLaw (E := E))).prod
    (measurePreserving_pi_prefix (stdGaussian E) hk)
  have hs : MeasurableSet
      {z : (Metric.sphere (0 : E) 1) Γ— (Fin k β†’ E) |
        dist z.1.val (y (streamRoute Ξ΄ 0 k j (z.2,fun i => βŸͺz.1.val,z.2 i⟫))) ≀ Ξ΅} := 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)))
  apply (le_of_eq (hp.measure_preimage hs.nullMeasurableSet)).trans
  apply (route_cap_bound hΞ΄ y hΞ΅ ha hq hqa k j).trans
  apply mul_le_mul' le_rfl
  exact pow_le_pow_rightβ‚€ (one_le_streamFactor (by omega : 0 < q))
    (Nat.add_le_add_right (Nat.div_le_div_right hk) 1)

end StreamTransfer

end NoiselessRegression

end

end OAI