Skip to content

Latest commit

 

History

History
308 lines (249 loc) · 11.4 KB

EXPLAINME.adoc

File metadata and controls

308 lines (249 loc) · 11.4 KB

Mathesis: EXPLAINME

This file backs each claim of the README with the files that implement it and an honest caveat. It is for a reader who wants the evidence before they rely on Mathesis.

Each result below names how it was observed: "run on 2026-11-11" is a local run in the session that wrote this file, on main at f778a19; "CI run" is a GitHub Actions run whose result that session read.

A census of proof files

It reads each public repository in the frame (docs/atlas/census/repos.jsonl) and records one row of counts for each repository that has proof files of its own: provers, declarations, holes, axioms. Each row names the commit that the census read and when.

— README.adoc
How this is implemented

scripts/census/run-census.sh censuses the whole frame, and scripts/census/update-rows.sh refreshes named repositories or, with --frame, drops entries outside the public frame. census-repo.sh clones each repository blobless and checks out its proof files only; build-rows.sh folds the raw output into one row per repository. The frame holds 465 public repositories; 249 have rows (54 theory, 195 engineering). The method and the one-writer rule are in the atlas README.

Caveat

Counts are textual: declarations are found by keyword and signature rules, and hole and axiom counts come from proof-craft’s proof-holes.sh. The kernel of each home repository is the authority. "Theory" and "engineering" is a first-pass heuristic by prover. One public repository could not be cloned in the last census.

Generated atlas views

A catalogue split into theory and engineering, an A-Z view, an organisation view and a machine-readable index, all generated from the census rows.

— README.adoc
How this is implemented

scripts/census/render-catalogue.sh writes docs/atlas/generated/catalogue.adoc; scripts/atlas/census-atlas.mjs writes az.adoc, organisations.adoc and index.json, and its check fails on a stale view, a non-public frame record or a malformed private count. just check-views passed (run on 2026-11-11), with the 13 atlas tests of tests/atlas/census-atlas.test.mjs.

Caveat

None currently known.

A claims registry

Claim pins point at one theorem in its home repository, at a commit and a receipt digest. The canon receipt reader of PROOF-POLICY §8.5.1 derives each Proof Witness Grade. No grade is typed by hand.

— README.adoc
How this is implemented

Pins are authored in docs/atlas/claims/claims.jsonl (18 claims from 3 repositories). scripts/registry/claims-registry.mjs fetches each receipt at its pinned commit, checks its digest, and calls readProofReceipt from a standards checkout whose file digest it also checks. The view is docs/atlas/generated/registry.adoc; ADR 0004 records the design. just registry-check passed with 14 tests (run on 2026-11-11). The must contract clause no-hand-typed-grade checks that no pin carries a grade.

Caveat

Of 17 theorems, 11 are at PWG-1 (THY-1, APP-1 to APP-4, and six of secret-types) and 6 are ungraded (run on 2026-11-14). The six are Lintel claims: their pins, at Lintel a0f2bae, name no receipt, so they derive no grade. Lintel’s main now holds a receipt that no pin names yet.

Bridge candidates

Recorded relations between artefacts in two repositories, generated into one view.

— README.adoc
How this is implemented

docs/atlas/claims/bridges.jsonl holds 2 candidate records; claims-registry.mjs renders docs/atlas/generated/bridges.adoc, and just registry-check fails on a stale view.

Caveat

These are candidates. The bridge lock of the re-anchoring plan (WO 5.2) does not exist yet, so no bridge is checked against both homes.

Home theory

THY-1, reachability is monotone under additive features, is proved in Agda and re-proved in Rocq and Lean. CI checks all three in a pinned Guix shell. A theorem enters the theory shelf only under a stated admission rule, and a generated index lists each one with its dependant.

— README.adoc
How this is implemented

The sources are verification/proofs/agda/FeatureReachability.agda, verification/proofs/coq/FeatureReachability.v and verification/proofs/lean4/FeatureReachability.lean. The receipt is verification/receipts/theory_praxis.deed. scripts/check-proofs.sh compiles each module and audits its axioms; .github/workflows/agda-proof-policy.yml runs it in the Guix shell pinned by build/channels.scm and build/manifest.scm, with planted controls (tests/proofs/gate_controls_test.sh). CI run 43057783538 on main at b2cf524 passed. See the Proof ledger. The admission rule is in docs/theory/README.adoc; scripts/registry/theory.mjs checks each record in docs/theory/admissions.jsonl against the claim pins and renders docs/theory/generated/index.adoc with the grade the registry derives.

Caveat

The proof is about a graph model. That the model matches Cargo’s feature resolution is argued, not proved.

Applied systems

Methods that apply mathematics to decisions, starting with accounting and finance. A shared input schema keeps missing apart from zero. A cohort model in Agda has three number modes and three synthetic worked examples, each checked by Agda. Its four general properties are proved in Agda and re-proved in Rocq and Lean.

— README.adoc
How this is implemented

