File size: 3,705 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
import Mathlib
import OAI.Probability.Ballisticity.Model

namespace OAI

section

section

open MeasureTheory ProbabilityTheory Filter Function
open scoped ENNReal NNReal BigOperators Topology Classical
namespace DirectionalTransience

noncomputable def canonicalLogExcess {Ξ© : Type*} (A : ℝ) (p : β„• β†’ Ξ© β†’ ℝ) (Ο‰ : Ξ©) : ℝ :=
  (⨆ n : β„•, ENNReal.ofReal (-Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2))).toReal

lemma measurable_canonicalLogExcess {Ξ© : Type*} [MeasurableSpace Ξ©]
    (A : ℝ) (p : β„• β†’ Ξ© β†’ ℝ) (hp : βˆ€ n, Measurable (p n)) :
    Measurable (canonicalLogExcess A p) := by
  unfold canonicalLogExcess
  apply Measurable.ennreal_toReal
  apply Measurable.iSup
  intro n
  exact ((hp n).log.neg.sub_const _).ennreal_ofReal

lemma canonicalLogExcess_nonneg {Ξ© : Type*} (A : ℝ) (p : β„• β†’ Ξ© β†’ ℝ) (Ο‰ : Ξ©) :
    0 ≀ canonicalLogExcess A p Ο‰ := ENNReal.toReal_nonneg

lemma canonicalLogExcess_bounds {Ξ© : Type*} {A D W : ℝ} (hA : 0 ≀ A) (hD : 0 ≀ D)
    (hW : 0 ≀ W) (p : β„• β†’ Ξ© β†’ ℝ) (Ο‰ : Ξ©)
    (hp : βˆ€ n, -Real.log (p n Ο‰) ≀ A*Real.log ((n:ℝ)+2)+D*(W+1)) :
    canonicalLogExcess A p Ο‰ ≀ D*(W+1) ∧
    (βˆ€ n, -Real.log (p n Ο‰) ≀ 2*A*Real.log ((n:ℝ)+2)+canonicalLogExcess A p Ο‰) := by
  let S := ⨆ n : β„•, ENNReal.ofReal (-Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2))
  have hS : S ≀ ENNReal.ofReal (D*(W+1)) := by
    apply iSup_le
    intro n
    apply ENNReal.ofReal_le_ofReal
    have hn := hp n
    have hl : 0 ≀ Real.log ((n:ℝ)+2) := Real.log_nonneg (by have := Nat.cast_nonneg (Ξ±:=ℝ) n; linarith)
    have hm : 0 ≀ A*Real.log ((n:ℝ)+2) := mul_nonneg hA hl
    linarith
  have hSt : S β‰  ⊀ := ne_top_of_le_ne_top ENNReal.ofReal_ne_top hS
  constructor
  Β· have hh := ENNReal.toReal_mono ENNReal.ofReal_ne_top hS
    simpa only [canonicalLogExcess,S,ENNReal.toReal_ofReal (show 0 ≀ D*(W+1) by positivity)] using hh
  Β· intro n
    have hn : ENNReal.ofReal (-Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2)) ≀ S := le_iSup (fun k : β„• => ENNReal.ofReal (-Real.log (p k Ο‰)-2*A*Real.log ((k:ℝ)+2))) n
    have hr := (ENNReal.ofReal_le_iff_le_toReal hSt).mp hn
    change -Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2) ≀ canonicalLogExcess A p Ο‰ at hr
    linarith

noncomputable def finiteLogExcess {Ξ© : Type*} (A : ℝ) (p : β„• β†’ Ξ© β†’ ℝ) (N : β„•) (Ο‰ : Ξ©) : ℝ :=
  (⨆ n : Fin (N+1), ENNReal.ofReal (-Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2))).toReal

lemma canonicalLogExcess_eq_finite {Ξ© : Type*} {A D W M : ℝ} (hA : 0 ≀ A) (hD : 0 ≀ D)
    (hWM : W ≀ M) (p : β„• β†’ Ξ© β†’ ℝ) (Ο‰ : Ξ©)
    (hp : βˆ€ n, -Real.log (p n Ο‰) ≀ A*Real.log ((n:ℝ)+2)+D*(W+1))
    (N : β„•) (hN : D*(M+1) ≀ A*Real.log ((N:ℝ)+2)) :
    canonicalLogExcess A p Ο‰ = finiteLogExcess A p N Ο‰ := by
  unfold canonicalLogExcess finiteLogExcess
  congr 1
  apply le_antisymm
  Β· apply iSup_le
    intro n
    by_cases hn : n ≀ N
    Β· exact le_iSup (fun k : Fin (N+1) => ENNReal.ofReal (-Real.log (p k Ο‰)-2*A*Real.log ((k:ℝ)+2))) ⟨n,by omega⟩
    Β· have hlog : Real.log ((N:ℝ)+2) ≀ Real.log ((n:ℝ)+2) :=
        Real.log_le_log (by positivity) (by exact_mod_cast (show N+2 ≀ n+2 by omega))
      have hAl := mul_le_mul_of_nonneg_left hlog hA
      have hDW := mul_le_mul_of_nonneg_left (add_le_add_right hWM 1) hD
      have hp' := hp n
      have hzero : -Real.log (p n Ο‰)-2*A*Real.log ((n:ℝ)+2) ≀ 0 := by linarith
      rw [ENNReal.ofReal_eq_zero.mpr hzero]
      exact zero_le
  Β· apply iSup_le
    intro n
    exact le_iSup (fun k : β„• => ENNReal.ofReal (-Real.log (p k Ο‰)-2*A*Real.log ((k:ℝ)+2))) n.val
end DirectionalTransience

end

end

end OAI