Skip to content

proof(L3): preservation_l3 capstone — slice 4 (closes L3 wiring)#196

Merged
hyperpolymath merged 1 commit into
mainfrom
proof/preservation-l3-capstone
May 27, 2026
Merged

proof(L3): preservation_l3 capstone — slice 4 (closes L3 wiring)#196
hyperpolymath merged 1 commit into
mainfrom
proof/preservation-l3-capstone

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

L3 wiring slice 4 — capstone. Per-layer preservation theorem for the two L3-specific echo-emitting step rules paired with their matching L3 typing rules. Closes the L3 wiring task in PROOF-NEEDS.md §2.

What's new

Three new Qed in formal/Semantics_L1.v:

Lemma What it proves
preservation_l3_region_active_echo (T_Region_Active_L1_Echo, S_Region_Exit_Echo) pair preserves typing at TEcho T
preservation_l3_drop_echo (T_Drop_L1_Echo, S_Drop_Echo) pair preserves typing at TEcho T
preservation_l3 (umbrella) Conjunction of the two — Qed by split; exact …

Per-case alignment is forced by T_Echo_L1's witness-type premise. The step rules are universally quantified over T (non-deterministic at the relation level); the typing derivation pins which T is in play. Non-deterministic crossover cases (e.g. legacy T_Region_Active_L1 + L3 S_Region_Exit_Echo) are non-preserving by design — not covered by this theorem and not well-typed at the umbrella's TEcho T output.

Seam audit (every admit/axiom classified)

The user asked to "make sure that all the seams and gaps are checked and secure." Two outcomes:

1. One avoidable parallel-rule admit closed

region_shrink_preserves_typing_l1_gen_m's T_Region_L1_Echo case admit (was a mirror of a fully-closed original) is now Qed-style — count-monotonicity for the shadowed sub-case, remove_first commutation for the descend sub-case. Same treatment for the descend sub-case of T_Region_Active_L1_Echo. Net debt: -1 internal admit.

2. Every remaining admit classified in PROOF-NEEDS.md §4

