Skip to content

docs: Phase B Slice 1 deferral + Phase C scoping (2026-05-28)#198

Merged
hyperpolymath merged 2 commits into
mainfrom
proof/phase-c-l1-multiset-bridge
May 28, 2026
Merged

docs: Phase B Slice 1 deferral + Phase C scoping (2026-05-28)#198
hyperpolymath merged 2 commits into
mainfrom
proof/phase-c-l1-multiset-bridge

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

  • Records the 2026-05-28 investigation finding that Phase B Slice 1 (TEcho linearity wire) is structurally larger than the saved plan implied, and the owner directive to defer until Phase D.
  • Reorients `STATE.a2ml` next_action to Phase C — closure of the two list-vs-multiset structural admits at `formal/Semantics_L1.v:553/621` inside `region_shrink_preserves_typing_l1_gen_m`.
  • No proof changes — `coqc 8.18.0` clean rebuild verified (9/9 .v files `Qed`).

Background — the Phase B Slice 1 deferral

The original Phase B Slice 1 plan was a one-line definitional refinement: add `| TEcho _ => true` to `is_linear_ty` in `formal/Syntax.v`, realising the design intent annotated at `TypingL1.v:T_Observe_L1`.

Investigation 2026-05-28 revealed the wire's true scope:

  • Legacy `Semantics.v` impact: vacuous. `linear_value_is_loc` (Semantics.v:2625) gains a TEcho branch closeable by `inversion Htype; discriminate` because legacy `Typing.v` has zero typing rules producing `TEcho` (grep-verified).
  • L1 impact: structurally non-vacuous. At L1, `EEcho T v` is both a value (`VEcho` in Syntax.v:152) AND typed at `TEcho T` (via `T_Echo_L1` in TypingL1.v:351-354). This refutes the conclusion of `linear_value_is_loc_l1` (Semantics_L1.v:891) — the lemma claims "linear-typed value ⇒ `ELoc` with `TString r`", but `EEcho T v` is a linear-typed value that is neither. The lemma feeds 9 call-sites inside `subst_typing_gen_l1_m` (Semantics_L1.v:1326-1605, `Qed`), which is foundational L1 substitution scaffolding for `preservation_l1`.

Three resolution paths were surfaced (`AskUserQuestion` 2026-05-28):

  1. Disjunctive rewrite + 9-caller updates: structurally correct but adds ~9 forward-looking `Admitted` sites to the L1 substitution chain.
  2. Layered predicate split: introduce `is_linear_ty_l3` keeping legacy `is_linear_ty` alone. Zero legacy touch but adds definitional duplication.
  3. Defer until Phase D: Phase D (L2 effect-typed `TFun`) will reshape the L1 substitution chain anyway. The wire lands naturally once that infrastructure exists.

Owner chose (3) defer — Phase D will create the right shape for the wire to land cleanly without the disjunctive rewrite.

Phase C scoping (this commit)

`STATE.a2ml` next_action now reads: "Phase C — L1 structural list-vs-multiset bridge (1-2 PRs). Closes `Semantics_L1.v` structural admits at ~line 553/621 + 1 outer `Admitted` that depend on them. Bridge predicate choice (rotation vs permutation vs abstract multiset) is the first design decision. Branch: `proof/phase-c-l1-multiset-bridge`."

Mapping verified:

  • Lines 553 + 621: both inside `region_shrink_preserves_typing_l1_gen_m`, T_Region_Active_L1 `rr = r` shadowed case + T_Region_Active_L1_Echo mirror. Phase C scope.
  • Lines 1256 + 1276: in `region_liveness_at_split_l1_gen`, "GENUINELY FALSE at L1" per source comment at 1253 — closes naturally at Phase D's L2 effect-typed TFun. NOT Phase C scope.
  • Line 1694: lambda-rigidity admit inside `preservation_l1`'s outer Admitted. Phase D scope.

Closure of 553 + 621 ⇒ outer `Admitted` at line 653 (`region_shrink_preserves_typing_l1_gen_m`) flips to `Qed`. That makes the value-restricted wrapper at line 666-676 (`region_shrink_preserves_typing_l1`) actually-`Qed` (currently `Qed` only under the outer `Admitted`).

Test plan

  • `coqc 8.18.0` clean rebuild — all 9 .v files `Qed`
  • No proof changes; only PROOF-NEEDS.md row + STATE.a2ml refresh
  • CI: standard governance + scorecard

🤖 Generated with Claude Code

Phase B Slice 1 (TEcho linearity wire) investigated and deferred per
owner directive 2026-05-28:

The intended wire (`is_linear_ty (TEcho _) => true` in Syntax.v) is
structurally non-vacuous at L1. While the legacy `Semantics.v` cascade
is vacuous (no rule produces `TEcho`), at L1 `EEcho T v` is both a
value (`VEcho`) and typed at `TEcho T` (via `T_Echo_L1`,
TypingL1.v:351-354), refuting the conclusion of `linear_value_is_loc_l1`
(Semantics_L1.v:891). The lemma feeds 9 call-sites in the foundational
substitution-chain lemma `subst_typing_gen_l1_m` (Qed at line 1605).

Three resolution options surfaced — disjunctive lemma rewrite, layered
predicate split, defer until Phase D. Owner chose deferral: Phase D's
L2 effect-typed TFun reshapes the L1 substitution chain anyway; the
wire will land naturally once that infrastructure exists.

This commit records the deferral discovery in PROOF-NEEDS.md §"Near-
term (L3 wiring)" as a parked row, and reorients STATE.a2ml's
next_action to Phase C (L1 structural list-vs-multiset bridge at
Semantics_L1.v:553/621). No proof changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) May 28, 2026 08:06
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 67 issues detected

Severity Count
🔴 Critical 10
🟠 High 10
🟡 Medium 47

⚠️ 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

@hyperpolymath
hyperpolymath merged commit 3a22dae into main May 28, 2026
17 checks passed
@hyperpolymath
hyperpolymath deleted the proof/phase-c-l1-multiset-bridge branch May 28, 2026 08:12
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