math / data /lean /OAI /Dynamics /StandardMap /BridgeSamples.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.49 kB
import OAI.Dynamics.StandardMap.BridgeRealBound
namespace OAI
open MeasureTheory Set
open scoped ENNReal BigOperators
open MeasureTheory Set Filter Metric
open scoped ENNReal Topology Classical
namespace StandardMapEntropy
noncomputable def arrayObservation {R : β„•} (a b : Fin R β†’ DyadicTime)
(F : (Fin R β†’ ℝ) β†’ ℝ) (d : DistanceArray) : ℝ := F (fun i => arrayShortfall (a i) (b i) d)
lemma continuous_arrayObservation {R : β„•} (a b : Fin R β†’ DyadicTime)
(F : (Fin R β†’ ℝ) β†’ ℝ) (hF : Continuous F) : Continuous (arrayObservation a b F) :=
hF.comp (continuous_pi fun i => continuous_arrayShortfall (a i) (b i))
lemma arrayObservation_sample {R : β„•} (k : ℝ) (hk : 0≀ k) (n : β„•) (hn : 0< n)
(a b : Fin R β†’ DyadicTime) (A : Fin R β†’ β„€) (m : Fin R β†’ β„•) (hm : βˆ€i,0< m i)
(ha : βˆ€i,(n:ℝ)*(a i:ℝ)=(A i:ℝ)) (hb : βˆ€i,(n:ℝ)*(b i:ℝ)=(A i:ℝ)+(m i:ℝ))
(F : (Fin R β†’ ℝ) β†’ ℝ) (z : Torus) :
arrayObservation a b F (sampleArray k hk z n hn)=shortfallObservation k A m F z := by
unfold arrayObservation shortfallObservation
congr 1
funext i
exact shortfall_sample_aligned k hk z n hn (a i) (b i) (A i) (m i) (hm i) (ha i) (hb i)
lemma array_fast_sample (k : ℝ) (hk : 0≀ k) (z : Torus) (n : β„•) (hn : 0< n)
(u v : DyadicTime) (a : β„€) (N : β„•)
(hu : (n:ℝ)*(u:ℝ)=(a:ℝ)) (hv : (n:ℝ)*(v:ℝ)=(a:ℝ)+(N:ℝ))
(hf : (999/1000:ℝ)*((v:ℝ)-(u:ℝ))< (sampleArray k hk z n hn).val u v) :
torusFastBridge k (torusIter k a z) N := by
change _< rescaledDistance k z n u v at hf
rw [rescaledDistance_aligned k z n u v a (a+(N:β„€)) hu (by push_cast; exact hv),
productDistance_forward] at hf
have hshift := torusSegmentTransfer_shift k z 0 a N
rw [zero_add] at hshift
unfold torusFastBridge
rw [hshift,Real.rpow_le_iff_le_log (by linarith [growthBase_ge_four k hk])
(lt_of_lt_of_le zero_lt_one (torusSegmentTransfer_norm_bounds k hk z a N).1)]
have hnp : (0:ℝ)< n := by exact_mod_cast hn
have hg : 0< Real.log (growthBase k) := log_growthBase_pos k hk
have hl : (n:ℝ)*((v:ℝ)-(u:ℝ))=N := by linarith
have he := (lt_div_iffβ‚€ hnp).mp hf
have he' := (lt_div_iffβ‚€ hg).mp he
nlinarith
lemma integral_observable_sample {R : β„•} (k : ℝ) (hk : 0≀ k) (n : β„•) (hn : 0< n)
(a b : Fin R β†’ DyadicTime) (A : Fin R β†’ β„€) (m : Fin R β†’ β„•) (hm : βˆ€i,0< m i)
(ha : βˆ€i,(n:ℝ)*(a i:ℝ)=(A i:ℝ)) (hb : βˆ€i,(n:ℝ)*(b i:ℝ)=(A i:ℝ)+(m i:ℝ))
(F : (Fin R β†’ ℝ) β†’ ℝ) (hF : Continuous F) :
(∫ d,arrayObservation a b F d βˆ‚sampleLaw k hk n hn)=∫ z,shortfallObservation k A m F z βˆ‚area := by
rw [integral_sampleLaw k hk n hn _ (continuous_arrayObservation a b F hF)]
apply integral_congr_ae
exact Eventually.of_forall (arrayObservation_sample k hk n hn a b A m hm ha hb F)
lemma integral_supported_bound {X : Type*} [MeasurableSpace X] (ΞΌ : Measure X)
(F W : X β†’ ℝ) (hF : Integrable F ΞΌ) (hW : Integrable W ΞΌ) (E : Set X) (hE : MeasurableSet E)
(D : ℝ) (_hD : 0≀ D) (_hW0 : βˆ€x,0≀ W x)
(hb : βˆ€x,x∈E β†’ F x≀ D*W x) (hz : βˆ€x,xβˆ‰E β†’ F x=0) :
(∫ x,F x βˆ‚ΞΌ)≀ D*(∫ x in E,W x βˆ‚ΞΌ) := by
rw [←integral_const_mul,←integral_indicator hE]
apply integral_mono hF ((hW.const_mul D).indicator hE)
intro x
by_cases hx : x∈E
Β· simpa only [indicator_of_mem hx] using hb x hx
Β· rw [hz x hx,indicator_of_notMem hx]
end StandardMapEntropy
end OAI