docs(proof-debt): seed docs/proof-debt.md per standards#203 schema#41
Merged
Conversation
Per the estate-wide Trusted-Base Reduction Policy (standards#203, filled in by standards#222), seed `docs/proof-debt.md` for betlang following the canonical schema. Classifications: - §(d) DEBT: `axiom substTop_preserves_typing` at proofs/BetLang.lean:392 — standard TAPL Ch.9 substitution-preservation lemma. NOT §(c) NECESSARY because the property is constructively provable in Lean 4; the axiom only exists because a full de Bruijn substitution calculus would "triple the file size" per the inline doc-comment (a cost judgement, not a necessity judgement). Discharge plan inlined from the PR #27 body (~300-400 LoC standard TAPL mechanisation). - Comment-skip false positives (proofs/BetLang.lean:19, :387, :388): documented at the top of docs/proof-debt.md but require no further action. The check-trusted-base.sh `is_comment_line` heuristic strips the line-19 case but not :387/:388 (they are continuation lines of a `/-- ... -/` block, not `--`-prefixed); coverage is via path enumeration in docs/proof-debt.md. Adds an inline `-- AXIOM: substTop_preserves_typing — disposition §(d) DEBT` comment 5 lines preceding the axiom so the check-trusted-base.sh gate (standards#211) flips from a naked-marker error to documented. Verified locally: $ bash /path/to/standards/scripts/check-trusted-base.sh . [OK] All 3 escape hatch(es) are documented. Refs hyperpolymath/standards#203 Refs hyperpolymath/standards#211 Refs hyperpolymath/standards#222 Refs #23 Refs #27 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
auto-merge was automatically disabled
May 27, 2026 11:11
Pull request was closed
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.
Per-repo proof-debt triage for
betlang, applying the estate-wideTrusted-Base Reduction Policy that landed at
standards#203 and
was filled in by
standards#222.
The detection gate is
scripts/check-trusted-base.sh(standards#211).
What this PR does
docs/proof-debt.mdmatching the schema-conformant per-repoform (the same shape as
standards/docs/proof-debt.md@standards#213).
proofs/BetLang.lean(theaxiom substTop_preserves_typingat L392) under §(d) DEBT, witha full discharge recipe inlined from the body of
PR #27.
at the top of
docs/proof-debt.mdas a marker-count table.-- AXIOM: substTop_preserves_typing — disposition §(d) DEBT ...annotation 5 lines preceding the axiom so thecheck-trusted-base.shgate flips from naked-marker to documented.Classification rationale
substTop_preserves_typingis §(d) DEBT, not §(c) NECESSARY AXIOM:TAPL Ch.9). It is constructively provable in Lean 4 by induction on
the typing derivation, factored through a generalised
substAt_preserves_typingplus threeCtx.insertAtlookup lemmas.choice, no UIP, no propositional truncation).
calculus would, per the inline doc-comment, "triple the file size" —
a cost judgement (which §(d) DEBT captures) not a necessity
judgement (which §(c) would capture).
(
proofs/discharge-substTop-axiom-23, commit8fa128d); thesix-step discharge recipe is inlined verbatim in the new
docs/proof-debt.mdfrom the body of merged PR#27.
closed optimistically when PR WIP: discharge substTop_preserves_typing axiom (Refs #23) #27 merged the build-fix half of the
work; the axiom itself remained in source. The new §(d) entry
records "INDEFINITE" as the deadline pending re-open.
Verification
Locally:
(The "3" reflects the post-comment-skip count from the script's
is_comment_lineheuristic: L19 is line-comment-skipped, L387 + L388survive as continuation lines of a
/-- ... -/block, L392 is thereal declaration. All three are covered by
docs/proof-debt.md'spath enumeration plus the inline
AXIOM:annotation within 5 lines.)References
Test plan
bash scripts/check-trusted-base.sh .exits 0 on this branch (verified locally)trusted-basejob (when wired) reports[OK]on the merged mainCo-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code