Skip to the result

ResearchTechnical note 2

Proved correct for any bit width

Testing shows that a system was right on the cases that were tried. A proof shows it is right on all of them. The arithmetic of METRON is proved correct in Lean 4 for every bit width.

Measured
14 November 2026
Proof assistant
Lean 4
Operations
+  −  <  ×
Record
117

At a glance

Anyw

bit width covered by the proof: 32, 4,096, or a width nobody has built yet.

1,158

cell identities verified, exhaustively and by the proof assistant.

0

unproved steps. No sorry, only the three standard axioms.

In plain words

You can test a calculator a million times and still not know whether the next sum will be right. A mathematical proof settles it for every possible sum at once. That is what was done here, and a proof-checking program verified every step.

For engineers

Six theorems in Lean 4: the frozen laws, composed by the declared structure, equal x + y, x − y, x < y (unsigned and signed) and x · y mod 2w for all w. No sorry; axioms limited to propext, Classical.choice and Quot.sound.

Why it matters

Correctness stops being a statistic. For markets where a wrong result has a cost (chips, finance, safety), a machine-checked proof is the strongest form of evidence there is, and it does not expire when the numbers get bigger.

MTRMETRON is AIDON’s exact co-processor. It learns laws from data, proves them and runs them, alongside a neural model or on its own.

The bottleneck

A test covers the cases you tried. Nothing more.

Neural systems are validated by sampling: run many cases, count the errors, report a percentage. However large the sample, the space of inputs is larger. A 64-bit addition alone has more input pairs than any test will ever run.

Hardware designers solved this decades ago with formal verification. We apply the same standard to laws that were learned from data rather than written by hand.

Result

One proof, every width.

bit 0bit 31bit w − 1Learned at 32 bitsProved for every width wone proof, checked by the Lean kernel···

Fig. 1 The laws were learned on 32-bit numbers. The proof shows that, composed cell after cell, they give the right answer at any width, not only at the widths that were tested.

Table 1 What is proved, and the cell lemmas behind each theorem.
OperationStatementCell lemmasProved for
Additionx + y33Every width w
Subtractionx − y33Every width w
Comparison, unsigned and signedx < y35Every width w
Multiplicationx · y mod 2w1,057Every width w

1,158 cell identities in total, each checked twice: exhaustively in Python and by decision in Lean. The proof compiles with no sorry and uses only the three standard axioms of Lean 4.

Method

How the proof is built

  1. Learned lawsfrozen after learning at 32 bits
  2. Cell lemmas1,158 identities, each verified
  3. Theoremscorrect for every width w
  1. The laws are frozen. The file that holds them is fingerprinted, and the proof refers to that exact file.

  2. Each cell is verified on its own. Every law is checked against the truth on all of its inputs, in Python and again inside Lean.

  3. Induction does the rest. If every cell is right and the cells are chained the same way at any length, the whole operation is right at any length.

Controls

What was checked

Negative control

With a single term of one law changed, Python rejects the identity and the Lean proof fails to compile. The proof is sensitive to the laws it is about.

Standard axioms only

Each of the six theorems depends only on propext, Classical.choice and Quot.sound, the axioms every Lean 4 proof may use.

Model equals implementation

The Lean model, the Python implementation and the true result agreed on 32 of 32 pairs evaluated at 64 bits.

Same frozen laws

The proof is about the same law file used in the measurements of the other notes, identified by its fingerprint.

Open questions

What this opens

  • Proving the composition of longer programs built from these operations.
  • Carrying the proof from the mathematical model down to the circuit that will run it.

Fields of application

Where it fits

  • Chip design, where formal sign-off is already the industry standard.
  • Cryptography and financial infrastructure, which run on wide-integer arithmetic.
  • Any regulated use of AI where a result has to be justified, not estimated.

Record

How this result is kept

Record
117
Run
14 November 2026, proof checked in 32 s
Scope
6 theorems; 4 operations; every width w
Measurement file
SHA-256 6d9e77b27448afaa0e848ac19e268d48abde5b5b5c5bb7c0bfdcd55020374bc9

Every figure on this page was read by a program from the raw measurement file, not typed. The fingerprint identifies that file: when it is disclosed, anyone can check that it is the same one.

Contact

Talk to the founders

Get in touch. We would be glad to share our ideas and walk you through the results, the proof and the measurements.