Lean / Reader
Lean reader

WalkResults.lean

836 lines88 declarationsno sorryimports Mathlib
  1. import Mathlib
  2. /-!
  3. # Ratio limit for a centered integer random walk under logarithmic time shifts
  4. Source: https://mathoverflow.net/questions/511513 (Leonard Euler)
  5. Credit: @OriRune
  6. The variables are indexed from zero rather than one. The shift is the number
  7. of steps removed, and the support condition is the one specified in the post.
  8. There is no assumption of finite variance.
  9. -/
  10. namespace OMA.S_mo_511513
  11. open Filter MeasureTheory ProbabilityTheory
  12. def HasSpanOne (support : Set ℤ) : Prop :=
  13. ∀ a b : ℤ, 1 < a → ∃ z ∈ support, ¬ a ∣ (z - b)
  14. def walk {Ω : Type} (X : ℕ → Ω → ℤ) (n : ℕ) (ω : Ω) : ℤ :=
  15. ∑ i ∈ Finset.range n, X i ω
  16. def claim : Prop :=
  17. ∀ (Ω : Type) [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P],
  18. ∀ X : ℕ → Ω → ℤ,
  19. (∀ i, Measurable (X i)) →
  20. iIndepFun X P →
  21. (∀ i, Measure.map (X i) P = Measure.map (X 0) P) →
  22. Integrable (fun ω => (X 0 ω : ℝ)) P →
  23. (∫ ω, (X 0 ω : ℝ) ∂P) = 0 →
  24. HasSpanOne {z | 0 < P {ω | X 0 ω = z}} →
  25. ∀ (s : ℕ → ℕ) (z : ℕ → ℤ),
  26. (∃ C : ℝ, ∀ᶠ n : ℕ in atTop, (s n : ℝ) ≤ C * Real.log (n : ℝ)) →
  27. (∃ B : ℤ, ∀ᶠ n : ℕ in atTop, |z n| ≤ B) →
  28. Tendsto (fun n =>
  29. (P {ω | walk X (n - s n) ω = -z n}).toReal /
  30. (P {ω | walk X n ω = 0}).toReal) atTop (nhds 1)
  31. end OMA.S_mo_511513
  32. /-! Finite-stage elementary estimates for the sparse centered random-walk counterexample. -/
  33. noncomputable section
  34. open Finset Filter Real
  35. open scoped Topology BigOperators
  36. namespace SparseWalk
  37. /-- A positive exponentially small sequence has unbounded backward ratios at
  38. any prescribed divergent sequence of time shifts. -/
  39. theorem unbounded_ratios (b : ℕ → ℝ) (hb : ∀ n, 0 < b n)
  40. {ρ : ℝ} (hρ₀ : 0 < ρ) (hρ₁ : ρ < 1) (hdecay : ∀ n, b n ≤ ρ^n)
  41. (s : ℕ → ℕ) (hs : Tendsto s atTop atTop) (hlo : ∀ᶠ n in atTop, 1 ≤ s n)
  42. (hhi : ∀ᶠ n in atTop, s n ≤ n) {M : ℝ} (hM : 0 < M)
  43. (N : ℕ) : ∃ n ≥ N, M < b (n - s n) / b n := by
  44. by_contra! H
  45. obtain ⟨r,hρr,hr₁⟩ := exists_between hρ₁
  46. have hr₀ := hρ₀.trans hρr
  47. have hsmall := (tendsto_pow_atTop_nhds_zero_of_lt_one hr₀.le hr₁).comp hs
  48. obtain ⟨K,hK⟩ := eventually_atTop.mp
  49. ((eventually_ge_atTop N).and (hlo.and (hhi.and (hsmall.eventually_lt_const (inv_pos.mpr hM)))))
  50. let C := (Finset.range (K+1)).inf' (by simp) (fun j ↦ b j / r^j)
  51. have hC : 0 < C := (Finset.lt_inf'_iff _).2 (fun j _ ↦ div_pos (hb j) (pow_pos hr₀ _))
  52. have lower (n : ℕ) : C * r^n ≤ b n := by
  53. induction n using Nat.strong_induction_on with
  54. | h n ih =>
  55. by_cases hn : n < K
  56. · apply (le_div_iff₀ (pow_pos hr₀ _)).mp
  57. exact Finset.inf'_le _ (mem_range.mpr (by omega : n < K+1))
  58. · obtain ⟨hnN,hn₁,hn₂,hn₃⟩ := hK n (by omega)
  59. have l := ih (n-s n) (by omega)
  60. have hbound := (div_le_iff₀ (hb n)).mp (H n hnN)
  61. have hpow : r ^ n = r^(n-s n) * r^(s n) := by
  62. rw [← pow_add, Nat.sub_add_cancel hn₂]
  63. have hpart : r^(s n) * M ≤ 1 := by
  64. have := (lt_div_iff₀ hM).mp (show r^(s n) < 1 / M by simpa using hn₃)
  65. linarith
  66. rw [hpow]
  67. apply (mul_le_mul_iff_left₀ hM).mp
  68. calc
  69. (C * (r^(n-s n)*r^(s n))) * M = (C*r^(n-s n))*(r^(s n)*M) := by ring
  70. _ ≤ (C*r^(n-s n))*1 := mul_le_mul_of_nonneg_left hpart (by positivity)
  71. _ ≤ b n * M := by simpa [mul_comm] using l.trans hbound
  72. have hg (n : ℕ) : C ≤ (ρ/r)^n := by
  73. rw [div_pow]
  74. exact (le_div_iff₀ (pow_pos hr₀ _)).2 ((lower n).trans (hdecay n))
  75. have ht := tendsto_pow_atTop_nhds_zero_of_lt_one (div_nonneg hρ₀.le hr₀.le)
  76. ((div_lt_one hr₀).2 hρr)
  77. exact (not_lt_of_ge (le_of_tendsto_of_tendsto' tendsto_const_nhds ht hg)) hC
  78. abbrev Atom := ℤ × ℝ
  79. /-- Unnormalized integration against a finite list of weighted atoms. -/
  80. def integrate : List Atom → (ℤ → ℝ) → ℝ
  81. | [], _ => 0
  82. | (x,w)::rest, f => w*f x + integrate rest f
  83. def raw (L : List Atom) : ℕ → ℤ → ℝ
  84. | 0, k => if k=0 then 1 else 0
  85. | n+1, k => integrate L (fun x ↦ raw L n (k-x))
  86. def positive (L : List Atom) := ∀ a ∈ L, 0 ≤ a.2
  87. lemma integrate_mono {L : List Atom} (hL : positive L) (f g : ℤ → ℝ)
  88. (hfg : ∀ a ∈ L, f a.1 ≤ g a.1) : integrate L f ≤ integrate L g := by
  89. induction L with
  90. | nil => rfl
  91. | cons a L ih =>
  92. exact add_le_add (mul_le_mul_of_nonneg_left (hfg a (by simp)) (hL a (by simp)))
  93. (ih (fun z hz ↦ hL z (by simp [hz])) (fun z hz ↦ hfg z (by simp [hz])))
  94. lemma integrate_scale (L : List Atom) (f : ℤ → ℝ) (c : ℝ) :
  95. integrate L (fun x ↦ c*f x) = c*integrate L f := by
  96. induction L with
  97. | nil => simp [integrate]
  98. | cons a L ih => cases a; simp only [integrate, ih]; ring
  99. lemma integrate_drift_deriv (L : List Atom) :
  100. HasDerivAt (fun t : ℝ ↦ integrate L (fun x ↦ Real.exp (-t*x))) (-integrate L Int.cast) 0 := by
  101. induction L with
  102. | nil => simpa [integrate] using (hasDerivAt_const (x := (0:ℝ)) (c := (0:ℝ)))
  103. | cons a L ih =>
  104. rcases a with ⟨x,w⟩
  105. have h := (((hasDerivAt_id (0:ℝ)).neg.mul_const (x:ℝ)).exp.const_mul w).add ih
  106. convert h using 1 <;> first | rfl | (simp [integrate]; ring)
  107. lemma strictly_tilt {L : List Atom} (h : 0 < integrate L Int.cast) :
  108. ∃ t : ℝ, integrate L (fun x ↦ Real.exp (-t*x)) < integrate L (fun _ ↦ 1) := by
  109. have hd := integrate_drift_deriv L
  110. by_contra! H
  111. have hm : IsLocalMin (fun t : ℝ ↦ integrate L (fun x ↦ Real.exp (-t*x))) 0 := by
  112. apply IsMinOn.isLocalMin (s := Set.univ) _ Filter.univ_mem
  113. apply isMinOn_univ_iff.mpr
  114. intro t
  115. simpa using H t
  116. have hz := hm.hasDerivAt_eq_zero hd
  117. linarith
  118. lemma raw_tilt_bound (L : List Atom) (hL : positive L) (t : ℝ)
  119. (n : ℕ) (k : ℤ) :
  120. raw L n k ≤ Real.exp (t*k) * (integrate L (fun x ↦ Real.exp (-t*x)))^n := by
  121. induction n generalizing k with
  122. | zero => by_cases hk : k=0 <;> simp [raw,hk, (Real.exp_pos _).le]
  123. | succ n ih =>
  124. rw [raw, pow_succ]
  125. calc
  126. _ ≤ integrate L (fun x ↦ Real.exp (t*(k-x)) * (integrate L (fun x ↦ Real.exp (-t*x)))^n) := by
  127. apply integrate_mono hL
  128. intro a _
  129. simpa using ih (k-a.1)
  130. _ = integrate L (fun x ↦ (Real.exp (t*k)*(integrate L (fun x ↦ Real.exp (-t*x)))^n) *
  131. Real.exp (-t*x)) := by
  132. congr 1
  133. funext x
  134. rw [show t*((k:ℝ)-x) = t*k + (-t*x) by ring, Real.exp_add]
  135. ring
  136. _ = _ := by rw [integrate_scale]; ring
  137. def atomWeight (i A : ℕ) : ℝ := (1/2 : ℝ)^(i+1) / (A:ℝ)
  138. def stageAtoms (a : ℕ → ℕ) : ℕ → List Atom
  139. | 0 => [(0,1),(1,1)]
  140. | j+1 => (-(a j : ℤ), atomWeight j (a j)) :: stageAtoms a j
  141. def stageMass (a : ℕ → ℕ) (j : ℕ) : ℝ := integrate (stageAtoms a j) (fun _ ↦ 1)
  142. lemma stage_positive (a : ℕ → ℕ) (j : ℕ) : positive (stageAtoms a j) := by
  143. induction j with
  144. | zero => intro x hx; simp [stageAtoms] at hx; rcases hx with rfl | rfl <;> norm_num
  145. | succ j ih =>
  146. intro x hx
  147. rcases List.mem_cons.mp hx with h | h
  148. · rw [h]; unfold atomWeight; positivity
  149. · exact ih x h
  150. lemma stage_le_one (a : ℕ → ℕ) (j : ℕ) : ∀ x ∈ stageAtoms a j, x.1 ≤ 1 := by
  151. induction j with
  152. | zero => intro x hx; simp [stageAtoms] at hx; rcases hx with rfl | rfl <;> norm_num
  153. | succ j ih =>
  154. intro x hx
  155. rcases List.mem_cons.mp hx with h | h
  156. · rw [h]; simp
  157. · exact ih x h
  158. lemma integrate_congr (L : List Atom) (f g : ℤ → ℝ) (h : ∀ x ∈ L, f x.1 = g x.1) :
  159. integrate L f = integrate L g := by
  160. induction L with
  161. | nil => rfl
  162. | cons a L ih =>
  163. rcases a with ⟨x,w⟩
  164. simp only [integrate]
  165. rw [h (x,w) (by simp), ih (fun u hu ↦ h u (by simp [hu]))]
  166. lemma integrate_zero (L : List Atom) : integrate L (fun _ ↦ 0) = 0 := by
  167. induction L with
  168. | nil => rfl
  169. | cons a L ih => cases a; simp [integrate,ih]
  170. lemma overshoot_zero (L : List Atom) (hL : ∀ x ∈ L, x.1 ≤ 1) (n : ℕ) (k : ℤ)
  171. (hk : (n:ℤ) < k) : raw L n k = 0 := by
  172. induction n generalizing k with
  173. | zero => simp [raw, ne_of_gt (show 0 < k by simpa using hk)]
  174. | succ n ih =>
  175. rw [raw, ← integrate_zero L]
  176. apply integrate_congr
  177. intro x hx
  178. apply ih
  179. have := hL x hx
  180. omega
  181. /-- Extra negative atoms of magnitude at least A are invisible up to a time m
  182. at endpoints k ≥ m−A. All other increments are at most one. -/
  183. theorem cutoff_stable (a : ℕ → ℕ) (ha : Monotone a) (j l : ℕ) (hjl : j ≤ l)
  184. (m : ℕ) (k : ℤ) (hk : (m:ℤ)-(a j:ℤ) ≤ k) :
  185. raw (stageAtoms a l) m k = raw (stageAtoms a j) m k := by
  186. induction m generalizing k with
  187. | zero => rfl
  188. | succ m ih =>
  189. rw [raw, raw]
  190. have trim (v : ℕ) (hv : j ≤ v) :
  191. integrate (stageAtoms a v) (fun x ↦ raw (stageAtoms a l) m (k-x)) =
  192. integrate (stageAtoms a j) (fun x ↦ raw (stageAtoms a l) m (k-x)) := by
  193. induction v, hv using Nat.le_induction with
  194. | base => rfl
  195. | succ v hv ihv =>
  196. have hav : (a j : ℤ) ≤ a v := by exact_mod_cast ha hv
  197. have eq := overshoot_zero (stageAtoms a l) (stage_le_one a l) m
  198. (k-(-(a v:ℤ))) (by omega)
  199. simp only [stageAtoms,integrate,eq,mul_zero,zero_add,ihv]
  200. rw [trim l hjl]
  201. apply integrate_congr
  202. intro x hx
  203. apply ih
  204. have := stage_le_one a j x hx
  205. omega
  206. lemma stage_mass_gt (a : ℕ → ℕ) (j : ℕ) : 0 < stageMass a j := by
  207. induction j with
  208. | zero => norm_num [stageMass,stageAtoms,integrate]
  209. | succ j ih =>
  210. change 0 < atomWeight j (a j) * 1 + stageMass a j
  211. have : 0 ≤ atomWeight j (a j) := by unfold atomWeight; positivity
  212. linarith
  213. lemma stage_drift (a : ℕ → ℕ) (ha : ∀ j, 0 < a j) (j : ℕ) :
  214. integrate (stageAtoms a j) Int.cast = (1/2 : ℝ)^j := by
  215. induction j with
  216. | zero => norm_num [stageAtoms,integrate]
  217. | succ j ih =>
  218. simp only [stageAtoms, integrate, ih, atomWeight, Int.cast_neg, Int.cast_natCast,
  219. pow_succ]
  220. have h : (a j:ℝ) ≠ 0 := by exact_mod_cast (ha j).ne'
  221. field_simp
  222. ring
  223. lemma integrate_nonneg {L : List Atom} (hL : positive L) {f : ℤ → ℝ}
  224. (hf : ∀ a ∈ L, 0 ≤ f a.1) : 0 ≤ integrate L f := by
  225. rw [← integrate_zero L]
  226. exact integrate_mono hL _ _ hf
  227. lemma integrate_pos_of_atom {L : List Atom} (hL : positive L) {f : ℤ → ℝ}
  228. (hf : ∀ a ∈ L, 0 ≤ f a.1) (x : Atom) (hx : x ∈ L)
  229. (hw : 0 < x.2) (hfx : 0 < f x.1) : 0 < integrate L f := by
  230. induction L with
  231. | nil => simp at hx
  232. | cons a L ih =>
  233. have hp : positive L := fun y hy ↦ hL y (by simp [hy])
  234. have hrest : ∀ y ∈ L, 0 ≤ f y.1 := fun y hy ↦ hf y (by simp [hy])
  235. change 0 < a.2 * f a.1 + integrate L f
  236. rcases List.mem_cons.mp hx with h | h
  237. · subst a
  238. exact add_pos_of_pos_of_nonneg (mul_pos hw hfx) (integrate_nonneg hp hrest)
  239. · exact add_pos_of_nonneg_of_pos (mul_nonneg (hL a (by simp)) (hf a (by simp))) (ih hp hrest h)
  240. lemma raw_nonneg {L : List Atom} (hL : positive L) (n : ℕ) (k : ℤ) : 0 ≤ raw L n k := by
  241. induction n generalizing k with
  242. | zero => simp [raw,apply_ite]
  243. | succ n ih => exact integrate_nonneg hL (fun _ _ ↦ ih _)
  244. lemma base_atom (a : ℕ → ℕ) (j : ℕ) : ((0,1) : Atom) ∈ stageAtoms a j := by
  245. induction j with
  246. | zero => simp [stageAtoms]
  247. | succ j ih => simp [stageAtoms,ih]
  248. lemma raw_pos (a : ℕ → ℕ) (j n : ℕ) : 0 < raw (stageAtoms a j) n 0 := by
  249. induction n with
  250. | zero => norm_num [raw]
  251. | succ n ih =>
  252. rw [raw]
  253. apply integrate_pos_of_atom (f := fun x ↦ raw (stageAtoms a j) n (0-x))
  254. (stage_positive a j) (fun _ _ ↦ raw_nonneg (stage_positive a j) _ _)
  255. (0,1) (base_atom a j) (by norm_num)
  256. simpa using ih
  257. def normalized (a : ℕ → ℕ) (j n : ℕ) : ℝ := raw (stageAtoms a j) n 0 / (stageMass a j)^n
  258. theorem stage_bad (a : ℕ → ℕ) (ha : ∀ i, 0 < a i) (j : ℕ)
  259. (s : ℕ → ℕ) (hs : Tendsto s atTop atTop) (hlo : ∀ᶠ n in atTop, 1 ≤ s n)
  260. (hhi : ∀ᶠ n in atTop, s n ≤ n) (M : ℝ) (hM : 0 < M) (N : ℕ) :
  261. ∃ n ≥ N, M < normalized a j (n-s n) / normalized a j n := by
  262. have h := stage_drift a ha j
  263. have hd : 0 < integrate (stageAtoms a j) Int.cast := by rw [h]; positivity
  264. obtain ⟨t,ht⟩ := strictly_tilt hd
  265. let z := integrate (stageAtoms a j) (fun x ↦ Real.exp (-t*x))
  266. have hz : 0 < z := integrate_pos_of_atom (stage_positive a j)
  267. (fun _ _ ↦ (Real.exp_pos _).le) (0,1) (base_atom a j) (by norm_num) (Real.exp_pos _)
  268. have hW := stage_mass_gt a j
  269. apply unbounded_ratios (normalized a j) (fun n ↦ div_pos (raw_pos a j n) (pow_pos hW n))
  270. (ρ := z / stageMass a j) (div_pos hz hW) ((div_lt_one hW).mpr ht) _ s hs hlo hhi hM N
  271. intro n
  272. rw [normalized,div_pow]
  273. apply div_le_div_of_nonneg_right _ (pow_nonneg hW.le _)
  274. simpa [z] using raw_tilt_bound (stageAtoms a j) (stage_positive a j) t n 0
  275. end SparseWalk
  276. /-! A diagonal distribution whose finite-stage return ratios grow without bound. -/
  277. noncomputable section
  278. open Filter
  279. open scoped Topology
  280. namespace SparseWalk
  281. def admissibleTime (a : ℕ → ℕ) (s : ℕ → ℕ) (j n : ℕ) : Prop :=
  282. j+1 ≤ n ∧ a j < n ∧ s n ≤ n ∧
  283. (j+1 : ℕ) < normalized a (j+1) (n-s n) / normalized a (j+1) n
  284. lemma exists_time (a s : ℕ → ℕ) (ha : ∀ i, 0 < a i) (hs : Tendsto s atTop atTop)
  285. (hhi : ∀ᶠ n in atTop, s n ≤ n) (j : ℕ) : ∃ n, admissibleTime a s j n := by
  286. obtain ⟨K,hK⟩ := eventually_atTop.mp hhi
  287. obtain ⟨n,hn,hr⟩ := stage_bad a ha (j+1) s hs (hs.eventually_ge_atTop 1) hhi
  288. (j+1 : ℕ) (by positivity) (max K (max (j+1) (a j+1)))
  289. exact ⟨n,by unfold admissibleTime; exact ⟨by omega,by omega,hK n (by omega),hr⟩⟩
  290. open Classical in
  291. def chooseTime (a s : ℕ → ℕ) (j : ℕ) : ℕ :=
  292. if h : ∃ n, admissibleTime a s j n then Nat.find h else 0
  293. lemma chooseTime_spec (a s : ℕ → ℕ) (ha : ∀ i, 0 < a i) (hs : Tendsto s atTop atTop)
  294. (hhi : ∀ᶠ n in atTop, s n ≤ n) (j : ℕ) :
  295. admissibleTime a s j (chooseTime a s j) := by
  296. classical
  297. have h := exists_time a s ha hs hhi j
  298. simpa [chooseTime, dif_pos h] using Nat.find_spec h
  299. /-- On advancing a stage, retain the prefix and fill the unused tail with the
  300. new jump length. The dummy tail never enters the stage's convolution. -/
  301. def approxLaw (s : ℕ → ℕ) : ℕ → ℕ → ℕ
  302. | 0, _ => 1
  303. | j+1, i => if i ≤ j then approxLaw s j i else chooseTime (approxLaw s j) s j + 1
  304. def magnitude (s : ℕ → ℕ) (i : ℕ) := approxLaw s i i
  305. def witnessTime (s : ℕ → ℕ) (j : ℕ) := chooseTime (approxLaw s j) s j
  306. lemma approx_pos (s : ℕ → ℕ) (j i : ℕ) : 0 < approxLaw s j i := by
  307. induction j generalizing i with
  308. | zero => simp [approxLaw]
  309. | succ j ih => simp only [approxLaw]; split <;> first | apply ih | omega
  310. lemma magnitude_pos (s : ℕ → ℕ) (i : ℕ) : 0 < magnitude s i := approx_pos s i i
  311. lemma approx_eq (s : ℕ → ℕ) {i j : ℕ} (h : i ≤ j) :
  312. approxLaw s j i = magnitude s i := by
  313. induction j, h using Nat.le_induction with
  314. | base => rfl
  315. | succ j hj ih => simpa [approxLaw,hj] using ih
  316. lemma next_magnitude (s : ℕ → ℕ) (j : ℕ) : magnitude s (j+1) = witnessTime s j + 1 := by
  317. simp [magnitude,approxLaw,witnessTime]
  318. lemma stage_congr {a b : ℕ → ℕ} (j : ℕ) (h : ∀ i < j, a i = b i) :
  319. stageAtoms a j = stageAtoms b j := by
  320. induction j with
  321. | zero => rfl
  322. | succ j ih => simp [stageAtoms,h j (by omega),ih (fun i hi ↦ h i (by omega))]
  323. lemma witness_spec (s : ℕ → ℕ) (hs : Tendsto s atTop atTop) (hhi : ∀ᶠ n in atTop, s n ≤ n)
  324. (j : ℕ) : admissibleTime (magnitude s) s j (witnessTime s j) := by
  325. have h := chooseTime_spec (approxLaw s j) s (approx_pos s j) hs hhi j
  326. have heq := stage_congr (a := approxLaw s j) (b := magnitude s) (j+1)
  327. (fun i hi ↦ approx_eq s (by omega))
  328. simpa only [admissibleTime, normalized, stageMass, heq, magnitude, witnessTime] using h
  329. lemma magnitude_strictMono (s : ℕ → ℕ) (hs : Tendsto s atTop atTop)
  330. (hhi : ∀ᶠ n in atTop, s n ≤ n) : StrictMono (magnitude s) := by
  331. apply strictMono_nat_of_lt_succ
  332. intro j
  333. rw [next_magnitude]
  334. exact (witness_spec s hs hhi j).2.1.trans (Nat.lt_succ_self _)
  335. /-- The inequality survives renormalization by any larger positive mass. -/
  336. lemma normalization_ratio (A B m n : ℝ) (hA : 0 < A) (hB : 0 < B) (hm : 0 < m)
  337. (hmn : m ≤ n) (t d : ℕ) :
  338. (A/m^t)/(B/m^(t+d)) ≤ (A/n^t)/(B/n^(t+d)) := by
  339. have hn := hm.trans_le hmn
  340. have eq (u : ℝ) (hu : 0 < u) : (A/u^t)/(B/u^(t+d)) = (A/B)*u^d := by
  341. rw [pow_add]
  342. field_simp
  343. rw [eq m hm,eq n hn]
  344. exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hm.le hmn d) (div_pos hA hB).le
  345. /-- An arbitrary normalized return law agreeing with all applicable cutoffs
  346. has infinitely many arbitrarily large backward ratios. -/
  347. theorem arbitrarily_bad_full (s : ℕ → ℕ) (hs : Tendsto s atTop atTop)
  348. (hhi : ∀ᶠ n in atTop, s n ≤ n) (W : ℝ)
  349. (hW : ∀ j, stageMass (magnitude s) j ≤ W) (p : ℕ → ℝ)
  350. (hp : ∀ j m, m ≤ magnitude s j → p m = raw (stageAtoms (magnitude s) j) m 0 / W^m)
  351. (j : ℕ) : ∃ n ≥ j+1, (j+1 : ℕ) < p (n-s n) / p n := by
  352. let n := witnessTime s j
  353. obtain ⟨hjn,_,hsn,hbad⟩ := witness_spec s hs hhi j
  354. have hb : n ≤ magnitude s (j+1) := by rw [next_magnitude]; exact Nat.le_succ _
  355. refine ⟨n,hjn,?_⟩
  356. rw [hp (j+1) n hb, hp (j+1) (n-s n) ((Nat.sub_le ..).trans hb)]
  357. apply hbad.trans_le
  358. unfold normalized
  359. have hm := stage_mass_gt (magnitude s) (j+1)
  360. have he := normalization_ratio _ _ _ _ (raw_pos (magnitude s) (j+1) (n-s n))
  361. (raw_pos (magnitude s) (j+1) n) hm (hW (j+1)) (n-s n) (s n)
  362. have hsn' : s n ≤ n := hsn
  363. simpa only [Nat.sub_add_cancel hsn'] using he
  364. theorem full_not_tendsto (s : ℕ → ℕ) (hs : Tendsto s atTop atTop)
  365. (hhi : ∀ᶠ n in atTop, s n ≤ n) (W : ℝ)
  366. (hW : ∀ j, stageMass (magnitude s) j ≤ W) (p : ℕ → ℝ)
  367. (hp : ∀ j m, m ≤ magnitude s j → p m = raw (stageAtoms (magnitude s) j) m 0 / W^m) :
  368. ¬ Tendsto (fun n ↦ p (n-s n) / p n) atTop (𝓝 1) := by
  369. intro ht
  370. obtain ⟨K,hK⟩ := eventually_atTop.mp (ht.eventually_lt_const (by norm_num : (1:ℝ)<2))
  371. obtain ⟨n,hn,hr⟩ := arbitrarily_bad_full s hs hhi W hW p hp (K+2)
  372. have he := hK n (by omega)
  373. norm_num only [Nat.cast_add,Nat.cast_ofNat,Nat.cast_one] at hr
  374. linarith [Nat.cast_nonneg (α := ℝ) K]
  375. /-- The concrete time shift in the disproof of the question. -/
  376. def logShift (n : ℕ) : ℕ := ⌊Real.log (n:ℝ)⌋₊
  377. lemma logShift_tendsto : Tendsto logShift atTop atTop :=
  378. tendsto_nat_floor_atTop.comp (Real.tendsto_log_atTop.comp tendsto_natCast_atTop_atTop)
  379. lemma logShift_le (n : ℕ) : logShift n ≤ n :=
  380. Nat.floor_le_of_le (Real.log_le_self (Nat.cast_nonneg n))
  381. lemma logShift_growth : ∃ C : ℝ, ∀ᶠ n : ℕ in atTop, (logShift n : ℝ) ≤ C * Real.log (n:ℝ) := by
  382. refine ⟨1,?_⟩
  383. filter_upwards [eventually_ge_atTop (1:ℕ)] with n hn
  384. simpa [logShift] using Nat.floor_le (Real.log_nonneg (show (1:ℝ) ≤ n by exact_mod_cast hn))
  385. end SparseWalk
  386. open scoped BigOperators ENNReal NNReal
  387. open MeasureTheory
  388. namespace SparseWalk
  389. def jump (a : ℕ → ℕ) : ℕ → ℤ
  390. | 0 => 0
  391. | 1 => 1
  392. | i + 2 => -(a i : ℤ)
  393. noncomputable def labelWeight (a : ℕ → ℕ) : ℕ → ℝ
  394. | 0 => 1
  395. | 1 => 1
  396. | i + 2 => (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ)
  397. noncomputable def totalMass (a : ℕ → ℕ) : ℝ :=
  398. 2 + ∑' i, (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ)
  399. noncomputable def labelLaw (a : ℕ → ℕ) : Measure ℕ :=
  400. Measure.sum (fun m => ENNReal.ofReal (labelWeight a m / totalMass a) • Measure.dirac m)
  401. theorem geometric_jump_mass : HasSum (fun i : ℕ => (1 / 2 : ℝ) ^ (i + 1)) 1 := by
  402. simpa [pow_succ] using hasSum_geometric_two.mul_right (1 / 2 : ℝ)
  403. theorem negative_weights_summable {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  404. Summable (fun i => (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ)) := by
  405. apply Summable.of_nonneg_of_le (fun i => by positivity) _ geometric_jump_mass.summable
  406. intro i
  407. exact div_le_self (by positivity) (by exact_mod_cast ha i)
  408. theorem labelWeight_nonneg (a : ℕ → ℕ) (m : ℕ) : 0 ≤ labelWeight a m := by
  409. match m with
  410. | 0 | 1 => norm_num [labelWeight]
  411. | n + 2 => simp only [labelWeight]; positivity
  412. theorem totalMass_ge_two (a : ℕ → ℕ) : 2 ≤ totalMass a := by
  413. have h : 0 ≤ ∑' i, (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ) :=
  414. tsum_nonneg (fun i => by positivity)
  415. unfold totalMass
  416. linarith
  417. theorem labelWeight_summable {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  418. Summable (labelWeight a) :=
  419. (summable_nat_add_iff 2).mp (negative_weights_summable ha)
  420. theorem tsum_labelWeight {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  421. ∑' m, labelWeight a m = totalMass a := by
  422. rw [← (labelWeight_summable ha).sum_add_tsum_nat_add 2]
  423. norm_num [Finset.sum_range_succ, labelWeight, totalMass]
  424. theorem truncated_mass_le {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) (j : ℕ) :
  425. 2 + ∑ i ∈ Finset.range j, (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ) ≤ totalMass a := by
  426. exact add_le_add_right ((negative_weights_summable ha).sum_le_tsum _ (fun i _ => by positivity)) 2
  427. theorem labelLaw_singleton (a : ℕ → ℕ) (m : ℕ) :
  428. labelLaw a {m} = ENNReal.ofReal (labelWeight a m / totalMass a) := by
  429. classical
  430. rw [labelLaw, Measure.sum_apply _ (measurableSet_singleton _), tsum_eq_single m]
  431. · simp
  432. · intro b hb
  433. simp [Measure.dirac_apply' _ (measurableSet_singleton _), hb]
  434. theorem labelLaw_real_singleton (a : ℕ → ℕ) (m : ℕ) :
  435. (labelLaw a).real {m} = labelWeight a m / totalMass a := by
  436. rw [Measure.real, labelLaw_singleton, ENNReal.toReal_ofReal]
  437. exact div_nonneg (labelWeight_nonneg a m) (by linarith [totalMass_ge_two a])
  438. theorem labelLaw_probability {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  439. IsProbabilityMeasure (labelLaw a) := by
  440. constructor
  441. rw [labelLaw, Measure.sum_apply _ MeasurableSet.univ]
  442. simp only [Measure.smul_apply, measure_univ, smul_eq_mul, mul_one]
  443. rw [← ENNReal.ofReal_tsum_of_nonneg (fun i => div_nonneg (labelWeight_nonneg a i)
  444. (by linarith [totalMass_ge_two a])) ((labelWeight_summable ha).div_const _),
  445. tsum_div_const, tsum_labelWeight ha, div_self (by linarith [totalMass_ge_two a]),
  446. ENNReal.ofReal_one]
  447. theorem jump_integrable {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  448. Integrable (fun m => (jump a m : ℝ)) (labelLaw a) := by
  449. apply integrable_sum_dirac (fun _ => ENNReal.ofReal_ne_top)
  450. apply (summable_nat_add_iff 2).mp
  451. refine (geometric_jump_mass.summable.div_const (totalMass a)).congr (fun i => ?_)
  452. have hai : 0 < (a i : ℝ) := by exact_mod_cast ha i
  453. rw [ENNReal.toReal_ofReal (div_nonneg (labelWeight_nonneg a _) (by linarith [totalMass_ge_two a]))]
  454. simp [jump, labelWeight]
  455. field_simp
  456. theorem jump_integral {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) :
  457. ∫ m, (jump a m : ℝ) ∂labelLaw a = 0 := by
  458. rw [labelLaw, integral_sum_dirac (fun _ => ENNReal.ofReal_ne_top)]
  459. simp only [ENNReal.toReal_ofReal (div_nonneg (labelWeight_nonneg a _) (by linarith [totalMass_ge_two a])),
  460. smul_eq_mul]
  461. let f := fun m => labelWeight a m / totalMass a * (jump a m : ℝ)
  462. change ∑' m, f m = 0
  463. have ht : HasSum (fun i => f (i + 2)) (-(1 / totalMass a)) := by
  464. have eqfun : (fun i => f (i + 2)) = (fun i : ℕ => -((1/2 : ℝ)^(i+1) / totalMass a)) := by
  465. funext i
  466. have hai : 0 < (a i : ℝ) := by exact_mod_cast ha i
  467. simp [f, labelWeight, jump]
  468. field_simp
  469. rw [eqfun]
  470. exact (geometric_jump_mass.div_const (totalMass a)).neg
  471. have hs : Summable f := (summable_nat_add_iff 2).mp ht.summable
  472. rw [← hs.sum_add_tsum_nat_add 2, ht.tsum_eq]
  473. simp [Finset.sum_range_succ, f, jump, labelWeight]
  474. theorem stageMass_eq_sum (a : ℕ → ℕ) (j : ℕ) :
  475. stageMass a j = 2 + ∑ i ∈ Finset.range j, (1 / 2 : ℝ) ^ (i + 1) / (a i : ℝ) := by
  476. induction j with
  477. | zero => norm_num [stageMass, stageAtoms, integrate]
  478. | succ i ih =>
  479. change atomWeight i (a i) * 1 + stageMass a i = _
  480. rw [ih, Finset.sum_range_succ]
  481. unfold atomWeight
  482. ring
  483. theorem stageMass_le_totalMass {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) (j : ℕ) :
  484. stageMass a j ≤ totalMass a := by
  485. rw [stageMass_eq_sum]
  486. exact truncated_mass_le ha j
  487. theorem totalMass_sub_stageMass {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) (j : ℕ) :
  488. totalMass a - stageMass a j =
  489. ∑' i : ℕ, (1 / 2 : ℝ) ^ (i + j + 1) / (a (i + j) : ℝ) := by
  490. rw [stageMass_eq_sum, totalMass, ← (negative_weights_summable ha).sum_add_tsum_nat_add j]
  491. ring
  492. theorem totalMass_sub_stageMass_le {a : ℕ → ℕ} (ha : ∀ i, 0 < a i) (hm : Monotone a) (j : ℕ) :
  493. totalMass a - stageMass a j ≤ (1/2 : ℝ)^j / (a j : ℝ) := by
  494. rw [totalMass_sub_stageMass ha]
  495. have hg : HasSum (fun i : ℕ => (1 / 2 : ℝ) ^ (i + j + 1)) ((1 / 2 : ℝ)^j) := by
  496. simpa only [show ∀ i : ℕ, i + j + 1 = i + 1 + j by omega, pow_add _ (_ + 1), one_mul] using
  497. geometric_jump_mass.mul_right ((1/2 : ℝ)^j)
  498. rw [← (hg.div_const (a j : ℝ)).tsum_eq]
  499. apply Summable.tsum_le_tsum _ ((summable_nat_add_iff j).mpr (negative_weights_summable ha))
  500. (hg.div_const (a j : ℝ)).summable
  501. intro i
  502. exact div_le_div_of_nonneg_left (by positivity) (by exact_mod_cast ha j)
  503. (by exact_mod_cast hm (Nat.le_add_left j i))
  504. end SparseWalk
  505. /-! Independent increments on their countable product sample space and
  506. finite convolution after the impossible negative jumps have been discarded. -/
  507. noncomputable section
  508. open Filter Finset MeasureTheory ProbabilityTheory
  509. open scoped BigOperators Topology ENNReal
  510. namespace SparseWalk
  511. abbrev labelProduct (μ : Measure ℕ) [IsProbabilityMeasure μ] : Measure (ℕ → ℕ) :=
  512. Measure.infinitePi fun _ : ℕ ↦ μ
  513. def posAt (v : ℕ → ℤ) (n : ℕ) (ω : ℕ → ℕ) : ℤ := ∑ i ∈ range n, v (ω i)
  514. lemma pos_meas (v : ℕ → ℤ) (n : ℕ) : Measurable (posAt v n) := by
  515. apply Finset.measurable_fun_sum
  516. intro i _
  517. exact (measurable_of_countable v).comp (measurable_pi_apply i)
  518. lemma pos_bound {v : ℕ → ℤ} (hv : ∀ m, v m ≤ 1) (n : ℕ) (ω : ℕ → ℕ) :
  519. posAt v n ω ≤ n := by
  520. calc
  521. _ ≤ ∑ _i ∈ range n, (1:ℤ) := Finset.sum_le_sum fun i _ ↦ hv (ω i)
  522. _ = _ := by simp
  523. lemma pos_succ (v : ℕ → ℤ) (n : ℕ) (ω : ℕ → ℕ) :
  524. posAt v (n+1) ω = posAt v n ω + v (ω n) := Finset.sum_range_succ _ _
  525. lemma label_indep (μ : Measure ℕ) [IsProbabilityMeasure μ] (v : ℕ → ℤ) :
  526. iIndepFun (fun i (ω : ℕ → ℕ) ↦ v (ω i)) (labelProduct μ) :=
  527. iIndepFun_infinitePi (fun _ ↦ measurable_of_countable v)
  528. lemma label_map (μ : Measure ℕ) [IsProbabilityMeasure μ] (v : ℕ → ℤ) (i : ℕ) :
  529. (labelProduct μ).map (fun ω ↦ v (ω i)) = μ.map v := by
  530. calc
  531. _ = ((labelProduct μ).map (fun ω ↦ ω i)).map v :=
  532. (Measure.map_map (measurable_of_countable v) (measurable_pi_apply i)).symm
  533. _ = _ := congrArg (Measure.map v) (Measure.infinitePi_map_eval (fun _ : ℕ ↦ μ) i)
  534. lemma past_indep (μ : Measure ℕ) [IsProbabilityMeasure μ] (v : ℕ → ℤ) (n : ℕ) :
  535. IndepFun (fun ω : ℕ → ℕ ↦ ω n) (posAt v n) (labelProduct μ) := by
  536. have h : iIndepFun (fun i (ω : ℕ → ℕ) ↦ ω i) (labelProduct μ) :=
  537. iIndepFun_infinitePi (X := fun _ ↦ id) (fun _ ↦ measurable_id)
  538. have hp := h.indepFun_finset ({n} : Finset ℕ) (range n) (by simp) (fun i ↦ measurable_pi_apply i)
  539. let left : ((i : ({n} : Finset ℕ)) → ℕ) → ℕ := fun H ↦ H ⟨n, by simp⟩
  540. let right : ((i : range n) → ℕ) → ℤ := fun H ↦ ∑ i, v (H i)
  541. have hright : Measurable right :=
  542. Finset.measurable_fun_sum _ (fun i _ ↦ (measurable_of_countable v).comp (measurable_pi_apply i))
  543. have hh := hp.comp (show Measurable left from measurable_pi_apply _) hright
  544. change IndepFun (fun ω : ℕ → ℕ ↦ ω n) (fun ω ↦ ∑ i : range n, v (ω i)) _ at hh
  545. have he (ω : ℕ → ℕ) : (∑ i : range n, v (ω i)) = posAt v n ω := by
  546. exact Finset.sum_attach (range n) (fun i ↦ v (ω i))
  547. simpa only [he] using hh
  548. lemma coordinate_mass (μ : Measure ℕ) [IsProbabilityMeasure μ] (n m : ℕ) :
  549. (labelProduct μ) {ω | ω n = m} = μ {m} := by
  550. have h := congrArg (fun ν : Measure ℕ ↦ ν {m}) (Measure.infinitePi_map_eval (fun _ : ℕ ↦ μ) n)
  551. exact (Measure.map_apply (measurable_pi_apply n) (measurableSet_singleton m)).symm.trans h
  552. lemma finite_step (μ : Measure ℕ) [IsProbabilityMeasure μ] (v : ℕ → ℤ)
  553. (hv : ∀ m, v m ≤ 1) (n : ℕ) (k : ℤ) (L : ℕ)
  554. (outside : ∀ m ≥ L, (n : ℤ) + v m < k) :
  555. (labelProduct μ).real {ω | posAt v (n+1) ω = k} =
  556. ∑ m ∈ range L, μ.real {m} * (labelProduct μ).real {ω | posAt v n ω = k - v m} := by
  557. let E (m : ℕ) : Set (ℕ → ℕ) := {ω | ω n = m} ∩ {ω | posAt v n ω = k - v m}
  558. have heq : {ω | posAt v (n+1) ω = k} = ⋃ m ∈ range L, E m := by
  559. ext ω
  560. simp only [Set.mem_ofPred_eq, Set.mem_iUnion, Finset.mem_range, exists_prop, E, Set.mem_inter_iff]
  561. rw [pos_succ]
  562. constructor
  563. · intro h
  564. refine ⟨ω n, ?_, rfl, by omega⟩
  565. by_contra! hlarge
  566. have := outside (ω n) hlarge
  567. have := pos_bound hv n ω
  568. omega
  569. · rintro ⟨m, _, rfl, hm⟩
  570. omega
  571. have hd : Set.PairwiseDisjoint (↑(range L)) E := by
  572. intro i _ j _ hij
  573. exact Set.disjoint_left.mpr fun ω hi hj ↦ hij (hi.1.symm.trans hj.1)
  574. have hm (i : ℕ) : MeasurableSet (E i) :=
  575. (measurableSet_eq_fun (measurable_pi_apply n) measurable_const).inter
  576. (measurableSet_eq_fun (pos_meas v n) measurable_const)
  577. rw [heq, measureReal_biUnion_finset hd (fun i _ ↦ hm i)]
  578. apply Finset.sum_congr rfl
  579. intro m _
  580. have h := (past_indep μ v n).measure_inter_preimage_eq_mul {m} {k-v m}
  581. (measurableSet_singleton _) (measurableSet_singleton _)
  582. change ((labelProduct μ) (E m)).toReal = _ * _
  583. change (labelProduct μ) (E m) = (labelProduct μ) {ω | ω n = m} * _ at h
  584. rw [h, ENNReal.toReal_mul, coordinate_mass]
  585. rfl
  586. lemma jump_le_one (a : ℕ → ℕ) (m : ℕ) : jump a m ≤ 1 := by
  587. rcases m with _ | (_ | i) <;> simp [jump]
  588. lemma sum_stage (a : ℕ → ℕ) (j : ℕ) (f : ℤ → ℝ) :
  589. (∑ m ∈ range (j+2), labelWeight a m * f (jump a m)) = integrate (stageAtoms a j) f := by
  590. induction j with
  591. | zero => simp [Finset.sum_range_succ, labelWeight, jump, stageAtoms, integrate]
  592. | succ j ih =>
  593. rw [show j+1+2 = (j+2)+1 by omega, Finset.sum_range_succ, ih]
  594. simp [labelWeight, jump, stageAtoms, integrate, atomWeight, add_comm]
  595. lemma true_cutoff (μ : Measure ℕ) [IsProbabilityMeasure μ] (a : ℕ → ℕ) (ha : Monotone a)
  596. (W : ℝ) (_hW : 0 < W) (hm : ∀ m, μ.real {m} = labelWeight a m / W)
  597. (j n : ℕ) (k : ℤ) (hk : (n : ℤ) - a j ≤ k) :
  598. (labelProduct μ).real {ω | posAt (jump a) n ω = k} = raw (stageAtoms a j) n k / W^n := by
  599. induction n generalizing k with
  600. | zero =>
  601. by_cases hz : k = 0
  602. · subst k
  603. simp [posAt, raw]
  604. · simp [posAt, raw, hz, Ne.symm hz]
  605. | succ n ih =>
  606. have hout (m : ℕ) (hm' : j+2 ≤ m) : (n : ℤ) + jump a m < k := by
  607. obtain ⟨i, rfl⟩ := Nat.exists_eq_add_of_le' (show 2 ≤ m by omega)
  608. have hai : a j ≤ a i := ha (by omega)
  609. simp only [jump]
  610. omega
  611. rw [finite_step μ _ (jump_le_one a) n k (j+2) hout]
  612. calc
  613. _ = ∑ m ∈ range (j+2), (labelWeight a m * raw (stageAtoms a j) n (k - jump a m)) / W^(n+1) := by
  614. apply Finset.sum_congr rfl
  615. intro m _
  616. have := jump_le_one a m
  617. rw [hm, ih _ (by omega), pow_succ]
  618. ring
  619. _ = _ := by rw [← Finset.sum_div, sum_stage a j (fun x ↦ raw (stageAtoms a j) n (k-x)), raw]
  620. end SparseWalk
  621. /-! The negation is stated with the two definitions of the official statement unfolded.
  622. This lets the module be checked without importing the official placeholder. -/
  623. noncomputable section
  624. open Filter Finset MeasureTheory ProbabilityTheory
  625. open scoped BigOperators Topology ENNReal
  626. namespace SparseWalk
  627. /-- For every prescribed time shift going to infinity, one span-one, integrable,
  628. centered integer walk has strictly positive return probabilities and arbitrarily
  629. large backward return ratios at arbitrarily late times. The law may depend on s. -/
  630. theorem unbounded_returns_for_shift (s : ℕ → ℕ) (hs : Tendsto s atTop atTop)
  631. (hle : ∀ᶠ n in atTop, s n ≤ n) :
  632. ∃ (P : Measure (ℕ → ℕ)) (X : ℕ → (ℕ → ℕ) → ℤ),
  633. IsProbabilityMeasure P ∧ (∀ i, Measurable (X i)) ∧ iIndepFun X P ∧
  634. (∀ i, Measure.map (X i) P = Measure.map (X 0) P) ∧
  635. Integrable (fun ω => (X 0 ω : ℝ)) P ∧ (∫ ω, (X 0 ω : ℝ) ∂P) = 0 ∧
  636. 0 < P {ω | X 0 ω = 0} ∧ 0 < P {ω | X 0 ω = 1} ∧
  637. (∀ u b : ℤ, 1 < u → ∃ z ∈ {z | 0 < P {ω | X 0 ω = z}}, ¬u ∣ z-b) ∧
  638. (∀ n, 0 < P.real {ω | (∑ i ∈ range n, X i ω) = 0}) ∧
  639. (∀ j : ℕ, ∃ n ≥ j+1, (j+1 : ℕ) <
  640. P.real {ω | (∑ i ∈ range (n-s n), X i ω) = 0} /
  641. P.real {ω | (∑ i ∈ range n, X i ω) = 0}) := by
  642. let a := magnitude s
  643. have ha : ∀ i, 0 < a i := magnitude_pos s
  644. have ham : Monotone a := (magnitude_strictMono _ hs hle).monotone
  645. let μ := labelLaw a
  646. let _ : IsProbabilityMeasure μ := labelLaw_probability ha
  647. let P := labelProduct μ
  648. let X := fun (i : ℕ) (ω : ℕ → ℕ) => jump a (ω i)
  649. let g := fun m => (jump a m : ℝ)
  650. let e := fun ω : ℕ → ℕ => ω 0
  651. have hme : Measurable e := measurable_pi_apply 0
  652. have hmg : Measurable g := measurable_of_countable _
  653. have hmap : P.map e = μ := Measure.infinitePi_map_eval (fun _ : ℕ ↦ μ) 0
  654. have hi : Integrable (fun ω => (X 0 ω : ℝ)) P := by
  655. have h : Integrable g (P.map e) := by rw [hmap]; exact jump_integrable ha
  656. exact (integrable_map_measure hmg.aestronglyMeasurable hme.aemeasurable).mp h
  657. have hmean : ∫ ω, (X 0 ω : ℝ) ∂P = 0 := by
  658. calc
  659. _ = ∫ m, g m ∂(P.map e) := (integral_map hme.aemeasurable hmg.aestronglyMeasurable).symm
  660. _ = 0 := by rw [hmap]; exact jump_integral ha
  661. have hW : 0 < totalMass a := by linarith [totalMass_ge_two a]
  662. have atom (m : ℕ) (hm : labelWeight a m = 1) : 0 < P {ω | X 0 ω = jump a m} := by
  663. have hp : 0 < P {ω | ω 0 = m} := by
  664. rw [show P {ω | ω 0 = m} = μ {m} from coordinate_mass μ 0 m,
  665. show μ {m} = _ from labelLaw_singleton a m, hm]
  666. exact ENNReal.ofReal_pos.mpr (one_div_pos.mpr hW)
  667. exact hp.trans_le (measure_mono (fun ω h => congrArg (jump a) h))
  668. have span : ∀ u b : ℤ, 1 < u → ∃ z ∈ {z | 0 < P {ω | X 0 ω = z}}, ¬u ∣ z-b := by
  669. intro u b hu
  670. by_cases hd : u ∣ 0-b
  671. · refine ⟨1, atom 1 rfl, ?_⟩
  672. intro hh
  673. have h1 : u ∣ 1 := by simpa using Int.dvd_sub hh hd
  674. exact (not_le_of_gt hu) (Int.le_of_dvd (by norm_num) h1)
  675. · exact ⟨0, atom 0 rfl, hd⟩
  676. let p := fun n => P.real {ω | posAt (jump a) n ω = 0}
  677. have hp (j m : ℕ) (hm : m ≤ a j) : p m = raw (stageAtoms a j) m 0 / (totalMass a)^m := by
  678. apply true_cutoff μ a ham _ hW (labelLaw_real_singleton a) j m 0
  679. exact sub_nonpos.mpr (by exact_mod_cast hm)
  680. refine ⟨P, X, inferInstance, fun i =>
  681. (measurable_of_countable (jump a)).comp (measurable_pi_apply i),
  682. label_indep μ (jump a), fun i => (label_map μ (jump a) i).trans
  683. (label_map μ (jump a) 0).symm, hi, hmean, atom 0 rfl, atom 1 rfl, span, ?_, ?_⟩
  684. · intro n
  685. change 0 < p n
  686. rw [hp n n ((magnitude_strictMono s hs hle).id_le n)]
  687. exact div_pos (raw_pos a n n) (pow_pos hW n)
  688. · exact arbitrarily_bad_full s hs hle (totalMass a) (stageMass_le_totalMass ha) p hp
  689. theorem fullDisproof :
  690. ¬ (∀ (Ω : Type) [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P],
  691. ∀ X : ℕ → Ω → ℤ,
  692. (∀ i, Measurable (X i)) →
  693. iIndepFun X P →
  694. (∀ i, Measure.map (X i) P = Measure.map (X 0) P) →
  695. Integrable (fun ω => (X 0 ω : ℝ)) P →
  696. (∫ ω, (X 0 ω : ℝ) ∂P) = 0 →
  697. (∀ u b : ℤ, 1 < u → ∃ z ∈ {z | 0 < P {ω | X 0 ω = z}}, ¬u ∣ z-b) →
  698. ∀ (s : ℕ → ℕ) (z : ℕ → ℤ),
  699. (∃ C : ℝ, ∀ᶠ n : ℕ in atTop, (s n : ℝ) ≤ C * Real.log (n : ℝ)) →
  700. (∃ B : ℤ, ∀ᶠ n : ℕ in atTop, |z n| ≤ B) →
  701. Tendsto (fun n =>
  702. (P {ω | (∑ i ∈ range (n-s n), X i ω) = -z n}).toReal /
  703. (P {ω | (∑ i ∈ range n, X i ω) = 0}).toReal) atTop (𝓝 1)) := by
  704. intro H
  705. obtain ⟨P, X, hP, hm, hI, hD, hi, hmean, _, _, span, _, hbad⟩ :=
  706. unbounded_returns_for_shift logShift logShift_tendsto (.of_forall logShift_le)
  707. let _ := hP
  708. have ht := H (ℕ → ℕ) P X hm hI hD hi hmean span logShift (fun _ => 0)
  709. logShift_growth ⟨0, .of_forall (fun _ => by simp)⟩
  710. obtain ⟨K,hK⟩ := eventually_atTop.mp (ht.eventually_lt_const (by norm_num : (1:ℝ)<2))
  711. obtain ⟨n,hn,hr⟩ := hbad (K+2)
  712. have he := hK n (by omega)
  713. simp only [neg_zero] at he
  714. simp only [Measure.real] at hr
  715. norm_num only [Nat.cast_add,Nat.cast_ofNat,Nat.cast_one] at hr
  716. linarith [Nat.cast_nonneg (α := ℝ) K]
  717. end SparseWalk
  718. #print axioms SparseWalk.unbounded_returns_for_shift
  719. #print axioms SparseWalk.fullDisproof
  720. theorem OMA.disproof : ¬ OMA.S_mo_511513.claim := SparseWalk.fullDisproof
  721. #print axioms SparseWalk.unbounded_returns_for_shift
  722. #print axioms OMA.disproof
  723. #print axioms SparseWalk.unbounded_ratios