Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 47 additions & 13 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install the pinned prover
run: |
apt-get update
apt-get install --no-install-recommends -y ca-certificates git agda-bin=2.6.4.3-1+b2
apt-get install --no-install-recommends -y ca-certificates curl git agda-bin=2.6.4.3-1+b2
- name: Checkout
uses: actions/checkout@v7.0.1
with:
Expand All @@ -51,30 +51,31 @@ jobs:
run: bash scripts/fetch-siblings.sh
- name: Proof gate
run: bash scripts/check.sh
# The receipt names the gate, its flags, the claim PWGs and the hashed
# import cone (PROOF-POLICY §8). A committed receipt that no longer
# matches the tree fails here.
- name: Verification receipt matches the tree and the claim list
run: bash scripts/grade-receipt.sh --check
- name: Emit the receipt for this commit
run: |
bash scripts/grade-receipt.sh --write --commit "$(git rev-parse --short=12 HEAD)"
sed -n '1,40p' verification/receipts/agda-pwg_praxis.deed
- name: Fetch the pinned tools of the standard
run: bash scripts/grade-receipt.sh --fetch-standards
# PROOF-POLICY §8.4 and §8.5.1: the receipt's trusted base and Agda input
# set must be exactly what the pinned Agda reports for the graded root.
- name: Receipt trusted base and Agda cone match the prover
run: bash scripts/check-trusted-base.sh
# The Rocq and Lean recheck legs (PROOF-POLICY §2), re-proved by hand on top
# of secret-types' own legs at the sibling pin (verification/legs/README.adoc
# gives the route and the statement correspondence). Both provers are pinned:
# Coq by its Ubuntu package version, Lean by its release tarball's sha256.
# Neither leg may depend on anything but secret-types' leg, nor rest on an
# axiom; scripts/check-legs.sh refuses either.
# axiom; scripts/check-legs.sh refuses either. The job runs in an image
# pinned by its digest, so the checker is isolated in the sense of
# PROOF-POLICY §8.2 (owner ruling 2026-11-16): a bare runner's image can
# change underneath a version-pinned prover.
legs:
name: Rocq and Lean recheck legs (no axioms, no libraries)
runs-on: ubuntu-24.04
timeout-minutes: 30
container: ubuntu:24.04@sha256:73b999393d07f2bf65a40373778a44dc9a6d54ad7718d29247d8ff9413c4d6a8
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
steps:
- name: Install the pinned Coq
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y coq=8.18.0+dfsg-1build2 zstd
apt-get update
apt-get install --no-install-recommends -y ca-certificates curl git zstd coq=8.18.0+dfsg-1build2
- name: Install the pinned Lean (release tarball, sha256-checked)
env:
LEAN_URL: https://github.com/leanprover/lean4/releases/download/v4.24.0/lean-4.24.0-linux.tar.zst
Expand All @@ -92,7 +93,40 @@ jobs:
persist-credentials: false
- name: Leg diagnostics and correspondence self-test
run: bash tests/legs-receipt-test.sh
- name: Recheck gate self-test (escape hatches, pins, axiom lines)
run: bash tests/check-legs-test.sh
- name: Fetch siblings at their pinned commits
run: bash scripts/fetch-siblings.sh
- name: Both legs check, with no axioms
run: bash scripts/check-legs.sh
# The proof receipt (PROOF-POLICY §8.5): the pinned reader of the standard
# derives each grade, the shared git checker does the checks of §8.5.3, and
# every current receipt must still describe this commit. The git checks read
# the history, so the checkout is full. Bun is the release zip, pinned by
# sha256 (the digest oven-sh publishes in SHASUMS256.txt for v1.4.2).
receipt:
name: Proof receipt (reader, git checks, currency)
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Install the pinned Bun (release zip, sha256-checked)
env:
BUN_URL: https://github.com/oven-sh/bun/releases/download/bun-v1.4.2/bun-linux-x64.zip
BUN_SHA256: 36368faef7527875d5ffa52e53cd48021741f2a83eb6208a8dd64068d422a913
run: |
set -euo pipefail
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSL "$BUN_URL" -o "$RUNNER_TEMP/bun.zip"
echo "$BUN_SHA256 $RUNNER_TEMP/bun.zip" | sha256sum --check --strict
unzip -q "$RUNNER_TEMP/bun.zip" -d "$RUNNER_TEMP/bun"
echo "$RUNNER_TEMP/bun/bun-linux-x64" >> "$GITHUB_PATH"
- name: Checkout (full history)
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Fetch siblings at their pinned commits
run: bash scripts/fetch-siblings.sh
- name: Fetch the pinned tools of the standard
run: bash scripts/grade-receipt.sh --fetch-standards
- name: The receipt holds
run: bash scripts/grade-receipt.sh --check
35 changes: 20 additions & 15 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,26 @@ runs `scripts/fetch-siblings.sh` then `scripts/check.sh`), and so does the
`Agda proofs` workflow: Agda 2.6.4.3 with the flags of `scripts/proof-flags.sh`,
the canonical `--safe --without-K --cubical-compatible` (`PROOF-POLICY.adoc`
§2.1) and `--no-libraries --ignore-interfaces --double-check -W error` besides,
secret-types pinned at `45046c2`.

