Skip to content

fix(proofs): repair bit-rotted WokeLang.v (Coq) + meticulous audit + CI gate#82

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/sleepy-carson-bREoV
Jun 14, 2026
Merged

fix(proofs): repair bit-rotted WokeLang.v (Coq) + meticulous audit + CI gate#82
hyperpolymath merged 1 commit into
mainfrom
claude/sleepy-carson-bREoV

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The Coq formalization docs/proofs/verification/WokeLang.v claimed 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_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). Everything else — including the large preservation proof — then compiled clean.

Meticulous soundness check

Print Assumptions on progress / preservation / type_safety: no Admitted/admit/Axiom; they depend only on ClassicalDedekindReals.sig_forall_dec + functional_extensionality, both pulled in unavoidably by modelling floats as real numbers (R) — exactly as the file header claims. cap_subsumes_refl is even axiom-free ("Closed under the global context").

Latent bug fixed

cap_subsumes's catch-all was TODO: false, so subsumption wasn't even reflexive (cap_subsumes CapProcess CapProcess = false). Fixed to fall back to decidable equality (capability_eq_dec, kept Opaque), and proved cap_subsumes_refl. cap_subsumes_trans is 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 (pinned ubuntu-24.04, since the file is version-sensitive) and runs coqc WokeLang.v on every push. Can't silently rot again.
  • AUDIT.md gains a full Coq section: rot, axiom honesty, and coverage vs the Lean file — Coq is ahead on arrays (full T_Array + array stepping + well-founded progress on expr_size, the exact Tier-1 item still open in Lean) and behind on binops (only add/eq/and). Also flags the brute-force preservation ("Nuclear option") as a clean-rewrite follow-up.
  • .gitignore for Coq build artifacts.

Verification

$ coqc docs/proofs/verification/WokeLang.v   # exit 0

https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7


Generated by Claude Code

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
@hyperpolymath hyperpolymath marked this pull request as ready for review June 14, 2026 14:31
@hyperpolymath hyperpolymath merged commit 11ec276 into main Jun 14, 2026
17 of 20 checks passed
@hyperpolymath hyperpolymath deleted the claude/sleepy-carson-bREoV branch June 14, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants