§0 · Two goals
Two goals: certified correctness first, then AI-powered unification
The programme pursues two goals, one after the other. Phase I, certified correctness: a number produced by simulation is correct in physics, in mathematics and as software, or its error is bounded and checked by a proof (§1–§11 of this page). Phase II, AI-powered unification: one framework from the interactions of electrons and nuclei to macroscopic physics, with AI doing as much of the derivation as possible (the research goal below).
The order is deliberate. To bring in AI as far as possible — to let it propose effective theories, cross-scale maps, interatomic potentials and constitutive laws — its output has to be checkable: an AI-produced step is a candidate until a checker accepts it, and a refusal says why. Phase I’s certificates are what make that possible, so the more of the chain is certified, the more of it can be handed to AI without losing trust.
Everything done so far is Phase I: Stage I (reached, frozen on 30 October 2026), Stage II (under way until 29 January 2027) and the Stage III candidates on the progress page. Phase II begins only when the programme has actually produced something new along that path, not before.
Certified correctness
Triple correctness for DFT, FEM, MD, CALPHAD and CSP: Lean-checked certificates, verified software, comparison with experiment where the first two are bounded.
Stage I reached; Stage II making DFT and CALPHAD usable for research.
AI-powered unification
Electrons, atoms and continuum as consistent descriptions of one system, with AI deriving the effective models and Phase I’s checkers deciding which of them hold.
Starts when something new has actually been produced; first candidates below.
Research goal of Phase II: from microscopic laws to macroscopic physics, one framework across the electronic, atomic and continuum scales
Can we build a first-principles framework of general validity that starts from the basic interactions of electrons and nuclei, systematically derives the effective degrees of freedom, evolution equations and constitutive relations at each scale, and so predicts macroscopic properties, dynamics and collective phenomena on one consistent physical footing?
The problem. Given a system’s microscopic composition, its basic interactions, and its initial conditions, boundary conditions and external driving, construct a cross-scale derivation that is computable, physically consistent and error-controlled. According to the space and time scales and the accuracy the target phenomenon requires, it should identify the degrees of freedom that matter, derive the corresponding effective theory, and establish consistent maps between the descriptions at different scales.
The aim is to unify the electronic-structure description of density functional theory (DFT), the atomic-motion description of molecular dynamics (MD) and the continuum models solved by the finite element method (FEM): the energies and interactions at the electronic scale, the structure and dynamics at the atomic scale, and the constitutive relations and field equations at the macroscopic scale become mutually consistent descriptions of one physical system at different resolutions.
General validity means one set of derivation principles for different materials, for equilibrium and non-equilibrium conditions, and for mechanical, thermal, electrical and other processes. The concrete effective model may change with the system and the scale, but each level states its range of validity, its physical constraints, and how errors and uncertainties propagate between scales.
The end goal is a traceable chain of prediction from microscopic interactions to macroscopic phenomena, in which macroscopic laws and their parameters are generated systematically from microscopic physics, and predictions that can be checked are obtained at an affordable computational cost.
Energies and interactions
Kohn–Sham ground states: total energies, band structures, and, to come, forces and stresses.
Today: Lean-checked LDA solutions on real 3D crystals (Si, NaCl and any lattice with a rational cell volume); PBE in progress.
Structure and dynamics
Trajectories under an interatomic potential; free energies and phase equilibria of the resulting phases.
Today: trajectory bounds for a 1D Lennard-Jones chain; certified multicomponent CALPHAD equilibria from TDB databases.
Constitutive laws and fields
Field equations with constitutive relations and coefficients (elastic, thermal, transport) taken from the scales below.
Today: 1D finite elements whose bounds speak about the true solution of the continuous problem.
What Phase I gives Phase II. Each arrow above is a map between computed quantities, and each such map can fail in the three ways this programme separates (§2). Its mathematical error (discretisation, truncation, fitting) and its software error (arithmetic, parallel bookkeeping) can be bounded and checked by a proof; its physics error (the functional, the form of the potential, the constitutive ansatz) cannot be proved and is tested against observation, with its range of validity stated. With a certified interval at every scale and a proved bound on how each map propagates it, the propagation of the first two kinds of error through the whole chain becomes a theorem rather than an estimate, and a remaining disagreement with experiment can be attributed to a named physical approximation at a named scale.
Where we stand. The single-scale pieces exist at very different maturity: DFT on real 3D crystals, MD and FEM in one dimension, CALPHAD for multicomponent alloys. No map between scales is certified yet. This is the goal of Phase II, not a commitment of Stage II; its first candidate steps are listed under Phase II on the progress page.
- Phase II candidate First bridge: DFT elastic constants into FEM elasticity. Certified stresses or energy–strain curves from DFT give elastic constants with intervals; a certified linear-elastic FEM solution then carries those intervals to displacements and stresses. Needs certified DFT stresses and FEM beyond one dimension.
- Phase II candidate DFT formation energies into CALPHAD. Certified formation energies fix end-member parameters with intervals; the CALPHAD checker then bounds how far a phase boundary can move.
- Phase II candidate A DFT-fitted interatomic potential into MD. A potential fitted to certified DFT energies and forces, with its fit residual stated; MD trajectory bounds then hold for that potential, and the residual is reported as the model error of map 1.
§1
Why do this
Scientific software usually earns trust in three ways: comparison with analytic solutions, with experiment, and with other programs. All three work, but they only cover the cases that were tested, and when a result deviates it is hard to say which layer the deviation came from.
The Sleipner A platform sinks
Poorly shaped finite elements underestimated the shear stress in the tricell walls by about 47%; the concrete base failed in a ballast test and sank. The program reported no error.
Lesson: mesh quality and discretisation error must be checked, not judged.
The Δ-gauge and reproducibility
Lejaeghere et al. compared 40 DFT methods on 71 elemental crystals. Differences could only be traced by item-by-item comparison.
Lesson: hidden numerical settings belong in the specification, with an error bound.
The band-gap problem
LDA gives silicon a gap of about 0.5 eV against a measured 1.17 eV. The cause is the model, not the numerics: no amount of precision removes it.
Lesson: only with maths and software errors bounded can a gap with experiment be blamed on the model.
Parallelism makes things harder. An MD code decomposes space over thousands of MPI ranks; if an atom is lost or duplicated as it crosses a subdomain boundary, the energy curve may show only a barely visible jump. The order of floating-point reductions changes with the number of ranks, so the same input gives bitwise-different trajectories on machines of different size. These errors have nothing to do with physics. They are errors in concurrent protocols, and concurrent protocols are exactly what TLA+ is good at.
The examples are three different kinds of error: Sleipner was a mathematical error (uncontrolled discretisation), a lost atom is a software error, and the band gap is a physics error in the model itself. Common practice checks all three the same way, by comparing with experiment or with other programs, so a deviation cannot be located. This programme separates them: each correctness gets its own kind of evidence and its own entries in the ledger.
§2
Core claim: triple correctness, and a result is only as trustworthy as the weakest link
A simulated conclusion is trustworthy only if it is correct in three ways at once; none can be left out:
- Physically correct. The model (equations, functional, force field, constitutive law, thermodynamic database) describes the real world in the range it claims. This cannot be proved; only experimental observation can confirm or refute it, always with a measurement uncertainty.
- Mathematically correct. What is solved really is the model’s equations: the solution exists and is unique, and the discretisation and iteration errors have rigorous bounds. Machine proofs in Lean 4 guarantee this.
- Software correct. The program faithfully executes the algorithm, parallel protocols lose and duplicate nothing, and floating-point rounding error is bounded. TLA+ specifications and model checking, Frama-C proofs of the C code and proved certificate checkers guarantee this.
Trust depends on the weakest link. We split the path from the real world to a floating-point number into seven layers and write an explicit obligation between each pair: the first is physics (validation), the middle three are mathematical (PDE theory and numerical analysis), the last two belong to software (specification and floating-point analysis). To our knowledge this is the first time the three correctnesses have been put into one framework and one ledger.
- L0
Real world
Experimental observations: band gaps, lattice constants, magnetic moments, phase diagrams, elastic moduli, diffusion coefficients, with their measurement conditions and uncertainties.
- Physics Validation: the model’s predictions agree with the observations within the stated uncertainty, and agreement is claimed only in the range where it was checked
- L1
Physics model
The equations themselves: Kohn–Sham, Newton or Langevin equations of motion, linear elasticity.
- Maths Well-posedness: a solution exists, is unique and depends continuously on the data
- L2
Continuous problem
A variational form in a function space, e.g. find u ∈ H¹ with a(u, v) = ℓ(v) for all v.
- Maths Discretisation error estimate: uh → u, with a rate
- L3
Discrete problem
A finite-dimensional algebraic system: stiffness matrices, plane-wave coefficients, particle coordinates.
- Maths Algorithmic convergence: when the iteration stops at step k, the algebraic error is controlled
- L4
Abstract algorithm
SCF iteration, velocity Verlet, conjugate gradients — described mathematically, in exact arithmetic.
- TLA+ Refinement: every step of the parallel program corresponds to one step of the abstract algorithm, or leaves the abstract state unchanged
- L5
Parallel program
MPI ranks, messages, shared-memory threads, GPU streams, checkpoint and restart.
- Floating point Rounding-error bound: the distance between the floating-point result and the exact-arithmetic result
- L6
Floating-point execution
The number actually computed on IEEE 754 hardware.
- Maths Discretisation and algebraic error: from PDE theory and the theory of the algorithm
- Floating point Rounding error: from floating-point analysis
- TLA+ Precondition: the program really computes ũh(k) — guaranteed by refinement
This inequality is the backbone of mathematical and software correctness. Each term must be backed by a theorem, and the premise that makes it hold — that the parallel program faithfully executes the abstract algorithm — must be guaranteed by the software-layer specification. Physics correctness adds one more layer outside it:
- Physics Measurement error and model error: only experiment can confirm them, with a statistical uncertainty
- Maths Numerical and software error: enclosed rigorously by the inequality above, y(u) ∈ [lo, hi]
When computation is compared with experiment today, the three terms are mixed: a deviation may come from the model, or from the cutoff, the k-points, SCF convergence, the pseudopotential or the code. Once the last term is enclosed by a certificate, subtracting a known interval from the deviation yobs − ỹ leaves only model error and measurement error: model error is bounded rigorously, not estimated. Here the model is everything fixed at L1: the equations, the functional or force field, the pseudopotential, and the identification of the computed quantity with the measured one (for example a Kohn–Sham gap standing in for an optical gap). That is what the three correctnesses gain from being together, and what distinguishes this programme from pure verification or pure validation. The rules and grades for validation are in §5.
§3
Three kinds of evidence: mathematics, software and physics layers, one bridge, one foundation
PDE theory and numerical analysis
- Well-posedness: Lax–Milgram, inf-sup conditions, existence of minimisers of the Kohn–Sham energy
- Discrete convergence: a priori estimates (Céa’s lemma, interpolation, plane-wave truncation) and a posteriori estimates
- Structure preservation: symplecticity, time reversibility, conservation of momentum and charge, crystal symmetry
- Iterative convergence: conditions and stopping criteria for SCF fixed points, Newton and Krylov methods
Tool: Lean 4 with Mathlib, which already has Hilbert spaces, measure theory and Lax–Milgram. Strategy: state theorems first as axioms with a literature source so that upper layers can depend on them at once, then replace the axioms with machine proofs. Every unproved axiom is registered in the trust ledger.
TLA+ specification and model checking
- Safety: atoms are never lost or duplicated, every degree of freedom has exactly one owner, parallel assembly has no write conflicts, no deadlock
- Liveness: messages are eventually delivered; the SCF loop either converges or reports failure in finitely many steps
- Protocols: domain decomposition and halo exchange, distributed FFT transposes, checkpoint and restart, adaptive refinement and load rebalancing
Tools: PlusCal for algorithms; TLC for exhaustive checking of small instances; Apalache for symbolic checking; TLAPS for proofs at any scale. Link to the code: the implementation emits an event log at run time, and trace validation checks that the log is a behaviour the specification allows.
Refinement carries the theorems to the parallel program
The abstract algorithm is a TLA+ specification A whose state is the global density or phase-space point, and whose steps are one mathematical iteration each. The parallel implementation is a specification P whose state is spread over processes. A refinement mapping projects the state of P onto that of A — for example by stitching local densities into the global one. Once P ⇒ A is proved, the convergence theorems about A hold for the parallel program.
Performance work is handled the same way: every optimisation is a new refinement, and must be proved to still implement the level above.
Validation: traceable observations and certified model error
- What is validated: the model’s predictions of observables (band gaps, lattice constants, bulk moduli, magnetic moments, phase boundaries, elastic response, transport coefficients) agree with experiment in the stated range and uncertainty
- Where they disagree: a certified model error, the observed value minus the rigorous computed interval, with the measurement uncertainty on top
- Range of validity: which compositions, temperatures, pressures and structures were checked, and where there are no data
Data: every experimental value is registered with its source (DOI), conditions, uncertainty and the corrections needed before comparison (zero-point and temperature corrections for band gaps, zero-point expansion for lattice constants); data files are hashed and versioned with the repository. Rules: the quantities, tolerances and data sets are fixed before the comparison; data used to fit a model are not reused to validate it; a conclusion holds only in the validated range. Limits: physics correctness can be corroborated or refuted, never proved; measurement uncertainty is statistical, unlike the rigorous intervals of the other layers, and the two are reported separately.
Floating point is a first-class citizen
IEEE 754 addition is not associative. Floating-point results never enter a conclusion directly: the output of a large solver goes to a proved checker that uses either exact rational arithmetic or outward-rounded interval arithmetic. The only floating-point fact we then have to trust is “round-to-nearest returns the nearest double”.
Global reductions use a deterministic summation order, so results do not depend on the number of processes or threads. The rounding model is part of the specification and sits in the same error budget as the discretisation and algebraic errors.
How a result earns its guarantee
The solver is never trusted. It proposes; a proved checker disposes. This is what lets us use LAPACK and fast floating-point code while still stating every output as a theorem. The same four steps run in every domain.
Solver
A C driver runs the SCF loop, the FEM assembly, the Verlet integrator or the equilibrium search, and writes a certificate.
Certificate
Floating-point numbers read as the exact binary rationals they are. Nothing in it is assumed to be correct.
Checker
Re-checks everything in exact rational arithmetic. Its soundness is a Lean theorem; a wrong certificate can only fail or widen the interval.
Rigorous statement
An interval that provably contains the true quantity: the continuous FEM solution, the true MD trajectory, the global CALPHAD equilibrium.
Alongside, the DFT SCF controller is a TLA+ specification checked with TLC (it can report “converged” only if the residual is small, the gap is open and the certificate passes), and every run can emit a trace that is replayed against that specification.
On 6 October the checkers were reviewed adversarially, with the attacker in control of the certificate (and of the driver) but not of the checker or the command line. Seven flaws were fixed: phase names with Unicode line breaks or tabs that a script reading the output would split into forged lines and fields; huge decimal and binary exponents that hung a checker; a DOS printed although a k-point had failed or the weights did not sum to one; band labels that shifted after a failed k-point; and problem echoes (smearing, functional, grid) that were not all compared with the command line. None of the soundness theorems changed. Six weaker points were recorded, among them that a --tdb certificate could omit phases (they were listed as unsupported) and that a failed secondary check did not change the exit code; both are fixed. A second review on 7 October, covering the entry points added since (collinear spin, user potentials, fis multiplicity, certify-csp and fis itself), found no wrong soundness theorem and fixed eight more points: one exit-code rule for all five checkers (0 accepted, 1 rejected, 2 unreadable, 3 when a secondary check failed), a complete phase table for --tdb certificates, exact CALPHAD headers, the input gate for spin-down k-point lines, the Gaussian ball in fis multiplicity, hashing of the user’s input files, the LSDA band echo, and fis ignoring driver lines named like conclusions. 307 forged certificates are replayed by make verify-all on every run.
§4
The proof-obligation matrix
What each of the three domains must validate or prove at each of the seven layers. This table is the project’s work list: every cell must eventually correspond to a specification, a theorem, a registered assumption or, in the first row, a registered validation against experimental data. The first row is new in v0.4 and none of its cells is filled yet.
| Layer | DFT · electronic structure | MD · atomic trajectories | FEM · continuum mechanics |
|---|---|---|---|
| Observation Physics | Measured band gaps, lattice constants, bulk moduli, magnetic moments and formation energies with uncertainties (including zero-point and temperature corrections); compared with rigorous computed intervals, giving a certified exchange–correlation model error | Measured equations of state, radial distribution functions, diffusion coefficients and heat capacities; force-field fitting sets kept apart from validation sets | Measured material constants and loads; displacements, strains and failure loads in structural tests compared with computed intervals |
| Model | Kohn–Sham equations, a nonlinear eigenvalue problem H[ρ]ψi = εiψi, ρ = Σfi|ψi|² | Hamiltonian dynamics; for thermostatted runs, Langevin dynamics and its Fokker–Planck equation | Elliptic, parabolic and hyperbolic PDEs, e.g. linear elasticity −∇·σ(u) = f and its weak form |
| Continuum | Lieb variational principle; existence of minimisers for LDA-type Kohn–Sham models; self-adjointness of the Hamiltonian | Existence and uniqueness for Lipschitz forces; conservation of energy, momentum and angular momentum; Liouville; invariant measure and ergodicity of Langevin dynamics | Well-posedness via Lax–Milgram; inf-sup conditions for mixed problems (Stokes, nearly incompressible elasticity); regularity sets the attainable rate |
| Discrete | A priori error of the plane-wave cutoff; Brillouin-zone k-point integration error; pseudopotential model error registered separately | Symplecticity and time reversibility of velocity Verlet; backward error analysis: a modified Hamiltonian keeps the energy error O(Δt²) for exponentially long times | Céa’s lemma plus interpolation: ‖u − uh‖H¹ ≤ C hk|u|Hk+1; mesh shape regularity as an explicit premise; reliability and efficiency of a posteriori estimators |
| Algorithm | Local convergence of SCF with Anderson/Pulay mixing; orthogonality in LOBPCG and Davidson; the SCF state machine: converge, oscillate, restart | Neighbour lists: no pair is missed while the maximum displacement since the last rebuild is below half the skin; convergence of SHAKE/RATTLE | Convergence and stopping criteria of CG/GMRES with preconditioners; convergence of the SOLVE → ESTIMATE → MARK → REFINE loop |
| Parallel | k-point / band / plane-wave data distribution; distributed 3D FFT transposes lose and duplicate nothing; every process sees the same ρ after reduction | Atom migration is conserved under domain decomposition; ghost exchange is consistent; no deadlock; state is equivalent across checkpoint and restart | Parallel assembly is write-conflict free; every degree of freedom has exactly one owner; the mesh stays conforming after distributed refinement; rebalancing loses no cells |
| Floating point | Accumulated rounding in orthogonalisation; a bound on the numerical deviation of the charge ∫ρ = N | Rounding accumulation over long integrations; bitwise irreproducibility from reduction order | The limit that a condition number κ ∼ h−2 puts on attainable accuracy; quadrature error |
§5
Trust tiers and validation grades
Not everything can be proved at once. Every component states honestly which tier it has reached and lists the assumptions it depends on in the trust ledger. Tiers only go up, and are never overstated.
Tested
Regression tests, analytic solutions, comparison with established codes. Holds only for the inputs tested.
Paper proof
A proof on paper with a literature source and explicit assumptions, not yet machine-checked.
Model-checked
TLC or Apalache has exhausted every behaviour of a finite instance.
Machine proof
A Lean, Rocq or TLAPS proof valid at any scale, for the abstract model, exact arithmetic or a line-by-line model of the code.
End to end
Machine proof all the way down to executable code and floating-point rounding. Precedent: Boldo et al.’s proof of a C program for the 1D wave equation.
T0–T4 measure mathematical and software correctness. Physics correctness cannot be proved, so it is measured on a separate axis, the validation grades V0–V3. A conclusion carries both, for example “band-gap interval T4, comparison with experiment V2”. Every result so far is at V0: the ledger has no validation claims yet, and the physics track is planned (§8).
Not validated
No comparison with observation. All one can say is “the model gives this number”.
Single comparison
Compared with experimental data that have a source and an uncertainty; the deviation is reported together with the computed interval and the measurement uncertainty.
Systematic validation
Compared on a data set and protocol fixed in advance, separate from the fitting data, giving the distribution of model errors and the validated range.
Blind prediction
The computed interval is archived, time-stamped and with its certificate, before the measurement, and then confirmed or refuted by an independent experiment.
§6
Principles
Specification before code
Every module has a mathematical statement and a TLA+ specification before it has an implementation.
Assumptions are visible
Regularity, mesh conditions, step-size limits and convergence thresholds are written into the specification, not hidden in input-file defaults.
Honest tiers
Better to mark T0 than to overstate T3. The trust ledger is the most important file in the project.
A small trusted kernel
Only a few kernels need T4; upper layers inherit their guarantees through composition theorems.
Floating point enters the specification
The rounding model and its error bounds join the discretisation error in a single error budget.
Reproducible by default
The same input gives bitwise-identical results at any process count, unless the user explicitly gives this up.
Correct first, fast later
First obtain a provable version, then optimise without breaking the proof. Every optimisation is a new refinement.
Verify the checker, not the solver
Large numerical libraries such as LAPACK or FFT libraries are not proved; their outputs are checked by proved checkers. Solvers are replaceable; the guarantee comes from the checker.
Every run comes with a report
Each line of the report cites a claim in the trust ledger, from which its tier and assumptions can be looked up; the report ends with the assumptions the run used.
Every output has a theorem
Every number the program prints must correspond to a machine-proved theorem. Where the result is an approximation — iteration, discretisation, k-point sampling, finite temperature, floating point — what is proved is an error bound. Tests, model checking and sanitizers are supporting evidence only. An output without such a theorem is unfinished and is listed as a gap.
The three correctnesses are kept apart
Mathematical and software conclusions carry T tiers, physics conclusions V grades, and reports state them separately. Rigorous intervals and statistical uncertainties are never mixed.
Experimental data are traceable
Every experimental value used for validation has a source, conditions, an uncertainty and documented corrections; fitting and validation sets are kept apart, and the comparison protocol is fixed before the comparison.
Open
Specifications, proofs, benchmarks, experimental data sets and the trust ledger are to be public, so that anyone can re-check them.
§7
What we do not do
Claim to prove a physics model
Physics correctness can only be confirmed by observation; its conclusions always carry a measurement uncertainty and hold only in the validated range (the V grades of §5). We measure model error, but developing new functionals, force fields or constitutive laws is not a goal. Versions before 8 October 2026 excluded validation altogether (“we do not judge whether the physical model is correct”); that non-goal is withdrawn, and validation is now one of the three correctnesses.
Replace existing software at the outset
Quantum ESPRESSO, VASP, LAMMPS, GROMACS, deal.II and FEniCS are benchmarks and references, not targets for replacement.
Prove all the code
Input parsing, I/O and visualisation can stay at T0, as long as they do not enter the error budget.
§8
Roadmap
This roadmap, and its phases 0–4, are steps inside Phase I (certified correctness; see §0).
Current goal — a 3D showcase of triple correctness set 8 Oct 2026
Extend DFT to three-dimensional real materials and give, on the same systems, evidence for all three correctnesses: mathematical (existence and uniqueness of the SCF solution, rigorous intervals for energies and band gaps, where possible for the continuous problem), software (TLA+ specifications and trace validation of the parallel protocols, proved checkers) and physics (systematic validation against experimental band gaps, lattice constants and magnetic moments, with a certified exchange–correlation model error). The three showcases and where they stand on 17 October 2026:
- Physics S1 Certified model error. LDA band gaps and lattice constants of semiconductors and insulators against experiment; the computed values are rigorous intervals, so the deviation is the error of the model (functional and pseudopotential, with the Kohn–Sham gap standing in for the measured gap) — a band-gap problem free of numerical error. Status: the Si model at the protocol's settings is certified (DFT-K29) and bounded over the whole Brillouin zone, gap at most 0.530902 eV under rule U (W42–W51); since 22–26 October the band gaps of the Si, AlP and GaP models are bounded on both sides over the whole zone and compared with experiment (DFT-O04, O20, O24). On the validation side, the Cohen–Bergstresser pseudopotentials were compared with experiment for twelve semiconductors under pre-registered rules (DFT-O01–O03, O07–O19).
- Maths S2 Not the ground state. Prove by machine-checked certificate that a converged self-consistent solution is not the ground state of the discrete model: the higher solution is certified, and a trial state has a strictly lower free-energy bound. The energy orderings involved are known physics, so this is a first in rigour, not a discovery in physics; first done in simple-cubic hydrogen (local pseudopotential, certified margin 330 meV), next NiO.
- Software S3 Parallel correctness. 3D k-point, band and plane-wave parallelism and distributed FFT transposes specified in TLA+, model-checked and trace-validated; bitwise-identical results at any process count; planted parallel bugs caught. Status: protocol specifications model-checked with TLC (DFT-R08–R11, T2); since 28 October the 3D MPI driver gives bit-for-bit identical results in 25 tested layouts with 1 to 32 processes, and its logs pass trace validation (DFT-R13–R18).
Alongside runs the physics track P: V grades in the ledger rules, a validation section per domain ledger, a versioned experimental data set traced to the original publications, protocols fixed before comparison, and run reports in three columns (maths, software, physics). The plan, its phases and open decisions are in docs/plan-dft3d.md. DFTK parity (G1) remains the reference for the 1D and 3D implementations.
Goal G1 — feature parity with DFTK set 29 Sep 2026
Bring mini-DFT to the main feature set of DFTK.jl. A feature is done only when it is implemented, agrees with DFTK on the same discrete problem, and its output carries a Lean certificate. Order: complete everything in 1D first, then generalise the Lean model to d dimensions for 3D, and finally infrastructure and external interfaces. FEM moved to the parallel goal G2; for MD (phase 2), a basic version, mini-MD v0, was built on 1 October 2026. Status →
Parallel goal G2 — certified finite elements against scikit-fem set 30 Sep 2026
Cover the main features of scikit-fem with our own C implementation, with scikit-fem as the independent reference on the same discrete problem. Same completion standard as G1, and wherever possible the certificate speaks about the true solution of the continuous problem, not just the discrete one. 1D first, then 2D triangular meshes. Status →
Parallel goal G3 — certified CALPHAD against pycalphad set 1 Oct 2026
Read TDB thermodynamic databases and compute phase equilibria with our own C implementation, with pycalphad as the independent reference on the same database and the same phases. Same completion standard as G1 and G2, and the certificate speaks about the true global equilibrium of the database model, not just the local solution the driver found. Binary systems first (point equilibria, phase diagrams, invariant reactions, magnetism), then multicomponent and sublattice models. Status →
- PHASE 0Minimal DFTExit criteria met
A one-dimensional periodic reduced Hartree model, plane waves, serial. Walk through L1–L6 once, and build the infrastructure the whole project reuses: the trust ledger, certificate checkers, the run-report format, trace validation.
Exitevery obligation reaches its target tier; four benchmark groups pass; every run prints a trust report.
- PHASE 1DFT extensionsPartial
1D LDA exchange-correlation (convexity is lost; uniqueness becomes a local result); k-point sampling and its MPI parallelisation — the project’s first real parallel protocol; 3D plane waves with local pseudopotentials, cross-checked against DFTK.jl.
Exitk-point parallel runs are bitwise identical on 1 to 64 processes and every run log passes trace validation.
- PHASE 2MD and FEMExit criteria met
Reuse the phase-0 framework for two minimal versions: a 1D Lennard-Jones chain with velocity Verlet, and 1D Poisson with P1 elements. TLA+ modules for halo exchange, atom migration, parallel assembly and checkpointing.
Exitboth minimal versions print trust reports; Céa’s lemma and Verlet symplecticity reach T3.
- PHASE 3Trusted kernelsPartial
Bring a few kernels to T4: the plane-wave kinetic operator, FEM element-stiffness assembly, one Verlet step — with machine-checked floating-point error bounds connected to the code.
Exitthe floating-point error bounds of these kernels are machine-checked and enter the global error budget.
- PHASE 4BenchmarkingPartial
Standard benchmarks against established codes: the Δ-gauge for DFT, NVE energy drift and radial distribution functions for MD, the method of manufactured solutions for FEM convergence rates.
Exitpublished benchmark results, each with its trust ledger.
The current status of every goal of Stage I and Stage II, reached and planned, is in roadmap (§04 of the progress page). Detailed, item-by-item status is on the progress page and on one page per domain: DFT, FEM, MD, CALPHAD, CSP.
§9
First milestones: mini-DFT and mini-FEM
Before extending to MD and FEM, we walk through L1 to L6 with the smallest DFT program we could design. It is small enough that every layer’s obligation can be written down, yet it keeps the full skeleton of a Kohn–Sham calculation: a nonlinear eigenvalue problem, self-consistent iteration, plane-wave discretisation.
| Model | One-dimensional periodic reduced Hartree–Fock (rHF), no exchange-correlation. Periodic interval [0, L), N electrons, spin-degenerate. Energy: kinetic + external + ½ Hartree, with the Hartree kernel 4π/q² on nonzero frequencies. |
| Potential | Smooth periodic: constant, cosine, periodised Gaussian double well (optionally repeated). The 1D Coulomb potential is not integrable at the origin and is not used. |
| Discretisation | Plane waves with |k| ≤ K; Γ only, or Nk equally weighted k-points (Γ-centred or Monkhorst–Pack). A real-space grid of at least 4K + 1 points guarantees that density and Hamiltonian action are alias-free. |
| Occupation | Zero temperature with a gap checked in interval arithmetic at every iteration; or Fermi–Dirac, Gaussian, Methfessel–Paxton or Marzari–Vanderbilt smearing with a common chemical potential. |
| Algorithm | SCF with linear or Anderson mixing and optional Kerker preconditioning; dense diagonalisation; shared-memory thread parallelism over k-points with a fixed summation order. |
Why rHF
Its energy is convex in the density matrix, and the Hartree term is strictly convex on nonzero frequencies, so the ground-state density is unique. Within the DFT family it has the cleanest mathematics — a good first target for machine proof. Adding LDA exchange-correlation loses convexity; that step belongs to phase 1.
LAPACK solves, the checker guarantees
LAPACK stays at T0. After convergence the solver writes a certificate; a checker written and compiled in Lean re-checks it in exact rational arithmetic and returns rigorous intervals for the energy, free energy, truncation limit, density, eigenvalues, band structure and density of states. Its soundness is a Lean theorem: it trusts no number from the solver, so a solver bug can only make the check fail or the interval wider.
mini-FEM follows the same pattern for goal G2: 1D Poisson with P1 elements (Dirichlet, Neumann and Robin boundaries) and the beam equation with cubic Hermite elements (clamped, pinned, free and sliding ends), with right-hand sides built from polynomials, exponentials, sines and cosines. The Lean checker returns intervals for the true solution of the continuous problem at every node, and a rigorous bound on the maximum error over the whole interval. Adaptive refinement uses these proved element-wise bounds as its marking criterion.
mini-MD (1 October 2026) does the same for a 1D Lennard-Jones chain with velocity Verlet: the checker bounds the distance from the true solution of Newton’s equations at every step, and from the initial state over about one vibration period. mini-CALPHAD (goal G3) certifies binary phase equilibria from TDB databases — magnetic phases and whole phase diagrams included — with the chemical potentials, driving forces and which phases can appear in any equilibrium. See the MD, CALPHAD and CSP pages.
mini-CSP (7 October 2026) starts the structure-search track with Lennard-Jones clusters: an untrusted searcher proposes candidates, and the checker certifies each as an exact local minimum, unique up to rotation, reflection and translation, and certifies pairs of candidates as equal or distinct. The run’s BEST is the lowest certified minimum it found; global optimality is not claimed.
§10
Decisions and open questions
Provers: Lean 4 for the mathematics and the floating-point model; Frama-C’s floating-point model at the code level
- Division
- Lean 4 + Mathlib for L1–L4 (well-posedness, discretisation error, structure preservation, iterative convergence) and for two parts of L6: the certificate checkers (exact rationals, compiled to executables) and a line-by-line binary64 model of the interval-arithmetic kernel.
- Frama-C/WP for the absence of run-time errors in the trusted C kernel.
- The code-level link (decided 6 Oct 2026): Frama-C/WP’s floating-point model. The interval kernel’s ACSL contracts state, over real numbers, what the Lean theorems state; WP translates every
doubleoperation into Why3’s IEEE 754 binary64 theory and Alt-Ergo, CVC5 and Z3 prove every goal on the actual C code (DFT-F01, F02 at T4). For the inertia count, Frama-C proves that the intervals enclose an exact symmetric-pivoting elimination; Lean proves that this elimination counts the eigenvalues.
- Why
- The mathematics layer is the bulk of the work; Mathlib’s analysis and measure theory form one unified library, and most AI-assisted proving tools support Lean first. “Verify the checker, not the solver” shrinks the floating-point obligations enough that a small binary64 model in Lean suffices. For the code level, Frama-C was chosen because it already proves the kernel’s run-time safety, so one annotation file and one proof run extend to floating point, with no third prover and no second C semantics; WP’s IEEE 754 model and Alt-Ergo’s floating-point theory discharge the rounding goals automatically; and without Rocq the Lean/Rocq interface rule and claim DFT-I01 are withdrawn.
- Cost
- That the ACSL statements say what the Lean statements say is checked by hand (an assumption in the ledger). The trusted base grows by WP’s floating-point model, a contract for
nextafter, Frama-C’s libc contracts forsqrt,fabsandisfinite, three SMT solvers, and oneadmitfor the value ofINFINITY, which WP cannot translate. The SMT proofs depend on hand-written invariants and hints, and take about five minutes on a 384-core machine.
Implementation language: C11, split into a proved kernel and an untrusted driver
- Division
- Trusted kernel — roots of unity, grid density and charge intervals, interval-arithmetic residual bounds and inertia counting. Restricted C with formal annotations; Frama-C/WP proves no run-time errors and the floating-point correctness of the interval arithmetic (T4).
- Certificate checkers in Lean, exact rationals, soundness a Lean theorem.
- Driver — SCF loop, LAPACK, threads, I/O, reports, event logs, certificate output. Stays at T0: every number it computes must pass the kernel or a checker before it appears as a guaranteed result.
- Python and Julia appear only in benchmarks and trace-validation tooling, outside the trust chain.
- Why
- The mature code-level verification routes all start from C. LAPACK and FFTW have C interfaces. The main risk, memory safety, is handled by proof in the kernel and by sanitizers in the driver. Compilation forbids fused multiply-add contraction and any fast-math optimisation, so the compiled arithmetic matches the proofs.
- Not chosen
- Rust (its verifiers do not connect to the code-level tools above), Julia or Python (no route to code-level proof), Fortran (few verification tools), Lean itself (its floating point has no formal semantics).
Open questions
- Continuum theory of 1D rHF. Resolved at T1 on 5 October 2026: no published result covers the 1D periodic Hartree kernel directly, so the project supplies paper proofs (existence and unique density at zero and finite temperature, the cutoff limit equals the continuum energy, exponential plane-wave convergence for analytic potentials). What remains is to machine-check them, which ties in with the next question. The cutoff limit was machine-checked on 8 October 2026 (DFT-C02, T3) with the continuum model written in Fourier space, which avoids periodic Sobolev spaces; its equivalence with the operator model on H¹ is assumption A-DFT-08.
- Comparing with experiment. Measured and model quantities rarely mean the same thing: band gaps need zero-point and temperature corrections, lattice constants zero-point expansion, and the corrections come from other models or measurements. How they enter a V grade without contaminating the rigorous part, and how to keep fitting and validation sets apart when published functionals and databases do not always say what they were fitted to, are open.
- How deep to formalise Sobolev spaces — what to axiomatise first, and which theorems to prove first.
- Randomness. Langevin dynamics and random initial guesses involve probabilistic properties; TLA+ only describes nondeterminism.
- GPUs. How asynchronous streams and weak memory models enter a TLA+ specification.
§11
References
- B. Jakobsen, F. Rosendahl. The Sleipner platform accident. Structural Engineering International 4(3), 1994.
- K. Lejaeghere et al. Reproducibility in density functional theory calculations of solids. Science 351, aad3000, 2016.
- J. P. Perdew, M. Levy. Physical content of the exact Kohn–Sham orbital energies: band gaps and derivative discontinuities. Physical Review Letters 51, 1884, 1983.
- L. J. Sham, M. Schlüter. Density-functional theory of the energy gap. Physical Review Letters 51, 1888, 1983.
- W. L. Oberkampf, C. J. Roy. Verification and Validation in Scientific Computing. Cambridge University Press, 2010.
- S. Boldo, F. Clément, J.-C. Filliâtre, M. Mayero, G. Melquiond, P. Weis. Wave equation numerical resolution: a comprehensive mechanized proof of a C program. Journal of Automated Reasoning 50(4), 2013.
- S. Boldo, F. Clément, F. Faissole, V. Martin, M. Mayero. A Coq formal proof of the Lax–Milgram theorem. CPP 2017.
- J. P. Solovej. Proof of the ionization conjecture in a reduced Hartree–Fock model. Inventiones Mathematicae 104, 1991.
- E. Cancès, A. Deleurence, M. Lewin. A new approach to the modeling of local defects in crystals: the reduced Hartree–Fock case. Communications in Mathematical Physics 281, 2008.
- E. Cancès, R. Chakir, Y. Maday. Numerical analysis of the planewave discretization of some orbital-free and Kohn–Sham models. ESAIM: M2AN 46(2), 2012.
- M. F. Herbst, A. Levitt, E. Cancès. DFTK: A Julian approach for simulating electrons in solids. JuliaCon Proceedings, 2021.
- E. Hairer, C. Lubich, G. Wanner. Geometric Numerical Integration, 2nd ed. Springer, 2006.
- B. Leimkuhler, C. Matthews. Rational construction of stochastic numerical methods for molecular sampling. AMRX, 2013.
- P. Binev, W. Dahmen, R. DeVore. Adaptive finite element methods with convergence rates. Numerische Mathematik 97, 2004.
- L. Lamport. Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, 2002.
- H. Cirstea, M. A. Kuppe, B. Loillier, S. Merz. Validating traces of distributed programs against TLA+ specifications, 2024.