*Grade.* The PROVEN claims (L-1 to L-4, L-6, L-7) are at Proof Witness Grade
**`PWG-2ii`** (`PROOF-POLICY.adoc` §8) and no higher. Each is also re-proved by
hand in Rocq (Coq 8.18.0) and in Lean (4.24.0, no Mathlib), on top of
secret-types' own legs at the same pin, with no axioms in either. The statements
are compared in link:verification/legs/README.adoc[`verification/legs/README.adoc`];
Claude Code wrote that comparison, and it is provisional until the owner reviews
it. `bash scripts/check-legs.sh` checks both legs. Not `PWG-1`: no per-commit
receipt captures each checker's observed result yet.
L-5 is a set of checked refusals and A-1 an assumption; neither is a theorem, so
neither is graded. The machine record is
link:verification/receipts/agda-pwg_praxis.deed[`verification/receipts/agda-pwg_praxis.deed`],
generated by `scripts/grade-receipt.sh` and checked in CI, and the per-claim
record is link:docs/status/PROOF-STATUS.adoc[`docs/status/PROOF-STATUS.adoc`].
secret-types pinned at `9fb8430`, its `main`.

*Grade.* Each PROVEN claim (L-1 to L-4, L-6, L-7) is also re-proved by hand in
Rocq (Coq 8.18.0) and in Lean (4.24.0, no Mathlib), on top of secret-types' own
legs at the same pin, with no axioms in either. The statements are compared in
link:verification/legs/README.adoc[`verification/legs/README.adoc`]; Claude Code
wrote that comparison, and it is provisional until the owner reviews it: the two
recheck legs, and so the grade, rest on it. `bash scripts/check-legs.sh` checks
both legs. The grade is derived from the receipt, never stated here
(`PROOF-POLICY.adoc` §8). The re-pin of secret-types to `9fb8430` changed every
leg's inputs, so the receipt grades nothing until the first run on `main` after
it is recorded. That run checks the Agda in a digest-pinned Debian image and both
legs in a digest-pinned Ubuntu image (isolated, §8.2), so its receipt can derive
`PWG-1`. The runs before it, on `89ceac3`, checked the legs on a bare runner,
which supports `PWG-2ii` at most. L-5 is a set of checked refusals and A-1 an
assumption; neither is a theorem, so neither is graded. The machine record is
link:verification/receipts/agda-pwg_praxis.deed[`verification/receipts/agda-pwg_praxis.deed`]
(PROOF-POLICY §8.5.1), written and checked in CI by `scripts/grade-receipt.sh` with
the standard's shared generator; the per-claim record is
link:docs/status/PROOF-STATUS.adoc[`docs/status/PROOF-STATUS.adoc`].

== Licence

