Formal in Silico

Domain · goal G2 · status snapshot 8 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.

56claims in the trust ledger: 14 at T4, 37 at T3, 5 at T0 (problem echo, parsing and exit code)
17 / 27scikit-fem parity items done, all 1D; the eigenvalue problem agrees
≤ 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 (Neumann at both ends: the projected problem, normalised by ∫u = 0); 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 · 14 T3 machine proof · 37 T0 tested · 5
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-C03Neumann at both ends: the projected problem −u″ = f − c̄ has exactly one classical solution with ∫u = 0; c̄ = 0 when the data are compatibleT3
FEM-D07Neumann at both ends: the true nodal values solve the discrete equations up to one constant s, given by the element integralsT3
FEM-B04Two-sided Neumann checker soundness: intervals for the compatibility defect c̄, the constant s, the true nodal values, and the max-error boundT4
FEM-D08Eigenvalues: Sylvester’s law of inertia for the pencil Kx = λMx (M positive definite): the number of eigenvalues below σ equals the number of negative pivots of K − σMT3
FEM-D09Spectral gap of sine series: a function vanishing at the ends and orthogonal to the first k sines satisfies ((k + 1)π/L)² ∫v² ≤ ∫v′², proved via Parseval — the analytic half of λk ≤ λk,hT3
FEM-B05Eigenvalue checker soundness: the k-th discrete eigenvalue lies in the certified interval, and the eigenvalue counts below the certified shifts are exactT4
FEM-B06Problem echo: equation, L, both boundary conditions with their kind and exact coefficients, and a canonical right-hand sideT0
FEM-B07Strict parsing: unknown, repeated, out-of-range or malformed lines are errors; the right-hand-side parser is total with a node limitT0
FEM-B10Pinned statements: the P1 solution is the unique classical solution; the beam’s classical solution exists and is uniqueT4
FEM-B11One exit-code rule (second adversarial review, 7 October): 0 only if no line starts with a tag ending in _FAIL or _PARTIAL; 3 when the main check passed and a secondary one failed; 1 rejected, 2 unreadableT0
FEM-B03Beam checker soundness: intervals for values and slopes, and the max-error boundT4

03

Proof dependencies

Which claims are built on which, read from the Lean proof terms themselves (not from the ledger’s hand-written dependency column). The graph starts with this domain only; click the legend to add the others, or switch to “All Lean theorems” for the theorem level. All domains together are on the programme page.

  • a claim or theorem, coloured by domain
  • uses — points at what the proof relies on
  • bigger — used by more results
  • what the selection uses
  • what uses the selection

Drag to pan, scroll or pinch to zoom, drag a node to move it; click a node to see what it uses and what uses it, and “Only its chain” to keep just those, directly or not. An arrow from claim A to claim B means that a proof behind A uses a theorem behind B (through lemmas that belong to no claim); two claims can use each other. Claims without a Lean theorem (tests, T0–T2) are not drawn. Generated by scripts/depgraph.py; a reading aid, not part of the trust chain.

04

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
5 / 10
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 (pure Neumann problem)DoneNormalised by ∫u = 0, as scikit-fem’s Lagrange-multiplier solution; the checker proves the compatibility defect c̄ and certifies the projected problem (FEM-C03, D07, B04)
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 problemAgreesSince 6 October, --eigs n with Dirichlet, Neumann or Robin ends: the checker evaluates an exact LDLᵀ of K − σM at rational shifts and counts eigenvalues by inertia, as in DFT; every discrete eigenvalue gets an interval of relative width ≤ 2.1×10⁻¹⁵ (FEM-D08, B05). Agrees with scikit-fem to 3×10⁻¹⁵. Not done: the link to the continuous eigenvalues (λk ≤ λk,h) and eigenvector bounds.
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+

05

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
  • for the eigenvalue problem, an interval for each discrete P1 eigenvalue (a statement about the discrete problem only, since 6 October)

06

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
  • Eigenvalues, 6 cases: Lean intervals against a 50-digit mpmath reference / scikit-fem 12.0.2 (Neumann at both ends with shift-invert)contain it, relative width ≤ 2.1×10⁻¹⁵ / ≤ 3×10⁻¹⁵ (2.3×10⁻¹³)
  • Dirichlet eigenvalues: the continuous (kπ/L)² below every Lean lower bound; convergence orderalways (known answer, not proved); 2.000
  • Eigenvalue checking time: N = 1024 with 4 eigenvalues / N = 2000 with 100.45 s / 2.6 s
  • 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

07

Open gaps

  • Eigenvalues of the continuous problemOnly the discrete P1 eigenvalues are certified. The inequality λk ≤ λk,h for Dirichlet ends lacks the P1 substitution step (the counting lemma is proved); there are no eigenvector bounds and no continuous results for Neumann or Robin ends.
  • Other load functionsLogarithms, rational and piecewise functions need their own Taylor models; today only polynomials, exponentials, sines and cosines.
  • 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); since 7 October the checker echoes the equation, interval, boundary conditions and load as exact PROBLEM lines and rejects repeated or unknown certificate lines (FEM-B06, B07). Phase 3 plans to bring element-stiffness assembly to T4.