|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Etienne Marion. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Etienne Marion, Joris van Winden |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.Probability.Independence.Basic |
| 9 | + |
| 10 | +import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap |
| 11 | + |
| 12 | +/-! |
| 13 | +# Stochastic processes with independent increments |
| 14 | +
|
| 15 | +A stochastic process `X : T → Ω → E` has independent increments if for any `n ≥ 1` and |
| 16 | +`t₁ ≤ ... ≤ tₙ`, the random variables `X t₂ - X t₁, ..., X tₙ - X tₙ₋₁` are independent. |
| 17 | +Equivalently, for any monotone sequence `(tₙ)`, the random variables `(X tₙ₊₁ - X tₙ)` |
| 18 | +are independent. |
| 19 | +
|
| 20 | +## Main definition |
| 21 | +
|
| 22 | +* `HasIndepIncrements`: A stochastic process `X : T → Ω → E` has independent increments if for any |
| 23 | + `n ≥ 1` and `t₁ ≤ ... ≤ tₙ`, the random variables `X t₂ - X t₁, ..., X tₙ - X tₙ₋₁` are |
| 24 | + independent. |
| 25 | +
|
| 26 | +## Main statement |
| 27 | +
|
| 28 | +* `hasIndepIncrements_iff_nat`: A stochastic process `X : T → Ω → E` has independent increments if |
| 29 | + and only if for any monotone sequence `(tₙ)`, the random variables `(X tₙ₊₁ - X tₙ)` are |
| 30 | + independent. |
| 31 | +
|
| 32 | +## Tags |
| 33 | +
|
| 34 | +independent increments |
| 35 | +-/ |
| 36 | + |
| 37 | +@[expose] public section |
| 38 | + |
| 39 | +open MeasureTheory Filter |
| 40 | + |
| 41 | +namespace ProbabilityTheory |
| 42 | + |
| 43 | +variable {T Ω E : Type*} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : T → Ω → E} |
| 44 | + [Preorder T] [MeasurableSpace E] |
| 45 | + |
| 46 | +section Def |
| 47 | + |
| 48 | +variable [Sub E] |
| 49 | + |
| 50 | +/-- A stochastic process `X : T → Ω → E` has independent increments if for any `n ≥ 1` and |
| 51 | +`t₁ ≤ ... ≤ tₙ`, the random variables `X t₂ - X t₁, ..., X tₙ - X tₙ₋₁` are independent. |
| 52 | +
|
| 53 | +Although this corresponds to the standard definition, dealing with `Fin` might make things |
| 54 | +complicated in some cases. Therefore we provide `HasIndepIncrements.of_nat` which instead requires |
| 55 | +to prove that for any monotone sequence `(tₙ)` that is eventually constant, |
| 56 | +the random variables `X tₙ₊₁ - X tₙ` are independent. -/ |
| 57 | +def HasIndepIncrements (X : T → Ω → E) (P : Measure Ω := by volume_tac) : Prop := |
| 58 | + ∀ n, ∀ t : Fin (n + 1) → T, Monotone t → |
| 59 | + iIndepFun (fun (i : Fin n) ω ↦ X (t i.succ) ω - X (t i.castSucc) ω) P |
| 60 | + |
| 61 | +protected lemma HasIndepIncrements.nat |
| 62 | + (hX : HasIndepIncrements X P) {t : ℕ → T} (ht : Monotone t) : |
| 63 | + iIndepFun (fun i ω ↦ X (t (i + 1)) ω - X (t i) ω) P := by |
| 64 | + refine iIndepFun_iff_finset.2 fun s ↦ ?_ |
| 65 | + obtain rfl | hs := s.eq_empty_or_nonempty |
| 66 | + · have := (hX 0 (fun _ ↦ t 0) (fun _ ↦ by grind)).isProbabilityMeasure |
| 67 | + exact iIndepFun.of_subsingleton |
| 68 | + · let g (x : s) : Fin (s.max' hs + 1) := ⟨x.1, Nat.lt_add_one_of_le (s.le_max' x.1 x.2)⟩ |
| 69 | + refine iIndepFun.precomp (g := g) ?_ (hX (s.max' hs + 1) (fun m ↦ t m) ?_) |
| 70 | + · simp [g, Function.Injective] |
| 71 | + · exact ht.comp Fin.val_strictMono.monotone |
| 72 | + |
| 73 | +protected lemma HasIndepIncrements.of_nat |
| 74 | + (h : ∀ t : ℕ → T, Monotone t → EventuallyConst t atTop → |
| 75 | + iIndepFun (fun i ω ↦ X (t (i + 1)) ω - X (t i) ω) P) : |
| 76 | + HasIndepIncrements X P := by |
| 77 | + intro n t ht |
| 78 | + let t' k := t ⟨min n k, by grind⟩ |
| 79 | + convert (h t' ?_ ?_).precomp Fin.val_injective with i ω |
| 80 | + · grind |
| 81 | + · grind |
| 82 | + · exact fun a b hab ↦ ht (by grind) |
| 83 | + · exact eventuallyConst_atTop.2 ⟨n, by grind⟩ |
| 84 | + |
| 85 | +lemma hasIndepIncrements_iff_nat : |
| 86 | + HasIndepIncrements X P ↔ |
| 87 | + ∀ t : ℕ → T, Monotone t → iIndepFun (fun i ω ↦ X (t (i + 1)) ω - X (t i) ω) P where |
| 88 | + mp h _ ht := h.nat ht |
| 89 | + mpr h := .of_nat (fun t ht _ ↦ h t ht) |
| 90 | + |
| 91 | +end Def |
| 92 | + |
| 93 | +lemma HasIndepIncrements.indepFun_sub_sub [Sub E] (hX : HasIndepIncrements X P) {r s t : T} |
| 94 | + (hrs : r ≤ s) (hst : s ≤ t) : |
| 95 | + (X s - X r) ⟂ᵢ[P] (X t - X s) := by |
| 96 | + let τ : ℕ → T |
| 97 | + | 0 => r |
| 98 | + | 1 => s |
| 99 | + | _ => t |
| 100 | + exact hX.nat (t := τ) (fun _ ↦ by grind) |>.indepFun (by grind : 0 ≠ 1) |
| 101 | + |
| 102 | +lemma HasIndepIncrements.indepFun_eval_sub [SubNegZeroMonoid E] (hX : HasIndepIncrements X P) |
| 103 | + {r s t : T} (hrs : r ≤ s) (hst : s ≤ t) (h : ∀ᵐ ω ∂P, X r ω = 0) : |
| 104 | + (X s) ⟂ᵢ[P] (X t - X s) := by |
| 105 | + refine (hX.indepFun_sub_sub hrs hst).congr ?_ .rfl |
| 106 | + filter_upwards [h] with ω hω using by simp [hω] |
| 107 | + |
| 108 | +protected lemma HasIndepIncrements.map' {F G : Type*} [MeasurableSpace G] [FunLike F E G] |
| 109 | + [AddGroup E] [SubtractionMonoid G] [AddMonoidHomClass F E G] {f : F} (hf : Measurable f) |
| 110 | + (hX : HasIndepIncrements X P) : |
| 111 | + HasIndepIncrements (fun t ω ↦ f (X t ω)) P := by |
| 112 | + intro n t ht |
| 113 | + simp_rw [← map_sub] |
| 114 | + exact (hX n t ht).comp (fun _ ↦ f) (fun _ ↦ hf) |
| 115 | + |
| 116 | +protected lemma HasIndepIncrements.map {R F : Type*} [Semiring R] [SeminormedAddCommGroup E] |
| 117 | + [Module R E] [OpensMeasurableSpace E] [SeminormedAddCommGroup F] [Module R F] |
| 118 | + [MeasurableSpace F] [BorelSpace F] (L : E →L[R] F) (hX : HasIndepIncrements X P) : |
| 119 | + HasIndepIncrements (fun t ω ↦ L (X t ω)) P := |
| 120 | + hX.map' L.measurable |
| 121 | + |
| 122 | +protected lemma HasIndepIncrements.smul {R : Type*} [AddGroup E] [DistribSMul R E] |
| 123 | + [MeasurableConstSMul R E] (hX : HasIndepIncrements X P) (c : R) : |
| 124 | + HasIndepIncrements (fun t ω ↦ c • (X t ω)) P := |
| 125 | + hX.map' (f := DistribSMul.toAddMonoidHom E c) (MeasurableConstSMul.measurable_const_smul c) |
| 126 | + |
| 127 | +protected lemma HasIndepIncrements.neg [AddCommGroup E] [MeasurableNeg E] |
| 128 | + (hX : HasIndepIncrements X P) : |
| 129 | + HasIndepIncrements (-X) P := |
| 130 | + hX.map' (f := negAddMonoidHom) measurable_neg |
| 131 | + |
| 132 | +end ProbabilityTheory |
0 commit comments