File size: 5,252 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 | import Mathlib
import OAI.Probability.Ballisticity.Entropy.WindowEntropy
import OAI.Probability.Ballisticity.Estimates.ClosedEmbeddingWeak
import OAI.Probability.Ballisticity.Estimates.ReferenceFeller
import OAI.Probability.Ballisticity.Entropy.EntropyContinuousTests
namespace OAI
section
open MeasureTheory ProbabilityTheory InformationTheory TopologicalSpace Filter
open scoped ENNReal Classical Topology
namespace DirectionalTransience
instance currentDataProfiles_secondCountable {d : β} (e : Direction d) :
SecondCountableTopology (ReferenceClasses.Data (HorizontalSpace e) Γ CurrentProfiles e) := inferInstance
instance currentDataProfiles_compact {d : β} (e : Direction d) :
CompactSpace (ReferenceClasses.Data (HorizontalSpace e) Γ CurrentProfiles e) := inferInstance
instance currentFields_compact {d : β} (e : Direction d) :
CompactSpace (ReferenceClasses.AllFields (HorizontalSpace e) (Row d)) := inferInstance
instance currentWindow_compact {d : β} (e : Direction d) : CompactSpace (CurrentWindow e) := inferInstance
instance currentWindow_secondCountable {d : β} (e : Direction d) : SecondCountableTopology (CurrentWindow e) := inferInstance
instance currentWindow_opens {d : β} (e : Direction d) : OpensMeasurableSpace (CurrentWindow e) := inferInstance
instance currentDataProfiles_borel {d : β} (e : Direction d) :
BorelSpace (ReferenceClasses.Data (HorizontalSpace e) Γ CurrentProfiles e) := inferInstance
instance currentDataProfiles_opens {d : β} (e : Direction d) :
OpensMeasurableSpace (ReferenceClasses.Data (HorizontalSpace e) Γ CurrentProfiles e) := inferInstance
lemma actualCurrentLaw_include {d : β} (e : Direction d) (m : β)
(L : ProbabilityMeasure (ActualEpisodeArray e))
(hc : βα΅ Y β(L : Measure (ActualEpisodeArray e)), ReferenceClasses.Consistent (currentOffsets e 0 Y)) :
(actualCurrentLaw e m L).map (currentWindowInclude e) =
L.map (currentArrayWindow e 0 m) := by
apply Subtype.ext
change ((L : Measure _).map (typedCurrentArrayWindow e 0 m)).map (currentWindowInclude e) = _
rw [Measure.map_map (currentWindowInclude_continuous e).measurable (typedCurrentArrayWindow_measurable e 0 m)]
apply Measure.map_congr
filter_upwards [hc] with Y hY
exact currentWindowInclude_typed e 0 m Y hY
lemma actualCurrentLaw_tendsto {d : β} (e : Direction d) (m : β)
(Ls : β β ProbabilityMeasure (ActualEpisodeArray e)) (L : ProbabilityMeasure (ActualEpisodeArray e))
(hlim : Tendsto Ls atTop (π L))
(hc : β n, βα΅ Y β(Ls n : Measure (ActualEpisodeArray e)), β j, ReferenceClasses.Consistent (currentOffsets e j Y)) :
Tendsto (fun n => actualCurrentLaw e m (Ls n)) atTop (π (actualCurrentLaw e m L)) := by
have hL := closed_support_weak_limit Ls L hlim _ (currentOffsets_closed e) hc
apply Entropy.tendsto_of_map_closedEmbedding (currentWindowInclude e)
((currentWindowInclude_continuous e).isClosedEmbedding (currentWindowInclude_injective e))
have hi (n : β) := actualCurrentLaw_include e m (Ls n) ((hc n).mono fun _ h => h 0)
simp_rw [hi,actualCurrentLaw_include e m L (hL.mono fun _ h => h 0)]
exact ProbabilityMeasure.tendsto_map_of_tendsto_of_continuous Ls L hlim
(currentArrayWindow_continuous e 0 m)
noncomputable def currentReferenceLaw {d : β} (e : Direction d)
(Ξ½ : Measure (Row d)) [IsProbabilityMeasure Ξ½] (W : ProbabilityMeasure (CurrentWindow e)) :
ProbabilityMeasure (CurrentWindow e) :=
Entropy.compProdProb (W.map Prod.fst) (currentWindowReference e Ξ½)
lemma currentReferenceLaw_tendsto {d : β} (e : Direction d)
(Ξ½ : Measure (Row d)) [IsProbabilityMeasure Ξ½]
{I : Type*} {l : Filter I} {Ws : I β ProbabilityMeasure (CurrentWindow e)} {W : ProbabilityMeasure (CurrentWindow e)}
(h : Tendsto Ws l (π W)) :
Tendsto (fun n => currentReferenceLaw e Ξ½ (Ws n)) l (π (currentReferenceLaw e Ξ½ W)) := by
have hK : Continuous (Entropy.kernelProb (currentWindowReference e Ξ½)) :=
(ReferenceClasses.referenceProb_continuous Ξ½).comp continuous_fst
exact Entropy.compProdProb_tendsto (currentWindowReference e Ξ½) hK
(ProbabilityMeasure.tendsto_map_of_tendsto_of_continuous Ws W h continuous_fst)
theorem actualCurrentLaw_kl_weak_limit {d : β} (e : Direction d)
(Ξ½ : Measure (Row d)) [IsProbabilityMeasure Ξ½] (m : β)
(Ls : β β ProbabilityMeasure (ActualEpisodeArray e)) (L : ProbabilityMeasure (ActualEpisodeArray e))
(hlim : Tendsto Ls atTop (π L))
(hc : β n, βα΅ Y β(Ls n : Measure (ActualEpisodeArray e)), β j, ReferenceClasses.Consistent (currentOffsets e j Y))
(C : β) (hC : 0β€C)
(hb : β n, klDiv (actualCurrentLaw e m (Ls n) : Measure (CurrentWindow e))
(currentReferenceLaw e Ξ½ (actualCurrentLaw e m (Ls n)) : Measure (CurrentWindow e)) β€ ENNReal.ofReal C) :
klDiv (actualCurrentLaw e m L : Measure (CurrentWindow e))
(currentReferenceLaw e Ξ½ (actualCurrentLaw e m L) : Measure (CurrentWindow e)) β€ ENNReal.ofReal C := by
have ht := actualCurrentLaw_tendsto e m Ls L hlim hc
exact Entropy.kl_le_of_weak_limit _ _ _ _ ht (currentReferenceLaw_tendsto e Ξ½ ht) hC (Filter.Eventually.of_forall hb)
end DirectionalTransience
end
end OAI
|