Skip to content

feat: the characterization of e-processes by domination with test (super)martingales [RRLK, Lemma 6] - #442

Merged
lmlexplore-automation[bot] merged 3 commits into
LeanMachineLearning:mainfrom
RemyDegenne:roadmap/rrlk-lemma-6-worker4
Nov 15, 2026
Merged

lmlexplore-automation[bot] merged 3 commits into
LeanMachineLearning:mainfrom
RemyDegenne:roadmap/rrlk-lemma-6-worker4

Conversation

@RemyDegenne

@RemyDegenne RemyDegenne commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR proves the characterization of e-processes [RRLK, Lemma 6]: for a null of probability measures, an adapted ℝ≥0∞-valued process is an e-process exactly when, under each member P of the null, it is P-almost surely dominated by a test supermartingale for P, or by a test martingale for P. Validity at ℕ-valued stopping times is therefore the same as validity at bounded stopping times, and the same as validity at WithTop ℕ-valued stopping times with either the limsup or the liminf convention at infinity. The PR then derives Ville's inequality for e-processes from the domination. It changes three existing files (about 210 added lines) and adds no new file.

Roadmap target: EValues, Layer 3, item 1, Definition and characterization, bullet "[RRLK, Lemma 6]. For an adapted E and any S, prove the equivalence of: …". The definition, the essential supremum of a family and the Snell envelope bullets of that item are already on main (#401, #400, #405), so after this PR nothing is left of Layer 3, item 1. The PR also covers the first bullet of Layer 3, item 2: "Ville's inequality for e-processes, P {ω | ∃ n, α⁻¹ ≤ E n ω} ≤ α for P ∈ S, and its forms at stopping times with values in WithTop ℕ, from the domination of item 1 and Layer 2.3". This is the first consumer of the characterization, and the completion check "Ville's inequality of Layer 3.2 yields its level-α sequential test" relies on it. After this PR, the rest of Layer 3, item 2 is still open: the closure properties (mixtures of the null, the effective null, minima over S ∪ T, time-mixtures, optional continuation), the counterexample for running maxima, and [RRLK, Lemmas 2–3].

Main declarations:

  • ProbabilityTheory.isEProcess_tfae (EValues/EProcess.lean). For hS : ∀ P ∈ S, IsProbabilityMeasure P and an adapted E, it proves the six-way TFAE of the roadmap bullet: IsEProcess E ℱ S; ∫⁻ E τ ∂P ≤ 1 at every bounded stopping time (boundedStoppingTimesFrom ℱ 0); ∫⁻ stoppedValueLimsup E τ ∂P ≤ 1 at every WithTop ℕ-valued stopping time; the same with liminf at infinity (Mathlib's stoppedValue where τ is finite); P-a.s. domination by an IsTestSupermartingale _ ℱ {P}; and the same by an IsTestMartingale _ ℱ {P}, for each P ∈ S.
  • IsEProcess.exists_isTestSupermartingale_ae_le and IsEProcess.exists_isTestMartingale_ae_le are the two domination directions under a single probability measure P ∈ S, with no hypothesis on the other members. The converse is the reverse direction of the named iffs isEProcess_iff_forall_exists_isTestSupermartingale and isEProcess_iff_forall_exists_isTestMartingale.
  • IsEProcess.isEVar_stoppedValueLimsup: the value of an e-process at every WithTop ℕ-valued stopping time is an e-variable.
  • IsEProcess.measure_exists_le_le (P {∃ n, c ≤ E n} ≤ c⁻¹), IsEProcess.measure_exists_inv_le_le (P {∃ n, α⁻¹ ≤ E n} ≤ α) and IsEProcess.measure_inv_le_stoppedValueLimsup_le (P {α⁻¹ ≤ stoppedValueLimsup E τ} ≤ α): Ville's inequality for e-processes.
  • IsTestSupermartingale.exists_isTestMartingale_ge (EValues/TestSupermartingale.lean). Given [SigmaFiniteFiltration P ℱ] and P ∈ S, it gives a test martingale M' for {P} with M' 0 = M 0 and M ≤ M' pointwise. Concretely, M' n = M n + ∑ k < n, (M k - P⁻[M (k + 1)|ℱ k]). This is the martingale part of the Doob decomposition, computed in ℝ≥0∞.
  • MeasureTheory.stoppedValueLimsup_mono (Probability/Process/StoppedValue.lean): stoppedValueLimsup is monotone in the process, for a complete lattice of values.

Notes for reviewers:

  • The roadmap says that the step to a martingale "uses Doob's decomposition (Mathlib's martingalePart)". Here the decomposition is computed directly in ℝ≥0∞ with Mathlib's conditional Lebesgue expectation condLExp. The predictable decreases M k - P⁻[M (k + 1)|ℱ k] are truncated subtractions that are exact almost surely, because P⁻[M (k + 1)|ℱ k] ≤ M k almost surely. The martingale identity is then a computation with lower integrals. Going through the real martingalePart would need integrability, toReal/ofReal round trips and a real-martingale-to-IsTestMartingale bridge that does not exist on main. The ℝ≥0∞ version gets the same martingale with no integrability hypothesis, and it dominates M everywhere, not just almost surely.
  • The test supermartingale is the Snell envelope snellEnvelope E ℱ P of feat: the discrete-time Snell envelope of an ℝ≥0∞-valued process #405, through isTestSupermartingale_snellEnvelope and ae_le_snellEnvelope. The direction from domination to validity at WithTop ℕ-valued stopping times uses optional stopping (IsTestSupermartingale.lintegral_stoppedValueLimsup_le_one, feat: convergence and optional stopping of ℝ≥0∞-valued supermartingales at stopping times in WithTop ℕ #395) and the new stoppedValueLimsup_mono. Ville's inequality uses IsTestSupermartingale.measure_exists_le_le (feat: the exact Ville identity, the extended Ville inequality and Ville's inequality in ℝ≥0∞ #399).
  • Placement: the characterization extends EValues/EProcess.lean, the file that defines IsEProcess. That file now imports Probability/Martingale/SnellEnvelope and ExactVille. The martingale domination is a statement about test supermartingales only, so it goes next to their converse wealth decomposition [WSR24, Proposition 3] in EValues/TestSupermartingale.lean. Two short proof steps of the TFAE are private helpers shared by the named domination lemmas and the TFAE, to avoid duplicating them.
  • Generality: no dominating measure, any filtration, any null of probability measures. The domination lemmas only need P to be a probability measure, not the whole null. exists_isTestMartingale_ge only needs SigmaFiniteFiltration P ℱ.
  • No declaration is removed or renamed.

Quality pass:

Roadmap: EValues

🤖 Prepared with Claude Code

…per)martingales [RRLK, Lemma 6]

Co-Authored-By: Claude Code <noreply@github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lmlexplore-automation lmlexplore-automation Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts and removed awaiting-CI CI has not yet reported on the latest commit labels Nov 15, 2026

@RemyDegenne RemyDegenne Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 reuse — request_changes claude/claude-opus-5-5

The characterization, the ℝ≥0∞ martingale domination, stoppedValueLimsup_mono and Ville's inequality for e-processes are new and build on the Snell envelope, optional stopping and ExactVille instead of re-deriving them. One public lemma is just the reverse direction of a new iff with the same hypotheses.

  • LMLExplore/EValues/EProcess.lean:306 — IsEProcess.of_ae_le_isTestSupermartingale has the same hypotheses (hS) (hE) (h) as the reverse direction of isEProcess_iff_forall_exists_isTestSupermartingale (line 315) and is proved as .out 5 1, so the two public declarations state the same thing. Nothing in LMLExplore uses it. Fix: Delete IsEProcess.of_ae_le_isTestSupermartingale and its module-docstring entry (line 74). Callers write (isEProcess_iff_forall_exists_isTestSupermartingale hS hE).2 h.

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 · 39s · 250.9k in (204.3k cache read, 46.6k cache write) / 3.1k out tokens · reviewing this diff · rubric · ⚠️ rubrics checkout differs from published main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 api-design — request_changes claude/claude-opus-5-5

The surface is minimal, but the roadmap's named equivalence isEProcess_iff_forall_exists_isTestMartingale is missing, so the characterization can only be used through position indices into the TFAE.

  • LMLExplore/EValues/EProcess.lean — No named iff between IsEProcess E ℱ S and domination by a test (super)martingale under each P ∈ S, and no converse lemma from domination by a test martingale. Users must write (isEProcess_tfae hS hE).out 0 5, which breaks if the list is reordered. Fix: Add public isEProcess_iff_forall_exists_isTestMartingale and isEProcess_iff_forall_exists_isTestSupermartingale (hypotheses hS, Adapted ℱ E), both proved from isEProcess_tfae. Optionally add IsEProcess.of_ae_le_isTestMartingale.

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 · 39s · 121.3k in (105.7k cache read, 15.6k cache write) / 3.2k out tokens · reviewing this diff · rubric · ⚠️ rubrics checkout differs from published main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 generality — request_changes claude/claude-opus-5-5

IsEProcess.measure_inv_le_stoppedValueLimsup_le requires every member of the null to be a probability measure, though its conclusion concerns only one P; the sibling Ville lemmas need only [IsProbabilityMeasure P]. The other statements are at the natural level.

  • LMLExplore/EValues/EProcess.lean:348 — measure_inv_le_stoppedValueLimsup_le takes hS : ∀ P ∈ S, IsProbabilityMeasure P, but its claim is about one P. It needs hS only because it goes through isEVar_stoppedValueLimsup, which is a statement about the whole null. The sibling lemmas measure_exists_le_le and measure_exists_inv_le_le need only [IsProbabilityMeasure P]. Fix: Use the signature (hE : IsEProcess E ℱ S) (hP : P ∈ S) [IsProbabilityMeasure P] (hτ : IsStoppingTime ℱ τ) (α). For the proof, take hE.exists_isTestSupermartingale_ae_le hP and apply lintegral_stoppedValueLimsup_le_one_of_ae_le. That shows stoppedValueLimsup E τ is an e-variable for {P}, so IsEVar.measure_inv_le_le with mem_singleton P finishes it.

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 · 29s · 74.5k in (68k cache read, 6.5k cache write) / 2.4k out tokens · reviewing this diff · rubric · ⚠️ rubrics checkout differs from published main

@RemyDegenne

RemyDegenne commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

AI review — approved

Each 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.

⚠️ This review ran from a rubrics checkout that differs from the published rubrics (out of date, pinned, or locally edited), so its findings may reflect different rules.

rubric state judge summary
✅ correctness approved claude/claude-opus-5-5 The six-way TFAE, the domination lemmas, the ℝ≥0∞ Doob martingale part and the Ville corollaries state the intended RRLK Lemma 6 and RW Fact 7.6 content, and the IsProbabilityMeasure hypotheses are justified by the stated counterexample. I tried to break every new statement and failed.
✅ reuse approved claude/claude-opus-5-5 New declarations (ℝ≥0∞ Doob martingale part, stoppedValueLimsup_mono, RRLK Lemma 6 TFAE, Ville for e-processes) have no existing counterpart in Mathlib or LMLExplore, and the proofs reuse the existing Snell envelope, optional stopping, exact Ville and conditional-expectation API.
✅ scope approved claude/claude-opus-5-5 The PR proves the roadmap's EValues Layer 3.1 [RRLK, Lemma 6] target and the first bullet of Layer 3.2, Ville's inequality for e-processes, which the roadmap derives from that result; both match declarations in Suggested.lean. Each helper lemma (the test martingale domination, stoppedValueLimsup_mono) is a direct prerequisite, and the PR does not bundle any refactor or off-roadmap material.
✅ attribution approved claude/claude-opus-5-5 The characterization is credited to [RRLK, Lemma 6], with the full reference added to the file, and Ville's inequality for e-processes to [RW, Fact 7.6]; the Doob decomposition step is named as such. No uncredited source is followed.
✅ api-design approved claude/claude-opus-5-5 The new public surface (the TFAE, the two named iffs, the two domination lemmas, Ville's inequality for e-processes, exists_isTestMartingale_ge and stoppedValueLimsup_mono) covers the Layer 3.1 and 3.2 targets of the roadmap, and the three private helpers are argument-specific steps stated with project predicates. No definitions are added, no bodies are exposed and no compatibility layer remains.
✅ generality approved claude/claude-opus-5-5 The public statements sit at the natural level: the domination and Ville results need IsProbabilityMeasure P because they go through the Snell envelope, exists_isTestMartingale_ge assumes only SigmaFiniteFiltration P ℱ, and stoppedValueLimsup_mono is stated for any complete lattice. The only over-strong assumptions are on private helpers, which are not user-visible.
✅ placement approved claude/claude-opus-5-5 Each new declaration sits in the file that defines the object it elaborates, and the two new imports of EProcess.lean (ExactVille, SnellEnvelope) are both used; the dropped OptionalStopping is still imported through both of them.
✅ naming approved claude/claude-opus-5-5 The new names describe their conclusions and match the roadmap's suggested names: isEProcess_iff_forall_exists_isTestMartingale, IsEProcess.isEVar_stoppedValueLimsup and IsEProcess.measure_exists_inv_le_le (roadmap EValues/Suggested.lean lines 244, 259 and 266). They also follow existing patterns such as IsTestSupermartingale.measure_exists_le_le and IsEVar.measure_inv_le_le, both _iff lemmas are real iffs, and the PR adds no notation.
✅ documentation approved claude/claude-opus-5-5 The module docstring and every new public declaration are documented accurately and match their statements, with no overclaiming and no process narrative; the [RRLK] reference was added correctly.
✅ proof-quality approved claude/claude-opus-5-5 The contested finding is resolved: TFAE step 4 → 1 now has a comment at EProcess.lean:299-300 explaining that the stoppedValue/WithTop.untopA unfolding is definitional. The remaining proofs are short and readable, with no undocumented defeq steps.

♻️ = approved on an earlier commit, re-run before merge.

Reviewing this diff at head eccfb5b. rubrics @ 7d59664. CLI @ 7d59664. Review spend: $1.17.

@lmlexplore-automation lmlexplore-automation Bot added awaiting-author A review requested changes; author action needed and removed awaiting-review CI is green; waiting for review verdicts labels Nov 15, 2026
… inequality for e-processes from test supermartingales

Add isEProcess_iff_forall_exists_isTestSupermartingale and
isEProcess_iff_forall_exists_isTestMartingale. Transfer
IsTestSupermartingale.measure_exists_inv_le_le through the domination
instead of re-deriving it, weaken the hypotheses of
measure_inv_le_stoppedValueLimsup_le to [IsProbabilityMeasure P], and
make the Doob decomposition and TFAE step 4 → 1 proofs explicit.

Co-Authored-By: Claude Code <noreply@github.com>
@lmlexplore-automation lmlexplore-automation Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts awaiting-author A review requested changes; author action needed and removed awaiting-author A review requested changes; author action needed awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts labels Nov 15, 2026
…e stoppedValue unfolding

Co-Authored-By: Claude Code <noreply@github.com>
@lmlexplore-automation lmlexplore-automation Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts and removed awaiting-author A review requested changes; author action needed awaiting-CI CI has not yet reported on the latest commit labels Nov 15, 2026
@lmlexplore-automation
lmlexplore-automation Bot added this pull request to the merge queue Nov 15, 2026
@lmlexplore-automation lmlexplore-automation Bot added ready-to-merge Current head passes all automated merge prerequisites; queue reservations may delay entry and removed awaiting-review CI is green; waiting for review verdicts labels Nov 15, 2026
Merged via the queue into LeanMachineLearning:main with commit 20dd001 Nov 15, 2026
22 of 27 checks passed
@lmlexplore-automation lmlexplore-automation Bot removed the ready-to-merge Current head passes all automated merge prerequisites; queue reservations may delay entry label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant