Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ 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: Receipt legs self-test (input digests, correspondence states)
run: bash tests/grade-receipt-legs-test.sh
- name: Fetch siblings at their pinned commits
run: bash scripts/fetch-siblings.sh
- name: Both legs check, with no axioms
Expand Down
5 changes: 2 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,14 @@ 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`.
secret-types pinned at `9fb8430`, its `main`.

*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
Claude Code wrote that comparison, and the owner reviewed it on 2026-11-16. `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
Expand Down
18 changes: 6 additions & 12 deletions docs/status/PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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 Down Expand Up @@ -70,8 +70,8 @@ statements, transitively.
The §2.2 record, with the statement comparison, versions, invocations and
universe discipline, is
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).
row is `RECONCILED`. Claude Code wrote the comparison, and the owner
reviewed it on 2026-11-16 (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
Expand All @@ -92,17 +92,11 @@ through `⊒-open`. In `Lintel.Composition`, `writes-flow` matched the typing
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.
over, is unchanged, as is every statement. The sibling needed the matching change, 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`.

== 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/fetch-siblings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."

SECRET_TYPES_COMMIT="${SECRET_TYPES_COMMIT:-45046c2c0f92ddae2ff73c8c05555bed419f46ad}"
SECRET_TYPES_COMMIT="${SECRET_TYPES_COMMIT:-9fb8430c3aa2d1d89016619722dc0a2631df0566}"
DEPENDENCIES_DIR="${DEPENDENCIES_DIR:-_build/dependencies}"

# fetch_pinned <repo> <commit>
Expand Down
10 changes: 8 additions & 2 deletions scripts/grade-receipt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ emit_legs() {
printf ' :route "re-proved"\n'
printf ' :route-reason "Agda2Dedukti is an Agda backend pinned to a fork (b026db1, GHC 8.10) and cannot run on Agda %s; no released Dedukti/Lambdapi exporter to Lean 4, and no pinned route to Rocq"\n' "$(proof_agda_pin)"
printf ' :state "RECONCILED"\n'
printf ' :review "statement comparison written by Claude Code; provisional until owner review (estate doctrine 4)"\n'
printf ' :review "statement comparison written by Claude Code; reviewed by the owner on 2026-11-16 (estate doctrine 4)"\n'
printf ' :depends-on "secret-types legs at the sibling pin (record, language, typing, TINI): imported, not restated"\n'
printf ' (leg :prover "rocq" :checker "coqc" :version "%s" :invocation "coqc -q -Q <sibling>/verification/legs/rocq SecretTypesLeg Lintel.v (in verification/legs/rocq)" :libraries "secret-types Rocq leg only (no standard library)" :axioms "none (Print Assumptions: Closed under the global context)")\n' "$coq"
printf ' (leg :prover "lean" :checker "lean" :version "%s" :invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)" :libraries "secret-types Lean leg only (no Mathlib)" :axioms "none (#print axioms: does not depend on any axioms)")\n' "$lean"
Expand All @@ -177,10 +177,16 @@ emit_legs() {

# Each counted leg must be RECONCILED in the correspondence record, and
# the reverse: the grade is derived from the §2.2 record (PROOF-POLICY §8.4).
# A claim may span several rows; identical rows count once, and rows that
# disagree on a state both survive and fail the match.
# On a mismatch, report the differing claim IDs to stderr and exit the script
# with status 1; matching records produce no output.
check_leg_records() {
local rec=verification/legs/README.adoc counted recorded
if [[ ! -f "$rec" ]]; then
echo "ERROR: counted legs must match RECONCILED states in $rec, which is missing" >&2
exit 1
fi
counted="$(claims | awk -F'|' '
$4=="re-proved" || $4=="transported" {print $1 "|rocq|RECONCILED"}
$5=="re-proved" || $5=="transported" {print $1 "|lean|RECONCILED"}
Expand All @@ -191,7 +197,7 @@ check_leg_records() {
print trim($2) "|rocq|" trim($3)
print trim($2) "|lean|" trim($4)
}
' "$rec" | LC_ALL=C sort)"
' "$rec" | LC_ALL=C sort -u)"
if [[ "$counted" != "$recorded" ]]; then
echo "ERROR: counted legs must match RECONCILED states in $rec" >&2
diff <(printf '%s\n' "$recorded") <(printf '%s\n' "$counted") \
Expand Down
2 changes: 1 addition & 1 deletion src/Lintel/Composition.agda
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-- link-writable and it can be written there, so the refusal is
-- not a refusal of everything
--
-- Pin: hyperpolymath/secret-types 45046c2c0f92ddae2ff73c8c05555bed419f46ad
-- Pin: hyperpolymath/secret-types 9fb8430c3aa2d1d89016619722dc0a2631df0566
-- SecretTypes.Vars, SecretTypes.Lang, SecretTypes.Typing.Generic
-- (scripts/fetch-siblings.sh)
module Lintel.Composition where
Expand Down
2 changes: 1 addition & 1 deletion src/Lintel/Instance.agda
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-- coalition-blind ... nor the client's local state, so coalition TINI
-- relates stores that differ there
--
-- Pin: hyperpolymath/secret-types 45046c2c0f92ddae2ff73c8c05555bed419f46ad
-- Pin: hyperpolymath/secret-types 9fb8430c3aa2d1d89016619722dc0a2631df0566
-- SecretTypes.Vars, SecretTypes.Lang, SecretTypes.Lattice.Record,
-- SecretTypes.Noninterference.Generic (scripts/fetch-siblings.sh)
module Lintel.Instance where
Expand Down
2 changes: 1 addition & 1 deletion src/Lintel/Lattice.agda
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
-- here.
--
-- Pins:
-- hyperpolymath/secret-types 45046c2c0f92ddae2ff73c8c05555bed419f46ad
-- hyperpolymath/secret-types 9fb8430c3aa2d1d89016619722dc0a2631df0566
-- SecretTypes.Prelude, imported (scripts/fetch-siblings.sh)
-- hyperpolymath/proven-servers b58289e7862139efd918561a7ddc9cb5605ea9d8
-- protocols/proven-odns/src/ODNS/Types.idr, Role = Client | Proxy | Target;
Expand Down
3 changes: 2 additions & 1 deletion tests/check-legs-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ done
for stage in SIBLING ROCQ BUILD LEAN; do
reset_case
export "TEST_${stage}_STATUS=17"
check 1 'does not check'
if [[ "$stage" == BUILD ]]; then check 1 'FAIL: the Lean leg does not build'
else check 1 'does not check'; fi
if [[ "$stage" == SIBLING || "$stage" == ROCQ ]]; then
if grep -q '^lake ' "$TEST_CALLS"; then exit 1; fi
elif [[ "$stage" == BUILD ]]; then
Expand Down
29 changes: 19 additions & 10 deletions tests/grade-receipt-legs-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,33 @@ write_receipt
grep -qF ':prover "rocq" :checker "coqc" :version "8.19.0"' "$receipt"
grep -qF ':prover "lean" :checker "lean" :version "4.25.0"' "$receipt"
check_receipt
# Cross-check correspondence rows in both directions. Repeated rows are
# legitimate: a claim may map to more than one theorem.
# Cross-check correspondence rows in both directions. A claim may map to more
# than one theorem, so an identical repeated row is legitimate.
record="$fixture/verification/legs/README.adoc"
cp "$record" "$fixture/record"
printf '\n| L-1\n' >> "$record"
printf '\n| L-1 | RECONCILED | RECONCILED\n' >> "$record"
check_receipt
mismatch='ERROR: counted legs must match RECONCILED states'
for id in L-1 L-2 L-3 L-4 L-6 L-7; do
sed "/^| $id$/d" "$fixture/record" > "$record"
check 1 'ERROR: claims with a counted leg differ' --check --commit bbbbbbbbbbbb
grep -qF "only in grade-receipt.sh: $id" "$fixture/output"
sed "/^| $id |/d" "$fixture/record" > "$record"
check 1 "$mismatch" --check --commit bbbbbbbbbbbb
grep -qF "only in grade-receipt.sh: $id|rocq|RECONCILED" "$fixture/output"
grep -qF "only in grade-receipt.sh: $id|lean|RECONCILED" "$fixture/output"
done
# A row without its states, or with a state other than RECONCILED, is refused,
# and so is a repeated row that disagrees with the first.
for row in '| L-1' '| L-1 | RECONCILED | PENDING' '| L-1 | PENDING | RECONCILED'; do
cp "$fixture/record" "$record"
printf '\n%s\n' "$row" >> "$record"
check 1 "$mismatch" --check --commit bbbbbbbbbbbb
done
for id in L-5 A-1 L-99; do
cp "$fixture/record" "$record"
printf '\n| %s\n' "$id" >> "$record"
check 1 'ERROR: claims with a counted leg differ' --check --commit bbbbbbbbbbbb
grep -qF "only in verification/legs/README.adoc: $id" "$fixture/output"
printf '\n| %s | RECONCILED | RECONCILED\n' "$id" >> "$record"
check 1 "$mismatch" --check --commit bbbbbbbbbbbb
grep -qF "only in verification/legs/README.adoc: $id|rocq|RECONCILED" "$fixture/output"
done
rm "$record"
check 1 'ERROR: claims with a counted leg differ' --check --commit bbbbbbbbbbbb
check 1 "$mismatch" --check --commit bbbbbbbbbbbb
cp "$fixture/record" "$record"
check_receipt
2 changes: 1 addition & 1 deletion verification/legs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ a theorem (§8.1).

* They are re-proofs, not transports. The match between each leg statement
and its Agda statement rests on the comparison above. Claude Code wrote it,
and it is provisional until the owner reviews it (estate doctrine 4). No tool
and the owner reviewed it on 2026-11-16 (estate doctrine 4). No tool
checks it.
* L-6 rests on secret-types' legs of N-7, as the Agda rests on N-7. Their
grade bounds this one.
Expand Down
22 changes: 11 additions & 11 deletions verification/receipts/agda-pwg_praxis.deed
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:repository "metadatastician/lintel"
:repo-uuid #u5"github.com/metadatastician/lintel"
:kind "theory"
:source-commit "01bf2bf14192")
:source-commit "d7bdc21a1264")
(prover
:tool "agda"
:version "2.6.4.3"
Expand Down Expand Up @@ -45,17 +45,17 @@
:route "re-proved"
:route-reason "Agda2Dedukti is an Agda backend pinned to a fork (b026db1, GHC 8.10) and cannot run on Agda 2.6.4.3; no released Dedukti/Lambdapi exporter to Lean 4, and no pinned route to Rocq"
:state "RECONCILED"
:review "statement comparison written by Claude Code; provisional until owner review (estate doctrine 4)"
:review "statement comparison written by Claude Code; reviewed by the owner on 2026-11-16 (estate doctrine 4)"
:depends-on "secret-types legs at the sibling pin (record, language, typing, TINI): imported, not restated"
(leg :prover "rocq" :checker "coqc" :version "8.18.0" :invocation "coqc -q -Q <sibling>/verification/legs/rocq SecretTypesLeg Lintel.v (in verification/legs/rocq)" :libraries "secret-types Rocq leg only (no standard library)" :axioms "none (Print Assumptions: Closed under the global context)")
(leg :prover "lean" :checker "lean" :version "4.24.0" :invocation "lake build; lake env lean Axioms.lean (in verification/legs/lean)" :libraries "secret-types Lean leg only (no Mathlib)" :axioms "none (#print axioms: does not depend on any axioms)")
(inputs
(input :path "verification/legs/rocq/Lintel.v" :sha256 "72fefcaa4af7facf71ebd7c9891fd55e1d388a51743f1ae3bf2e2bff1d4d218c")
(input :path "verification/legs/rocq/Lintel.v" :sha256 "47eb36dd5699873ee6fca09c05a2e0548cdf7dcecd094f176af33a1c49f5bc83")
(input :path "verification/legs/lean/Axioms.lean" :sha256 "fbc9517313f1d519b393b3af2dfaf23a3570b03d0d63eec672d12578d0d94cb6")
(input :path "verification/legs/lean/Lintel.lean" :sha256 "40ebf309ee76002da974837a9accfbe4de25d4e7faaa30305d33b01bafc93a9e")
(input :path "verification/legs/lean/Lintel/Composition.lean" :sha256 "03d3fe71419c3f0340c200454248301e990f9fc540e43798753eee42e93d196a")
(input :path "verification/legs/lean/Lintel/Instance.lean" :sha256 "643fd533fd646e5df59c72ab593d13b137ae233bcd1e98bf4e56462dd785c0e5")
(input :path "verification/legs/lean/Lintel/Lattice.lean" :sha256 "0b2134c82b60bd0f4332a432e8b1c0eff00c0cc55b2a1f6ebca5abb419503519")
(input :path "verification/legs/lean/Lintel/Instance.lean" :sha256 "6810fc39e7f67c02c3df828d015924c1523813aade5ec452afe945bd452d3a82")
(input :path "verification/legs/lean/Lintel/Lattice.lean" :sha256 "4323366527ae77d6aa7794bcd380e87f68c35b585191d6f2faac1e2a7e2fcd3a")
(input :path "verification/legs/lean/lakefile.toml" :sha256 "9f3404bcc6575c35111450ac45e86bdac94ea7e034b05e4bc5e2032ca5392f8b")
(input :path "verification/legs/lean/lean-toolchain" :sha256 "387019dd5f6d8213249f99bfe1bd9f346678bf0d4612938c1e7feae386665335")
(input :repository "hyperpolymath/secret-types" :path "verification/legs/rocq/SecretTypes.v" :sha256 "acffaa9b4884b46c61fae6f2c91a34e7005b5d4b6158ebcc83bde25bc573b75e")
Expand All @@ -76,18 +76,18 @@
; The import cone: every module the proofs rest on, hashed.
(modules
(module :path "src/Lintel/All.agda" :sha256 "0d1e310a5ae125ce7aeaa72cfce69355c9f361cdbc1cf6dbb5a9c4e13f51cdfd")
(module :path "src/Lintel/Composition.agda" :sha256 "4b4652780509ed2dbd26533b30ae0e4c99169b9bb258e22b9cf4acc2432cd8fc")
(module :path "src/Lintel/Instance.agda" :sha256 "6780327016175c6c1358bce0e58a5cf766b3632b4582988a59dc08f5339f014e")
(module :path "src/Lintel/Lattice.agda" :sha256 "abdf9416abc4abb8f5187167b508363e8fef7f81007dd803bc154fc2ee21704a")
(module :path "src/Lintel/Composition.agda" :sha256 "7a096e24742641d766c3e05f44766b29efc9b60120c18eb7a9c97d87352785f8")
(module :path "src/Lintel/Instance.agda" :sha256 "a70653d9560e12fb2f6acbb9031e63e3159910612e43f804c6bf42fbafe4240a")
(module :path "src/Lintel/Lattice.agda" :sha256 "3c726d7aab478c55fb00ebf445f983a5fe6887c76684cd7fb14d02b9d6875dfc")
)
(sibling
:repository "hyperpolymath/secret-types"
:commit "45046c2c0f92ddae2ff73c8c05555bed419f46ad"
:commit "9fb8430c3aa2d1d89016619722dc0a2631df0566"
(module :path "src/SecretTypes/Lang.agda" :sha256 "957333acdcc5c67692630411cd7a82e96075f07533b0d2cc7c99d000b1522570")
(module :path "src/SecretTypes/Lattice/Record.agda" :sha256 "25f4ee821b8e245dccb4f5f7eae9c3f1006a4b6eaeab3af14646721f14f83de3")
(module :path "src/SecretTypes/Noninterference/Generic.agda" :sha256 "7c86fcc801e256a2c4869c5ccc8302a93daa0a882e2493056e68b329ff79602a")
(module :path "src/SecretTypes/Noninterference/Generic.agda" :sha256 "716de16efc8ded98b0744fd38a5f95ca6e431b07dedb43e12140f5260e28af01")
(module :path "src/SecretTypes/Noninterference/Statement.agda" :sha256 "f76d84eb3a434c2f9f4203303fcf30fb04282afe787ce085d4590855b43e4c45")
(module :path "src/SecretTypes/Prelude.agda" :sha256 "5fea408acc63e0c91a293463913ef8f167a722cc1665f7a7010b26c8520c4072")
(module :path "src/SecretTypes/Prelude.agda" :sha256 "8ec095409f9424acf26e458e0ff1b129d1ca9525f37afa6d40e66bfcbd2cfed1")
(module :path "src/SecretTypes/Typing/Generic.agda" :sha256 "adacd5405be17ccbf845c56d2d7980d2b0eae7214a284df2bf5a64d64ccf7718")
(module :path "src/SecretTypes/Vars.agda" :sha256 "f188cbc8b630b036daac4720f3cfe492bf78671f87b82850919f09091ead5422")
)
Expand Down
Loading