fix(proofs): repair bit-rotted WokeLang.v (Coq) + meticulous audit + CI gate#82
Merged
Merged
Conversation
The Coq formalization `docs/proofs/verification/WokeLang.v` claimed type safety
but did NOT compile under Coq 8.18 — the same "verified but unchecked" hazard
the Lean file had, because no CI ever ran the prover.
Rot fix:
- `value_eq_dec` used `decide equality; ... apply list_eq_dec; assumption`, but
the recursive IH for the nested `list value` is no longer in scope under 8.18
("No such assumption"). Fixed with an explicit fixpoint
(`fix IH 1; ...; apply list_eq_dec; exact IH`). This was the ONLY rot; the
rest of the file (incl. the large preservation proof) then compiled.
Meticulous soundness check (Print Assumptions): NO Admitted/admit/Axiom; the
headline theorems (progress, preservation, type_safety) depend only on
`ClassicalDedekindReals.sig_forall_dec` + `functional_extensionality`, both
pulled in unavoidably by modelling floats as `R` — exactly as the header claims.
Also fixed a real latent bug + added the missing gate:
- `cap_subsumes` catch-all was `TODO: false`, so subsumption was not even
reflexive. Fixed to fall back to decidable equality (`capability_eq_dec`,
kept Opaque) and proved `cap_subsumes_refl` (axiom-free). `cap_subsumes_trans`
documented as a follow-up (needs explicit per-kind analysis).
- `.github/workflows/coq-proofs.yml` — installs Coq 8.18 (pinned ubuntu-24.04)
and runs `coqc WokeLang.v` on every push, so it cannot silently rot again.
- AUDIT.md gains a full Coq section (rot, axioms, coverage vs Lean — Coq is
AHEAD on arrays/well-founded progress, BEHIND on binops — and the
brute-force-preservation quality follow-up). .gitignore for Coq artifacts.
https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Coq formalization
docs/proofs/verification/WokeLang.vclaimed type safety but did not compile under Coq 8.18 — the same "verified-but-never-checked" hazard the Lean file had, because no CI ever ran the prover. This sorts out the rot, audits the file meticulously, fixes a latent bug, and adds the missing gate.The rot (fixed)
Exactly one breakage:
value_eq_decuseddecide equality; … apply list_eq_dec; assumption, but the recursive IH for the nestedlist valueis no longer in scope under 8.18 ("No such assumption"). Fixed with an explicit fixpoint (fix IH 1; …; apply list_eq_dec; exact IH). Everything else — including the largepreservationproof — then compiled clean.Meticulous soundness check
Print Assumptionsonprogress/preservation/type_safety: noAdmitted/admit/Axiom; they depend only onClassicalDedekindReals.sig_forall_dec+functional_extensionality, both pulled in unavoidably by modelling floats as real numbers (R) — exactly as the file header claims.cap_subsumes_reflis even axiom-free ("Closed under the global context").Latent bug fixed
cap_subsumes's catch-all wasTODO: false, so subsumption wasn't even reflexive (cap_subsumes CapProcess CapProcess = false). Fixed to fall back to decidable equality (capability_eq_dec, keptOpaque), and provedcap_subsumes_refl.cap_subsumes_transis documented as a follow-up (needs explicit per-kind analysis; the 6×6×6 automation is brittle).Durability + audit
.github/workflows/coq-proofs.yml— installs Coq 8.18 (pinnedubuntu-24.04, since the file is version-sensitive) and runscoqc WokeLang.von every push. Can't silently rot again.AUDIT.mdgains a full Coq section: rot, axiom honesty, and coverage vs the Lean file — Coq is ahead on arrays (fullT_Array+ array stepping + well-foundedprogressonexpr_size, the exact Tier-1 item still open in Lean) and behind on binops (onlyadd/eq/and). Also flags the brute-forcepreservation("Nuclear option") as a clean-rewrite follow-up..gitignorefor Coq build artifacts.Verification
https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
Generated by Claude Code