MindFormal — the Lean formalization of One Mind
Version v1.0.0, released December 1, 2026 · Lean 4 · doi.org/10.5281/zenodo.24584347
One Mind, the book · Its proofs · The repository (release v1.0.0) · The Lean report · The code's DOI · Main statements
One Mind (Anoop R. Menon; preprint, December 1, 2026, https://doi.org/10.5281/zenodo.24584333) states a theory of the mind as five equations, for activity, links, value, attention and action, and derives from them results on deliberation, memory, search, concepts, value, learning, logic, judgment, choice, exchange, markets and minds dealing with one another. This package is the Lean 4 project that states and proves those results.
The main results
- The mind's run exists and is unique. Take any mind the five equations admit: its noise comes from finitely many
Brownian sources, with an amplitude that may depend on its state, its input and where its attention is; its activity
is reflected at zero and its links and values are unbounded; attention and action are chosen by threshold rules on its
own path; and its world may respond to its past actions. From any start, a run on the mind's own noise exists for all
time, and every other such run agrees with it at every time almost surely, with the same records of focus and action
(
result_02_12_2_L771). - The stochastic calculus it needed, built here. The Itô integral against several Brownian sources on one filtration; existence and uniqueness on any horizon for reflected equations whose drift and noise amplitude depend on the state, Lipschitz in it; Doob's Lᵖ inequality in continuous time; and invariant probabilities under minorization, with geometric convergence. Other Lean work can use them.
- The normative standards in one mind. For classical logic, probability and Bayes' rule, expected utility, and Nash
equilibrium, a Lean theorem states an exact test of the standard, and further Lean theorems show a mind's learning
meeting it or coming close to it.
STATEMENTS.mdprints both for each, after the run's theorem.
The normative standards in one mind
Each of the first five has two parts. The first theorem states an exact test of the standard. The theorems under it, headed "The mind's side", show a mind's learning meeting the standard or coming close to it, under the conditions each states.
Classical consequence
Clause 13 of the book's result 10.2 (key 06.17)
- The exact test
MindFormal.result_06_17_group_rules- The mind's side
MindFormal.A695LogicPaper.result_06_17_12_L696- Plain claim
- The conclusions read from a grouping satisfy weakening, contraction, exchange, cut, cautious monotonicity and reflexivity
Classical probability
Clause 22 of the book's result 17.1 (key 19.22)
- The exact test
MindFormal.result_19_22_query_feasibility_iff- The mind's side
MindFormal.A617Judgment.result_15_9_53_L620(clause 53)- Plain claim
- When the empty event reads zero, a mind's likelihood reads over finitely many outcomes agree with one probability on every event asked about exactly when one nonnegative distribution on the outcomes, totaling one, gives each event asked about the sum of its outcomes' weights
Bayes' rule
Clause 15 of the book's result 12.1 (key 15.9)
- The exact test
MindFormal.result_15_9_bayes_response- The mind's side
MindFormal.A617Judgment.result_15_9_55_L620(clause 55)- Plain claim
- In the simplest comparison, with each activity settled and the read before the update equal to the prior, the later read equals the Bayes posterior exactly when the change in support meets the displayed equality
Expected utility
Clause 69 of the book's result 17.1 (key 19.22)
- The exact test
MindFormal.A640Standards.result_19_22_69_L641- The mind's side
MindFormal.A617Choice.result_16_12_13_L621(clause 13)MindFormal.A617Choice.result_16_12_15_L621(clause 15)- Plain claim
- A finite record of choices among lotteries has an expected-utility representation, with ties settled by the fixed priority, exactly when one utility over outcomes makes every chosen lottery at least as good as every option on its menu and better than every option of higher priority
Nash equilibrium
Clause 2 of the book's result 16.6 (key 19.15)
- The exact test
MindFormal.A630EncounterLaws.result_19_15_2_L631- The mind's side
MindFormal.A630EncounterLaws.result_19_13_18_L631(clause 18)- Plain claim
- When a finite family of minds has free encounters with positive probability and each chooses from its own menu almost surely in them, the steady mix is a Nash equilibrium of the stage game exactly when each plays its own mix independently and no change by one player alone raises that player's payoff
All seventeen main statements, as Lean prints them
What is proved
| Set | Results | Clauses that assert something |
|---|---|---|
| The book | 197 | 2,217 |
| Its proofs companion | 63 | 257 |
| The supporting results, whose steps the book's proofs use | 16 | 189 |
Every one of these clauses is stated by a Lean theorem tagged with its number, with the printed hypotheses as premises and no other step, and proved. Where a clause speaks of noise, the theorem holds on the run driven by the mind's own noise; a theorem proved only for noise of constant size is a special case and says so. Each clause's theorem was compared with the printed claim, with every definition it reaches, by a reader that did not build it.
INDEX.md lists every result: the book's by chapter and printed number, then the companion's and the supporting
results, each clause with the theorem that states it and its file and line (2,778 theorems in all). STATEMENTS.md
gives the run's theorem, seventeen main statements, the objects the theorems are about, and where each of the five
equations is defined.
One of the supporting results is also printed in the book, so the three sets hold 275 distinct results and 2,636 distinct asserted clauses.
The object. The theorems are about the five equations as the book prints them.
Build
Versions. Lean v4.35.0-rc3 (lean-toolchain) and Mathlib c55e6e786f49471c72fbddbec5415808896aec1e, with its
dependencies pinned in lake-manifest.json. Do not update either.
Requirements. macOS or Linux, git, curl and elan; about 80 GB of free disk.
From the root of this package:
lake exe cache get # fetch the pinned dependencies and Mathlib's prebuilt files
lake build # build the tag library, the ported libraries and MindFormal
elan reads lean-toolchain and installs the pinned toolchain on first use. The build ends with
Build completed successfully and no warning.
Measured on an Apple M3 Max (16 cores, 128 GB, macOS 27.2.1), from a fresh copy, with LEAN_NUM_THREADS=8 (at
most 8 parallel jobs): fetching 3 min; building 2 h 43 min. Disk: 73.5 GB in .lake and 0.5 GB of downloaded files;
free disk fell by 80 GB over the build. Memory: the build's processes together held up to 98 GB resident (shared
library files counted once per process), the largest single process 46 GB.
Axioms
lake env lean PrintAxioms.lean
prints the axioms of every theorem INDEX.md lists, one line each, and ends with
2778 theorems; 0 rest on an axiom other than propext, Classical.choice and Quot.sound
It fails if any listed theorem rests on an axiom other than Lean's three standard ones, propext, Classical.choice
and Quot.sound. Of the 2,778, five use only propext and Quot.sound and four use none. The code contains no
sorry, admit, axiom declaration, native_decide, implemented_by or extern.
Lean's fresh re-check of the compiled proofs, which replays every declaration MindFormal rests on through the kernel,
passes: lake env leanchecker --fresh MindFormal exits with no error (66 min on one core, 51 GB of memory, on the
machine above).
What others can use now
The components below have an interface in the library and an existing use in the project.
The Itô integral against several Brownian sources on one filtration, with L² bounds and martingale and exponential estimates
- Module and main declaration
MindFormal/Tools/ItoFiltration.lean(ito,ito_inner),MindFormal/Tools/ItoMartingale.lean(itoVecCont_martingale),MindFormal/Tools/ItoBounds.lean(itoVecCont_stray) andMindFormal/Tools/BoxNoise.lean(itoVecCont_exp_bounded)- Existing use
- Error budgets for the run on the mind's own noise
- Hypotheses it keeps
- For the joint estimates, finitely many independent standard Brownian sources on one filtration, with joint future increments independent of the past, and predictable L² integrands. The tail bounds use a uniform positive bound on the sum of their squares and a positive threshold
The reflected equation with state-dependent coefficients
- Module and main declaration
MindFormal/Tools/ReflectedSDE.lean(exists_unique_solution_short) andMindFormal/Tools/ReflectedGlobal.lean(exists_unique_solution)- Existing use
- The run of the mind's state
- Hypotheses it keeps
- A Brownian ground with finitely many sources and every null set known at time zero, predictable drift and amplitude uniformly Lipschitz in the state and bounded at zero, a causal Lipschitz reflection, and a square-integrable start known at time zero. The short-horizon theorem also requires its contraction bound
PathReflection, the product map with a floor at zero, reflected-path bounds, and the Skorokhod map
- Module and main declaration
MindFormal/Tools/ReflectedPaths.lean(PathReflection,PathReflection.floor) andMindFormal/Tools/Skorokhod.lean(floorReflection,productReflection)- Existing use
- The activity solver
- Hypotheses it keeps
- On continuous paths with finitely many coordinates, the reflection is causal, Lipschitz, and fixes the zero path. The mind's solver uses the activity floor at zero
MinorizedInvariant, invariant probabilities under minorization
- Module and main declaration
MindFormal/Tools/MinorizedInvariant.lean(exists_invariant_blocks)- Existing use
- Key 19.13, clauses 24 and 25
- Hypotheses it keeps
- Every m-step transition of the Markov kernel must dominate the same fixed positive fraction of one probability measure
Doob's Lᵖ inequality in continuous time, proved here in the ported BrownianMotion library
- Module and main declaration
vendor/BrownianMotion/StochasticIntegral/DoobLp.lean(integral_iSup_le_norm_rpow_le,integral_iSup_norm_rpow_le)- Existing use
- The martingale maximal bound in
MindFormal/Tools/MartingaleMaximal.lean - Hypotheses it keeps
- A martingale with right-continuous paths on a finite measure space, with second-countable ordered time and 1 < p
Staged nonexplosion and compatible truncation
- Module and main declaration
MindFormal/Tools/StagedNonexplosion.lean(staged_nonexplosion) andMindFormal/Run/OwnRun.lean(level_agree)- Existing use
StateExperiment.ownand its identification with one global state (own_globalState)- Hypotheses it keeps
- A common start, horizon and coordinate-bounded reflection. Uniformly across truncations, the base amplitude is bounded, base drift has linear growth, and the full coefficients have linear growth whenever the base is bounded
Brownian stopping, restart and strong Markov interfaces
- Module and main declaration
MindFormal/Tools/BrownianStrongMarkov.lean(condExp_futureAt) andMindFormal/Run/GroupRestartKernel.lean(admittedGroup_restart_kernel)- Existing use
- Continuing the full state of an admitted constant-loading group from the data at the stop and fresh Brownian increments
- Hypotheses it keeps
- Finitely many Brownian sources, a finite stopping time, a measurable entering state and a measurable, integrable test of the continuation. The group continuation also uses the world's retained source history and its replay with fresh increments
ReflectedOU.endpoint_hasLaw
- Module and main declaration
MindFormal/Tools/ReflectedOU/Endpoint.lean- Existing use
- The endpoint calculation for a zero-target reflected Ornstein–Uhlenbeck clock
- Hypotheses it keeps
- Zero start, zero target and positive ν, G and t. The driver is a continuous measurable version of the Brownian source. The half-normal scale is G√((1 − e^{−2νt})/(2ν))
BrownianAbsorption.measure_tube_eq_series and survival in a rectangle
- Module and main declaration
MindFormal/Tools/BrownianAbsorption/Survival.lean(measure_tube_eq_series) andMindFormal/Tools/BrownianAbsorption/Realization.lean(measure_rectangular_eq_series)- Existing use
- Finite-horizon tube bounds for constructed runs
- Hypotheses it keeps
- A positive horizon and radius, with the path strictly within the interval throughout. The interval theorem takes a continuous Brownian coordinate. The rectangle uses finitely many independent Brownian paths
DeterministicBrownianShift translated-tube prices, with anisotropic variants
- Module and main declaration
MindFormal/Tools/DeterministicBrownianShift/TubePrice.lean(translated_tube_price) andMindFormal/Tools/DeterministicBrownianShift/AnisotropicTube.lean(translated_anisotropic_price)- Existing use
- Quantitative bounds on the sources for constructed runs
- Hypotheses it keeps
- A finite family on a common Brownian filtration, a positive horizon and positive radii, and deterministic controls of finite L² energy
The finite comparison and rational checker
- Module and main declaration
MindFormal/Tools/RationalExpr.lean(RExpr.bound_sound),MindFormal/Tools/ContractionCertificate.lean(oslCheck_sound) andMindFormal/Tools/PiecewiseComparison.lean(piecewiseComparison_error)- Existing use
- Constructed learning examples and prepared runs
- Hypotheses it keeps
- Passed rational checks on the given boxes, or a finite partition with an integrable target and given start and cell error bounds, according to the declaration
Brouwer's theorem with a continuity bridge for the mind's maps
- Module and main declaration
vendor/FixedPointTheorems/brouwer.lean(brouwer_fixed_point), with the bridge inMindFormal/Chapters/Ch16/BrouwerSupport.lean(price_selection_fixed_point)- Existing use
- Clause 18.26.6
- Hypotheses it keeps
- A nonempty compact convex set in a finite-dimensional real space and a continuous map from the set into itself
Limits
Lean checks the proofs: each theorem follows from its hypotheses and the definitions, with the three standard axioms.
That each theorem states what the book's clause says is a judgment, made by readers during the work, and the reader's
to make again with INDEX.md and the printed text. If you find a statement that falls short of the book's clause,
please open an issue on the repository or write to
[email protected]. Whether the equations describe minds is a question for experiment. The code was built by AI
models under the author's direction; it is long and does not follow Mathlib's conventions on naming, length or style.
Assumptions and differences from the book
- The Brownian sources. The theorems take as a hypothesis a probability space carrying finitely many independent
standard Brownian sources, adapted to one filtration, with every future increment independent of the past
(
EquationGround). The library builds Brownian motion from the ported libraries and constructs independent copies on a joint natural filtration for an auxiliary comparison. The mind's run takes its own family of sources fromEquationGround. That family is a hypothesis, stated wherever it is used and never an axiom. - The completed ground. Every null set is in the information at time zero (
CompletedEquationGround). - The world. The world's input is jointly measurable in time, its randomness and the strict past of the mind's
actions, with one almost-sure bound before every history and horizon (
ConstructedWorld). This is slightly more than the book's boundedness on bounded intervals, and no general equivalence with every adapted world is proved. - Constant noise.
AdmittedExperimentfixes the noise loading to a constant matrix. A theorem through it proves a clause stated for constant noise, or a clause asserting that some mind exists; the general amplitude runs throughStateExperiment. - A result's own premises. A verified reference course and its control, a chosen start and the size of the noise belong to the results that use them, and each such theorem states them.
- Existence claims. Where the book asserts that some mind or run has a property, the theorem constructs one admitted example; it shows that the mechanism exists, not that every mind has it.
- Keys. Lean names carry the key under which each result was first written (
result_13_13_clause_3states clause 3 of result 13.13);INDEX.mdgives each book result's printed number beside its key.
What is where
| Path | What it holds |
|---|---|
MindFormal/Tools/ |
General mathematics the theory needs: reflected paths and the Skorokhod map, Itô estimates for finitely many sources, Markov kernels, rational certificates |
MindFormal/Equations/ |
The five equations: an instance and its admission conditions, the drift, the attention and action selections |
MindFormal/Run/ |
The probability space and the Brownian sources, the world, the start, and the run on the mind's own noise |
MindFormal/Example/ |
Constructed minds, each with its run and the certificate the kernel checks |
MindFormal/Chapters/ |
The tagged theorems, one per clause or group of clauses, with the lemmas beside them |
MindFormal.lean |
The root file, importing every module |
tools/MindTag.lean |
The @[clause "13.13" 3] attribute: the result and clause a theorem states, and any step it takes |
vendor/ |
Seven published libraries ported to these pins, each with its license |
lakefile.toml, lean-toolchain, lake-manifest.json |
The build configuration and the pins |
INDEX.md, STATEMENTS.md |
The index of results and the main statements |
PrintAxioms.lean |
The axioms check |
LICENSE, NOTICE, CITATION.cff |
The license, the notices of the ported libraries, the citation |
A module imports only its own layer or an earlier one: Tools, Equations, Run, Example, Chapters. The ported libraries import only Mathlib and themselves.
The chapters. MindFormal.Chapters.Ch02 · MindFormal.Chapters.Ch03 · MindFormal.Chapters.Ch04 · MindFormal.Chapters.Ch05 · MindFormal.Chapters.Ch06 · MindFormal.Chapters.Ch07 · MindFormal.Chapters.Ch07Concepts · MindFormal.Chapters.Ch08 · MindFormal.Chapters.Ch10 · MindFormal.Chapters.Ch11 · MindFormal.Chapters.Ch12 · MindFormal.Chapters.Ch13 · MindFormal.Chapters.Ch14 · MindFormal.Chapters.Ch15 · MindFormal.Chapters.Ch16 · MindFormal.Chapters.Ch17 · MindFormal.Chapters.Ch18 · MindFormal.Chapters.Ch19 · MindFormal.Chapters.Ch20 · MindFormal.Chapters.CountableScopeRepair · MindFormal.Chapters.ReferenceDoseData
The papers
The papers built on the book have their own Lean in papers/, a second library beside the book's, which is unchanged. A
file is placed there once, when a paper first needs it, under its module name; a later paper reuses it in place. Each
paper has one entry module listing its result files, and a section of INDEX.md.
- Paper 2, Five Equations, One Mind: A Unified Theory of Attention, Memory, Learning, and Choice
(https://doi.org/10.5281/zenodo.24584355): entry module
papers/Paper2.lean. Afterlake exe cache get,lake build Paper2builds paper 2's files and what they import, and nothing else, andlake env lean papers/PrintAxioms.leanprints the axioms of the theorems its section lists. Its 18 results make 176 statements: 80 are stated directly by 78 theorems, listed in the index, and 96 follow from those. It adds 200 files (40,505 lines) underpapers/and uses 872 of the book's modules.
Names
File, module and theorem names carry internal order numbers, as in
MindFormal.A695LearningValue.result_10_17_3_L698. An order number labels the internal work order a piece came from.
Some modules, comments and docstrings carry the name of an AI model or a role in the working process (a builder, a
reader, a proposer); such a label says where the process recorded it, not by itself which model built a file. Neither
kind of label carries mathematical content, and both are kept as they stand.
License and citation
The project's code is licensed under the Apache License 2.0 (LICENSE). The ported libraries keep their own licenses,
six Apache 2.0 and one MIT (NOTICE). Cite the code with CITATION.cff; the technical report on the formalization, A
machine-checked theory of the mind: the Lean formalization of One Mind, is cited separately
(https://doi.org/10.5281/zenodo.24584351).
One Mind, the book · Its proofs · The repository (release v1.0.0) · The Lean report · The code's DOI · Main statements