Repository navigation
feat: the discrete-time Snell envelope of an ℝ≥0∞-valued process #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lmlexplore-automation
merged 5 commits into
LeanMachineLearning:main
from
RemyDegenne:roadmap/snell-envelope-worker1
Nov 15, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1da2451
feat: the discrete-time Snell envelope of an ℝ≥0∞-valued process
RemyDegenne 578a377
refactor: name the bounded stopping times after a time in the Snell e…
RemyDegenne 0fb0946
Merge remote-tracking branch 'origin/main' into roadmap/snell-envelop…
RemyDegenne 00bb14f
doc: state the measurability hypothesis of the real condExp comparison
RemyDegenne 8a1802b
Merge remote-tracking branch 'origin/main' into roadmap/snell-envelop…
RemyDegenne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
LMLExplore/MeasureTheory/Function/ConditionalLExpectation.lean
|
RemyDegenne marked this conversation as resolved.
Resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| /- | ||
| Copyright (c) 2026 LMLExplore contributors. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: LMLExplore contributors | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.MeasureTheory.Function.ConditionalLExpectation | ||
|
|
||
| /-! | ||
| # Comparison and pasting of conditional Lebesgue expectations | ||
|
|
||
| Two facts about Mathlib's conditional expectation `P⁻[X|m]` of an `ℝ≥0∞`-valued function, which | ||
| needs no integrability or measurability of `X`: | ||
| * it is almost everywhere below an `m`-measurable function `Y` exactly when the set integrals of | ||
| `X` over `m`-measurable sets are below those of `Y`; | ||
| * it commutes with pasting two functions along an `m`-measurable set. | ||
|
|
||
| The second fact makes the conditional expectations of the values of a process at the stopping | ||
| times after a given time a family directed upward, the step behind the Snell envelope of optimal | ||
| stopping. | ||
|
|
||
| ## Main statements | ||
|
|
||
| * `MeasureTheory.condLExp_ae_le_iff_forall_setLIntegral_le`: comparison with an `m`-measurable | ||
| function through set integrals. | ||
| * `MeasureTheory.condLExp_piecewise`: `P⁻[s.piecewise X Y|m] =ᵐ[P] s.piecewise P⁻[X|m] P⁻[Y|m]` | ||
| for an `m`-measurable set `s`. | ||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| open Set | ||
| open scoped ENNReal | ||
|
|
||
| namespace MeasureTheory | ||
|
|
||
| variable {Ω : Type*} {m mΩ : MeasurableSpace Ω} {P : Measure Ω} {X Y : Ω → ℝ≥0∞} | ||
|
|
||
| /-- For a sub-σ-algebra `m` on which `P` is σ-finite and an `m`-measurable `Y`, the conditional | ||
| expectation `P⁻[X|m]` is almost everywhere below `Y` exactly when the integral of `X` over every | ||
| `m`-measurable set is at most that of `Y`. -/ | ||
| theorem condLExp_ae_le_iff_forall_setLIntegral_le (hm : m ≤ mΩ) [SigmaFinite (P.trim hm)] | ||
| (hY : Measurable[m] Y) : | ||
| P⁻[X|m] ≤ᵐ[P] Y ↔ ∀ s, MeasurableSet[m] s → ∫⁻ ω in s, X ω ∂P ≤ ∫⁻ ω in s, Y ω ∂P := by | ||
| refine ⟨fun h s hs ↦ ?_, fun h ↦ ?_⟩ | ||
| · rw [← setLIntegral_condLExp hm P X hs] | ||
| exact lintegral_mono_ae (ae_restrict_of_ae h) | ||
| · refine ae_le_of_ae_le_trim (hm := hm) <| ae_le_of_forall_setLIntegral_le_of_sigmaFinite | ||
| (μ := P.trim hm) (measurable_condLExp _ _ _) fun s hs _ ↦ ?_ | ||
| rw [setLIntegral_condLExp_trim hm _ _ hs, setLIntegral_trim hm hY hs] | ||
| exact h s hs | ||
|
|
||
| /-- The conditional expectation given `m` of two functions pasted along an `m`-measurable set is | ||
| almost everywhere the pasting of their conditional expectations. No measurability or | ||
| integrability of the functions is needed. -/ | ||
| theorem condLExp_piecewise (hm : m ≤ mΩ) [SigmaFinite (P.trim hm)] {s : Set Ω} | ||
| [DecidablePred (· ∈ s)] (hs : MeasurableSet[m] s) (X Y : Ω → ℝ≥0∞) : | ||
| P⁻[s.piecewise X Y|m] =ᵐ[P] s.piecewise P⁻[X|m] P⁻[Y|m] := by | ||
| refine (ae_eq_condLExp hm P _ | ||
| ((measurable_condLExp m P X).piecewise hs (measurable_condLExp m P Y)) fun t ht ↦ ?_).symm | ||
| have hs' : MeasurableSet s := hm s hs | ||
| have ht' : MeasurableSet t := hm t ht | ||
| -- Split `t` along `s`; on each part both sides reduce to one conditional expectation. | ||
| rw [← lintegral_inter_add_sdiff _ t hs', ← lintegral_inter_add_sdiff (s.piecewise X Y) t hs'] | ||
| congr 1 | ||
| · calc ∫⁻ ω in t ∩ s, s.piecewise P⁻[X|m] P⁻[Y|m] ω ∂P = ∫⁻ ω in t ∩ s, P⁻[X|m] ω ∂P := | ||
| setLIntegral_congr_fun (ht'.inter hs') fun ω hω ↦ piecewise_eq_of_mem _ _ _ hω.2 | ||
| _ = ∫⁻ ω in t ∩ s, X ω ∂P := setLIntegral_condLExp hm P X (ht.inter hs) | ||
| _ = ∫⁻ ω in t ∩ s, s.piecewise X Y ω ∂P := | ||
| (setLIntegral_congr_fun (ht'.inter hs') fun ω hω ↦ piecewise_eq_of_mem s X Y hω.2).symm | ||
| · calc ∫⁻ ω in t \ s, s.piecewise P⁻[X|m] P⁻[Y|m] ω ∂P = ∫⁻ ω in t \ s, P⁻[Y|m] ω ∂P := | ||
| setLIntegral_congr_fun (ht'.diff hs') fun ω hω ↦ piecewise_eq_of_notMem _ _ _ hω.2 | ||
| _ = ∫⁻ ω in t \ s, Y ω ∂P := setLIntegral_condLExp hm P Y (ht.diff hs) | ||
| _ = ∫⁻ ω in t \ s, s.piecewise X Y ω ∂P := | ||
| (setLIntegral_congr_fun (ht'.diff hs') fun ω hω ↦ piecewise_eq_of_notMem s X Y hω.2).symm | ||
|
|
||
| end MeasureTheory |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.