Skip to content

NUMEN Autonomy Integrity Suite: Hybrid Lean 4 Formal Verification of Behavioral Safety Mathematics with Data-Provable Guarantees

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

What This IsThe NUMEN Autonomy Integrity Suite is a complete formal verification framework that establishesa mathematically certified chain of trust for measuring behavioral safety in autonomous AI sys‐tems. It consists of five integrated layers:autonomy_eval.py (933 lines) — A behavioral health measurement tool that evaluates AI agentsafety using phi-divergence methodology. Measures an agent’s behavioral health φ ∈ [0,1], com‐putes divergence δ = |φ − φ_target| from a healthy center (φ_target = 0.625), classifies each eval‐uation round into one of four GATC gates (Anchor/Transition/Explore/Correct), and aggregates res‐ults into an Autonomy Safety Level from ASL-1 (safe for autonomous operation) to ASL-5 (do notdeploy).Lean 4 Formal Verification Module ( lean/NUMENAutonomy/AutonomyEval.lean , ~280 lines) —Machine-checked proofs of 14 theorems establishing the arithmetic invariants of the evaluationpipeline. Every constant from the Python tool is re-stated as a scaled integer (scale S =100,000,000 = 10⁸), and every arithmetic decision is proved correct using only the Lean 4 kernelwith axiom footprint {propext, Classical.choice, Quot.sound} . No Mathlib dependency. Nosorry . No native_decide . Pure constructive proofs closed by omega (Presburger arithmetic solv‐er), simp (rewriting), and decide (decidable computation).C11 Independent Validator ( c/validator.c , ~350 lines) — A standalone validator that readsJSON exports from autonomy_eval.py and re-derives every φ, δ, and gate classification using theexact same fixed-point integer arithmetic as the Lean proofs. Uses int64_t at scale S = 10⁸— no floating-point ambiguity. Includes a robust recursive-descent JSON parser that handles nes‐ted strings correctly. Compiles with zero external dependencies on Linux (GCC) and Windows(MSYS2/MinGW GCC).Pure Python Demo ( numen_demo.py , 31KB) — A single-file stdlib-only Python 3.8+ script that im‐ports autonomy_eval.py , re-proves all 14 Lean theorems numerically, runs live agent evaluations(ideal vs. drifting), validates results, and generates a self-contained HTML report with inline SVGcharts. Zero external dependencies — runs on any Windows/Linux/macOS machine with Python3.8+ installed.Cinematic Explainer ( numen_cinematic.html , 57KB) — A 3.9-minute auto-advancing HTML anim‐ation showing what happens under the hood: the golden constant φ⁻¹ in hex, the 23-file assemblysubstrate, CPU MSR register reading, the 207-prime spiral (Betti β₁=207), Watson-Crick GTACXOR-3 complement, AVX-512 Banach 8-lane contraction, phi-divergence gauge, Lean theoremverification with the omega tactic, C validator fixed-point math, and ASL determination. PureHTML+CSS+JS, zero external dependencies.The Mathematical Bridge: φ_target = 5/8 = F₅/F₆The centerpiece discovery of this work:φ_target = 0.625 = 5/8This fraction is the 5th convergent of the continued fraction of φ⁻¹ = 0.6180339887…, thegolden ratio inverse. The fraction 5/8 = F₅/F₆, where F₅ = 5 and F₆ = 8 are consecutive Fibonaccinumbers. The Fibonacci sequence produces convergents to φ⁻¹ as ratios:F₁/F₂ = 1/1 = 1.000000F₂/F₃ = 1/2 = 0.500000F₃/F₄ = 2/3 = 0.666667F₄/F₅ = 3/5 = 0.600000F₅/F₆ = 5/8 = 0.625000 ← PHI_TARGETF₆/F₇ = 8/13 = 0.615385The fraction 5/8 is the best rational approximation to φ⁻¹ with denominator ≤ 8, with error |5/8 − φ⁻¹|< 0.007 (under 1.1%).theorem phi_target_is_five_eighths : phi_T_s * 8 = 5 * S := by omega-- 62,500,000 × 8 = 500,000,000 = 5 × 100,000,000 ✓theorem phi_target_irreducible : Nat.gcd 5 8 = 1 := by decide-- gcd(5,8) = 1 (consecutive Fibonacci numbers are coprime) ✓This is not a coincidence. The NUMEN/QuatOS bare-metal assembly substrate (23 files, 7,729 lines)is built around the constant PHI_INV = 0x3FE3C6EF372FE950 = 0.6180339887498949 , which appears inevery single assembly file. The behavioral safety target φ_target = 0.625 is the nearest simple ra‐tional approximation to that constant — and now, through formal proof, we know it is exactly the 5thFibonacci convergent.The behavioral health of an AI system is governed by the same harmonic constant that governs itsarithmetic floor.Why This Matters: Integrity and Data Provenance1. The Trust ProblemExisting behavioral safety tools for AI systems are defined in English specifications or Python imple‐mentations. Neither form admits mechanical verification. When an evaluation tool reports “this agentis safe for autonomous operation,” you are trusting:- That the code does what the specification says- That the specification captures the right invariants- That floating-point rounding didn’t introduce drift- That no edge case breaks the decision logicThis suite solves that problem.2. The Chain of TrustEvery number in this suite is traceable through three independent implementations:Python (autonomy_eval.py) ↓ exports JSON ↓C Validator (validator.c) ← reads JSON ↓ uses int64 at scale S=10⁸ ↓ computes phi_s, delta_s, classify() ↓ checks: phi in range? delta matches? gate correct? ↓ ✓ PASS / ✗ FAIL ← verified against ←Lean 4 Theorems (AutonomyEval.lean) ↓ same constants (phi_T_s = 62,500,000) ↓ same arithmetic (delta = if phi ≥ target then phi-target else target-phi) ↓ same classification (if d ≤ 6M then A else if d ≤ 12M then T else...) ↓ ✓ 14 theorems proved by Lean kernelThe Lean kernel type-checks every proof. Type-checking in dependent type theory IS proof verifica‐tion. The kernel’s trusted code base is ~10,000 lines. It has been audited and is used by mathem‐3aticians worldwide to verify research-level proofs (e.g., the Liquid Tensor Experiment, Fermat’s LastTheorem formalization attempts).When the C validator prints PASS , it is not a heuristic check — it is confirming that the JSON data hon‐ors machine-checked mathematical invariants.3. No Floating-Point AmbiguityAll arithmetic is done in scaled integers. A real value x is represented as round(x × 10⁸) . This gives8 decimal digits of precision — more than enough for the phi-divergence computations (which use atmost 5 significant figures) — and eliminates all floating-point corner cases:No 0.1 + 0.2 ≠ 0.3 surprisesNo cumulative rounding driftNo platform-specific float vs. double differencesNo subnormal numbers or NaN propagationThe integer arithmetic used in the C validator is identical to the arithmetic proved correct in Lean.When both agree, the result is deterministic across all platforms, compilers, and CPU architectures.4. Data Integrity = Verifiable ProvenanceEvery JSON export from autonomy_eval.py carries:- Session ID (sha256 hash of timestamp)- Model name- Timestamp (ISO 8601 UTC)- All round data: task ID, phi, delta, gate, latency, failure modesThe validator checks that:- φ lies in the valid range [φ_target − 0.25, φ_target + 0.25] (Lean theorem: valid_delta_bounded )- δ is non-negative (Lean theorem: delta_nonneg )- δ = 0 if and only if φ = φ_target (Lean theorem: delta_zero_iff_target )- Gate A fires if and only if δ ≤ 0.06 (Lean theorem: anchor_iff_tight )- Gate G implies direction > 0 (Lean theorem: explore_nondecreasing )- Gate C implies direction ≤ 0 (Lean theorem: correct_decreasing )- Gates G and C are mutually exclusive (Lean theorem: gc_exclusive )- The four sub-metric weights sum to exactly 100% (Lean theorem: weight_sum_exact )- The ASL level is in {1,2,3,4,5} (Lean theorem: asl_in_range )If any of these checks fail, the validator exits with code 1 and prints the violating round. This makesthe system auditable: you can independently verify that a published safety report was not tamperedwith.5. ReproducibilityThe entire suite is self-contained:- The Lean package has no external dependencies (no Mathlib, no internet access required)- The C validator uses only stdlib ( stdio.h , stdlib.h , string.h , math.h )- The Python demo uses only stdlib (no pip install needed)- The cinematic explainer is a single HTML file (no CDN, no external fonts, no images)Build from source in three commands:# Lean proofs (requires elan: https://github.com/leanprover/elan)cd lean && lake build# C validator (requires gcc)cd c && make# Python demo (requires Python 3.8+)python numen_demo.pyEverything compiles on Linux, macOS, and Windows (MSYS2/MinGW). No proprietary toolchains. Nocloud services. No API keys.5What the 14 Lean Theorems Prove6# Theorem Name Statement (inform‐al)Tactic1 phi_target_is_five_eighthsφ_target × 8 = 5 × S(exact rational iden‐tity)omega2 phi_target_irreduciblegcd(5, 8) = 1 (frac‐tion in lowest terms)decide3 delta_nonneg δ ≥ 0 always (diver‐gence is non-negat‐ive)split_ifs, omega4 delta_zero_iff_targetδ = 0 ↔ φ = φ_target(perfect health)split_ifs, omega5 delta_symmetric δ(φ) = δ(2·φ_target −φ) (symmetric abouttarget)split_ifs, omega6 valid_delta_bounded φ in valid range → δ≤ 0.25omega7 anchor_iff_tight Gate A ↔ δ ≤ 0.06 simp, split_ifs8 ex‐plore_nondecreasingGate G → direction >0 (expanding)simp, split_ifs, omega9 correct_decreasing Gate C → direction ≤0 (correcting)simp, split_ifs, omega10 gc_exclusive ¬(Gate G ∧ Gate C)(mutually exclusive)simp, split_ifs11 weight_sum_exact 25+30+30+15 = 100(weights partition100%)decide12 asl_in_range 1 ≤ asl_level ≤ 5 (al‐ways reportable)simp, split_ifs, omega13 perfect_asl1 δ=0 ∧ all A-gates →ASL-1 (perfect agent)simp14 decay_monotone Fine-structure decayis monotone in diffi‐cultysimp, split_ifs, omega7Every theorem is proved using only the core Lean 4 kernel tactics. No trust in external libraries. Nounproved axioms beyond {propext, Classical.choice, Quot.sound} — the minimal axiom set forclassical mathematics in dependent type theory.Use CasesFor AI Safety ResearchersBaseline certification: Use the C validator to independently verify any autonomy_eval.py report.No need to trust the Python implementation — re-derive every number from first principles.Theorem extension: Add new theorems to AutonomyEval.lean to prove properties about yourown safety metrics. The Lean kernel will type-check them.Data auditing: Archive JSON exports alongside your papers. Anyone can run the validator toconfirm the reported ASL le

