From 2c75749dd7e326351b5359378f81013ac03aadd3 Mon Sep 17 00:00:00 2001 From: chenle02 Date: Mon, 19 Oct 2026 13:15:14 -0400 Subject: [PATCH 1/3] docs: house-style README (What is proved, Build and verify, Trust and axioms) Restructure the hand-written README to the shared house style for public Lean libraries: "What is proved" with the results in math and the Lean statement, the scope callout as "Not proved here", "Paper and references" (standalone library based on Armstrong's MarkovProcess), "Build and verify" with a [[require]] snippet for v0.1.1, "Trust and axioms" holding the status table, "Built with lean-pkg", and "Authors and AI disclosure". Add the Mathlib and release badges. All credit to MarkovProcess, the citing guidance and the license notes are kept. Docs only: no build input changes. Co-Authored-By: Claude Opus 5.5 --- README.md | 138 ++++++++++++++++++++++++++++++++++++++++++------------ llms.txt | 2 +- 2 files changed, 109 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index a920df3..47e1119 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,20 @@ Lean CI status Built on MarkovProcess by Scott Armstrong Lean version 4.35.0-rc2 + Mathlib commit 0653561 Evidence: lower-tier and comparator receipts + Release v0.1.1 DOI 10.5281/zenodo.23452512 Apache-2.0 license Sponsor Le Chen on GitHub

- The result - · Quick start + What is proved + · Verification and evidence + · Build · Proof outline - · Reproducing and evidence - · Citing + · Cite · LLM index

@@ -46,29 +48,33 @@ > with Armstrong's copyright notice and a statement of the changes. It is a > pilot, not a general library, and not a new theorem. -## The result +## What is proved

Diagram: a Brownian path starts at level x between levels a and b and is stopped at time T, the first time it touches b, which comes before the horizon K. Caption: under the law of Brownian motion started at x, the mean of the path at T is x.

-**Headline theorem.** Brownian motion started at `x ∈ (a, b)` and stopped at -its exit time from `(a, b)`, truncated at any deterministic horizon `K`, has -mean `x`: +- **Optional stopping at a truncated exit time** + (`MarkovProcessPilot.integral_eval_exitTimeTrunc_Ioo`). Let $\mathbb{P}_x$ be + the law of Brownian motion started at $x$ (`MarkovProcess.brownianMotion x`), + and let $\tau_K$ be the exit time of the path from $(a, b)$, truncated at a + deterministic horizon $K \ge 0$ (`exitTimeTrunc (Set.Ioo a b) K`). If + $a < x < b$, then $\int \omega(\tau_K(\omega))\,\mathbb{P}_x(d\omega) = x$. -```lean -theorem MarkovProcessPilot.integral_eval_exitTimeTrunc_Ioo - (a b x : ℝ) (hax : a < x) (hxb : x < b) (K : ℝ≥0) : - ∫ ω, ω (MarkovProcess.ContinuousPath.exitTimeTrunc (Set.Ioo a b) K ω) - ∂(MarkovProcess.brownianMotion x) = x -``` + ```lean + theorem MarkovProcessPilot.integral_eval_exitTimeTrunc_Ioo + (a b x : ℝ) (hax : a < x) (hxb : x < b) (K : ℝ≥0) : + ∫ ω, ω (MarkovProcess.ContinuousPath.exitTimeTrunc (Set.Ioo a b) K ω) + ∂(MarkovProcess.brownianMotion x) = x + ``` -**Bridge to Mathlib.** `MarkovProcessPilot.isBrownianReal_iff` shows that -`MarkovProcess.IsBrownianReal X P ↔ ProbabilityTheory.IsBrownianReal X P` for -every process `X` and measure `P`, so the library's Brownian motion is a -Brownian motion in Mathlib's sense once recentred at its starting point -(`isBrownianReal_brownianMotion`), and -Mathlib's Brownian API applies to it. +- **Bridge to Mathlib** (`MarkovProcessPilot.isBrownianReal_iff`). + `MarkovProcess.IsBrownianReal X P ↔ ProbabilityTheory.IsBrownianReal X P` for + every process $X$ and measure $P$, so the library's Brownian motion is a + Brownian motion in Mathlib's sense once recentred at its starting point: + under $\mathbb{P}_x$, the process $t \mapsto \omega(t) - x$ is + `IsBrownianReal` (`MarkovProcessPilot.isBrownianReal_brownianMotion`), and + Mathlib's Brownian API applies to it. **Mathlib-only statement check.** `lake comparator` confirms that the theorem `exit_mean` in [`Audit/Exit/Challenge.lean`](Audit/Exit/Challenge.lean), @@ -83,23 +89,39 @@ statement cannot name the library's kernel, so the Solution proves this with `MarkovProcess.brownianMotion` as the witness. `claims.yaml` names the Challenge theorem that judges each claim (`judged_as`). +The proof route is in [docs/proof-outline.md](docs/proof-outline.md); pins, +axioms and receipts are in [docs/reproducing.md](docs/reproducing.md). + > [!IMPORTANT] -> **Scope.** The exit time is **truncated at `K`**. Untruncated exit times, +> **Not proved here.** The exit time is **truncated at `K`**. Untruncated exit times, > and the exit probability `P_x(exit at b) = (x - a)/(b - a)`, are out of scope > and not claimed. The mathematics is classical; what this repository > contributes is a machine-checked consumer of MarkovProcess, not a new > theorem. -| Check | Status | -|---|---| -| Build | `lake build` green at Lean `v4.35.0-rc2`, Mathlib `065356127b1d` | -| Placeholders | no `sorry`, `admit`, custom `axiom` or `native_decide` in `MarkovProcessPilot/` | -| Axioms | `propext`, `Classical.choice`, `Quot.sound` only ([`logs/axioms.txt`](logs/axioms.txt)) | -| Comparator | `pass`, toolchain mechanism; con-ron, NanoDa and Lean kernels | -| Receipts | [`.lean-receipts/`](.lean-receipts/), bound to commit [`1548828e63c8`](https://github.com/chenle02/markovprocess-pilot/tree/1548828e63c86f2c3f360ac46ab91ec78ba45276) | -| Index | listed in the lean-pkg package index at that pin, trust level `comparator` | +## Paper and references + +Standalone library; there is no accompanying paper. It is based on: + +- Scott Armstrong. *MarkovProcess: sub-Markov kernel semigroups and + continuous-path Markov processes in Lean 4.* Software, Apache-2.0. + , used at commit + [`666cda029098`](https://github.com/scottnarmstrong/MarkovProcess/tree/666cda029098a1106914fc9fa7abd1727573284a). + It supplies the Brownian motion, exit times, the heat generator, optional + stopping and Dynkin's formula. +- [Mathlib](https://github.com/leanprover-community/mathlib4), for the + Brownian-motion API (`ProbabilityTheory.IsBrownianReal`) used by the bridge. + +If you use this work, cite MarkovProcess, the preferred citation; see +[Citing](#citing). + +## Build and verify -## Quick start +Toolchain Lean `v4.35.0-rc2` ([`lean-toolchain`](lean-toolchain), a prerelease +inherited from MarkovProcess); MarkovProcess +`666cda029098a1106914fc9fa7abd1727573284a` and, through it, Mathlib +`065356127b1dc0016f66b7283ce0ce2c4055aa55` +([`lake-manifest.json`](lake-manifest.json)). ```bash git clone https://github.com/chenle02/markovprocess-pilot.git @@ -115,6 +137,62 @@ build: about 3.5 minutes on 4 cores and 1.5 GB peak memory per process ([measured](docs/reproducing.md#build-cost-measured-on-a-laptop-2026-10-05)). `lake build Audit` builds the comparator challenge and solution. +To use the pilot from another Lake project: + +```toml +[[require]] +name = "MarkovProcessPilot" +git = "https://github.com/chenle02/markovprocess-pilot.git" +rev = "v0.1.1" +``` + +then `import MarkovProcessPilot`. This also brings in MarkovProcess at the +pinned commit; the consuming project must use the same Lean toolchain, +`leanprover/lean4:v4.35.0-rc2`. + +## Trust and axioms + +| Check | Status | +|---|---| +| Build | `lake build` green at Lean `v4.35.0-rc2`, Mathlib `065356127b1d` | +| Placeholders | no `sorry`, `admit`, custom `axiom` or `native_decide` in `MarkovProcessPilot/` | +| Axioms | `propext`, `Classical.choice`, `Quot.sound` only ([`logs/axioms.txt`](logs/axioms.txt)) | +| Comparator | `pass`, toolchain mechanism; con-ron, NanoDa and Lean kernels | +| Receipts | [`.lean-receipts/`](.lean-receipts/), bound to commit [`1548828e63c8`](https://github.com/chenle02/markovprocess-pilot/tree/1548828e63c86f2c3f360ac46ab91ec78ba45276) | +| Index | listed in the lean-pkg package index at that pin, trust level `comparator` | + +The comparator receipt covers three configurations in +[`comparator/`](comparator/): `exit_mean`, `exists_unique_brownian_kernel` and +a toolchain smoke test (`two_mul_le`, in [`Audit/Smoke/`](Audit/Smoke/)), each +with permitted axioms `propext`, `Quot.sound` and `Classical.choice`. The +`sorry` in each `Audit/*/Challenge.lean` is intentional: those files hold the +statements only, and the comparator checks each against its `Solution.lean`. +Details: [Axioms and placeholders](docs/reproducing.md#axioms-and-placeholders) +and [Receipts](docs/reproducing.md#receipts). + +## Built with lean-pkg + +Developed and verified with [lean-pkg](https://github.com/lean-pkg/lean-pkg) ([doi:10.5281/zenodo.23272098](https://doi.org/10.5281/zenodo.23272098)). +The receipts were made with lean-pkg 0.14.0 +([doi:10.5281/zenodo.23445755](https://doi.org/10.5281/zenodo.23445755)); the +build receipt and the comparator receipt under +[`.lean-receipts/`](.lean-receipts/) bind the checks above to source commit +`1548828e63c8`. + +## Authors and AI disclosure + +Le Chen, Associate Professor, +Department of Mathematics and Statistics, Auburn University. + +The mathematics formalised here, and nearly all of the Lean, come from Scott +Armstrong's [MarkovProcess](https://github.com/scottnarmstrong/MarkovProcess); +the pilot depends on it and on Mathlib, both Apache-2.0, and adapts one lemma +from MarkovProcess with Armstrong's notice. + +Developed with AI assistance (Anthropic Claude) under Le Chen's direction. +Lean compilation, the axiom check and the comparator check the stated theorems +only; AI assistance is not human mathematical review. + ## Find your way | You want to | Go to | diff --git a/llms.txt b/llms.txt index 1531eac..d57c17e 100644 --- a/llms.txt +++ b/llms.txt @@ -4,7 +4,7 @@ ## Essential -- [README](https://raw.githubusercontent.com/chenle02/markovprocess-pilot/main/README.md): Result, scope, status and quick start. +- [README](https://raw.githubusercontent.com/chenle02/markovprocess-pilot/main/README.md): What is proved, scope, build, trust and axioms, and how to cite. - [Repository contract](https://raw.githubusercontent.com/chenle02/markovprocess-pilot/main/AGENTS.md): Which files are bound to receipts, and the rules for changes. - [Machine-readable claims](https://raw.githubusercontent.com/chenle02/markovprocess-pilot/main/claims.yaml): The two claimed theorems (schema claims/1). - [Proof outline](https://raw.githubusercontent.com/chenle02/markovprocess-pilot/main/docs/proof-outline.md): Dynkin's formula route, the comparator statement, and what came from MarkovProcess. From e9f3f3a31045c2ac43a6be6ac43e5edf862121dd Mon Sep 17 00:00:00 2001 From: chenle02 Date: Mon, 19 Oct 2026 13:33:44 -0400 Subject: [PATCH 2/3] docs: a what-is-proved page for mathematicians Each result in mathematical notation beside the checked Lean statement (library and compared forms), its hypotheses and status, the boundary of what is not claimed, and how it was checked. Written by hand because the generated verification page is blocked for this package; math uses GitHub's math syntax and was checked through GitHub's Markdown renderer. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 +- docs/what-is-proved.md | 110 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 docs/what-is-proved.md diff --git a/README.md b/README.md index 47e1119..4a905e0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@

What is proved + · What is proved (for mathematicians) · Verification and evidence · Build · Proof outline @@ -89,7 +90,8 @@ statement cannot name the library's kernel, so the Solution proves this with `MarkovProcess.brownianMotion` as the witness. `claims.yaml` names the Challenge theorem that judges each claim (`judged_as`). -The proof route is in [docs/proof-outline.md](docs/proof-outline.md); pins, +The page [docs/what-is-proved.md](docs/what-is-proved.md) puts each result in mathematical +notation beside its Lean statement, with the boundary. The proof route is in [docs/proof-outline.md](docs/proof-outline.md); pins, axioms and receipts are in [docs/reproducing.md](docs/reproducing.md). > [!IMPORTANT] diff --git a/docs/what-is-proved.md b/docs/what-is-proved.md new file mode 100644 index 0000000..7ccb4fb --- /dev/null +++ b/docs/what-is-proved.md @@ -0,0 +1,110 @@ +# What is proved + +A page for mathematicians: each result in mathematical language, beside the Lean +statement that was checked, and the boundary of what is **not** claimed. + +Lean checks every step of the proofs below. It cannot check that a Lean statement says +what the words on this page say: that comparison is the reader's. For each result, read +the mathematics beside the Lean statement and check that the hypotheses match. + +All results build on Scott Armstrong's +[MarkovProcess](https://github.com/scottnarmstrong/MarkovProcess) library (pinned at +`666cda029098`), which supplies the Brownian motion, exit times, optional stopping and +Dynkin's formula. Checked at commit `1548828e63c8` with Lean `v4.35.0-rc2`; axioms +`propext`, `Classical.choice`, `Quot.sound` only. + +## 1. Mean of Brownian motion stopped at a truncated exit time + +**Status: proved; the Mathlib-only form was also confirmed by the comparator.** + +**In words.** Let $a Date: Mon, 19 Oct 2026 13:34:48 -0400 Subject: [PATCH 3/3] docs: make inline math survive GitHub's Markdown renderer GitHub removes backslash escapes such as \, and \{ inside $...$ before typesetting, so formulas lost their thin spaces and braces. Formulas that use them now use GitHub's $`...`$ form (display formulas a math block); checked through GitHub's Markdown renderer. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a905e0..caf6f72 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ the law of Brownian motion started at $x$ (`MarkovProcess.brownianMotion x`), and let $\tau_K$ be the exit time of the path from $(a, b)$, truncated at a deterministic horizon $K \ge 0$ (`exitTimeTrunc (Set.Ioo a b) K`). If - $a < x < b$, then $\int \omega(\tau_K(\omega))\,\mathbb{P}_x(d\omega) = x$. + $a < x < b$, then $`\int \omega(\tau_K(\omega))\,\mathbb{P}_x(d\omega) = x`$. ```lean theorem MarkovProcessPilot.integral_eval_exitTimeTrunc_Ioo