Skip to content

Commit 9520d23

Browse files
proofs: Print Assumptions audit — certify which axioms each layer-keystone surfaces (closes P10/P32) (#270)
## Summary Closes proof-debt P10/P32 from the comprehensive inventory. Adds `Print Assumptions` blocks at the end of `formal/Semantics_L1.v` (9 lemmas) and `formal/TypingL2.v` (6 lemmas) so the build oracle mechanically certifies which axioms each layer-keystone theorem surfaces. ## Findings ### 🎯 Phase 3b Stage 1b ships ZERO-AXIOM Both `subst_typing_gen_l1_m_tfuneff` and `preservation_l2_app_eff_beta_tfuneff` print `Closed under the global context`. The three side conditions (P1 leaf-only + P2 regions ⊆ R_in_v + P3 closed-below-0) make the proof go through without leaning on ANY pre-existing structural admit. Empirical seal on the cleanliness of Stage 1b. ### 🎯 L2 lift is exactly as advertised `preservation_l2_via_l1` surfaces ONLY `preservation_l1` — certifies the "L1-conditional lift" claim in `PROOF-NEEDS.md §1`. ### ⚠️ Soundness-leak alert `preservation_l2_app_eff_beta_linear` AND `subst_typing_gen_l1_m` both transitively depend on `region_liveness_at_split_l1_gen`, which is **provably false as stated** in its residual `[binder = rv]` sub-case (counterexample documented in source at `Semantics_L1.v:1923-1926`). Closure requires Phase D reformulation, not direct proof — this is the leak the `PROOF-NEEDS.md §4` falsity audit calls out. Mechanical capture here means any future Qed silently accruing this axiom can't escape notice. ### ✅ L3 drop-echo is clean `preservation_l3_drop_echo` is zero-axiom; only `region_active_echo` depends on `region_shrink_preserves_typing_l1_gen_m`. ## Full audit results **`Semantics_L1.v` block:** | Lemma | Surfaces | |---|---| | `ground_nonlinear_retype_l1_m` | (none) | | `tfuneff_lambda_retype_l1_m` | (none) | | `subst_typing_gen_l1_m` | `region_liveness_at_split_l1_gen` | | `subst_typing_gen_l1_m_ground_nonlinear` | (none) | | `subst_typing_gen_l1_m_tfuneff` | (none) ⭐ | | `preservation_l1` | `preservation_l1` (self — outer Admitted) | | `preservation_l3_region_active_echo` | `region_shrink_preserves_typing_l1_gen_m` | | `preservation_l3_drop_echo` | (none) | | `preservation_l3` | `region_shrink_preserves_typing_l1_gen_m` | **`TypingL2.v` block:** | Lemma | Surfaces | |---|---| | `weaken_modality` | (none) | | `preservation_l2_via_l1` | `preservation_l1` | | `linear_value_retype_l1_m` | (none) | | `preservation_l2_app_eff_beta_linear` | `region_liveness_at_split_l1_gen` | | `preservation_l2_app_eff_beta_ground_nonlinear` | (none) | | `preservation_l2_app_eff_beta_tfuneff` | (none) ⭐ | ## Test plan - [x] Local Coq build oracle green (`just -f formal/Justfile all`) - [x] Output captured in build log; CI artefacts will preserve it - [x] Zero new admits / axioms / Admitted; pure observation lemmas 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 48d996f commit 9520d23

2 files changed

Lines changed: 92 additions & 0 deletions

File tree

formal/Semantics_L1.v

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,3 +3265,47 @@ Proof.
32653265
- exact preservation_l3_region_active_echo.
32663266
- exact preservation_l3_drop_echo.
32673267
Qed.
3268+
3269+
(* ============================================================
3270+
Print Assumptions audit — L1 + L3 axiom inventory
3271+
============================================================
3272+
3273+
Companion to the L2-side audit at the end of TypingL2.v.
3274+
Closes proof-debt P10/P32: certify exactly which axioms each
3275+
layer-keystone theorem surfaces, mechanically.
3276+
3277+
Expected per the design:
3278+
3279+
- [region_shrink_preserves_typing_l1_gen_m] Admitted at
3280+
:678 → surfaces itself as an axiom (its outer Admitted is
3281+
listed). Once the list-vs-multiset gap closes, this drops.
3282+
3283+
- [region_liveness_at_split_l1_gen] Admitted at :2028 →
3284+
surfaces itself. Provably-false-as-stated in the residual
3285+
[binder = rv] sub-case (counterexample documented in source
3286+
at :1923-:1926); closure requires Phase D reformulation.
3287+
3288+
- [preservation_l1] Admitted at :3133 → surfaces itself plus
3289+
any structural debt its conditional Qed-portion already
3290+
pulls in.
3291+
3292+
- [preservation_l3] / [preservation_l3_region_active_echo] /
3293+
[preservation_l3_drop_echo] surface
3294+
[region_shrink_preserves_typing_l1_gen_m] only (the L1
3295+
structural admit they're conditional on). [drop_echo] is
3296+
additionally expected to be axiom-free (it doesn't traverse
3297+
region-shrink).
3298+
3299+
- [subst_typing_gen_l1_m_tfuneff] (Phase 3b Stage 1b) should
3300+
be zero-axiom under its three side conditions (P1+P2+P3) —
3301+
this is the cleanliness claim of Stage 1b. *)
3302+
3303+
Print Assumptions ground_nonlinear_retype_l1_m.
3304+
Print Assumptions tfuneff_lambda_retype_l1_m.
3305+
Print Assumptions subst_typing_gen_l1_m.
3306+
Print Assumptions subst_typing_gen_l1_m_ground_nonlinear.
3307+
Print Assumptions subst_typing_gen_l1_m_tfuneff.
3308+
Print Assumptions preservation_l1.
3309+
Print Assumptions preservation_l3_region_active_echo.
3310+
Print Assumptions preservation_l3_drop_echo.
3311+
Print Assumptions preservation_l3.

formal/TypingL2.v

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,3 +693,51 @@ Proof.
693693
eapply preservation_l2_app_eff_beta_tfuneff_l1; eassumption.
694694
- exfalso. inversion Hval.
695695
Qed.
696+
697+
(* ============================================================
698+
Print Assumptions audit — L2 lift honest-ness seal
699+
============================================================
700+
701+
Closes proof-debt P10/P32 (per the PROOF-NEEDS.md inventory):
702+
formally certify which axioms / Admitted lemmas surface through
703+
each L2 β-case and the lift theorem. Without this audit, the
704+
"L2 lift is honest" claim in PROOF-NEEDS.md §1 ("conditional on
705+
preservation_l1") is unverified — `Print Assumptions` is the
706+
build oracle for that claim.
707+
708+
Expected (per the design):
709+
710+
- [preservation_l2_via_l1] surfaces [preservation_l1] only.
711+
This is the canonical L1-conditional lift; no other axioms.
712+
713+
- [preservation_l2_app_eff_beta_linear] surfaces structural
714+
L1 admits via [subst_typing_gen_l1_m] +
715+
[region_shrink_preserves_typing_l1_gen_m].
716+
717+
- [preservation_l2_app_eff_beta_ground_nonlinear] surfaces
718+
[ground_nonlinear_retype_l1_m] + structural L1 admits.
719+
720+
- [preservation_l2_app_eff_beta_tfuneff] surfaces Phase 3b
721+
Stage 1b machinery + the three side conditions (P1 leaf-only,
722+
P2 regions ⊆ R_in_v, P3 closed-below-0) + structural L1
723+
admits.
724+
725+
- [weaken_modality] zero axioms.
726+
727+
- [linear_to_affine] (TypingL1.v) zero axioms.
728+
729+
Verifying these mechanically means a future Qed silently
730+
accruing an undocumented Axiom (the historical anti-pattern
731+
that produced the legacy [region_liveness_at_split_l1] axiom)
732+
would be caught at the next [Print Assumptions] re-run.
733+
734+
Build-oracle conformance: `just -f formal/Justfile all` prints
735+
these blocks at compile time; CI (coq-build.yml) preserves
736+
them in the artefacts. *)
737+
738+
Print Assumptions weaken_modality.
739+
Print Assumptions preservation_l2_via_l1.
740+
Print Assumptions linear_value_retype_l1_m.
741+
Print Assumptions preservation_l2_app_eff_beta_linear.
742+
Print Assumptions preservation_l2_app_eff_beta_ground_nonlinear.
743+
Print Assumptions preservation_l2_app_eff_beta_tfuneff.

0 commit comments

Comments
 (0)