Skip to content

Proof debt/standards 134 coq preservation admit#108

Closed
hyperpolymath wants to merge 2 commits into
mainfrom
proof-debt/standards-134-coq-preservation-admit
Closed

Proof debt/standards 134 coq preservation admit#108
hyperpolymath wants to merge 2 commits into
mainfrom
proof-debt/standards-134-coq-preservation-admit

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

No description provided.

…Refs standards#134)

`formal/Semantics.v` carries `Qed.` for `preservation` at L3327 with an
in-file comment claiming the proof was "FULLY CLOSED (2026-04-27). Zero
Admitted." That comment is unsubstantiated — `coqc` (8.18.0) rejects the
proof script with:

    Error: (in proof preservation): Attempt to save an incomplete proof
    (there are remaining open goals).

Consequence: `rust-ci.yml`'s "Coq proofs" job has been failing on every
push to main (3 most-recent runs on main all `conclusion: failure`,
back to 2026-05-19), and PR #87 transitively propagated the bogus
"Qed, closed 2026-04-27" claim from the comment into ROADMAP and
PROOF-NEEDS.

This change marks `preservation` as `Admitted.` so the formalisation
builds and the documentation accurately reflects proof state:

- `formal/Semantics.v` — `Qed.` → `Admitted.` on `preservation`;
  in-file comment rewritten honestly (the supporting lemmas
  `region_env_perm_typing`, `region_add_typing`,
  `region_shrink_preserves_typing` remain Qed).
- `ROADMAP.adoc` — Coq status row + "v0.1.0 close `preservation`"
  checkbox both flipped to reflect `Admitted`; admitted-proofs counter
  0 → 1.
- `PROOF-NEEDS.md` — "current state" row + admitted counter corrected;
  "what needs proving" now lists `preservation` as the top item with a
  precise pointer to L3215–L3326 of the proof script; the prior
  reconciliation note rewritten to record the propagated-lie failure
  mode honestly; priority raised MEDIUM → MEDIUM-HIGH.

Verified locally on Coq 8.18.0:
  cd formal && coq_makefile -f _CoqProject -o Makefile.coq && make -f Makefile.coq
  → exit 0; Syntax.vo + Typing.vo + Semantics.vo all produced.

Refs standards#134 (NOT Closes — joint-close on agreement; #134 also has
ephapax#88 open for the 14 SPDX headers, which is independent of this).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
The companion change to the `Qed.` → `Admitted.` honesty fix.

Running `Show. Show Existentials.` immediately before the `Admitted.`
reveals that the proof script leaves **910 goals open**, which is
exactly **35 (step rules) × 26 (typing rules) = 910** — the *full
combinatorial after `induction Hstep; inversion Htype; subst;`*. The
chain of `try solve [...]` tactics in `Semantics.v` L3228–L3326
closes **zero** of them.

This contradicts the in-file comment block at L3269–L3296 which
claims "only ONE case remains open: S_Region_Step + T_Region_Active."
That comment was either always optimistic, or captured a transient
earlier state that silently regressed (no CI gate caught it because
the Coq job has been failing for ≥3 runs — see ephapax#92's parent
issue).

`formal/PRESERVATION-HANDOFF.md` records:

- How the diagnostic was produced (`Show.` recipe + restore step).
- The exact open-goal count (910) and combinatorial decomposition
  (35 × 26).
- Why the existing `try solve` chain fails (cross-case
  `discriminate` has no equation after `inversion Htype; subst`;
  diagonal-case `eassumption` rarely matches because the IH gives
  body typing but the constructor needs step-result typing).
- A realistic remediation plan (move `remember` out of `try (...)`;
  rewrite cross-case closure arm-by-arm; write per-step-rule
  diagonal proofs; the `S_Region_Step + T_Region_Active` case may
  need a region-env *weakening* lemma which does not yet exist).
- Effort estimate: days–weeks, not "one more tactic."
- Anti-patterns to avoid (mass-`Admitted.` per case; replacing
  `induction` with `inversion`).
- The checklist for unwinding the honest-mark when `preservation`
  is finally closed.

The supporting lemmas needed already exist (`subst_preserves_typing`,
`region_env_perm_typing`, `region_add_typing`,
`region_shrink_preserves_typing`, `values_dont_step`) — they all
have Qed. The missing piece is the glue + a region-env weakening
lemma for non-values.

Refs standards#134.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@hyperpolymath
Copy link
Copy Markdown
Owner Author

Superseded by the live preservation chain: #92 (Admitted), #102 (910 → 29 goals via remember-cfg), #104 (docs correction), and the in-flight #106 (29 → 22 via universal-IH revert). The PRESERVATION-HANDOFF.md from this PR's commit fc0f58f was already landed via the #102 cherry-pick. Closing as fully superseded.

@hyperpolymath hyperpolymath deleted the proof-debt/standards-134-coq-preservation-admit branch May 21, 2026 06:54
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.

1 participant