Skip to content

docs(coq): correct stale "only ONE case" claim in preservation PROOF STATUS#104

Merged
hyperpolymath merged 2 commits into
mainfrom
proof-debt/ephapax-preservation-status-accuracy
May 20, 2026
Merged

docs(coq): correct stale "only ONE case" claim in preservation PROOF STATUS#104
hyperpolymath merged 2 commits into
mainfrom
proof-debt/ephapax-preservation-status-accuracy

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Docs-only correction to the PROOF STATUS [preservation] comment in formal/Semantics.v (lines 3328+). PR #92 honestly marked preservation Admitted. after coqc rejected the Qed., but the earlier in-file comment at line 3269 continued to claim "Only ONE case remains open: S_Region_Step + T_Region_Active" — that's the language-design bottleneck, not the actual goal count.

Diagnostic

# Replace `Admitted.` with `Qed.` at line 3327; insert before it:
#   all: match goal with |- ?G => idtac G end.
$ coqc -Q . Ephapax Semantics.v 2>&1 | grep '^REMAINING' | wc -l
40

40 goals remain open across many type-shape variants:

exists G_out, R'; G  |- e' : T0           -| G_out   (many)
exists G_out, R'; G  |- e' : TBase TUnit  -| G_out
exists G_out, R'; G  |- e' : TBase TBool  -| G_out
exists G_out, R'; G  |- e' : TBase TI32   -| G_out
exists G_out, R'; G0 |- e' : TString r0   -| G_out
exists G_out, R'; G0 |- e' : TFun  T1 T2  -| G_out
exists G_out, R'; G0 |- e' : TProd T1 T2  -| G_out
exists G_out, R'; G0 |- e' : TSum  T1 T2  -| G_out
exists G_out, R'; G0 |- e' : TBorrow T    -| G_out
exists G_out, R'; G0 |- e' : TProd T T    -| G_out

Root cause

These are mostly congruence-case failures, not the documented S_Region_Step language-design item. The proof script's IH-application pattern picks ANY has_type hypothesis in scope:

match goal with
| [ IH : forall _ _ _, _ -> exists _, _ |- _ ] =>
  match goal with
  | [ H : has_type _ _ _ _ _ |- _ ] =>
      destruct (IH _ _ _ H) ...

With multiple inversion-introduced has_types (one per typing premise of each compound expression), it often picks the wrong one. eassumption then fails silently inside try solve [...].

What this PR does

Updates the PROOF STATUS comment block at line 3328+ to:

  • Quote the ~40 goal count
  • List the type-shape variants
  • Explain why the existing try solve [...] scaffolding fails (pattern picks wrong has_type)
  • Document that closing these goals is multi-day proof engineering, separate from the S_Region_Step language-design item

No proof change. Admitted. remains; Qed.-proven supporting lemmas are still Qed..

Verification

$ coqc -Q . Ephapax Semantics.v
(builds clean, ~1 minute)

Refs

  • ephapax#92 (honest framing of preservation Admitted)
  • standards#124 (proof-debt audit epic)

Test plan

  • coqc -Q . Ephapax Semantics.v builds clean
  • No proof tactic changed; only the comment block at lines 3328+
  • CI green

🤖 Generated with Claude Code

hyperpolymath and others added 2 commits May 20, 2026 19:51
…STATUS

PR ephapax#92 honestly marked the preservation theorem `Admitted.`
after `coqc` rejected the `Qed.` for "remaining open goals". The
in-file comment at line 3269+ continued to claim "Only ONE case
remains open: S_Region_Step + T_Region_Active" — which is the
*language-design* bottleneck, but is NOT the actual goal count.

Diagnostic build (2026-05-20):

  $ # Replace `Admitted.` with `Qed.`, insert before it:
  $ #   all: match goal with |- ?G => idtac G end.
  $ coqc -Q . Ephapax Semantics.v 2>&1 | grep '^REMAINING' | wc -l
  40

~40 goals remain open across many type-shape variants:

    TBase TUnit, TBase TBool, TBase TI32, T0, TString, TFun,
    TProd, TSum, TBorrow, TProd T T, …

These are mostly congruence-case failures, not the documented
S_Region_Step language-design item. The proof script's
IH-application pattern picks ANY `has_type` hypothesis in scope:

    match goal with
    | [ IH : forall _ _ _, _ -> exists _, _ |- _ ] =>
      match goal with
      | [ H : has_type _ _ _ _ _ |- _ ] => destruct (IH _ _ _ H) ...

With multiple inversion-introduced has_types in scope (one per
typing premise of each compound expression), it often picks the
wrong one, and the subsequent `eassumption` fails silently inside
`try solve [...]`.

Closing the additional ~40 goals is multi-day proof engineering:
each step-constructor's congruence case needs its IH applied to
the specific inner-expression typing (not just any has_type), then
the outer typing reconstructed by the matching typing constructor.

This commit just corrects the PROOF STATUS comment to reflect that
quantitative reality. No proof change.

Refs ephapax#92, standards#124.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the quantitative correction in the previous commit
(in-file PROOF STATUS comment in Semantics.v) over to PROOF-NEEDS.md.

The "Close the remaining open goals" bullet now states the count
explicitly (~40), lists the ten type-shape variants from the
diagnostic build, and characterises the work as multi-day proof
engineering rather than a one-PR fix.

Refs ephapax#92, standards#124.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 95868b9 into main May 20, 2026
0 of 8 checks passed
@hyperpolymath hyperpolymath deleted the proof-debt/ephapax-preservation-status-accuracy branch May 20, 2026 18:57
hyperpolymath added a commit that referenced this pull request May 21, 2026
…122)

Closure sweep after PR #116 took preservation from 22 → 12 open goals
and PR #121 landed Phase 1 scaffold. Updates the preservation-count
claims across docs to reflect 12, and adds a CHANGELOG entry summarising
the full 2026-05-20 → 2026-05-21 reduction campaign.

## Files updated

| File | What changed |
|---|---|
| `README.adoc` | Coq formal-foundations paragraph; reduction chain now
lists all 8 PRs through #121; clear pointer to ROADMAP closure plan |
| `ROADMAP.adoc` | Formal-proof status table row (`12 open goals`); v0.1
blocker entry; v1.0 status; 97.6% → 98.7% reduction figure |
| `EXPLAINME.adoc` | Coq theorem table; reduction-story bullets extended
through #114, #116, #121 |
| `CHANGELOG.md` | New "Proof state" + "Documentation" sections under
`[Unreleased]` tracking the full PR chain (#92, #102, #104, #106, #114,
#115, #116, #117, #121) + the Idris2 totality campaign (#89#100) +
doc/wiki refresh (#113 + wiki) |

## Companion wiki update

`Home.md`, `Proof-status.md`, `What-can-go-wrong.md` updated in the wiki
repo with the same 22 → 12 figures + extended reduction story. Pushed
separately to wiki master.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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