Lean 4 (v4.28.0) + Mathlib formalization of the Creative Determinant framework.
Models autopoietic closure as a nonlinear elliptic BVP on a compact Riemannian
manifold. Fifteen theorems proved with zero sorry. Five classical PDE results
axiomatized via the PDEInfra typeclass (Schaefer, Schauder, maximum principle,
Amann iteration, fixed-point nonnegativity).
lake build --wfail # primary check — warnings are errors
lake lint # Mathlib linter suite
lake build CdFormal.Verify # axiom dashboard (#print axioms)Pre-commit hooks enforce: trailing whitespace, EOF newline, merge conflicts,
copyright headers on all .lean files.
- Prop terms (theorems):
snake_case—mul_comm,rpow_le_of_mul_rpow_le - Types/Props/Sorts (structures):
UpperCamelCase—SemioticBVP,IsWeakCoherentConfiguration - Other Type terms:
lowerCamelCase—viabilityThreshold,canonicalViability - UpperCamelCase inside snake_case: becomes
lowerCamelCase—neZero_iffnotNeZero_iff - Conclusion-first:
lt_of_le_of_ne(conclusionlt, hypothesesleandne) _of_pattern: hypotheses joined by_of_in order:C_of_A_of_BforA → B → C- American English:
factorizationnotfactorisation
- 100-char line limit (linter-enforced)
byat end of preceding line, never on its own line- 2-space indent for proof bodies; 4-space for multi-line statements
- No empty lines inside declarations (linter-enforced)
- Focusing dots
·flush with current indent, tactics indented beneath :,:=, infix ops at end of line, not start of nextfun x ↦notλ x ↦; no$(use<|if needed)
| Goal type | Preferred tactic |
|---|---|
| Linear ℕ/ℤ arithmetic | omega |
| Numerical evaluation | norm_num |
| Decidable props | decide |
| Positivity (0 ≤ x, 0 < x) | positivity |
| Monotonicity/congruence | gcongr |
| General simplification | simp (last resort) |
| Nonlinear arithmetic | nlinarith [hint] |
| Field algebra | field_simp then ring or linarith |
| Real powers | Real.rpow_* lemmas; rw [Real.rpow_sub_one] for v^(p-1) |
- Terminal
simp: do NOT squeeze (maintenance burden from lemma renames) - Non-terminal
simp: MUST besimp only [...] - One tactic per line (semicolons only for short single-idea sequences)
@[simp]: equations/iff where LHS is more complex than RHS; must not loop@[ext]: extensionality lemmas@[simps]: auto-generate projection simp lemmas for structures@[gcongr]: congruence lemmas of formf x₁ ∼ f x₂givenx₁ ∼ x₂
Type*notType _(performance requirement)wheresyntax for instances, not bracesvariableblocks for shared parameters — don't repeat{n : ℕ} {M : Type*}- Hypotheses left of colon —
(h : 1 < n) : 0 < nnot: 1 < n → 0 < n abbrev(reducible) requires justification;@[irreducible]requires justification- Classical by default — don't thread
Decidableinstances unless the type requires them
- Module docstring (
/-! ... -/) required after imports: title, summary, Main definitions, Main statements, Implementation notes, References, Tags - Definition docstrings (
/-- ... -/) required on everydef(linter:docBlame) - References: cite as
[AuthorYear], e.g.[GilbargTrudinger2001],[Amann1976]
- Granular imports only — never
import Mathlib - Import hierarchy: Algebra → Order → Topology → Analysis (no cross-category violations)
- Files under ~1000 lines; split along natural boundaries
Role: leaf-lemma grinder and dependency detector, not theorem architect.
- Algebraic reshaping (e.g.
bv ≥ cv^p → v^{p-1} ≤ b/c) - Positivity/nonzeroness, rpow simplification, division algebra
- High success on algebraic/order-theoretic leaves
- Headline theorems, design decisions, anything where definitions are still moving
- If you can't explain in one sentence why the lemma is true, don't submit it
- Freeze the statement — hand-design def + statement, compile to sorry, then submit
- Each sorry = one leaf — one concept, one obvious target, short dependency cone
- Proof-shaped files — short helpers first, named intermediates, minimal imports
- Batch by type: positivity → algebra → rpow → order theory → cleanup
prove_filewithwait=False— runs take minutes to hours; don't poll in tight loops
- Keep the statement, keep discovered dependencies
- Rewrite proof into clean human-owned form — Aristotle output is draft, not scripture
- Artifacts go to
artifacts/aristotle/*.lean(outside build tree, gitignored from lint)
- Aristotle runs Lean 4.24.0 — outputs may not compile on our 4.28.0
- Sometimes generates
exact?(interactive-only tactic) — rewrite manually - Do NOT use
axiomto provide upstream lemmas — shadows function definitions
Real.rpow_sub_one (hv : v ≠ 0) : v ^ (p - 1) = v ^ p / v— key for L∞ algebraReal.rpow_le_rpowrequires0 ≤ baseand0 ≤ exponentReal.rpow_mul (hx : 0 ≤ x)— exponent product rule needs nonneg baseone_div_nonneg.mprto prove0 ≤ 1/(p-1)from0 < p-1
Bornology.IsVonNBounded ℝ S— Mathlib's bornological bounded setsIsCompact (closure (T '' S))— compact image characterization- These are used in the
T_compactaxiom (PDEInfra typeclass)
SemioticOperatorsfields (laplacian_add,laplacian_smul,gradNorm_nonneg,gradNorm_smul,gradNorm_const) are axioms — proved consequences go inOperatorLemmas.leanandCoefficientLemmas.leangradNorm_constwas added after Aristotle couldn't derive it — it IS needed as an axiom
OrderHom.nextFixed— Knaster-Tarski iterative construction- Need
CompleteLattice αforOrderHom.nextFixed_le_of_le - The
Propinstance isProp.instCompleteLattice(auto-derived)
- Never shadow prelude names: don't use
le,lt,eq,neas variable names - Standard parameters:
{n : ℕ} {M : Type*},[SemioticManifold n M] ops : SemioticOperators n M— abstract PDE operatorsctx : SemioticContext n M— coefficient fields (a, b, c, p)bvp : SemioticBVP n M— full boundary value problemsolOp : SolutionOperator bvp— solution operator Tinfra : PDEInfra bvp solOp— PDE infrastructure axiomsΦorPhi— solutions (weak coherent configurations)
| File | Role | Status |
|---|---|---|
Basic.lean |
SemioticManifold, SemioticContext, SemioticBVP, operators | Definitions |
Axioms.lean |
PDEInfra typeclass (5 axioms), SolutionOperator, PrincipalEigendata | Axioms |
Theorems.lean |
Existence + nontriviality theorems, spectral characterization | Proved |
OperatorLemmas.lean |
Δ(0)=0, Δ linear, |∇0|=0 | Proved |
CoefficientLemmas.lean |
a(x)≥0, a(x)≤1, p-1>0 | Proved |
ScalingUniqueness.lean |
kΦ with k>1 is impossible | Proved |
LinftyAlgebraic.lean |
bv≥cv^p ⟹ v≤(b/c)^{1/(p-1)} | Proved |
MonotoneFixedPoint.lean |
Knaster-Tarski between sub/super-fixed points | Proved |
Verify.lean |
Axiom dashboard (#print axioms, 17 declarations) | Dashboard |
| Field | Paper Ref | Classical Source |
|---|---|---|
T_compact |
Lemma 3.7 | Schauder + Arzelà-Ascoli |
linfty_bound |
Lemma 3.10 | Maximum principle (Gilbarg-Trudinger) |
schaefer |
Thm 3.12 | Schaefer 1955 |
fixed_point_nonneg |
Thm 3.12 | Strong maximum principle |
monotone_iteration |
Thm 3.16 | Amann 1976 |
T_compact uses bornological vocabulary (IsVonNBounded → IsCompact).
The schaefer axiom takes T_compact as an explicit hypothesis.
- No sorries on main — every theorem fully proved before shipping
- Internal docs (
docs/internal/) are NOT committed to git - Commit messages: substantive, not ceremonial
- Feature branches merge to main via fast-forward; delete after merge
- Mathlib PR process: post to Zulip first, small PRs preferred, AI disclosure required