Skip to content

About

Consumer pilot of scottnarmstrong/MarkovProcess: two Brownian-motion theorems, with lean-pkg receipts

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

MarkovProcess pilot logo: a random path between two barriers, stopped where it first touches the upper barrier

MarkovProcess consumer pilot

A small Lean 4 project that uses Scott Armstrong's MarkovProcess library to prove optional stopping for Brownian motion at a truncated exit time.

Lean CI status Built on MarkovProcess by Scott Armstrong Lean version 4.35.0 Mathlib commit 56a0058 Evidence: lower-tier and comparator receipts Release v0.1.2 DOI 10.5281/zenodo.24026993 Apache-2.0 license Sponsor Le Chen on GitHub

What is proved · What is proved (for mathematicians) · Verification and evidence · Build · Proof outline · Cite · LLM index

Note

Credit: almost all of this is Scott Armstrong's work. This pilot is a thin consumer of Armstrong's MarkovProcess (Apache-2.0), which did the heavy lifting. If you use the pilot, please cite MarkovProcess.

MarkovProcess supplies: the canonical Brownian motion (MarkovProcess.brownianMotion) and its uniqueness; exit times and their truncations as stopping times; the heat generator ½ d² and its domain; Feller and Kolmogorov regularity of the heat semigroup; continuous-time optional stopping; and Dynkin's formula at a bounded stopping time, the expensive part.

The pilot adds (about 250 lines): a two-way bridge to Mathlib's IsBrownianReal, a smooth test function equal to the identity near [a, b], two pathwise facts about the exit time, and the final assembly. One helper lemma (mem_of_lt_exitTimeTrunc) is adapted from MarkovProcess, with Armstrong's copyright notice and a statement of the changes. It is a pilot, not a general library, and not a new theorem.

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.

  • 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$.

    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). 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, stated in Mathlib's vocabulary only (any law on C(ℝ≥0, ℝ) that is Brownian started at x, with Mathlib's hittingBtwn as the stopping time), is exactly what Audit/Exit/Solution.lean proves. The bridge is judged by exists_unique_brownian_kernel in Audit/BrownianKernel/Challenge.lean: exactly one Markov kernel from ℝ to C(ℝ≥0, ℝ) has a recentred coordinate process that is IsBrownianReal at every starting point. A Mathlib-only 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 page 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; pins, axioms and receipts are in docs/reproducing.md.

Important

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.

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. https://github.com/scottnarmstrong/MarkovProcess, used at commit 2486404 (its main on 2026-11-04, from release v0.1.2; v0.1.1 and earlier used 666cda029098). It supplies the Brownian motion, exit times, the heat generator, optional stopping and Dynkin's formula.
  • Mathlib, for the Brownian-motion API (ProbabilityTheory.IsBrownianReal) used by the bridge.

If you use this work, cite MarkovProcess, the preferred citation; see Citing.

Build and verify

Toolchain Lean v4.35.0 (lean-toolchain, the toolchain MarkovProcess uses at its pin); MarkovProcess 2486404169c10c774164626503aba4ed7c1f0da5 and, through it, Mathlib 56a005855ea17e0b0958f73ec801ae140b0a1679 (lake-manifest.json).

git clone https://github.com/chenle02/markovprocess-pilot.git
cd markovprocess-pilot
lake update                         # once; fetches packages and the Mathlib cache
lake exe cache get                  # Mathlib oleans (no-op if already fetched)
lake build                          # builds MarkovProcess from source, then the pilot
lake env lean scripts/Axioms.lean   # prints the axioms of the main declarations

MarkovProcess ships no olean cache, so its 250 modules compile on the first build: about 3.5 minutes on 4 cores and 1.5 GB peak memory per process (measured). lake build Audit builds the comparator challenge and solution.

To use the pilot from another Lake project:

[[require]]
name = "MarkovProcessPilot"
git = "https://github.com/chenle02/markovprocess-pilot.git"
rev = "v0.1.2"

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.

Trust and axioms

Check Status
Build lake build green at Lean v4.35.0, Mathlib 56a005855ea1, MarkovProcess 2486404
Placeholders no sorry, admit, custom axiom or native_decide in MarkovProcessPilot/
Axioms propext, Classical.choice, Quot.sound only (logs/axioms.txt)
Comparator pass, toolchain mechanism; con-ron, NanoDa and Lean kernels
Receipts .lean-receipts/, bound to commit 6e94db2aea80
Index listed in the lean-pkg package index at the previous pin 1548828e63c8, trust level comparator

