African AI for Mathematics & Mathematical Physics

Reason.Compute.Certify.

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.

  • LLM · reasoning
  • SymPy · exact computation
  • Lean 4 · formal proof

Current phase

P3 · Experimental baselines

3
coupled engines
3
falsifiable hypotheses
19
phases, 2026–2028
100 %
open science, CC BY 4.0

The problem

Convincing is not true.

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.

  • 01

    Invalid steps

    An inference that “looks” right but does not follow from the previous ones.

  • 02

    Symbolic hallucinations

    A sign, an index or an identity invented in the middle of a computation.

  • 03

    Forgotten boundary conditions

    A result that holds on one domain, applied outside it.

  • 04

    No certified proof

    No autonomous mechanism guarantees that the proof is correct.

Experiment

Euler’s trap

A plausible conjecture:P(n)=n2+n+41 is prime for every n∈NP(n) = n^2 + n + 41 \text{ is prime for every } n \in \mathbb{N}

01234567891011121314151617181920212223242526272829303132333435363738394041

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

Four beats, one single loop.

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.

  1. 01

    Reason

    LLM

    An LLM proposes a strategy and a draft proof, step by step.

  2. 02

    Compute

    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.

  3. 03

    Certify

    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.

  4. 04

    Correct

    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.

Proof workshop

Illustrative example
Iteration 1to prove
LLMSymPyLean 4Fixtheoremsum_odd

Statement

Show that the sum of the first n odd numbers is n².

A simple lemma, chosen so that every step of the loop stays readable. The keyword sorry marks the missing proof.

∑k=0n−1(2k+1)=n2\sum_{k=0}^{n-1} (2k+1) = n^2
theorem sum_odd (n : ℕ) :    ∑ k ∈ Finset.range n, (2 * k + 1) = n ^ 2 := by  sorry

An 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

Where formal proof has not gone yet.

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.

i

The Lanczos chain

The Lanczos algorithm turns the evolution of an operator into motion along a chain, governed by the coefficients bₙ:

∂tφn=bn φn−1−bn+1 φn+1\partial_t \varphi_n = b_n\,\varphi_{n-1} - b_{n+1}\,\varphi_{n+1}

Conventions: b₀ = 0, φₙ(0) = δₙ₀, O(t) = Σₙ iⁿ φₙ(t) Oₙ, inner product (A|B) = Tr(A†B) / Tr 𝟙.

ii

Krylov complexity

It measures the operator’s average position on the chain, that is, how complex it has become:

K(t)=∑nn ∣φn(t)∣2K(t) = \sum_{n} n\,|\varphi_n(t)|^2
iii

Universal growth

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.

bn∼αn  ⇒  K(t)∼e2αtλL≤2α(T=∞)\begin{gathered} b_n \sim \alpha n \;\Rightarrow\; K(t) \sim e^{2\alpha t} \\ \lambda_L \le 2\alpha \quad (T = \infty) \end{gathered}

Parker, Cao, Avdoshkin, Scaffidi, Altman, Phys. Rev. X 9, 041017 (2019).

Interactive lab

Grow an operator.

Lanczos coefficients

bn=αn (n−1+η)b_n = \alpha\sqrt{n\,(n-1+\eta)}

Autocorrelation

C(t)=sech⁡η(αt)C(t) = \operatorname{sech}^{\eta}(\alpha t)

Exact solution

K(t)=η sinh⁡2(αt)K(t) = \eta\,\sinh^2(\alpha t)

Exponential growth at rate λK = 2α (η = 2h > 0): the behaviour expected in chaotic systems, but not proof of chaos.

Live checker

  • Unitarity—
  • Agreement with the exact solution—
  • Positivity of the bₙmin bₙ = 1.00 > 0 (n = 1…899)
Wave function on the Krylov chaint = 0.000 · K(t) = 0.000
Krylov complexity K(t)simulation (RK4)exact solution

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.

What AIM²P will have to certify

∂

Formal derivation

Generate the Krylov operator basis with a symbolic Lanczos algorithm, checkable step by step.

