SDD-ADC-003 — Formal proof and executable assurance

  • Status: Proposed on 2026-12-01. Not accepted, not implemented. Nothing here is a claim of an existing capability, and its requirement identifiers (ADC-FPV-*) are not in SDD-ADC-001 and are not traced.
  • Date: 2026-12-01
  • Target: an opt-in, experimental way to state a few properties of Agentic-Datacenter's own judging exactly, prove them about a small model, and test that the Python code behaves like the model.
  • Related: SDD-ADC-001; ADR 0050, 0056, 0061, 0062; PR #159 (the evidence hardening this builds on); What a status shows.
  • Normative words: MUST, MUST NOT, SHOULD and MAY as in RFC 2119, binding only once this document is accepted.

1. Objective and boundary

Agentic-Datacenter is a simulator. It runs agents and governance gates against a simulated plant and says what happened, under rules it states. Its statuses (a verification card's PASS, a weekly seal's GREEN, the release check's PASS) are only as good as the functions that give them. PR #159 made those functions refuse missing, partial and malformed evidence, and tested them on every small input.

This document proposes a further step: to state the most important of those rules as propositions, prove them about a small typed model with a proof assistant, and check by test that the Python functions give the same answers as the model. It is a way of checking the judge, not a new track for participants and not a claim about any gate.

Method Question Does not establish
Simulation (SDD-ADC-001) What did this gate do in these runs? Behaviour outside the sampled runs
Verification track (ADR 0062) What can a verifier establish from these bundles? A real execution
Formal proof (this document) Does a stated rule follow from the model's definitions? That the Python code, the plant model or a facility follows the model
Conformance (this document) Does the Python code agree with the model on these inputs? Agreement on every possible input

Proved, tested and measured are kept apart in every report. None is combined into a certification.

1.1 Success criteria

  1. The proofs and the conformance tests run from a clean checkout, without credentials, REMORA or external services, once the pinned toolchain is installed.
  2. A weakened statement, an unapproved assumption, a missing proof, a missing tool or a failed check never gives a successful result.
  3. Each proved claim is tied to the real function by a conformance test, and a mutation that makes the function always pass or always refuse is caught.
  4. Frozen benchmark versions, the verification-v1 pack, published cards and season rules are unchanged.
  5. The default installation gains no Lean, Rust or other toolchain.

1.2 Non-goals

  • No proof about the whole simulator, the floating-point plant model, REMORA, any participant's gate or any physical equipment.
  • No claim that consistent records show that something happened.
  • No certification, badge or participant-facing track in the first version.
  • No running of untrusted proofs in the benchmark's self-hosted or privileged workflows.
  • No copying of third-party proofs, scripts or text. The model and its statements are written here.

2. Method

The method follows a pattern used in published formal research: trusted statements are kept apart from the proofs of them; a proof is accepted only if a comparator confirms it proves exactly the trusted statement, only the approved axioms are used, and a second, independently written kernel replays it. Where the statement is weaker than the informal claim, a list of departures says so.

Part Role here
Lean 4 The typed model and its proofs
A statement comparator (e.g. Lean Comparator) That a proof proves the trusted statement and nothing weaker
An independent kernel (e.g. Nanoda, via an exporter) A second check of every accepted proof
An axiom report Which axioms each proof rests on
departures.md Where the model differs from the prose claim

Each tool, its version and its licence MUST be verified at the exact pinned revision before it is used (section 8).

3. Trust domains

Domain Holds Trust
T1 Specification the model definitions, the trusted statements, the assumptions, the pack manifest reviewed by the maintainer, hashed, frozen per version
T2 Candidate proofs the proofs untrusted until checked; cannot change T1
T3 Checker the pinned Lean kernel, comparator, exporter, independent kernel and the runner pinned, with the residual trust in them stated
T4 Implementation the Python code tested against the model, not proved
T5 Provenance logs, result files, attestations origin and integrity, not truth

A theorem with the right name is not enough: its statement, the definitions it depends on and its axioms MUST match T1.

4. Proposed layout

formal/
  lean-toolchain, lakefile.toml, toolchain.lock.json
  Model/        Coverage.lean, Verdict.lean, Seal.lean, Release.lean
  Challenge/    the trusted statements
  Solution/     the proofs
  packs/formal-assurance-v1/
    manifest.json, assumptions.json, vectors.json, departures.md
tools/formal_check.py           validate, run and verify (proposed)
tests/conformance/test_formal_*.py
.github/workflows/formal.yml    separate, read-only, no secrets

No runtime package imports anything under formal/. uv.lock gains nothing.

5. The model, version 1

  • Domains. Case, run, gate, agent and scenario identifiers are compared exactly. Counts are natural numbers. A hash binds an identity under a collision-resistance assumption, nothing more.
  • Inputs. Untrusted JSON is parsed in Python into either a valid record or a classified error. A rejected input never enters the model as 0, an empty list or false. Parsing is covered by conformance tests, not by the proofs.
  • Coverage. A trusted expected set E is held apart from the observed set O. complete(E, O) holds when E is non-empty, each identifier is in O exactly once, O holds nothing else, and each hash that is required matches. An intentionally empty scope is NOT_APPLICABLE, never PASS.
  • Verdicts. The three verdicts of ADR 0062, with the status rule as it stands after PR #159: REFUSED for a false accept, a false reject or an overstated verdict; PASS only when every case is answered correctly; INCOMPLETE otherwise.
  • The seal. GREEN needs complete week coverage, all seven counts present and agreeing, and every run passed: nothing without a mandate carried out, no step the control failed to answer, at least one sound step and every sound step carried out.

6. First claims

Claim Statement, for every valid input Tied to
FP-001 Coverage Release eligibility in the model implies complete evidence, every hard breach zero and harm-free true; incomplete evidence is never eligible release_gate.py, as a necessary condition only
FP-002 Verdicts PASS implies complete coverage and every given verdict equal to the expected one; every complete, all-correct card is PASS verification.status, counts, recheck, judge_week
FP-003 Seal GREEN implies complete week coverage and every run passed; a week with no data or unreadable counts is never GREEN; a complete passing week is GREEN weekly_seal.judge, tools/weekly_seals.problems

Later candidates, each needing its own decision: authority that cannot outlive its revocation, a one-time authorization used at most once, authority that cannot grow, breakers that are never closed together in the modelled states, and missing measurements that cannot raise a score.

6.1 No empty proofs

Every claim MUST come with a witness that its premise can hold and its success state can be reached, and with negative examples that are refused. A proof that holds only because its premise is impossible is not accepted. Replacing the function with one that always passes, or always refuses, MUST fail a test.

6.2 Axioms

Only propext, Classical.choice and Quot.sound are allowed by default. sorry, admit, declared axioms and native evaluation shortcuts MUST NOT be in an accepted proof's dependencies.

7. Requirements (proposed)

Id Requirement
ADC-FPV-001 Formal tooling is opt-in; the default install and runtime dependencies do not change.
ADC-FPV-002 The trusted pack is immutable, versioned, hashed and non-empty, with distinct claim ids.
ADC-FPV-003 Proofs are kept apart from trusted statements and cannot change them.
ADC-FPV-004 Each accepted proof passes statement comparison and the axiom check, not only compilation.
ADC-FPV-005 Each accepted proof is replayed by the pinned Lean kernel and an independent kernel.
ADC-FPV-006 Every tool and dependency is pinned by revision and hash; a mismatch stops the run.
ADC-FPV-007 Parsing rejects invalid or missing observations and never turns them into valid counts.
ADC-FPV-008 FP-001 is proved, with witnesses, and tied to the release check by conformance tests.
ADC-FPV-009 FP-002 is proved, with witnesses, and tied to the verification functions by the full verdict matrix.
ADC-FPV-010 FP-003 is proved, with witnesses, and tied to both seal paths.
ADC-FPV-011 Conformance is checked against the real Python functions on frozen and generated inputs.
ADC-FPV-012 Always-pass and always-refuse mutations of each tied function are caught.
ADC-FPV-013 A missing, duplicated, partial or stale artifact, or no work at all, never gives a successful result.
ADC-FPV-014 A result binds the pack, statement, assumptions, proof, commit and checker identities to its raw evidence.
ADC-FPV-015 Assumptions, departures and limits are published, with proof and conformance reported apart.
ADC-FPV-016 No frozen benchmark version, pack, card, weekly record or season rule changes silently.
ADC-FPV-017 Proofs are checked in isolation: no secrets, no write tokens, no network after setup, bounded resources.
ADC-FPV-018 Every third-party input is inventoried and licence-checked at its pinned revision before use.
ADC-FPV-019 The repository's licences and contribution terms are unchanged without the owner's approval.
ADC-FPV-020 The formal CI job fails closed on a missing tool, a failed check, a missing report or zero tests.
ADC-FPV-021 Once accepted, the requirements are added to SDD-ADC-001 and traced like the others.
ADC-FPV-022 A small example reproduces from a clean checkout with documented commands.
ADC-FPV-023 No formal result is presented as a certification, an endorsement or evidence of real execution.

8. Toolchain, isolation and licences

  • Pins. formal/toolchain.lock.json records the Lean version and distribution hash, the comparator, exporter and independent kernel revisions, the build tools, and the hash of each binary. No floating versions, no automatic fallback.
  • Isolation. A separate workflow on a hosted runner, contents: read, no secrets, pull_request only, network off after setup, limits on time, memory, disk and processes; a failing or timed-out check stops its own process group only.
  • Exit codes. 0 every required stage passed and was verified; 1 a semantic refusal; 2 an infrastructure, schema, hash or tool error, missing output or no work; 3 not run. Exit code and reported status MUST agree.
  • Licences. The tools named in section 2 are published under permissive licences (Lean 4 is Apache-2.0; the comparator, exporter and Nanoda are reported to be Apache-2.0); this MUST be confirmed at each pinned revision with its transitive dependencies before the tool is used. They are development tools fetched in CI, not shipped in any distribution. Nothing third-party is copied into the repository; if that ever changes, its licence and notices are kept and THIRD_PARTY_NOTICES.md is updated in the same change. New first-party files stay under the repository's current licence.

9. Stages

Stage Delivers Done when
0 The evidence hardening of PR #159 Merged (done)
A An ADR accepting this document, the pinned toolchain, the runner, the pack skeleton and the isolated workflow A smoke proof passes both kernels, and a changed statement, an extra axiom and a missing artifact each fail
B FP-001 to FP-003 with witnesses, conformance tests and mutations All pass; departures written
C Later candidates, each by its own decision —

Stage numbers here are local to this document. SDD-ADC-001's build plan is not changed by it: its traceability check requires a passing test and an owner for every requirement up to the stage set in pyproject.toml, and lists later stages without requiring them.

10. Open decisions for the owner

Decision Proposed default
Whether to do this at all Yes, as an experimental check of the judge, after Season 1
Toolchain Lean 4, a statement comparator and an independent kernel; no Mathlib at first
A participant-facing formal track Not in the first version
Licence of new formal files The repository's current licence

11. Sources and credits

  • The separation of trusted statements from proofs, statement comparison, independent kernel replay, axiom reports and a written list of departures follow published formal research artifacts, including Anthropic's formal-math repository (consulted 2026-12-01, Apache-2.0); exact revisions are to be recorded when stage A begins. Nothing from it is copied.