The comparator receipt covers three configurations in comparator/: exit_mean, exists_unique_brownian_kernel and a toolchain smoke test (two_mul_le, in 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 and Receipts.

Built with lean-pkg

Developed and verified with lean-pkg (doi:10.5281/zenodo.23272098). The current receipts were made with lean-pkg 0.26.0 (doi:10.5281/zenodo.24025862); the build receipt and the comparator receipt under .lean-receipts/ bind the checks above to source commit 6e94db2aea80. The earlier receipts, at 1548828e63c8 (MarkovProcess 666cda029098, Lean v4.35.0-rc2), were made with lean-pkg 0.14.0 (doi:10.5281/zenodo.23445755).

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; 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
Understand the proof and what came from MarkovProcess docs/proof-outline.md
Rebuild, check pins, axioms and receipts docs/reproducing.md
Read the Lean source MarkovProcessPilot/BrownianExit.lean
Machine-readable claims claims.yaml
Point a coding agent at the repository llms.txt and AGENTS.md
Report a problem open an issue

Repository map

Path Contents
MarkovProcessPilot/BrownianExit.lean the bridge and the exit-time theorem
MarkovProcessPilot.lean umbrella import
Audit/Exit/ comparator statement (Mathlib only) and its proof
Audit/BrownianKernel/ comparator statement for the bridge (Mathlib only) and its proof
Audit/Smoke/, comparator/ comparator smoke test and configurations
scripts/Axioms.lean #print axioms for the main declarations
.lean-receipts/ lower-tier and comparator receipts, bound to source commits
claims.yaml machine-readable claims (schema claims/1)
logs/ build, cache and axiom logs
docs/ proof outline, reproduction notes, images

Citing

This pilot is a thin layer over Scott Armstrong's MarkovProcess, which did the hard part. If you use it, please cite MarkovProcess as its CITATION.cff asks:

Scott Armstrong. MarkovProcess: sub-Markov kernel semigroups and continuous-path Markov processes in Lean 4. Software, Apache-2.0. https://github.com/scottnarmstrong/MarkovProcess

This repository's CITATION.cff names MarkovProcess as the preferred citation, so GitHub's "Cite this repository" button shows it, and lists it under references at the pinned commit 2486404. To refer to the pilot itself, cite release v0.1.2, archived on Zenodo as doi:10.5281/zenodo.24026993 (concept DOI for v0.1.2 and later: doi:10.5281/zenodo.24026992); its Lean source is the source at commit 6e94db2aea80 that the receipts cover. v0.1.2 moves MarkovProcess to 2486404 and Lean to v4.35.0; the earlier release v0.1.1 (doi:10.5281/zenodo.23452512, in an earlier Zenodo record family, concept doi:10.5281/zenodo.23452511) used MarkovProcess 666cda029098, Lean v4.35.0-rc2, source 1548828e63c8.

Acknowledgments

The mathematics formalised here, and nearly all of the Lean, come from Scott Armstrong's MarkovProcess. Mathlib supplies the Brownian-motion API used by the bridge. Developed and verified with lean-pkg (doi:10.5281/zenodo.23272098); the current receipts were made with lean-pkg 0.26.0 (doi:10.5281/zenodo.24025862), the earlier ones with lean-pkg 0.14.0 (doi:10.5281/zenodo.23445755).

Support

If this work is useful to you, you can sponsor Le Chen on GitHub. Sponsorship does not change what is claimed here or how it is checked. To support MarkovProcess, star and cite Armstrong's repository.

License

Apache-2.0, see LICENSE. MarkovProcess (Apache-2.0, Scott Armstrong) and Mathlib (Apache-2.0) are dependencies, not vendored, except one lemma adapted from MarkovProcess (mem_of_lt_exitTimeTrunc; its notice is in MarkovProcessPilot/BrownianExit.lean).

Maintained by Le Chen, Department of Mathematics and Statistics, Auburn University.

About

Consumer pilot of scottnarmstrong/MarkovProcess: two Brownian-motion theorems, with lean-pkg receipts

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages