Formal in Silico

Domain · goal G2 · status snapshot 1 October 2026

mini-FEM

One-dimensional finite elements — Poisson with P1 elements and beams with cubic Hermite elements — whose certificates speak about the true solution of the continuous problem, not just the discrete one. Goal G2 is feature parity with scikit-fem 12.0.2.

11claims in the trust ledger, all at T3 or T4
11 / 26scikit-fem parity items done, all 1D
≤ 3×10⁻¹⁵width of the Lean intervals for the true nodal values
0.85 – 1.00sampled true error ÷ proved max-error bound

01

The problems

Poisson−u″ = f on (0, L) with Dirichlet, Neumann or Robin conditions at each end (not Neumann at both); P1 linear elements on any mesh with rational nodes.
Beamu⁗ = f on (0, L) with clamped, pinned, free or sliding ends in any combination; cubic Hermite elements carrying nodal values and slopes.
LoadsSums and products of polynomials, eλx, sin and cos (also of qπx); the checker re-encloses them with Taylor models and never trusts the solver’s quadrature.
Why 1DGreen’s functions and classical solutions avoid Sobolev spaces, so every statement can be about the true solution; 2D will need an H¹ model in Lean.

02

Claims in the trust ledger

T4 end to end · 3 T3 machine proof · 8
ClaimStatementTier
FEM-C01Poisson: the Green representation is a classical solution, and the only oneT3
FEM-D01P1 nodal exactness and the discrete Green representationT3
FEM-D02Pointwise error inside an element: Mh²/8 plus the nodal errorT3
FEM-D03Céa’s lemma (abstract setting, in preparation for 2D)T3
FEM-D04Discrete maximum principleT3
FEM-C02Beam: the classical solution exists and is uniqueT3
FEM-D05Discrete stability of Hermite elements (no maximum principle needed)T3
FEM-D06Hermite nodal exactness and the h⁴/384 interpolation boundT3
FEM-B02Taylor models of the load are soundT4
FEM-B01P1 checker soundness: intervals for u(xi) and a bound on max |u − uh|T4
FEM-B03Beam checker soundness: intervals for values and slopes, and the max-error boundT4

03

Goal G2 — certified finite elements against scikit-fem

Reference: scikit-fem 12.0.2 on the same discrete problem. The standard is the same as G1, with one addition: wherever possible, the certificate is about the true solution of the continuous problem, not only the discrete one. In 1D this avoids Sobolev spaces by working with Green’s functions and classical solutions; 2D will need an H¹ model in Lean.

F0
1D Poisson, P1 elements
7 / 7
F1
1D extensions
4 / 9
F2
2D triangular meshes
0 / 5
F3
More physics, 3D
0 / 5

F0 · 1D Poisson with P1 elements — complete

FeatureStatusWhat is certified
1D meshes: uniform, graded, arbitrary rational nodesDoneThe checker verifies the mesh is well ordered
P1 elements, stiffness and load assemblyDoneThe checker re-encloses the load with Taylor models and does not trust the solver’s quadrature
Non-homogeneous Dirichlet boundariesDoneCovered by the checker’s soundness theorem
Polynomial right-hand sidesDoneIntegrated exactly
Linear solveDoneThe solver is untrusted; its nodal error is bounded exactly
True-solution nodal values and pointwise errorDoneExistence and uniqueness of the classical solution, nodal exactness, the h²/8 interpolation bound and the discrete maximum principle are all proved
Céa’s lemma (abstract setting)DoneProved, in preparation for 2D

F1 · 1D extensions

FeatureStatusWhat is certified
Neumann and Robin boundariesDoneAll theory proved for general boundary conditions; Neumann at both ends is excluded
Non-polynomial right-hand sidesDoneSums and products of polynomials, exponentials, sines and cosines, via Taylor models with proved remainders; nodal intervals about 10−15 wide
Hermite beam elements (fourth-order problem)DoneClamped, pinned, free and sliding ends in any combination; rigorous intervals for both nodal values and slopes; the h⁴/384 interpolation bound is proved
Adaptive refinement (1D)DoneElements are marked by their proved error bounds, not by an estimator; the final mesh is certified
Variable coefficientsNot started
P2 and higher-order Lagrange elementsNot started
Eigenvalue problemNot startedCan reuse the DFT inertia argument
Energy-norm errorNot started
Example-by-example comparison with scikit-fem’s 1D galleryNot started
Planned: F2–F3 (10 items, none started)

F2 · 2D triangular meshes

  • Triangular meshes with checker-verified shape regularity (the Sleipner lesson)
  • P1 and P2 triangles
  • A Lean model of H¹0
  • Guaranteed-upper-bound a posteriori estimates (equilibrated fluxes)
  • Quadrilateral elements

F3 · more physics and 3D

  • Linear elasticity (Korn’s inequality)
  • Stokes and mixed elements (inf-sup)
  • Adaptive refinement in 2D
  • Tetrahedral and hexahedral meshes
  • Parallel assembly, specified in TLA+

04

What a certified run reports today

Rigorous statements about the true solution

  • an interval for u(xi) at every node
  • for beams, also an interval for the slope u′(xi)
  • the exact error of the solver’s own nodal values
  • a bound on max |u − uh| over the whole interval, and per element
  • an adaptively refined mesh that meets a requested tolerance, with the tolerance certified on the final mesh

05

Cross-checks and supporting evidence

  • 11 Poisson and 6 beam cases — Lean nodal intervals contain the reference solutionwidth ≤ 3×10⁻¹⁵
  • scikit-fem nodal values against mini-FEM (Poisson / beam)≤ 3×10⁻¹³ / 4×10⁻¹²
  • proved max-error bound relative to the sampled actual error0.85 – 1.00
  • tampered nodal valuesonly widen the error bound
  • Report validation: every Lean line in a report is the checker’s own output; a rejecting, crashing or missing checker makes the driver exit with an errorpass
  • Fuzzing of the driver under AddressSanitizer and UBSan (about 14 000 mutated inputs), after hardening its input parsingno memory errors, undefined behaviour or crashes

06

Open gaps

  • Other load functionsLogarithms, rational and piecewise functions need their own Taylor models; today only polynomials, exponentials, sines and cosines.
  • Neumann at both endsThe solution is defined only up to a constant; a compatibility condition and a normalisation are needed. Both driver and checker reject it.
  • Checking time for transcendental loadsAbout 13 ms per element, mostly in exact rational series at element midpoints; an interval series with term-wise rounding would be faster.
  • Variable beam stiffness and elastic supportsOnly EI = 1; the checker accepts any 4×4 boundary matrix, but the driver writes only the four standard end conditions.
  • The driver itselfUntrusted (T0) with no Frama-C proof; every result passes through the checker. Since 1 October it parses numbers strictly and rejects inputs it cannot write exactly (fuzzing had found a right-hand side truncated at 4 KB and NaN parameters written as zero); the boundary data and load in the certificate are still not echoed by the checker. Phase 3 plans to bring element-stiffness assembly to T4.