Skip to content

Commit 97d0793

Browse files
hyperpolymathclaude
andcommitted
echo-types: <ᵇ-+1 partial discharge via target-additive-principal parameter (Item 1)
Adds three new compositional primitives in `Ordinal.Buchholz.RankPow` for the `<ᵇ-+1` constructor (`bplus x₁ x₂ <ᵇ bplus y₁ y₂` from `x₁ <ᵇ y₁`): * `rank-mono-<ᵇ-+1-via-target` — parametric in the target-side additive-principal closure. Consumer supplies the closure witness at each call site (depending on `y₁`'s shape). * `rank-mono-<ᵇ-+1-Ω-target` — convenience for `y₁ = bOmega μ` (target's left summand is an Ω-marker). Uses `additive-principal-ω-rank-pow {μ}`. * `rank-mono-<ᵇ-+1-ψ-target` — convenience for `y₁ = bpsi ν α`. Same closure via the provisional `rank-pow (bpsi ν _) = ω-rank-pow ν`. ## Why parametric `rank-pow y₁` is additive principal exactly when `y₁` is atomic (`bOmega` or `bpsi`). For `y₁ = bplus z₁ z₂`, `rank-pow y₁ = rank-pow z₁ ⊕ rank-pow z₂` is NOT additive principal in general; that sub-case needs a coarser dominator function or richer rank shape. The parametric primitive lets consumers handle atomic-`y₁` cases cleanly while leaving the bplus-`y₁` sub-case explicitly deferred. ## Proof shape For atomic-target case: rank x₂ ≤′ rank x₁ <′ rank y₁ (premise + WfCNF tail) ⇒ both <′ rank y₁ ⇒ rank x₁ ⊕ rank x₂ <′ rank y₁ (additive-principal at y₁) ≤′ rank (bplus y₁ y₂) (⊕-left-≤-sum) Headlines pinned in `Smoke.agda`. `agda proofs/agda/All.agda` and `agda proofs/agda/Smoke.agda` exit 0 under `--safe --without-K`. No postulates, no escape pragmas. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9fdad9a commit 97d0793

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

