Euler’s trap
A plausible conjecture:
Let’s test it, one integer at a time.
Forty examples do not make a proof. A formal checker demands an argument that holds for every n. That is exactly what Lean 4 brings.
African AI for Mathematics & Mathematical Physics
AIM²P is building a research assistant for pure mathematics and theoretical physics in which no result is accepted before it has been checked. An LLM proposes, SymPy computes, Lean 4 certifies, and the compiler’s errors become the raw material for correction.
Current phase
P3 · Experimental baselines
The problem
Generative models produce proofs that look flawless. Yet a single invalid step is enough to bring everything down, and nothing in the text gives it away.
An inference that “looks” right but does not follow from the previous ones.
A sign, an index or an identity invented in the middle of a computation.
A result that holds on one domain, applied outside it.
No autonomous mechanism guarantees that the proof is correct.
A plausible conjecture:
Let’s test it, one integer at a time.
Forty examples do not make a proof. A formal checker demands an argument that holds for every n. That is exactly what Lean 4 brings.
How it works
Each engine covers another one’s weakness. The LLM has intuition but no guarantee. SymPy computes exactly but cannot structure a proof. Lean 4 lets nothing through but invents nothing. Together, they correct each other.
LLM
An LLM proposes a strategy and a draft proof, step by step.
SymPy
SymPy recomputes every algebraic manipulation exactly, with no rounding. This critic can be wrong: its reliability will be measured, and Lean re-checks whatever it can.
Lean 4
Lean 4 compiles the proof. Its kernel accepts or rejects: there is no “almost right”. It certifies the formal statement as written; whether that statement is faithful to the problem is reviewed separately.
Compiler feedback
Error messages are fed back into the reasoning. The loop starts again until the proof is certified, or until a budget fixed in advance runs out.
Statement
A simple lemma, chosen so that every step of the loop stays readable. The keyword sorry marks the missing proof.
theorem sum_odd (n : ℕ) : ∑ k ∈ Finset.range n, (2 * k + 1) = n ^ 2 := by sorryAn example replayed step by step to illustrate the loop. The Lean code and the SymPy output are real; the V0.1 prototype that will automate this loop is planned for phases P4 to P6.
Flagship case study · Mathematical physics
Formal verification is moving fast on competition mathematics, but theoretical physics remains a minority in certified corpora. AIM²P starts with a topic they do not cover yet, Krylov complexity: the way a simple operator spreads, over time, across a chain of ever more complex operators.
The Lanczos algorithm turns the evolution of an operator into motion along a chain, governed by the coefficients bₙ:
Conventions: b₀ = 0, φₙ(0) = δₙ₀, O(t) = Σₙ iⁿ φₙ(t) Oₙ, inner product (A|B) = Tr(A†B) / Tr 𝟙.
It measures the operator’s average position on the chain, that is, how complex it has become:
Under the universal operator growth hypothesis, in a generic chaotic system of dimension d > 1 the bₙ grow linearly and K(t) grows as e2αt; at infinite temperature, this bounds the Lyapunov exponent. Such growth is not, by itself, proof of chaos: it also occurs in free theories and in integrable systems.
Parker, Cao, Avdoshkin, Scaffidi, Altman, Phys. Rev. X 9, 041017 (2019).
Interactive lab
Lanczos coefficients
Autocorrelation
Exact solution
Exponential growth at rate λK = 2α (η = 2h > 0): the behaviour expected in chaotic systems, but not proof of chaos.
Live checker
——min bₙ = 1.00 > 0 (n = 1…899)Simulation computed in your browser (fourth-order Runge–Kutta, α = 1). All three families of bₙ have an exact solution, so the computation can be checked live. A numerical foretaste of the formal certification AIM²P is aiming for.
Generate the Krylov operator basis with a symbolic Lanczos algorithm, checkable step by step.
Automatically check operator growth and the regularity conditions of the Lanczos coefficients.
Compare trajectories in Krylov space with holographic models, in the rare cases where both sides have a closed form (double-scaled SYK and JT gravity, SL(2,ℝ) coherent states).
State of the art
LLM + Lean and LLM + computer-algebra couplings are mature, and a few systems already combine all three, either for a specific domain (LIPS, NSPI, MechGeo) or by handing the solving to computer algebra (Moxia). To our knowledge (November 2026), what is still missing is an open, general-purpose architecture in which SymPy critiques the LLM’s steps with measured reliability, Lean 4 certifies, and ablations quantify each component’s contribution. Hover over or tap a system to place it.
DeepSeek-R1, OpenAI o1/o3, Llemma, AlphaProof
Strong mathematical intuition, fast proof drafts.
Logical hallucinations, no formal guarantee, focus on olympiads.
Lean 4 (Mathlib), Rocq, Isabelle/HOL
Every step is checked by the kernel, for a formal statement whose faithfulness still has to be audited.
Steep learning curve, very slow tactic writing.
SymPy, SageMath, Mathematica
Exact algebra, analytic differentiation and simplification.
Cannot structure a global proof, and can return a wrong but well-formed result, with no certificate.
IAIFI (MIT/Harvard), SciML, PINN
Very good numerical modelling of physical data.
Mostly numerical; Lean provers for physics have only appeared since October 2025.
Research gap
Formal physics is growing fast: Physlib (grown out of HepLean and PhysLean) covers mechanics, quantum mechanics, relativity, QFT and quantum information, and LLM provers for physics in Lean have existed since 2025. But, to our knowledge (November 2026), Krylov complexity, the Lanczos recursion and operator growth are absent from Mathlib and Physlib, apart from one isolated, unreviewed repository, and research-level derivations remain largely unformalised.
Some systems already combine an LLM, computer algebra and Lean 4, either for a specific domain (inequalities with LIPS and NSPI, geometry with MechGeo) or by letting computer algebra solve in place of the LLM (Moxia, 2026). To our knowledge (November 2026), there is not yet an open, general-purpose architecture in which SymPy critiques the LLM’s steps with measured reliability, Lean 4 certifies the results and, where possible, the computations, and ablations measure each component’s contribution.
Feeding Lean errors back to revise a proof has become standard (Goedel-Prover-V2, Seed-Prover, Hilbert…), and these loops have been evaluated in physics since October 2025 (QuantumTheorems, LeanPhysBench, AxQM). To our knowledge (November 2026), no published pipeline couples them with computer algebra for mathematical-physics derivations, and per-lemma certification curves are rarely published.
To our knowledge (November 2026), no open-source platform or benchmark for formally verified reasoning (Lean 4, Rocq, Isabelle) is developed from the African continent, and no Lean community event has been held there. African benchmarks exist for informal reasoning (AfriMGSM, Uhura), as do strong AI communities (AIMS, Deep Learning Indaba, Masakhane): AIM²P aims to connect them with formal methods.
Falsifiable hypotheses
Each hypothesis has a numerical target, a decision criterion fixed before any measurement, and a phase in which it will be put to the test. It is stated so that measurements can contradict it.
≥ +20 ptsverified success rate
On AMP-Bench-mini (40 problems frozen with their grader), the LLM + SymPy + Lean 4 loop beats the same LLM used alone by at least 20 absolute points (H1a), and outperforms the same LLM given 5 attempts filtered by the same verifier, at equal budget (H1b). Paired test, pre-registered.
Resultto be measured
k ≤ 5iterations · ≥ 70% of lemmas
With a frozen proof plan, LLM and budget, at least 70% of intermediate lemmas (items N3–N5) are certified by Lean within at most 5 iterations. The success(k) curve, for k = 0 to 10, will be published, compared with resampling at equal cost and broken down by error type.
Resultto be measured
Detectinjected physics errors
In correct derivations seeded with controlled errors (sign, units, invariance, boundary conditions), Lean 4 is compared with SymPy and an LLM judge. H3a: typing rejects unit and invariance errors. H3b: missing hypotheses and wrong boundary conditions become unprovable goals or counterexamples, caught more often than by the other two critics. H3c (exploratory): the loop proposes a fix, reviewed by a human.
Resultto be measured
Our scientific conduct fits in one sentence.
“Our AI solves mathematics.”
“Our system reaches X% on AMP-Bench versus Y% for the baseline, with Z% of solutions fully verified by Lean 4.”
Until X, Y and Z are measured, this site shows no results.
AMP-Bench · being specified (P2)
AMP-Bench will evaluate reasoning on mathematics and physics problems graded from N1 to N5. Each solution will be judged on two separate criteria: is the answer right, and is the proof fully verified by Lean 4?
Indicative examples. The final content of the benchmark is the subject of phase P2; it will be released as open data.
Roadmap 2026–2028
From scientific framing to assisted discovery, every phase has a public deliverable. Pick a step on the map to see its goal.
Literature review, identification of the research gap, publication of the founding documents.
Comparative matrix of LLMs, Lean 4, SymPy, Rocq (formerly Coq) and Isabelle.
Initial dataset, levels N1 to N5, in mathematics and physics.
Evaluation of current models (OpenAI, Anthropic, DeepSeek, Llemma…), versions frozen when testing starts.
Prototype of the Reasoning Engine V0.1 and its SymPy critic.
Loop that generates and checks Lean tactics.
Agentic revision loop or tree search, guided by Lean compiler errors.
Hamiltonian mechanics module and the Krylov complexity case study.
Release of the reference benchmark for mathematical physics.
Writing and submitting preprints (NeurIPS, ICLR, physics journals).
Structuring the AIM2P GitHub organisation: complete, documented repositories.
Hiring key roles: mathematics research, AI engineering, physics, development.
Setting up the scientific advisory board (SAB).
Grant and compute-grant campaign, from $5k to over $100k.
Targeted partnerships with institutions such as AIMS, Oxford, the Perimeter Institute, ENS and INRIA.
Talks at AI for Math and Mathematical Physics workshops.
Launching research groups, hackathons and seminars.
Assisted formulation of conjectures and a large international programme.
Founding documents: research question, state of the art, research gap, research proposal v0.1.
Reference datasets, robustness protocol, definition of the metrics.
Closed and open models evaluated at frozen versions; report on errors and hallucinations.
A first Python reasoning engine coupled with SymPy and Lean 4 checking. Public repository.
Founding documents
To what extent does an open neuro-symbolic loop, in which an LLM reasons, SymPy computes and critiques, and Lean 4 certifies, increase, at equal compute budget, the share of correct and fully verified solutions, and reduce unverified claims of success, compared with the same LLM used alone or filtered by the same verifier, in mathematics and mathematical physics?
Automatically translate reasoning written in enriched natural language (LaTeX) into executable Lean 4 tactics.
Feed Lean error messages and SymPy verdicts back to the LLM to guide a revision loop (agentic, possibly tree-shaped) towards a certified proof, and measure its cost per iteration.
Adapt formal checkers to the objects of theoretical physics: Lanczos operators, Krylov complexity, quantum Hamiltonians.
Vision, objectives, architecture, Krylov case study, 19 phases, first 90 days.
Central question, sub-questions SQ1–SQ3, hypotheses H1–H3.
LLMs, proof assistants, symbolic solvers, AI for physics, recent systems.
The four open problems AIM²P targets.
Pre-registered hypotheses, AMP-Bench-mini, protocol, Krylov case study, timeline and budget.
Phase P1: tool comparison and frozen choices (Lean 4.35, Mathlib, Physlib, SymPy, free models, verification chain).
Documents written in French, available in Markdown and PDF.
AIM²P Initiative. (2026). AIM²P: Research Program for Certified AI Reasoning in Mathematics and Mathematical Physics (Phase 0) (Version 0.1.0). https://github.com/AIM2P/researchOpen science · Africa
AIM²P aims to build, from the continent, an open research infrastructure for AI in mathematics and formal physics, and to make rigour a common good, open to African researchers as to everyone else.
No claim without a proof or an experiment.
Frozen scripts, pipelines and random seeds.
Data and code 100% public.
Always against state-of-the-art baselines.
Validation by the proof compiler.
Independence from any single LLM provider.
AIM²P moves forward in funding tiers. Foundations, compute programmes and academic institutions: let’s talk.
Get in touchJoin the initiative
The founding team is taking shape (phase P11). Mathematician, physicist, AI engineer or Lean developer: your exacting standards are what we need.
Specify AMP-Bench, formalise statements, judge the quality of proofs.
Krylov complexity, Hamiltonian mechanics, holography: define what must be certified.
Reasoning engine, agentic revision loop, rigorous evaluation of baselines.
Lean integration, reproducible pipelines, open-source tooling.