Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [chenle02]
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/build-problem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build or proof problem
description: Report a build failure, a wrong axiom list, or a mismatch between the Lean source and what the documentation claims.
title: "[Build]: "
body:
- type: textarea
id: what
attributes:
label: What happened
description: Paste the command you ran and the relevant output.
render: text
validations:
required: true
- type: input
id: commit
attributes:
label: Commit
description: Output of `git rev-parse HEAD`.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: Output of `lean --version` and `lake --version`, operating system, and whether `lake exe cache get` succeeded.
render: text
validations:
required: true
- type: checkboxes
id: scope
attributes:
label: Scope check
options:
- label: I checked that the problem is in this pilot, not in MarkovProcess or Mathlib (those have their own trackers).
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: MarkovProcess library (Scott Armstrong)
url: https://github.com/scottnarmstrong/MarkovProcess/issues
about: Problems in the underlying MarkovProcess library belong in its own tracker.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Documentation problem
description: Report unclear, stale, inaccessible, or overstated documentation.
title: "[Docs]: "
body:
- type: input
id: location
attributes:
label: Page or file
description: Link the file and heading.
placeholder: "README.md#the-result"
validations:
required: true
- type: textarea
id: problem
attributes:
label: What is wrong or hard to use?
validations:
required: true
- type: textarea
id: correction
attributes:
label: Proposed correction
description: If it concerns mathematics, cite the Lean declaration it should match.
- type: checkboxes
id: scope
attributes:
label: Scope check
options:
- label: My correction does not claim more than the Lean source proves (for example, untruncated exit times).
required: true
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Summary

<!-- What changed and why. -->

## Scope

- [ ] Presentation only (README, `docs/`, images, `.github/`, metadata): no new receipts needed.
- [ ] Touches receipt-bound files (Lean source, `Audit/`, `scripts/*.lean`, `lakefile.toml`,
`lake-manifest.json`, `lean-toolchain`, `comparator/`, `claims.yaml`): fresh build,
comparator run and receipts are included.
- [ ] No theorem-boundary change, or the change is stated here and mirrored in `README.md`,
`docs/`, `claims.yaml` and `llms.txt`.
- [ ] Credit to Scott Armstrong's MarkovProcess is unchanged or more prominent.

## Validation

<!-- Commands run and their results. -->

- [ ] `lake build` and `lake build Audit`
- [ ] `lake env lean scripts/Axioms.lean` shows only `propext`, `Classical.choice`, `Quot.sound`
- [ ] no `sorry`, `admit`, `axiom` or `native_decide` in `MarkovProcessPilot/`
- [ ] `git diff --check`
- [ ] links checked, when documentation changed
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lean CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: lean-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build, audit and axioms
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Reject placeholders in production modules
# Audit/*/Challenge.lean contain `sorry` by design (comparator challenges).
shell: bash
run: |
if grep -rnE 'sorry|admit|axiom |native_decide' MarkovProcessPilot.lean MarkovProcessPilot/; then
echo "placeholder or custom axiom found" >&2
exit 1
fi

- uses: leanprover/lean-action@f061402b660e0c34644504b324e830f2991d4865 # v1.6.1
with:
build: true
use-mathlib-cache: true

- name: Build the comparator audit
run: lake build Audit

- name: Axioms match the recorded log
shell: bash
run: |
lake env lean scripts/Axioms.lean | tee axioms-ci.txt
diff -u logs/axioms.txt axioms-ci.txt
55 changes: 55 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Repository contract

Rules for people and coding agents changing this repository.

## What this repository is

A small Lean 4 pilot built on Scott Armstrong's
[MarkovProcess](https://github.com/scottnarmstrong/MarkovProcess). It is not a
general library. Keep the credit to MarkovProcess at least as prominent as it
is in `README.md`, and keep Armstrong's notice in
`MarkovProcessPilot/BrownianExit.lean`.

## Authority order

1. The Lean source (`MarkovProcessPilot/`, `Audit/`) at commit
`05d99d75df8235e79902220f0fe13e07e81867ca`, and its receipts in
`.lean-receipts/`.
2. `claims.yaml`.
3. `README.md`, `docs/`, `llms.txt`: presentation; they must agree with 1 and 2.

## Files bound to receipts

The receipts cover the source at `05d99d75df82`. Changing any of these
requires a fresh build, a fresh comparator run and new receipts in the same
pull request:

- `MarkovProcessPilot.lean`, `MarkovProcessPilot/`, `Audit/`, `scripts/*.lean`
- `lakefile.toml`, `lake-manifest.json`, `lean-toolchain`
- `comparator/`, `claims.yaml`

Never edit `.lean-receipts/` or `logs/` by hand.

Documentation, images, `.github/` and other metadata may change without new
receipts.

## Claim boundary

- Headline: `MarkovProcessPilot.integral_eval_exitTimeTrunc_Ioo`, exit time
**truncated at `K`**. Do not describe it as a result about untruncated exit
times or exit probabilities.
- Bridge: `MarkovProcessPilot.isBrownianReal_iff`.
- Kernel checking, a green build, comparator acceptance and novelty are
different claims. The mathematics is classical; do not claim novelty.

## Checks before a pull request

```bash
lake build && lake build Audit
lake env lean scripts/Axioms.lean # expect propext, Classical.choice, Quot.sound only
grep -rnE 'sorry|admit|axiom |native_decide' MarkovProcessPilot.lean MarkovProcessPilot/ # expect nothing
git diff --check
```

`sorry` in `Audit/*/Challenge.lean` is intentional: those files are
comparator challenges.
38 changes: 38 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
cff-version: 1.2.0
message: >-
This pilot is a thin layer over Scott Armstrong's MarkovProcess library,
which did the hard part. If you use it, please cite MarkovProcess (the
preferred citation below). To refer to the pilot itself, cite this
repository at commit 05d99d75df8235e79902220f0fe13e07e81867ca, the commit
its receipts cover; there is no tagged release.
type: software
title: "MarkovProcess consumer pilot: optional stopping for Brownian motion at a truncated exit time"
abstract: >-
A small Lean 4 project built on Scott Armstrong's MarkovProcess library. It
proves that Brownian motion started at x in (a, b), stopped at its exit time
from (a, b) truncated at a deterministic horizon K, has mean x, and that
MarkovProcess.IsBrownianReal is equivalent to Mathlib's
ProbabilityTheory.IsBrownianReal.
authors:
- family-names: Chen
given-names: Le
affiliation: "Department of Mathematics and Statistics, Auburn University"
repository-code: "https://github.com/chenle02/markovprocess-pilot"
license: Apache-2.0
commit: 05d99d75df8235e79902220f0fe13e07e81867ca
keywords:
- Lean
- mathlib
- formal verification
- Brownian motion
- optional stopping
- exit time
preferred-citation:
type: software
title: "MarkovProcess: sub-Markov kernel semigroups and continuous-path Markov processes in Lean 4"
authors:
- family-names: Armstrong
given-names: Scott
repository-code: "https://github.com/scottnarmstrong/MarkovProcess"
url: "https://github.com/scottnarmstrong/MarkovProcess"
license: Apache-2.0
Loading
Loading