proofs/agda/Ordinal/Buchholz/RankPow.agda

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,72 @@ rank-mono-<ᵇ-+ψ {x} {y} {ν} {α} px y≤x =
349349
-- `rank-pow (bpsi ν α) = ω-rank-pow ν` (provisional shape), so
350350
-- this reduces to the `<ᵇ-+Ω`-shaped argument at target ν.
351351
rank-pow-bplus-into-ω-rank-pow {x} {y} {ν} px y≤x
352+
353+
----------------------------------------------------------------------
354+
-- `<ᵇ-+1` via a caller-supplied target-additive-principal witness
355+
----------------------------------------------------------------------
356+
357+
-- `bplus x₁ x₂ <ᵇ bplus y₁ y₂` from `x₁ <ᵇ y₁` is the `<ᵇ-+1`
358+
-- constructor. The rank-mono conclusion `rank-pow (bplus x₁ x₂) <′
359+
-- rank-pow (bplus y₁ y₂)` requires `rank-pow y₁` to be additive
360+
-- principal (in the sense that `α, β <′ rank-pow y₁` forces
361+
-- `α ⊕ β <′ rank-pow y₁`). For atomic `y₁ ∈ {bOmega μ, bpsi ν _}`,
362+
-- `rank-pow y₁ = ω-rank-pow _` IS additive principal and the consumer
363+
-- supplies `additive-principal-ω-rank-pow`. For `y₁ = bplus z₁ z₂`,
364+
-- `rank-pow y₁` is not additive principal in general; that sub-case
365+
-- needs a coarser dominator function and is deferred.
366+
--
367+
-- The primitive below is parametric in the additive-principal
368+
-- witness, so the consumer pattern-matches on `y₁`'s constructor and
369+
-- supplies the appropriate witness at each call site.
370+
371+
rank-mono-<ᵇ-+1-via-target : {x₁ x₂ y₁ y₂}
372+
(target-add : {α β}
373+
α <′ rank-pow y₁
374+
β <′ rank-pow y₁
375+
α ⊕ β <′ rank-pow y₁)
376+
rank-pow x₁ <′ rank-pow y₁ -- IH on `x₁ <ᵇ y₁`
377+
rank-pow x₂ ≤′ rank-pow x₁ -- WfCNF source tail bound
378+
rank-pow (bplus x₁ x₂) <′ rank-pow (bplus y₁ y₂)
379+
rank-mono-<ᵇ-+1-via-target {x₁} {x₂} {y₁} {y₂} target-add rx<ry rx₂≤rx₁ =
380+
let
381+
-- rank x₂ ≤′ rank x₁ <′ rank y₁ gives rank x₂ <′ rank y₁
382+
rx₂<ry : rank-pow x₂ <′ rank-pow y₁
383+
rx₂<ry = ≤′-trans
384+
{osuc (rank-pow x₂)} {osuc (rank-pow x₁)} {rank-pow y₁}
385+
rx₂≤rx₁
386+
rx<ry
387+
388+
-- additive-principal closure on the target: both summands <′ y₁,
389+
-- so their ⊕-sum is also <′ y₁.
390+
sum<ry : rank-pow x₁ ⊕ rank-pow x₂ <′ rank-pow y₁
391+
sum<ry = target-add rx<ry rx₂<ry
392+
393+
-- y₁ ≤′ y₁ ⊕ y₂ by left-≤-sum.
394+
ry≤target : rank-pow y₁ ≤′ rank-pow (bplus y₁ y₂)
395+
ry≤target = ⊕-left-≤-sum {rank-pow y₁} (rank-pow y₂)
396+
in
397+
≤′-trans
398+
{osuc (rank-pow x₁ ⊕ rank-pow x₂)} {rank-pow y₁} {rank-pow (bplus y₁ y₂)}
399+
sum<ry
400+
ry≤target
401+
402+
-- Convenience: when the target's leading subterm is `bOmega μ`, the
403+
-- consumer can directly supply `additive-principal-ω-rank-pow {μ}`.
404+
-- Same for `bpsi ν _` via the provisional shape.
405+
406+
rank-mono-<ᵇ-+1-Ω-target : {x₁ x₂ μ y₂}
407+
rank-pow x₁ <′ ω-rank-pow μ
408+
rank-pow x₂ ≤′ rank-pow x₁
409+
rank-pow (bplus x₁ x₂) <′ rank-pow (bplus (bOmega μ) y₂)
410+
rank-mono-<ᵇ-+1-Ω-target {x₁} {x₂} {μ} {y₂} =
411+
rank-mono-<ᵇ-+1-via-target {x₁} {x₂} {bOmega μ} {y₂}
412+
(additive-principal-ω-rank-pow {μ})
413+
414+
rank-mono-<ᵇ-+1-ψ-target : {x₁ x₂ ν α y₂}
415+
rank-pow x₁ <′ ω-rank-pow ν
416+
rank-pow x₂ ≤′ rank-pow x₁
417+
rank-pow (bplus x₁ x₂) <′ rank-pow (bplus (bpsi ν α) y₂)
418+
rank-mono-<ᵇ-+1-ψ-target {x₁} {x₂} {ν} {α} {y₂} =
419+
rank-mono-<ᵇ-+1-via-target {x₁} {x₂} {bpsi ν α} {y₂}
420+
(additive-principal-ω-rank-pow {ν})

proofs/agda/Smoke.agda

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ open import Ordinal.Buchholz.RankPow using
486486
; rank-mono-<ᵇ-ψ+
487487
; rank-mono-<ᵇ-+Ω
488488
; rank-mono-<ᵇ-+ψ
489+
; rank-mono-<ᵇ-+1-via-target
490+
; rank-mono-<ᵇ-+1-Ω-target
491+
; rank-mono-<ᵇ-+1-ψ-target
489492
)
490493

491494
open import Ordinal.OmegaMarkers using

0 commit comments

Comments
 (0)