Commit 8eb08de
proof(architecture): RankMonoUnion umbrella over source-rule extensions (#168)
## Summary
Realises the **architectural recommendation** from PR #167's closing
note: the future bplus-chain rank-mono umbrella shipped as a UNION OF
SOURCE-RULE EXTENSIONS rather than a single enriched rank function.
**Zero new proof obligations**; purely structural composition via Sum +
\`[_,_]\` mediator. \`--safe --without-K\`, no postulates, no funext.
## What the union umbrella ships
| Name | Type | Role |
|---|---|---|
| \`_<ᵇᵘ_\` | \`BT → BT → Set\` | Disjoint sum of \`_<ᵇ¹_\` (Slice 3)
and \`_<ᵇ⁺²_\` (Path-3) |
| \`rank-pow-mono-<ᵇᵘ\` | \`∀ {x y} → x <ᵇᵘ y → rank-pow x <′ rank-pow
y\` | Coproduct mediator via \`[_,_]\` — **ONE LINE** |
| \`<ᵇᵘ-from-<ᵇ¹\` / \`<ᵇᵘ-from-<ᵇ⁺²\` / \`<ᵇᵘ-from-<ᵇ⁰\` (+symmetric) |
embeddings | Convenience injections |
## The architectural design
PR #167's closing observation:
> 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).
This PR mechanises that recommendation. Each contributing extension
keeps its own proof obligation local; the union dispatches via case
analysis on which extension witnesses the relation. The mediator is \`[
rank-pow-mono-<ᵇ¹ , rank-pow-mono-<ᵇ⁺² ]\` — a single \`[_,_]\` over the
existing per-extension umbrellas.
## Why this architectural shape (three observations)
1. **Different sub-cases prefer different rank-mono machinery.**
Strict-head joint-bplus closes via head-Ω + \`ω-rank-pow-succ\`;
same-left closes via \`rank-pow-bplus-right-mono\`; cross-head
rank-equal closes at LEX-RANK via rank-lex-jb. No single rank function
dominates.
2. **Source-rule enrichment is structurally simpler than rank-function
enrichment** (Path-3 verdict, PR #167). The consumer-side first-eq
derivation that rank-lex-jb requires (PR #166 (c) trichotomy + first-eq)
gets bypassed entirely when the source rule carries the discriminator.
3. **Union of extensions scales.** Every new sub-case ships as its own
extension module with its own rank-mono theorem, then unions in
mechanically. No interference between extensions; closure is local.
## Extension recipe (for future contributors)
Documented in the module preamble. To add a new source-rule extension:
1. Define the relation + rank-pow-mono in its own module (use
\`RankMonoSameLeft\` as canonical template).
2. Re-export through \`Ordinal/Buchholz/Smoke.agda\` with its own
\`using\` block.
3. Update this module to extend \`_<ᵇᵘ_\` with the new disjunct and
extend \`rank-pow-mono-<ᵇᵘ\` with the new case via \`[_,_]\`.
Both edits mechanical; no new proof obligations.
## Honest scope (preserved in module preamble)
- Does NOT wrap with WfCNF endpoints (à la
\`RankMonoUmbrellaSlice4._<ᵇ⁻ⁿ_\`).
- Does NOT include rank-lex-jb discharge — cross-head rank-equal case
lives at LEX-RANK level, different rank-relation. Union is over
\`rank-pow <′\` discharges only.
- Does NOT prove well-foundedness of the union — orthogonal to
rank-mono.
## Slice 3+4 Route A arc summary (4 PRs total)
After this PR the session arc is closed:
| PR | Role |
|---|---|
| #165 | (b) \`<lex-first\` primitive + bpsi sub-case discharge |
| #166 | (c) trichotomy data type + first-eq derivation |
| #167 | Path-3 prototype (same-left source-rule extension) |
| **THIS PR** | **RankMonoUnion** (architectural realisation) |
The full bplus-chain rank-mono umbrella over all 13 \`_<ᵇ_\`
constructors is still gated on (i) tail-rank-equality discharge for the
bpsi-source-at-equal-head case AND (ii) the cross-head rank-equal case
via rank-lex-jb's structural research; **neither is closed by this PR**.
The architecture is now in place for those closures to plug in
mechanically.
## Local verification
- All four Agda lanes typecheck clean, exit 0.
- \`bash tools/check-guardrails.sh proofs/agda\` — **162 modules** pass.
- \`sh scripts/kernel-guard.sh\` — PASS.
Six new names pinned in \`Ordinal/Buchholz/Smoke.agda\`.
## Test plan
- [x] All Agda lanes typecheck under \`--safe --without-K\` with zero
postulates.
- [x] Foundation guardrail + kernel-guard pass with 162 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 390cebb commit 8eb08de
3 files changed
Lines changed: 180 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
0 commit comments