Skip to content

Commit 390cebb

Browse files
proof(Path-3 prototype): same-left joint-bplus rank-mono extension (#167)
## Summary Mechanises the **Path-3 alternative** identified in PR #166's closing note: enrich the SOURCE RULE rather than the rank function. New module \`Ordinal.Buchholz.RankMonoSameLeft\` introduces a \`<ᵇ⁰\`-grounded same-left joint-bplus constructor and closes its rank-pow obligation in **one line**, bypassing the rank-lex-jb pivot's first-eq derivation entirely for the same-literal-left sub-case. Zero postulates, \`--safe --without-K\`, no funext. ## The structural insight tested PR #166's closing note flagged Path-3 as a possible reframing: > The source rule may need enrichment, not the rank function. > For a valid \`<ᵇ-+1\`-at-equal-head derivation under WfCNF, rank-mono soundness *requires* tail-rank-strict. Path-3 alternative: enrich the source side instead — promote \`_<ᵇ_\` to carry a \`<ᵇ⁺-+2\`-style same-left constructor with both head-eq and tail-strict premises baked in. This PR mechanises that intuition concretely. **Result: WORKS.** ## Headlines | Name | Role | |---|---| | \`_<ᵇ⁺²_\` | Extended relation: \`<ᵇ⁺²-from-<ᵇ⁰\` embeds 10 closed cases + \`<ᵇ⁺²-same-left\` adds the source-rule enrichment | | \`rank-pow-mono-<ᵇ⁺²\` | Two-case structural recursion: each case ONE LINE | | \`rank-pow-mono-same-left\` | Direct lemma showing the same-left case without routing through embedding | ## Path-3 vs rank-lex-jb (complementary, not subsuming) | Sub-case | Path | Closure | |---|---|---| | Same LITERAL left (\`bplus x s\` vs \`bplus x t\`) | **Path-3 (this PR)** | One-line via \`rank-pow-bplus-right-mono\` | | Same head-Ω, different left syntax (\`bpsi ν α\` vs \`bOmega ν\`) | rank-lex-jb (#147+#165+#166) | Multi-step: leftmost-α + first-eq + \`<lex-second\` | The same-left case is UNREACHABLE in K-free \`_<ᵇ_\` (would require \`<ᵇ-irrefl\` violation via \`<ᵇ-+1 (x <ᵇ x)\`); reachable only in the extended \`_<ᵇ⁺_\` of \`Ordinal.Buchholz.OrderExtended\` via \`<ᵇ⁺-+2\`. This prototype narrows the tail premise to \`_<ᵇ⁰_\` to keep the closure inductively grounded. The K-restriction does NOT bite at constructor formation (only at pattern-match elimination), so the same-binder \`<ᵇ⁺²-same-left\` constructor is fine under \`--safe --without-K\`. ## Honest scope - Does NOT prove well-foundedness of \`_<ᵇ⁺²_\` — separate from rank-mono; would need a Brouwer-rank embedding (the rank function here provides the seed). - Does NOT subsume rank-lex-jb for the cross-head case — Path-3 and rank-lex-jb are complementary. - Does NOT extend the tail premise to \`_<ᵇ¹_\` — composes mechanically via \`rank-pow-mono-<ᵇ¹\` but kept out of the prototype for minimality. - Does NOT wrap in WfCNF endpoints (à la \`_<ᵇ⁻ⁿ_\` from Slice 4) — left for downstream consumers. ## Implication confirmed PR #166's #3 implication holds mechanically: enriching the source rule is structurally simpler than the rank-function enrichment for this scenario. The one-line closure here contrasts with the multi-PR rank-lex-jb assembly chain. This suggests the **future bplus-chain rank-mono umbrella may want to be designed as a UNION of source-rule extensions** (Path-3 style for cleanly-decomposable cases) rather than a single enriched rank function (rank-lex-jb style for cross-head cases). ## Local verification - \`agda -i proofs/agda proofs/agda/Ordinal/Buchholz/RankMonoSameLeft.agda\` — clean. - \`agda -i proofs/agda proofs/agda/Ordinal/Buchholz/Smoke.agda\` — clean, exit 0. - \`agda -i proofs/agda proofs/agda/Smoke.agda\` — clean, exit 0. - \`agda -i proofs/agda proofs/agda/All.agda\` — clean, exit 0. - \`bash tools/check-guardrails.sh proofs/agda\` — **161 modules** pass (one new). - \`sh scripts/kernel-guard.sh\` — PASS. Five new names pinned in \`Ordinal/Buchholz/Smoke.agda\` under a new \`RankMonoSameLeft\` \`using\` block. ## Test plan - [x] Module typechecks under \`--safe --without-K\` with zero postulates. - [x] Full suite + Smoke remain green with the new module wired in. - [x] Foundation guardrail + kernel-guard pass with 161 modules. - [ ] CI: \`check\` + \`cold-check\` + governance lanes green. - [ ] Auto-merge on green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 930000b commit 390cebb

3 files changed

Lines changed: 191 additions & 0 deletions

File tree

proofs/agda/All.agda

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ open import Ordinal.Buchholz.RankPowSlice3Headline
149149
open import Ordinal.Buchholz.RankMonoUmbrella
150150
open import Ordinal.Buchholz.RankMonoUmbrellaSlice3
151151
open import Ordinal.Buchholz.RankMonoUmbrellaSlice4
152+
open import Ordinal.Buchholz.RankMonoSameLeft
152153
open import Ordinal.Buchholz.RecursiveSurfaceOrder
153154
open import Ordinal.Buchholz.RecursiveSurfaceBudget
154155
open import Ordinal.Buchholz.SurfaceOrder
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{-# OPTIONS --safe --without-K #-}
2+
-- SPDX-License-Identifier: MPL-2.0
3+
-- SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+
-- Path-3 PROTOTYPE — same-left joint-bplus extension (2026-05-30).
6+
--
7+
-- ## Context
8+
--
9+
-- Slice 3+4 Route A's rank-lex-jb pivot (PRs #147 / #165 / #166)
10+
-- attacks the joint-bplus `<ᵇ-+1`-at-equal-head case by enriching
11+
-- the RANK FUNCTION (carrying `leftmost-α` as a second component)
12+
-- to discriminate where rank-pow alone collapses. The (a)+(b)+(c)
13+
-- assembly identified a key insight in PR #166's note: the
14+
-- consumer-side first-eq derivation reduces to TAIL-RANK-EQUALITY
15+
-- under WfCNF (`first-eq-from-bpsi-source-at-equal-head`), and the
16+
-- same residual obligation also gates the ψ-rank-level closure
17+
-- (`RankLexSlice3.rank-adm-bpsi-strict-at-equality`).
18+
--
19+
-- ## Path-3 ALTERNATIVE — enrich the SOURCE rule, not the rank
20+
--
21+
-- The K-free `_<ᵇ_`'s `<ᵇ-+1` constructor carries only `x₁ <ᵇ y₁`
22+
-- as premise; nothing on `x₂ vs y₂`. For the same-LITERAL-left
23+
-- sub-case (`bplus x y₂ <ᵇ bplus x z₂` when `y₂ <ᵇ z₂`),
24+
-- `<ᵇ-irrefl` makes the only viable `<ᵇ-+1` instantiation
25+
-- (`x <ᵇ x`) impossible — so this case is UNREACHABLE in K-free
26+
-- `_<ᵇ_`. The extended `_<ᵇ⁺_` of `Ordinal.Buchholz.OrderExtended`
27+
-- adds `<ᵇ⁺-+2 : x₁ ≡ y₁ → x₂ <ᵇ y₂ → bplus x₁ x₂ <ᵇ⁺ bplus y₁ y₂`
28+
-- to fill this gap (mod a K-elimination on the shared `x₁ ≡ y₁`).
29+
--
30+
-- This PROTOTYPE narrows the extended `<ᵇ⁺-+2` to `<ᵇ⁰` on the
31+
-- tail premise (the closed 10-constructor umbrella), then shows
32+
-- rank-pow closure FOR THE SAME-LEFT JOINT-BPLUS CASE WITHOUT
33+
-- routing through rank-lex-jb at all. Path-3's claim: enriching
34+
-- the source-rule with same-left + tail-`<ᵇ⁰` discharges this
35+
-- case at the rank-pow level via `rank-pow-bplus-right-mono`,
36+
-- bypassing the rank-lex-jb pivot's first-eq derivation
37+
-- obligation entirely.
38+
--
39+
-- ## Scope of this prototype
40+
--
41+
-- * Extends only `_<ᵇ⁰_` (10-constructor closure), not `_<ᵇ¹_`
42+
-- (which adds strict-head joint-bplus) — keeps the prototype
43+
-- minimal and the closure inductively grounded.
44+
-- * Does NOT prove well-foundedness of the extended relation —
45+
-- that would need a separate proof; orthogonal to the
46+
-- rank-mono question.
47+
-- * Does NOT subsume rank-lex-jb for the cross-head case
48+
-- (`bpsi ν α` vs `bOmega ν` etc.) — that case has different
49+
-- left-summand SYNTAX, only equal rank-pow. Rank-lex-jb
50+
-- handles those; this prototype handles same-left-syntax.
51+
--
52+
-- ## What this prototype demonstrates
53+
--
54+
-- The Path-3 implication from PR #166's closing note:
55+
-- "the source rule may need enrichment, not the rank function".
56+
-- A `<ᵇ⁰`-grounded same-left source rule closes its rank-pow
57+
-- obligation in ONE LINE via `rank-pow-bplus-right-mono`,
58+
-- contrasted with the multi-PR rank-lex-jb assembly's chain
59+
-- through first-eq + leftmost-α-strict + `<lex-second`. When
60+
-- the same-left literal-equality holds, Path-3 is structurally
61+
-- simpler than the rank-lex-jb route.
62+
--
63+
-- Honest caveat: this does NOT close the RANK-EQUAL-HEAD-
64+
-- SYNTAX-DIFFERENT case (e.g., `bpsi ν α` vs `bOmega ν`); the
65+
-- rank-lex-jb pivot is still load-bearing for that scenario.
66+
-- Path-3 covers a strictly different sub-case.
67+
68+
module Ordinal.Buchholz.RankMonoSameLeft where
69+
70+
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
71+
72+
open import Ordinal.Brouwer.Phase13 using (_<′_)
73+
open import Ordinal.Buchholz.Syntax using (BT; bplus)
74+
open import Ordinal.Buchholz.RankPow using
75+
( rank-pow
76+
; rank-pow-bplus-right-mono
77+
)
78+
open import Ordinal.Buchholz.RankMonoUmbrella using
79+
( _<ᵇ⁰_
80+
; rank-pow-mono-<ᵇ⁰
81+
)
82+
83+
----------------------------------------------------------------------
84+
-- The extended relation `_<ᵇ⁺²_`
85+
----------------------------------------------------------------------
86+
87+
-- Two constructors:
88+
--
89+
-- 1. `<ᵇ⁺²-from-<ᵇ⁰` — embed every `<ᵇ⁰` derivation into the
90+
-- extension. Keeps the prototype additive over the closed
91+
-- umbrella's 10 cases.
92+
-- 2. `<ᵇ⁺²-same-left` — the SOURCE-RULE ENRICHMENT: when the
93+
-- left summand is LITERALLY equal on both sides and the
94+
-- right summand satisfies `<ᵇ⁰`, the bplus chain is in the
95+
-- relation. Crucially, the SAME `x` appears on both sides
96+
-- under one binder — this is the K-eliminated case that
97+
-- `_<ᵇ_` deliberately omits. In `--safe --without-K` the
98+
-- shared binder is supplied syntactically (Agda accepts
99+
-- this in `data` constructors; the K-restriction bites only
100+
-- at pattern-match elimination, not at constructor
101+
-- formation).
102+
103+
data _<ᵇ⁺²_ : BT BT Set where
104+
<ᵇ⁺²-from-<ᵇ⁰ : {x y}
105+
x <ᵇ⁰ y
106+
x <ᵇ⁺² y
107+
108+
<ᵇ⁺²-same-left : {x y₂ z₂}
109+
y₂ <ᵇ⁰ z₂
110+
bplus x y₂ <ᵇ⁺² bplus x z₂
111+
112+
infix 4 _<ᵇ⁺²_
113+
114+
----------------------------------------------------------------------
115+
-- Rank-pow monotonicity for `_<ᵇ⁺²_`
116+
----------------------------------------------------------------------
117+
118+
-- Direct structural recursion. The inherited case forwards to the
119+
-- closed umbrella's `rank-pow-mono-<ᵇ⁰`. The same-left case fires
120+
-- `rank-pow-bplus-right-mono` (which IS `⊕-mono-<-right`
121+
-- specialised to rank-pow) on the tail's rank-pow strict witness.
122+
123+
rank-pow-mono-<ᵇ⁺² : {x y} x <ᵇ⁺² y rank-pow x <′ rank-pow y
124+
rank-pow-mono-<ᵇ⁺² (<ᵇ⁺²-from-<ᵇ⁰ p) = rank-pow-mono-<ᵇ⁰ p
125+
rank-pow-mono-<ᵇ⁺² (<ᵇ⁺²-same-left {x = x} {y₂ = y₂} {z₂ = z₂} p) =
126+
rank-pow-bplus-right-mono {x = x} {y = y₂} {z = z₂}
127+
(rank-pow-mono-<ᵇ⁰ p)
128+
129+
----------------------------------------------------------------------
130+
-- Convenience constructor — direct same-left rank-mono
131+
----------------------------------------------------------------------
132+
133+
-- The same-left case stated as a direct rank-mono lemma, without
134+
-- routing through the extended-relation embedding. Demonstrates
135+
-- the one-line closure that motivated this Path-3 prototype.
136+
137+
rank-pow-mono-same-left :
138+
{x y₂ z₂}
139+
y₂ <ᵇ⁰ z₂
140+
rank-pow (bplus x y₂) <′ rank-pow (bplus x z₂)
141+
rank-pow-mono-same-left {x = x} {y₂ = y₂} {z₂ = z₂} p =
142+
rank-pow-bplus-right-mono {x = x} {y = y₂} {z = z₂}
143+
(rank-pow-mono-<ᵇ⁰ p)
144+
145+
----------------------------------------------------------------------
146+
-- What this prototype shows
147+
----------------------------------------------------------------------
148+
149+
-- Path-3 verdict (witnessed mechanically): the SAME-LITERAL-LEFT
150+
-- joint-bplus case at the rank-pow level discharges in ONE LINE
151+
-- via existing `rank-pow-bplus-right-mono` once the source rule
152+
-- carries a `<ᵇ⁰`-grounded tail premise. The rank-lex-jb pivot's
153+
-- machinery (first-eq derivation, leftmost-α discriminator,
154+
-- `<lex-second` discharge, tail-rank-equality consumer
155+
-- obligation) is NOT NEEDED for this sub-case.
156+
--
157+
-- The implication identified in PR #166's note holds: enriching
158+
-- the source rule is structurally simpler than the rank-function
159+
-- enrichment for this scenario. For the cross-head case
160+
-- (`bpsi ν α` vs `bOmega ν` etc.), rank-lex-jb's leftmost-α
161+
-- discriminator remains load-bearing; Path-3 is complementary,
162+
-- not subsuming.
163+
--
164+
-- Future work that this prototype unblocks:
165+
-- * Lifting the tail premise from `_<ᵇ⁰_` to `_<ᵇ¹_` (allowing
166+
-- strict-head joint-bplus tails) — composes mechanically via
167+
-- `rank-pow-mono-<ᵇ¹`.
168+
-- * Wrapping the extension in WfCNF endpoints (mirroring
169+
-- `_<ᵇ⁻ⁿ_` from RankMonoUmbrellaSlice4) for downstream
170+
-- consumers that need the canonical-form invariant.
171+
-- * Well-foundedness of `_<ᵇ⁺²_` — separate from rank-mono;
172+
-- would need a Brouwer-rank embedding (the rank function
173+
-- here provides the seed).

proofs/agda/Ordinal/Buchholz/Smoke.agda

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,3 +568,20 @@ open import Ordinal.Buchholz.RankMonoUmbrellaSlice4 using
568568
; <ᵇ⁻ⁿ-+1-+
569569
; rank-pow-mono-<ᵇ⁻ⁿ
570570
)
571+
572+
-- Path-3 prototype 2026-05-30 (own block per CLAUDE.md Working
573+
-- rules): same-left joint-bplus rank-mono extension. Bypasses
574+
-- the rank-lex-jb pivot's first-eq derivation obligation for the
575+
-- LITERAL-same-left sub-case by enriching the source rule
576+
-- (`<ᵇ⁺²-same-left`) rather than the rank function. One-line
577+
-- closure via `rank-pow-bplus-right-mono` once the tail premise
578+
-- is grounded in `_<ᵇ⁰_`. Complementary to rank-lex-jb, which
579+
-- remains load-bearing for the cross-head case (`bpsi ν α` vs
580+
-- `bOmega ν`, syntactically different but rank-equal).
581+
open import Ordinal.Buchholz.RankMonoSameLeft using
582+
( _<ᵇ⁺²_
583+
; <ᵇ⁺²-from-<ᵇ⁰
584+
; <ᵇ⁺²-same-left
585+
; rank-pow-mono-<ᵇ⁺²
586+
; rank-pow-mono-same-left
587+
)

0 commit comments

Comments
 (0)