bₙ

Invariant checking

Automatically check operator growth and the regularity conditions of the Lanczos coefficients.

AdS

From classical to quantum

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

Three worlds starting to talk.

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.

Reasoning (LLM)Symbolic computationFormal proofLIPS · MechGeoDeepSeek-R1OpenAI o1 / o3LlemmaAlphaProofDeepSeek-Prover-V1.5Lean CopilotSymPySageMathLean 4 · MathlibRocq · IsabellePhysLean / PhyslibAIM²P

Reasoning LLMs

DeepSeek-R1, OpenAI o1/o3, Llemma, AlphaProof

Strong mathematical intuition, fast proof drafts.

Logical hallucinations, no formal guarantee, focus on olympiads.

Proof assistants

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.

Symbolic solvers

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.

AI for physics

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

Four locks, one programme.

01

Research-level physics, outside formal libraries

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.

02

A triad that exists, but not as a critical loop

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.

03

Self-correction not yet coupled with computer algebra

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.

04

No African home yet for formal verification

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

Three bets, measurable or refutable.

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.

H1Measured: P3 → P8

Gain at equal budget

≥ +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

H2Measured: P5 → P6

Lemma certification curve

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

H3Measured: P7

Transfer to physics

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

The golden rule

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)

Five levels, from computation to research.

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?

  1. N1

    Elementary computation

    (sin⁡x2)′=2xcos⁡x2(\sin x^2)' = 2x\cos x^2
  2. N2

    Classical lemma

    ∑k=0n−1(2k+1)=n2\sum_{k=0}^{n-1}(2k+1) = n^2
  3. N3

    University level

    2∉Q\sqrt{2} \notin \mathbb{Q}
  4. N4

    Mathematical physics

    dHdt={H,H}=0\frac{dH}{dt} = \{H, H\} = 0
  5. N5

    Research

    λL≤2α(T=∞)\lambda_L \le 2\alpha \quad (T = \infty)

Indicative examples. The final content of the benchmark is the subject of phase P2; it will be released as open data.

Roadmap 2026–2028

Nineteen phases. The first three are done.

From scientific framing to assisted discovery, every phase has a public deliverable. Pick a step on the map to see its goal.

20262028FramingFoundationsEnginePhysics & benchmarkOpen scienceCommunityDiscoveryP0FramingP1MappingP2Benchmark specP3BaselinesP4Engine V0.1P5Lean 4P6Self-correctionP7Math. physicsP8AMP-BenchP9PublicationsP10Open sourceP11TeamP12Advisory boardP13FundingP14CollaborationsP15ConferencesP16African networkP17–18Discovery
  1. P0Scientific framingFraming · Done

    Literature review, identification of the research gap, publication of the founding documents.

  2. P1Domain mappingFoundations · Done

    Comparative matrix of LLMs, Lean 4, SymPy, Rocq (formerly Coq) and Isabelle.

  3. P2Benchmark specificationFoundations · Done

    Initial dataset, levels N1 to N5, in mathematics and physics.

  4. P3Experimental baselinesFoundations · In progress

    Evaluation of current models (OpenAI, Anthropic, DeepSeek, Llemma…), versions frozen when testing starts.

  5. P4Neuro-symbolic engineEngine · Next

    Prototype of the Reasoning Engine V0.1 and its SymPy critic.

  6. P5Lean 4 integrationEngine · Planned

    Loop that generates and checks Lean tactics.

  7. P6Self-correction loopEngine · Planned

    Agentic revision loop or tree search, guided by Lean compiler errors.

  8. P7Mathematical physicsPhysics & benchmark · Planned

    Hamiltonian mechanics module and the Krylov complexity case study.

  9. P8AMP-Bench benchmarkPhysics & benchmark · Planned

    Release of the reference benchmark for mathematical physics.

  10. P9Scientific publicationsOpen science · Planned

    Writing and submitting preprints (NeurIPS, ICLR, physics journals).

  11. P10Open-source ecosystemOpen science · Planned

    Structuring the AIM2P GitHub organisation: complete, documented repositories.

  12. P11Building the teamCommunity · Planned

    Hiring key roles: mathematics research, AI engineering, physics, development.

  13. P12Scientific advisory boardCommunity · Planned

    Setting up the scientific advisory board (SAB).

  14. P13Funding strategyCommunity · Planned

    Grant and compute-grant campaign, from $5k to over $100k.

  15. P14International collaborationsCommunity · Planned

    Targeted partnerships with institutions such as AIMS, Oxford, the Perimeter Institute, ENS and INRIA.

  16. P15Conferences and outreachCommunity · Planned

    Talks at AI for Math and Mathematical Physics workshops.

  17. P16African Research NetworkCommunity · Planned

    Launching research groups, hackathons and seminars.

  18. P17–18Discovery and scalingDiscovery · Planned

    Assisted formulation of conjectures and a large international programme.

  • In progress
  • Next step
  • Planned