Expand Down
6 changes: 3 additions & 3 deletions docs/status/PROOF-NEEDS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ rechecked in Rocq and in Lean, with no Mathlib (`standards/3-practice/PROOF-POLI
|===
| # | Proof Needed | Category | Prover | Priority | File(s)

| L-1 to L-4 | The reader-set lattice: laws, reverse inclusion, the link's confinement | DOM | Agda, Rocq, Lean (done, `PWG-2ii`) | — | `src/Lintel/Lattice.agda`
| L-6 | TINI at this lattice, per role and per coalition | SEC | Agda, Rocq, Lean (done, `PWG-2ii`) | — | `src/Lintel/Instance.agda`
| L-7 | Self-defeating compositions cannot be built as programs | SEC | Agda, Rocq, Lean (done, `PWG-2ii`) | — | `src/Lintel/Composition.agda`
| L-1 to L-4 | The reader-set lattice: laws, reverse inclusion, the link's confinement | DOM | Agda, Rocq, Lean (done; graded by the next recorded run) | — | `src/Lintel/Lattice.agda`
| L-6 | TINI at this lattice, per role and per coalition | SEC | Agda, Rocq, Lean (done; graded by the next recorded run) | — | `src/Lintel/Instance.agda`
| L-7 | Self-defeating compositions cannot be built as programs | SEC | Agda, Rocq, Lean (done; graded by the next recorded run) | — | `src/Lintel/Composition.agda`
| R-1 | Rocq leg for L-1 to L-4, L-6, L-7 (§2) | DOM/SEC | Rocq | done | `verification/legs/rocq/Lintel.v`
| R-2 | Lean leg for L-1 to L-4, L-6, L-7 (§2), no Mathlib | DOM/SEC | Lean | done | `verification/legs/lean/`
|===
Expand Down
68 changes: 44 additions & 24 deletions docs/status/PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
// SPDX-License-Identifier: CC-BY-SA-4.0
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
= Proof Status — Lintel
:revdate: 2026-11-09
:revdate: 2026-11-17

This is Lintel's proof-status file in the sense of
`standards/3-practice/PROOF-POLICY.adoc` §8.5: the per-claim record of status
tokens, Proof Witness Grades (PWG) and recheck legs. The claims themselves, with
their statements and artefacts, are the table in link:../../README.adoc[README]
(L-1 to L-7, A-1). The machine copy is
link:../../verification/receipts/agda-pwg_praxis.deed[`verification/receipts/agda-pwg_praxis.deed`],
generated by `scripts/grade-receipt.sh`; CI fails if it drifts from the tree, the
import cone or the README's claim IDs.
a §8.5.1 proof receipt. `scripts/grade-receipt.sh` holds Lintel's ledgers and
hooks and writes it with the standard's shared generator
(`scripts/proof-receipt.sh`, pinned with the reader, the reference digest and the
git checker at one standards commit), deriving every manifest, digest, import and
grade from git. Its `--check` (the `receipt` job of the `Agda proofs`
workflow) runs the pinned reader, the git checks of §8.5.3 and a currency check,
and fails if the receipt's claims or legs drift from this table or the legs
record.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

Until 2026-11-09 this file was the RSR template's placeholder ("0% proven", Idris
ABI rows). That never described this repository. The README's claim table was
Expand All @@ -25,7 +31,7 @@ sibling, under the flags of `scripts/proof-flags.sh`:
flags. `scripts/check.sh` checks, in order:

. coverage: every module under `src/Lintel` is imported by `Lintel.All`;
. the sibling at its pin, `hyperpolymath/secret-types` `45046c2`, all of
. the sibling at its pin, `hyperpolymath/secret-types` `9fb8430` (its `main`), all of
`SecretTypes.All` under the same flags;
. `Lintel.All`;
. the 5 positive controls under `tests/accept`;
Expand All @@ -34,8 +40,9 @@ flags. `scripts/check.sh` checks, in order:
. a negative control: the rejection check, pointed at each positive control,
reports it accepted, so step 5 cannot pass vacuously.

Trust base: no postulates, no escape hatches, no library, no axioms (`--safe`, and
the counts in the receipt). A-1 is a hypothesis of the threat model, not an axiom
Trust base: no postulates, no escape hatches, no library, no axioms (`--safe`).
The receipt's `(trusted-base …)` lists the prover's own postulates in the cone:
`Level`, `lzero`, `lsuc` and `_⊔_` of `Agda.Primitive`, each BUILTIN-bound (§8.4). A-1 is a hypothesis of the threat model, not an axiom
of any proof: no proof assumes it, and `Lintel.Instance.collusion-gap` proves
what happens without it.

Expand All @@ -45,13 +52,13 @@ what happens without it.
|===
| Claim | Token | PWG | Rocq leg | Lean leg | Note

| L-1 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Lattice`
| L-2 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Lattice`
| L-3 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Lattice`, packed as `Lintel.Instance.reader-sets`
| L-4 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Lattice`
| L-1 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Lattice`
| L-2 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Lattice`
| L-3 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Lattice`, packed as `Lintel.Instance.reader-sets`
| L-4 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Lattice`
| L-5 | tested-only | n/a | n/a | n/a | Checked refusals and acceptances; not a theorem (§8.1)
| L-6 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Instance`; rests on secret-types N-7, itself `PWG-2ii` at the pin
| L-7 | proven | `PWG-2ii` | re-proved | re-proved | `Lintel.Composition`
| L-6 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Instance`; rests on secret-types N-7, whose files at the pin each run checks (the receipt's imports)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
| L-7 | proven | ungraded until the next run | re-proved | re-proved | `Lintel.Composition`
| A-1 | argued | n/a | n/a | n/a | An assumption; its gap is proved (`collusion-gap`)
|===

Expand All @@ -73,12 +80,28 @@ link:../../verification/legs/README.adoc[`verification/legs/README.adoc`]. Every
row is `RECONCILED`. Claude Code wrote the comparison, and it is provisional
until the owner reviews it (estate doctrine 4).

*Why not higher.* `PWG-1` needs a receipt per witness and per commit that
records each checker's observed result (§8.2). The receipt records each leg's
pinned checker, invocation and input digests, the sibling's leg files
included, but not the result. The verification claim is CI-backed until
per-leg, per-commit receipts record the observed results. The `legs` job log
is execution evidence, not a substitute for those receipts.
*The receipts.* A grade is derived from the receipt (§8.2, §8.4). `PWG-1` needs
a current receipt, for every witness, of a pinned, headless and isolated checker
run that describes the receipt's `:source-commit`; isolated means in an image
pinned by its digest (owner ruling 2026-11-16). The last runs,
https://github.com/metadatastician/lintel/actions/runs/42740256887[42740256887]
on `89ceac3`, checked the inputs at the earlier secret-types pin, and its legs ran
on a bare runner, so they support `PWG-2ii` at most; the re-pin to `9fb8430`
superseded them, and the receipt grades nothing until the first run on `main`
after it is recorded. That run checks the Agda in
`debian:13-slim@sha256:a29215f6…` and both legs in
`ubuntu:24.04@sha256:73b99939…`. Each receipt lists the files of its graded
invocation: for Agda, the import cone of `src/Lintel/All.agda` (the gate's
separate run over all of `SecretTypes.All` is not a witness of these claims
and is not listed); for Rocq and Lean, the leg's files. Files of secret-types
at the pin are an `(import …)`, and the git checks confirm each one at its
commit. A change to a Lintel file of a receipt fails the currency check until
a new run is recorded. The imported files are fixed by their pinned commit,
which the git checks read; they change only with a repin, and the pin file
`scripts/fetch-siblings.sh` is a Lintel input of every leg, so a repin fails
Comment thread
hyperpolymath marked this conversation as resolved.
Resolved
the currency check too. `scripts/check-trusted-base.sh` checks that the
receipt's Agda input set and `(trusted-base …)` are exactly what Agda reports
(`--dependency-graph` and a scan of the prover-supplied modules).

*The template skeletons are not the legs.* `verification/proofs/{agda,coq,lean4,idris2,tlaplus}`
are RSR template boilerplate. They prove nothing about Lintel, and no workflow
Expand All @@ -93,16 +116,13 @@ derivation and the `Writes` derivation together on one `Cmd` index. It now reads
`Writes` into `Writes′`, the same relation computed by recursion on the command,
and recurses on the typing derivation alone. `Writes`, the relation L-7 is stated
over, is unchanged, as is every statement. The sibling needed the matching change,
hyperpolymath/secret-types#26 (`just-injective`). That, and secret-types' legs
(hyperpolymath/secret-types#29, stacked on #26), are why the pin is a branch
commit, `45046c2`, until they merge.
which reached secret-types `main` as hyperpolymath/secret-types#30, with its legs
as hyperpolymath/secret-types#34. The pin is `9fb8430`, on that `main`
(re-pin from metadatastician/lintel#27).

== Open

* Owner review of the legs' statement comparison
(link:../../verification/legs/README.adoc[`verification/legs/README.adoc`]).
* Re-pin secret-types to its `main` once hyperpolymath/secret-types#26 and
hyperpolymath/secret-types#29 (its legs) merge. The squash commits will differ
from `45046c2`.
* A-1 stays an assumption by design: confinement of the link is per role, and a
proxy–target coalition can join the two fields outside any program.
2 changes: 1 addition & 1 deletion scripts/check-legs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# * every `#print axioms` line must read "does not depend on any axioms".
#
# Pins: COQ_VERSION and LEAN_VERSION below, fixed (no environment override);
# scripts/grade-receipt.sh reads them from here into the receipt.
# the receipt's [[run]] rows (verification/receipts/proof-receipt.toml) name them.
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
export LC_ALL="${LC_ALL:-C.UTF-8}"
Expand Down
Loading
Loading