After this PR, the complete admit/axiom inventory of formal/*.v:

Location Class
Semantics_L1.v:553 (admit.) Pre-existing L1 structural (T_Region_Active_L1 shadowed)
Semantics_L1.v:621 (admit.) True parallel mirror of :553
Semantics_L1.v:653 (Admitted.) Outer marker over :553 + :621
Semantics_L1.v:1256 (admit.) Pre-existing L1 structural (T_Region_Active_L1 r = rv)
Semantics_L1.v:1276 (admit.) True parallel mirror of :1256
Semantics_L1.v:1290 (Admitted.) Outer marker over :1256 + :1276
Semantics_L1.v:1694 (admit.) Pre-existing — preservation_l1 lambda-rigidity gap
Semantics_L1.v:1695 (Admitted.) Outer marker over :1694
Semantics.v:9257 (Admitted.) 🛑 Sacrosanct (provably false per Counterexample.v)

Zero Axiom declarations. TypingL1.v / Modality.v / Echo.v / Counterexample.v / TypingL2.v are all admit-free.

Per CLAUDE.md owner directive 2026-05-27

  • ✅ Zero new Admitted. or Axiom. declarations
  • ✅ No legacy Semantics.v patching
  • ✅ No cross-layer reasoning to close L1 admits
  • ✅ Re-uses pre-existing infrastructure only (value_R_G_preserving_l1 Qed + region_shrink_preserves_typing_l1_gen_m conditional)
  • ✅ Cross-layer dependency on L1 structural admit annotated per PRESERVATION-DESIGN.md §5.1

Build oracle

coqc 8.18.0 clean rebuild of all 9 .v files in dependency order: PASS.

Test plan

  • Slice 4 lemmas compile with zero warnings
  • All 9 formal/*.v files compile (coqc -R . Ephapax)
  • Zero new admit. or Admitted. introduced (verified via grep)
  • One avoidable parallel-rule admit closed (line 574 was; gone now)
  • Commit GPG-signed (G per git log --format=%G?)
  • CI green
  • Owner review

🤖 Generated with Claude Code

Per-layer preservation theorem for the two L3-specific
echo-emitting step rules (S_Region_Exit_Echo / S_Drop_Echo)
paired with their matching L3 typing rules
(T_Region_Active_L1_Echo / T_Drop_L1_Echo + T_Echo_L1).

Three new Qed in formal/Semantics_L1.v:
  - preservation_l3_region_active_echo
      For (T_Region_Active_L1_Echo, S_Region_Exit_Echo) pair:
      value_R_G_preserving_l1 pins body output context, then
      region_shrink_preserves_typing_l1_gen_m + T_Echo_L1 close.
  - preservation_l3_drop_echo
      For (T_Drop_L1_Echo, S_Drop_Echo) pair: value invariance
      (VLoc) + T_Echo_L1 directly.
  - preservation_l3 (umbrella)
      Conjunction of the two per-case lemmas. Each conjunct
      corresponds to one (L3 typing rule, L3 step rule) matched
      pair. Per-case alignment forced by T_Echo_L1's witness-
      type premise — non-deterministic crossover cases are
      non-preserving by design (typing derivation pins the path).

Seam audit + slice-4 tightening (no new debt, one debt closed):

  - region_shrink_preserves_typing_l1_gen_m: tightened from 3
    internal admits to 2. The avoidable T_Region_L1_Echo case
    (parallel mirror of a fully-closed T_Region_L1 case) is now
    Qed-style via count-monotonicity (shadowed sub-case) +
    remove_first commutation (descend sub-case). The descend
    sub-case of T_Region_Active_L1_Echo is also Qed-style now —
    only the shadowed sub-case remains as a true parallel mirror
    of the pre-existing T_Region_Active_L1 list-vs-multiset
    structural admit at line 553.

  - All 5 remaining internal admit. cases classified:
      Pre-existing L1 structural: lines 553, 1256, 1694
      True parallel mirrors:      lines 621, 1276
      (mirrors close when originals close — same structural debt)

  - All 3 outer Admitted. markers track the internal admit set;
    no new outer Admitted introduced.

  - Semantics.v's legacy preservation Admitted. is sacrosanct
    (provably false per Counterexample.v) and untouched.

Per CLAUDE.md owner directive 2026-05-27:
  ✓ Zero new Admitted. or Axiom. declarations
  ✓ No legacy Semantics.v patching
  ✓ No cross-layer reasoning to close L1 admits
  ✓ Re-uses pre-existing infrastructure only

PROOF-NEEDS.md updates:
  - §2 L3 wiring row marked ✅ done with full disposition
  - §1 Linear-mode forward progress count 23 → 26 Qed
  - §4 file-by-file table updated
  - NEW §4 "Seam audit (slice 4, 2026-05-27)" subsection
    classifies every admit/axiom in formal/*.v explicitly

Build status: full clean rebuild (coqc 8.18.0) passes for all
9 .v files in dependency order — Syntax, Typing, Modality,
TypingL1, Semantics, Echo, Semantics_L1, Counterexample,
TypingL2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) May 27, 2026 20:53
@hyperpolymath
hyperpolymath merged commit 8747d89 into main May 27, 2026
6 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the proof/preservation-l3-capstone branch May 27, 2026 21:37
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 51 issues detected

Severity Count
🔴 Critical 9
🟠 High 9
🟡 Medium 33

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in abi-verify.yml",
    "type": "unknown",
    "file": "abi-verify.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in boj-build.yml",
    "type": "unknown",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "unknown",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in governance.yml",
    "type": "unknown",
    "file": "governance.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in hypatia-scan.yml",
    "type": "unknown",
    "file": "hypatia-scan.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in instant-sync.yml",
    "type": "unknown",
    "file": "instant-sync.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in mirror.yml",
    "type": "unknown",
    "file": "mirror.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in rust-ci.yml",
    "type": "unknown",
    "file": "rust-ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in rust-ci.yml",
    "type": "unknown",
    "file": "rust-ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in scorecard-enforcer.yml",
    "type": "unknown",
    "file": "scorecard-enforcer.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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