Skip to content

proof(idris2): tighten Ephapax.Affine.Emit to %default total - #100

Merged
hyperpolymath merged 1 commit into
mainfrom
proof-debt/ephapax-emit-totality
May 20, 2026
Merged

proof(idris2): tighten Ephapax.Affine.Emit to %default total#100
hyperpolymath merged 1 commit into
mainfrom
proof-debt/ephapax-emit-totality

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Ninth and final file in the ephapax %default partial → totality-tightening campaign. After this lands together with the rest, no %default partial remains anywhere in ephapax/idris2/src/Ephapax/.

The file is a one-line wrapper:

emitModule: Module -> String
emitModule = encode

Its totality is exactly Ephapax.IR.Decode.encode's. On the chain's exit state (with PR #96 merged), encode is covering — the show . toSExpr pipeline inherits covering from Decode's recursive encode/decode functions (justified in #96's body).

Mark emitModulecovering to match. Flip file default %default partial → %default total. The covering modifier on the one defined function is the entirety of the "escape" footprint — explicit, narrow, justified.

No assert_total / believe_me.

Verification

$ IDRIS2_PREFIX=…/idris2/0.8.0 idris2 --check Ephapax/Affine/Emit.idr
1/4: Building Ephapax.IR.SExpr
2/4: Building Ephapax.IR.AST
3/4: Building Ephapax.IR.Decode
4/4: Building Ephapax.Affine.Emit

Refs — the full campaign

  • #124 (proof-debt audit epic)
  • #134 (ephapax totality sub-issue)
#FilePRAnnotation outcome
1IR/SExpr.idr#89%default total, fueled mutual parser
2Parse/Stream.idr#90%default total, fueled remaining/build
3Parse/Util.idr#91%default total, fueled many + sepBy.sepTail
4Parse/Lexer.idr#93%default total, fueled lex.go (57 call sites)
5IR/AST.idr#94%default total + 6 retained covering (showPrec/(/=) loop)
6IR/Decode.idr#96%default total + 7 covering (map/traverse SCT limit)
7Affine/Typecheck.idr#97%default total + pre-existing baseline-rot layout fix
8Parse/Parser.idr#99%default covering (LL(k) Stream-recursion, ~30 fns, large refactor deferred)
9Affine/Emit.idrthis%default total + 1 covering (inherits from Decode.encode)

Test plan

  • idris2 --check Ephapax/Affine/Emit.idr builds green under %default total
  • CI green
  • No assert_* / believe_me; only covering on emitModule (matches dependency)

🤖 Generated with Claude Code

One-line wrapper: emitModule = encode. Totality of emitModule is
exactly the totality of Ephapax.IR.Decode.encode.
On the chain's exit state (with PR #96 merged), encode is `covering`
(the show . toSExpr pipeline inherits covering from Decode's
recursive encode/decode functions -- justified in the #96 PR body).
Mark emitModule `covering` to match. No assert_total / believe_me.
Flip file default: %default partial -> %default total. The covering
modifier on the one defined function is the entirety of the
"escape" footprint -- explicit, narrow, justified.
Refs #124 (proof-debt epic), #134 (ephapax totality)
**This is the 9th and final file in the ephapax %default partial ->
totality-tightening campaign.** Companions: SExpr #89, Stream #90,
Util #91, Lexer #93, AST #94, Decode #96, Typecheck #97, Parser #99,
Emit here. After all 9 land, no `%default partial` remains in
ephapax/idris2/src/Ephapax/.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath marked this pull request as ready for review May 20, 2026 17:59
@hyperpolymath
hyperpolymath merged commit dc46d93 into mainMay 20, 2026
0 of 8 checks passed
@hyperpolymath
hyperpolymath deleted the proof-debt/ephapax-emit-totality branch May 20, 2026 17:59
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 freeto 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

@hyperpolymath