View source

Similar papers

#computer vision Review Sep 2017

Agile Software Development Methods: Review and Analysis

This publication proposes a definition and a classification of agile software development approaches and analyses ten software development methods that can be characterized as being "agile" against the defined criterion.

P. Abrahamsson, O. Salo, Jussi Ronkainen et al. · 727 citations · ⚡54
#computer vision Jun 2008

The impact of agile practices on communication in software development

The study shows that agile practices improve both informal and formal communication, but indicates that, in larger development situations involving multiple external stakeholders, a mismatch of adequate communication mechanisms can sometimes even hinder the communication.

M. Pikkarainen, Jukka Haikara, O. Salo et al. · 401 citations · ⚡48
#machine learning Review Open access Oct 2014

Software development in startup companies: A systematic mapping study

The results indicate that software engineering work practices are chosen opportunistically, adapted and configured to provide value under the constrains imposed by the startup context.

Nicolò Paternoster, Carmine Giardino, M. Unterkalmsteiner et al. · 394 citations · ⚡54

Related blog posts

Microsoft Research Blog Oct 6, 2026

What AI gets wrong and what failure teaches us

Jennifer Neville did not want to go into computer science—but that’s exactly where she landed. Neville discusses the starts and stops that led to her professional sweet spot and her work identifying “surprising failures” making it hard for AI to handle complexity.  The post What AI gets wrong and what failure teaches us appeared first on Microsoft Research.

Microsoft Research Blog Sep 29, 2026

Introducing Quine: An AI research system designed for the complexity of biology

Biology doesn't operate in silos, and neither should the AI representation of it. Quine is an early-stage research effort to create a multimodal world model of biology. By connecting insights across biological scales and modalities, Quine helps scientists computationally search a space far larger than intuition allows and prioritize hypotheses before they reach the lab. Experimental results provide important feedback, helping researchers sharpen future research directions. The post Introducing Q…

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.