Repository navigation
feat: convergence and optional stopping of ℝ≥0∞-valued supermartingales at stopping times in WithTop ℕ - #395
Conversation
…es at stopping times in WithTop ℕ Co-Authored-By: Claude Code <noreply@github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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 |
…e_top
Delete the private helper `natCast_add_one_le_of_lt` in favour of Mathlib's
`ENat.natCast_add_one_le_iff`. Add `IsTestSupermartingale.lintegral_zero_ne_top`
and use it at every site that rebuilt it inline. Add the simp lemma
`stoppedValueLimsup_natCast` for `ℕ`-valued random times, from which
`stoppedValueLimsup_const` now follows. Factor the inclusion
`s ∩ {σ ≤ N} ⊆ s \ {σ = ⊤}` out of the general optional-stopping proof.
Co-Authored-By: Claude Code <noreply@github.com>
…ingale limit bounds Add IsTestSupermartingale.setLIntegral_limsup_le, lintegral_limsup_le and lintegral_limsup_le_one. Convert between Mathlib's WithTop.some and the Nat.cast statements through private helpers using Nat.cast_withTop, and prove stoppedValueLimsup_of_eq_coe through WithTop.untopA_eq_untop. Co-Authored-By: Claude Code <noreply@github.com>
…Value Move measurableSet_le_natCast, measurableSet_natCast_lt, isStoppingTime_natCast and min_natCast from private helpers in OptionalStopping.lean to public MeasureTheory lemmas in Probability/Process/StoppedValue.lean. Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
🟡 naming — request_changes claude/claude-opus-5-5
Names describe conclusions in standard terminology and no notation is introduced, but stoppedValueLimsup_of_eq_coe is named after a coercion (WithTop.some) its statement does not use: it is stated at Nat.cast, which the rest of the file consistently calls natCast.
LMLExplore/Probability/Process/StoppedValue.lean:71—stoppedValueLimsup_of_eq_coehas hypothesisτ ω = (n : WithTop ℕ), which isNat.cast, not the coercionWithTop.some. The file explicitly separates the two and names its other cast lemmas_natCast, so_coemisdescribes the hypothesis. Fix: Rename tostoppedValueLimsup_of_eq_natCastand update all uses: lines 29, 93, 120, 123 and 126 here, plushg_succandhginOptionalStopping.lean.
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 · 26s · 83.4k in (66.9k cache read, 16.5k cache write) / 2.5k out tokens · reviewing this diff · rubric ·
…name stoppedValueLimsup_of_eq_natCast Move IsStoppingTime.measurableSet_le_natCast, IsStoppingTime.measurableSet_natCast_lt, isStoppingTime_natCast and IsStoppingTime.min_natCast from Process/StoppedValue.lean to Process/Stopping.lean, and rename stoppedValueLimsup_of_eq_coe to stoppedValueLimsup_of_eq_natCast, since its hypothesis is stated at Nat.cast. Co-Authored-By: Claude Code <noreply@github.com>
|
Do check what the conflict actually is before resolving it mechanically. If |
…nal-stopping-worker2 # Conflicts: # LMLExplore/Probability/Process/Stopping.lean
13fc17b
This PR proves the almost sure convergence of
ℝ≥0∞-valued supermartingales and optional stopping at arbitrary stopping times with values inWithTop ℕ. These are the EValues roadmap's Layer 2.2 target, Convergence and optional stopping inℝ≥0∞[RW, Fact 7.5; ShSVV11]. It builds onIsENNSupermartingaleandIsTestSupermartingale(EValues/TestSupermartingale.lean, merged in #385). It keeps their conventions:ℝ≥0∞values, set integrals, any filtration indexed byℕ, any nullS.Roadmap: EValues
LMLExplore/Probability/Process/StoppedValue.lean(129 lines, namespaceMeasureTheory) definesstoppedValueLimsup u τ ω:u n ωwhereτ ω = n, andlimsup (u · ω)whereτ ω = ⊤. This is the convention the roadmap fixes for the value of a process at a possibly infinite stopping time [RRLK; RLKR23, (1.2)]. The definition follows the shape inSuggested.lean, with a general value typeβ. Its API:stoppedValueLimsup_of_eq_coeandstoppedValueLimsup_of_eq_topgive its values;stoppedValueLimsup_congrsays the value atωdepends only onτ ω. The body is not exposed.stoppedValueLimsup_natCast(@[simp]) reads the process at anℕ-valued random timefun ω ↦ (τ ω : WithTop ℕ).stoppedValueLimsup_constfollows from it, andstoppedValueLimsup_top(@[simp]) handles the constant time⊤.stoppedValueLimsup_eq_stoppedValuesays it agrees with Mathlib'sstoppedValuewhereτis finite.tendsto_stoppedValueLimsup_min: for a convergent process, the values atmin τ Nconverge to the value atτ.measurable_stoppedValueLimsup.LMLExplore/Probability/Martingale/OptionalStopping.lean(303 lines, namespaceProbabilityTheory) goes in the home the roadmap suggests for this material. ForIsENNSupermartingale M ℱ S,P ∈ Sfinite and∫⁻ M 0 ∂P ≠ ∞:ae_tendsto_limsup(almost sure convergence to thelimsup) andae_limsup_lt_top(the limit is almost surely finite). They come from Mathlib'sSubmartingale.exists_ae_tendsto_of_bddapplied to-(M n).toReal, through the existing bridgeIsENNSupermartingale.supermartingale_toReal.setLIntegral_limsup_leandlintegral_limsup_le: forℱ n-measurables,∫⁻ in s, limsup M ≤ ∫⁻ in s, M n, so in particular∫⁻ M ∞ ≤ ∫⁻ M 0.setLIntegral_stoppedValueLimsup_le_of_le_const, the bounded case: for stopping timesσ ≤ τ ≤ Nandsmeasurable forhσ.measurableSpace,∫⁻ in s, M_τ ≤ ∫⁻ in s, M_σ. It holds for everyℝ≥0∞-valued supermartingale under every member of the null, with no finiteness or integrability. The proof works inℝ≥0∞: the timesmax σ (min τ k)interpolate fromσtoτand move only on theℱ k-measurable eventσ ≤ k < τ. Mathlib'sSubmartingale.expected_stoppedValue_monois the real, integrable version.setLIntegral_stoppedValueLimsup_le, the general case: the same inequality for arbitrary stopping timesσ ≤ τinWithTop ℕ. On{σ = ⊤}the two values agree. On{σ < ⊤}we apply the bounded case tomin σ N ≤ min τ Nons ∩ {σ ≤ N}(Mathlib'smeasurableSet_inter_le_const_iff) and letN → ∞with Fatou's lemma and the almost sure convergence.lintegral_stoppedValueLimsup_le:∫⁻ M_τ ≤ ∫⁻ M 0.For
IsTestSupermartingale, with no finiteness hypothesis beyondIsFiniteMeasure P, the file addsae_tendsto_limsup,ae_limsup_lt_top,setLIntegral_stoppedValueLimsup_leandlintegral_stoppedValueLimsup_le(the signature inSuggested.lean, stated for anyS). It also addslintegral_stoppedValueLimsup_le_oneandisEVar_stoppedValueLimsup: for a null of probability measures, the value of a test supermartingale at every stopping time inWithTop ℕis an e-variable (Statlib'sIsEVar).EValues/TestSupermartingale.leangainsIsTestSupermartingale.lintegral_zero_ne_top(finite initial expectation under every member of the null). It replaces the inline term((hM.lintegral_zero_le P hP).trans_lt ENNReal.one_lt_top).neat its three uses there and four uses in the new file.Consumers: Layer 3.1 of the same roadmap (
IsEProcess.isEVar_stoppedValueLimsupinSuggested.lean, and [RRLK, Lemma 6]'s equivalence with validity at all stopping times under thestoppedValueLimsupconvention) passes through test supermartingales that dominate e-processes and usesisEVar_stoppedValueLimsupandsetLIntegral_stoppedValueLimsup_le. Layer 3.2's Ville inequalities at stopping times inWithTop ℕuse them too. This PR does not depend on the stopped processes of the open #391: the bounded case is proved directly and does not overlap with it.Reuse: I searched the pinned Mathlib, Tau Ceti, LML, Statlib and
LMLExplore/for a value at infinite stopping times (stoppedValueLimsup,limsupwithstoppedValue), for convergence ofℝ≥0∞-valued or nonnegative supermartingales, and for optional stopping inℝ≥0∞or at unbounded stopping times. I found none. Mathlib's convergence (Submartingale.exists_ae_tendsto_of_bdd) and optional stopping (Submartingale.expected_stoppedValue_mono) are real-valued, and the latter only covers bounded times. The file has two private helpers, order facts about the interpolating timesmax a (min b k)inWithTop ℕ. The step↑k < b → ↑(k + 1) ≤ bthey use is Mathlib'sENat.natCast_add_one_le_iff. No proof is longer than 50 lines. No public declaration is removed or renamed, and no Mathlib material is vendored.Milestone: EValues Layer 2.2. With this PR both bullets of Layer 2.2 are covered (convergence with
∫⁻ M ∞ ≤ ∫⁻ M 0, and optional stopping atσ ≤ τinWithTop ℕwithstoppedValueLimsup). Next comes Layer 2.3, the exact Ville identity and Ville's inequality forℝ≥0∞-valued test supermartingales.Local checks (not CI):
tauceti-local-checks verify --policy ordinaryexited 0.scope: scoped: against dca76852a43d553a35fb2afa9d31ae4b37501ddelake build --iofailsucceeded (8601 jobs).local-axioms: checked 3 changed module(s), 95 declaration(s); 0 violation(s)🤖 Prepared with Claude Code