File size: 2,636 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
import Mathlib
import OAI.Probability.Ballisticity.Entropy.OccupationEntropy2

namespace OAI

section

open MeasureTheory ProbabilityTheory InformationTheory
open scoped ENNReal Classical BigOperators
namespace DirectionalTransience

lemma actualCurrentWindow_restricted_law {d : β„•} (e : Direction d)
    (Ξ½ : Measure (Row d)) [IsProbabilityMeasure Ξ½]
    (Q : Measure (Environment d)) [IsFiniteMeasure Q]
    (t : Environment d β†’ β„€ β†’ β„•) (ht : βˆ€ i, Measurable fun Ο‰ => t Ο‰ i)
    (i : β„€) (m N : β„•)
    (hi : βˆ€ n : β„•, MeasurableSet[rowSigma (BelowHeight (realPosition (step e)) n)] {Ο‰ | t Ο‰ i=n})
    (him : βˆ€ n : β„•, MeasurableSet[rowSigma (BelowHeight (realPosition (step e)) n)] {Ο‰ | t Ο‰ (i+m)=n})
    (filler : Environment d) :
    ((rawCurrentWindow e Ξ½ Q (fun Ο‰ => t Ο‰ i) (fun Ο‰ => t Ο‰ (i+m)) (ht i) filler).restrict
      {p | p.1.1<N}).map (rawCurrentProjection e) =
      ((episodeInputLaw e Ξ½ Q t ht).restrict {X | t X.1.1 i<N}).map
        (actualCurrentWindow e t i m) := by
  unfold rawCurrentWindow
  rw [← episodeInputLaw_current e Ξ½ Q t ht i m]
  rw [Measure.map_map (rawCurrentWindow_measurable e _ _ hi him filler)
    (currentInput_measurable e i m)]
  have hf := (rawCurrentWindow_measurable e _ _ hi him filler).comp (currentInput_measurable e i m)
  have hA : MeasurableSet {p : RawCurrentData e Γ— LocalUpperField e | p.1.1<N} :=
    measurableSet_lt (measurable_fst.comp measurable_fst) measurable_const
  rw [Measure.restrict_map hf hA]
  rw [Measure.map_map (rawCurrentProjection_measurable e) hf]
  congr 1
  funext X
  exact actualCurrentWindow_raw e t i m hi filler X

lemma rawCurrentOccupation_projected {d : β„•} (e : Direction d)
    (Ξ½ : Measure (Row d)) [IsProbabilityMeasure Ξ½]
    (Q : Measure (Environment d)) [IsFiniteMeasure Q]
    (t : Environment d β†’ β„€ β†’ β„•) (ht : βˆ€ i, Measurable fun Ο‰ => t Ο‰ i)
    (hst : βˆ€ (i : β„€) (n : β„•), MeasurableSet[rowSigma (BelowHeight (realPosition (step e)) n)] {Ο‰ | t Ο‰ i=n})
    (filler : Environment d) (N m : β„•) :
    (rawCurrentOccupation e Ξ½ Q (fun i Ο‰ => t Ο‰ i) (fun i => ht i) filler N m).map
      (rawCurrentProjection e) =
      βˆ‘ i ∈ Finset.range N, ((episodeInputLaw e Ξ½ Q t ht).restrict {X | t X.1.1 i<N}).map
        (actualCurrentWindow e t i m) := by
  unfold rawCurrentOccupation Entropy.activeSum
  rw [Measure.map_finset_sum (rawCurrentProjection_measurable e).aemeasurable]
  apply Finset.sum_congr rfl
  intro i _
  simpa only [Nat.cast_add] using actualCurrentWindow_restricted_law e Ξ½ Q t ht i m N
    (hst i) (hst (i+m)) filler

end DirectionalTransience

end

end OAI