applied-systems/README.adoc and its subdirectories: a management accounting design, a decision record, an event map and evidence guidance. The input schema (applied-systems/methods/input-schema.adoc, enforced by scripts/applied/inputs.mjs) gives each input an evidence status and keeps missing apart from zero. The cohort model (verification/proofs/agda/Applied/Cohort.agda) has three number modes and three synthetic worked examples; the Agda gate checks every expected output of each, missing ones included, and a control in tests/golden/check_controls_test.sh shows that a missing value read as zero fails it.

Caveat

Its four general properties (APP-1 to APP-4) are proved in Agda for the model as it runs, and re-proved in Rocq and Lean. The examples are synthetic and say nothing about any organisation. The management-accounting design has no model yet.

Privacy by count

The frame names public repositories only. The number of private repositories in the listing is kept as one number.

— README.adoc
How this is implemented

docs/atlas/census/private-count.json records 40 private repositories in the listing of 2026-11-09. Both census writers drop any entry outside the public frame, and census-atlas.mjs check refuses a non-public frame record (tests/census/update_rows_frame_test.sh, 6 cases, passed on 2026-11-11). The must clause no-private-name states the rule.

Caveat

The git history still holds the names (owner ruling D-2 (a): no rewrite).

Dogfooded across the account

Technology or pattern Used here Also used in

Repository deed (*_chora.deed) with one reader and one writer

mathesis_chora.deed, read by scripts/deed-field.sh, written only by scripts/deed-clause.sh

rsr-template-repo

k9 contractiles and the coaptation receipt

.machine_readable/contractiles/, .machine_readable/coaptation/

rsr-template-repo

Proof receipts read by the canon reader (PROOF-POLICY §8.5.1)

verification/receipts/theory_praxis.deed, scripts/registry/

standards

I-JSON/JCS data, one record per line

docs/atlas/census/.jsonl, docs/atlas/claims/.jsonl

ijson-jcs

The postulate scan over the import cone of an Agda module

scripts/scan-postulates.sh, called by scripts/check-proofs.sh

januskey

Known gaps

Caution

Badges: the authoring standard asks for OpenSSF Best Practices and Scorecard badges on a public repository. The README carries none, because no Best Practices project identifier is recorded for Mathesis.

Caution

Contract probes: the must contract states six Mathesis invariants with probes, but no runner executes must probes yet. CI enforces the same rules through just check.

Evidence index

Path Proves

tests/census/

Row folding, status-document ranking, the proof-holes scanner, the update guard and the public frame (8 test files, all passed on 2026-11-11)

tests/atlas/census-atlas.test.mjs

View determinism, row validation, the public frame (13 tests)

tests/registry/

Registry derivation through fixture receipts, and the admissions of the theory shelf (17 tests)

tests/proofs/gate_controls_test.sh

A planted postulate, Admitted and sorry each fail the proof gate (CI)

tests/golden/check_controls_test.sh

just check fails on a stale view and on a failing proof (CI)

Proof ledger

The receipt verification/receipts/theory_praxis.deed is the machine-readable ledger; this table cites it.

Obligation Status Checker (version, flags) Where Trust boundary

THY-1: reachability is monotone under additive features (Agda leg)

proven

Agda 2.7.0.1, --safe --without-K --cubical-compatible

verification/proofs/agda/FeatureReachability.agda:Cargo.absent-under-all-features

The graph model only. Agda.Primitive postulates Level, lzero, lsuc and ⊔ as builtins.

THY-1, Rocq leg (re-proved, correspondence RECONCILED)

proven

Rocq 8.18.0, coqc; Print Assumptions closed

verification/proofs/coq/FeatureReachability.v:absent_under_all_features

The graph model only

THY-1, Lean leg (re-proved, correspondence RECONCILED)

proven

Lean 4.29.0, lean; no axiom

verification/proofs/lean4/FeatureReachability.lean:absentUnderAllFeatures

The graph model only

The graph model matches Cargo’s feature resolution

argued

-

docs/status/PROOF-STATUS.adoc, THY-1 "Why"

Not formalised

The token-lattice theorems (owner ruling D-10: their home is Mathesis)

open

-

docs/proposals/mathesis-research-programme.adoc

Not yet stated in a prover (next on the theory shelf)

APP-1 to APP-4: the cohort model of the applied shelf (missing propagates, cash identity, the funding gap, status never upgrades), Agda leg

proven

Agda, --safe --without-K --cubical-compatible

verification/proofs/agda/Applied/Missing.agda, Cash.agda, IntLaws.agda

The model only. APP-2 and APP-3 rest on the laws that IntLaws.agda proves for the integer instance

APP-1 to APP-4, Rocq leg (re-proved)

proven

Rocq 8.18.0, coqc; Print Assumptions closed

verification/proofs/coq/Cohort.v

The model only, as in Agda

APP-1 to APP-4, Lean leg (re-proved)

proven

Lean 4.29.0, lean; no axiom

verification/proofs/lean4/Cohort.lean

The model only, as in Agda

Proofs, counted by leg: 15 proven of 17; 1 argued, 1 open (the token-lattice theorems count as one; APP-1 to APP-4 count one for each prover). The registry derives PWG-1 for THY-1 from the receipt. The checker versions are those that CI asserts in the Guix shell (CI run 43057783538).