Repository navigation
feat: the discrete-time Snell envelope of an ℝ≥0∞-valued process - #405
Conversation
Define `ProbabilityTheory.snellEnvelope E ℱ P n`, the essential supremum over the bounded stopping times τ ≥ n of the conditional Lebesgue expectations `P⁻[E τ|ℱ n]`, and prove that it is adapted, dominates an adapted process, is an ℝ≥0∞-valued supermartingale, is below every ℝ≥0∞-valued supermartingale that dominates the process, has expectation ⨆ τ, ∫⁻ E τ ∂P at time 0, is a test supermartingale when these expectations are at most 1, and agrees a.e. with the essential supremum of the real conditional expectations under finite expectations. Add the general lemmas `condLExp_piecewise` and `condLExp_ae_le_iff_forall_setLIntegral_le`. Co-Authored-By: Claude Code <noreply@github.com>
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
…nvelope API - Add `boundedStoppingTimesFrom ℱ n` with its membership, constant-time, antitonicity and pasting lemmas, and state the Snell envelope and its API over it. - Generalise `IsENNSupermartingale.snellEnvelope_ae_le` to supermartingales for a set `S` with `hP : P ∈ S`. - Extract `lintegral_stoppedValueLimsup_le_sum` into `StoppedValue.lean`. - Prove `isCondEVar_iff_condLExp_le` with `condLExp_ae_le_iff_forall_setLIntegral_le`. Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
🟡 documentation — request_changes claude/claude-opus-5-5
Docstrings are present and mostly accurate, but the SnellEnvelope module docstring still overstates snellEnvelope_ae_eq_essSupFamily_condExp by dropping its measurability hypothesis.
LMLExplore/Probability/Martingale/SnellEnvelope.lean:25— Module docstring says the envelope agrees a.s. with the realcondExpform 'when the values of the process have finite expectations', but the theorem also requireshE : ∀ n, Measurable (E n); the claim overstates the statement. Fix: Reword to 'When the values of the process are measurable with finite expectations, ...', matching the theorem docstring at line 268.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 15s · 57.2k in (51k cache read, 6.2k cache write) / 1.4k out tokens · reviewing this diff · rubric ·
…e-worker1 # Conflicts: # LMLExplore/Probability/Process/StoppedValue.lean
Co-Authored-By: Claude Code <noreply@github.com>
…e-worker1 # Conflicts: # LMLExplore/Probability/Process/StoppedValue.lean
486cbfc
This PR adds the discrete-time Snell envelope of an
ℝ≥0∞-valued process, with the properties that EValues Layer 3, item 1 ("Definition and characterization"), asks of it in its "Snell envelope" bullet. It adds two new files,LMLExplore/Probability/Martingale/SnellEnvelope.lean(298 lines) andLMLExplore/MeasureTheory/Function/ConditionalLExpectation.lean(78 lines), and edits two existing files:LMLExplore/Probability/Process/StoppedValue.leangains the public lemmaMeasureTheory.lintegral_stoppedValueLimsup_le_sum(at a random time bounded byN, the integral of anℝ≥0∞-valued process is at most the sum of its integrals at the times up toN) and the importMathlib.MeasureTheory.Integral.Lebesgue.Addforlintegral_finsetSum'. It is the finite-expectation step ofsnellEnvelope_ae_eq_essSupFamily_condExp, and belongs next to the otherstoppedValueLimsuplemmas.LMLExplore/EValues/CondEVariable.lean:isCondEVar_iff_condLExp_le(statement unchanged) is re-proved with the newcondLExp_ae_le_iff_forall_setLIntegral_le, removing the copy of that lemma's argument which its proof contained, and the file imports the newLMLExplore.MeasureTheory.Function.ConditionalLExpectation.ProbabilityTheory.snellEnvelope E ℱ P nis the essential supremum underP(LMLExplore'sMeasureTheory.essSupFamily, merged in #400) over the stopping timesτ : Ω → ℕwithn ≤ τandτ ≤ Nfor some constantN. The supremum is taken of the conditional expectationsP⁻[fun ω ↦ E (τ ω) ω|ℱ n].Departure from the roadmap's wording. The roadmap asks for the essential supremum of Mathlib's
condExp (ℱ n) Pof the real values(E τ).toReal, under⨆ τ, ∫⁻ E τ ∂P < ∞. The definition here instead uses Mathlib's conditional Lebesgue expectationcondLExp(P⁻[X|m], available at the pinned Mathlib). It needs no integrability, so the envelope is a supermartingale for every process.snellEnvelope_ae_eq_essSupFamily_condExpproves that it agrees almost surely with the roadmap's real-valued form as soon as eachE nis measurable with finite expectation, a hypothesis that the roadmap's implies. The proof goes through Mathlib'stoReal_condLExp. The roadmap's probability measure is weakened to Mathlib's[SigmaFiniteFiltration P ℱ].Main declarations (
ProbabilityTheory):boundedStoppingTimesFrom ℱ nof stopping timesτwithn ≤ τ ≤ Nfor some constantN, withmem_boundedStoppingTimesFrom_iff(@[simp]),const_mem_boundedStoppingTimesFrom,boundedStoppingTimesFrom_antiandpiecewise_mem_boundedStoppingTimesFrom.snellEnvelope,snellEnvelope_def(proved by(rfl); the body is not exposed),adapted_snellEnvelope(holds for every process).condLExp_ae_le_snellEnvelope,snellEnvelope_ae_le,snellEnvelope_ae_le_iff.ae_le_snellEnvelope,E n ≤ᵐ[P] snellEnvelope E ℱ P nfor an adaptedE.setLIntegral_snellEnvelope: the integral of the envelope over anℱ n-measurablesis⨆of∫⁻ ω in s, E (τ ω) ω ∂Pover the bounded stopping timesτ ≥ n.lintegral_snellEnvelope_zerogives∫⁻ L 0 ∂P = ⨆ τ, ∫⁻ E τ ∂Pover the bounded stopping times.isENNSupermartingale_snellEnvelope: it is anIsENNSupermartingalefor{P}(Layer 2.1), for every process.IsENNSupermartingale.snellEnvelope_ae_le: it is below everyℝ≥0∞-valued supermartingale for{P}that dominatesEalmost surely at every time. The proof uses the existing bounded optional stoppingIsENNSupermartingale.setLIntegral_stoppedValueLimsup_le_of_le_const.isTestSupermartingale_snellEnvelope: if the expectations at bounded stopping times are at most1, it is anIsTestSupermartingalefor{P}.snellEnvelope_ae_eq_essSupFamily_condExp: the comparison with the realcondExpform described above, for a process of measurable functions with finite expectations.General lemmas (
MeasureTheory, inLMLExplore/MeasureTheory/Function/ConditionalLExpectation.lean, which mirrors Mathlib'sMathlib/MeasureTheory/Function/ConditionalLExpectation.lean). Neither exists in Mathlib, Tau Ceti, Statlib or LML; I grepped forcondLExptogether withpiecewise,indicator,≤ᵐandae_le.condLExp_piecewise:P⁻[s.piecewise X Y|m] =ᵐ[P] s.piecewise P⁻[X|m] P⁻[Y|m]for anm-measurables, with no measurability or integrability ofXandY. This is the pasting step that makes the family of conditional expectations directed upward.condLExp_ae_le_iff_forall_setLIntegral_le:P⁻[X|m] ≤ᵐ[P] Yfor anm-measurableYexactly when∫⁻ ω in s, X ω ∂P ≤ ∫⁻ ω in s, Y ω ∂Pfor everym-measurables.How the proof works. Pasting two bounded stopping times
τ₁, τ₂ ≥ nalong theℱ n-measurable set where the first conditional expectation is the larger gives another such stopping time (Mathlib'sIsStoppingTime.piecewise_of_le). Its conditional expectation is the maximum of the two (condLExp_piecewise), so the family is directed upward.setLIntegral_essSupFamily_of_directedthen computes the set integrals of the envelope. The supermartingale inequality follows because the stopping times aftern + 1are among those aftern. Sources, credited in the module docstring: Föllmer and Schied, Stochastic Finance, 4th ed., Chapter 6 (the essential-supremum description of the Snell envelope), and Ramdas, Ruf, Larsson and Koolen, arXiv:2009.03167v3, Lemma 6 and Appendix A (its use for e-processes).Consumer milestone: EValues Layer 3, item 1, the bullet "[RRLK, Lemma 6]". Its implication from validity at bounded stopping times to "for each
P ∈ S,EisP-almost surely dominated by a test supermartingale forP" isisTestSupermartingale_snellEnvelopetogether withae_le_snellEnvelope. What remains after this PR in Layer 3, item 1 is the [RRLK, Lemma 6] equivalence itself, including the step to a test martingale throughmartingalePart. That step is stated withIsEProcess, which has since landed onmainin #401, and is left to a follow-up pull request so that this one stays on the Snell envelope. This PR shares no declarations with #401 (merged), #399 or any other open pull request.This PR removes or renames no public declaration.
Verification: local checks only, not CI (
tauceti-local-checks verify --policy ordinary, EXIT 0). It reportedscope: scoped: against 4581f34e5bbf909a83ac7ef36ff5da465f7784ddandlocal-axioms: checked 4 changed module(s), 78 declaration(s); 0 violation(s). The whole-librarylake build --iofail, module-system, header-style and changed-module environment lint all passed.Roadmap: EValues
🤖 Prepared with Claude Code