The first 90 days

  1. Days 1–15

    Scientific framework

    Founding documents: research question, state of the art, research gap, research proposal v0.1.

  2. Days 16–30

    Specifications

    Reference datasets, robustness protocol, definition of the metrics.

  3. Days 31–60

    Baselines and tests

    Closed and open models evaluated at frozen versions; report on errors and hallucinations.

  4. Days 61–90

    Prototype V0.1

    A first Python reasoning engine coupled with SymPy and Lean 4 checking. Public repository.

Founding documents

The question that drives everything else.

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?

Central research question · revised version, November 2026
SQ1

Neuro-symbolic interface

Automatically translate reasoning written in enriched natural language (LaTeX) into executable Lean 4 tactics.

SQ2

Feedback and errors

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.

SQ3

Physics and invariants

Adapt formal checkers to the objects of theoretical physics: Lanczos operators, Krylov complexity, quantum Hamiltonians.

00

Roadmap 2026–2028

Vision, objectives, architecture, Krylov case study, 19 phases, first 90 days.

01

Research question

Central question, sub-questions SQ1–SQ3, hypotheses H1–H3.

02

State of the art

LLMs, proof assistants, symbolic solvers, AI for physics, recent systems.

03

Research gap

The four open problems AIM²P targets.

04

Research Proposal v0.1

Pre-registered hypotheses, AMP-Bench-mini, protocol, Krylov case study, timeline and budget.

05

Domain map

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.

Cite AIM²P

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/research

Open science · Africa

Conceived in Africa. Open to the world.

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.

  • Research groupson formal proof and mathematical physics
  • Hackathonsaround Lean 4 and AMP-Bench
  • Seminarsopen, in French and English

Six non-negotiable principles

⊢

Rigour

No claim without a proof or an experiment.

↻

Reproducibility

Frozen scripts, pipelines and random seeds.

∅

Open science

Data and code 100% public.

≷

Strict comparison

Always against state-of-the-art baselines.

✓

Automatic verification

Validation by the proof compiler.

⊕

Technological neutrality

Independence from any single LLM provider.

Support the programme

AIM²P moves forward in funding tiers. Foundations, compute programmes and academic institutions: let’s talk.

Get in touch
  1. 0 – 5 k$SeedCompute grants, competitions, seed funds.
  2. 5 – 25 k$ConsolidationAcademic grants, open science, conferences.
  3. 25 – 100 k$+Scaling upInternational foundations, postdocs, GPU infrastructure.

Join the initiative

We are looking for rigorous minds.

The founding team is taking shape (phase P11). Mathematician, physicist, AI engineer or Lean developer: your exacting standards are what we need.

∀

Mathematics research

Specify AMP-Bench, formalise statements, judge the quality of proofs.

ℏ

Theoretical physics

Krylov complexity, Hamiltonian mechanics, holography: define what must be certified.

λ

AI engineering

Reasoning engine, agentic revision loop, rigorous evaluation of baselines.

⊢

Lean 4 & Python development

Lean integration, reproducible pipelines, open-source tooling.

An AI that proves things, and proves it.