Skip to content

Commit c516191

Browse files
committed
Add top-marker Ω/+ bridge with termination-safe WF update
1 parent 79f1add commit c516191

5 files changed

Lines changed: 31 additions & 13 deletions

File tree

docs/buchholz-plan.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ Remaining open comparison work after this update:
117117
(do not return to the blocked direct reflexive-equation elimination
118118
route).
119119

120+
Risk-gated bridge currently admitted:
121+
122+
* `bplus x y <ᵇ bOmega ω` from `x <ᵇ bOmega ω` (top-marker-only
123+
directional bridge). This is intentionally narrow to avoid forcing
124+
immediate `bplus` vs `bpsi` constructor commitments.
125+
120126
== The very first Agda proof: `C-monotone`
121127

122128
Before any ψ-value is defined, we must know the closure stages form a

proofs/agda/Ordinal/Buchholz/Order.agda

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
-- Open cases (no constructor yet; must be discharged in follow-ups
2323
-- before `<ᵇ`-totality and well-foundedness can land):
2424
--
25-
-- * bOmega vs bplus (either direction) — requires a comparison
26-
-- between atomic heads and additive normal forms.
25+
-- * bOmega vs bplus (general case) — requires a comparison
26+
-- between atomic heads and additive normal forms. A narrow
27+
-- top-marker bridge is admitted by `<ᵇ-+ω`.
2728
-- * bpsi vs bplus (either direction) — same reason, mediated by
2829
-- the leading bpsi summand of a bplus in CNF.
2930
-- * Two same-binder sub-cases whose natural shapes run into Agda
@@ -44,6 +45,8 @@ open import Ordinal.OmegaMarkers using
4445
( OmegaIndex
4546
; _≤Ω_
4647
; _<Ω_
48+
; ω
49+
; fin
4750
; <Ω-irrefl
4851
; <Ω-trans
4952
; <Ω→≤Ω
@@ -76,6 +79,7 @@ data _<ᵇ_ : BT → BT → Set where
7679
-- (compare right summands when lefts agree) is deferred for the
7780
-- same `--without-K` reason as `<ᵇ-ψα` above: its natural shape
7881
-- `bplus x y₂ <ᵇ bplus x z₂` shares the binder `x` on both sides.
82+
<ᵇ-+ω : {x y} x <ᵇ bOmega ω bplus x y <ᵇ bOmega ω
7983
<ᵇ-+1 : {x₁ x₂ y₁ y₂} x₁ <ᵇ y₁ bplus x₁ x₂ <ᵇ bplus y₁ y₂
8084

8185
infix 4 _<ᵇ_
@@ -111,6 +115,7 @@ infix 4 _<ᵇ_
111115
<ᵇ-trans <ᵇ-0-Ω (<ᵇ-Ωψ _) = <ᵇ-0-ψ
112116
-- Left leg: <ᵇ-0-+ (x = bzero, y = bplus _ _)
113117
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+1 _) = <ᵇ-0-+
118+
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ω _) = <ᵇ-0-Ω
114119
-- Left leg: <ᵇ-0-ψ (x = bzero, y = bpsi _ _)
115120
<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψΩ _) = <ᵇ-0-ψ
116121
-- Left leg: <ᵇ-ΩΩ (x = bOmega _, y = bOmega _)
@@ -126,6 +131,7 @@ infix 4 _<ᵇ_
126131
<ᵇ-trans (<ᵇ-ψΩ≤ p) (<ᵇ-Ωψ q) = <ᵇ-ψΩ (≤Ω-<Ω-trans p q)
127132
-- Left leg: <ᵇ-+1 (x = bplus _ _, y = bplus _ _)
128133
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+1 q) = <ᵇ-+1 (<ᵇ-trans p q)
134+
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ω q) = <ᵇ-+ω (<ᵇ-trans p q)
129135
-- Right leg: <ᵇ-ψΩ≤ (y = bpsi _ _, z = bOmega _)
130136
<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψΩ≤ _) = <ᵇ-0-Ω
131137
<ᵇ-trans (<ᵇ-Ωψ p) (<ᵇ-ψΩ≤ q) = <ᵇ-ΩΩ (<Ω-≤Ω-trans p q)
@@ -141,8 +147,8 @@ infix 4 _<ᵇ_
141147
<ᵇ-inv-Ω+ : {μ x y} bOmega μ <ᵇ bplus x y
142148
<ᵇ-inv-Ω+ ()
143149

144-
<ᵇ-inv-+Ω : {x y μ} bplus x y <ᵇ bOmega μ
145-
<ᵇ-inv-+Ω ()
150+
<ᵇ-inv-+Ωfin : {x y n} bplus x y <ᵇ bOmega (fin n)
151+
<ᵇ-inv-+Ωfin ()
146152

147153
----------------------------------------------------------------------------
148154
-- WF-2 open-case inversions (ψ vs +)

proofs/agda/Ordinal/Buchholz/Smoke.agda

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ open import Ordinal.Buchholz.Order using
5555
; <ᵇ-Ωψ
5656
; <ᵇ-ψΩ
5757
; <ᵇ-ψΩ≤
58+
; <ᵇ-+ω
5859
; <ᵇ-+1
5960
; <ᵇ-irrefl
6061
; <ᵇ-trans
6162
; <ᵇ-inv-Ω+
62-
; <ᵇ-inv-+Ω
63+
; <ᵇ-inv-+Ωfin
6364
; <ᵇ-inv-ψ+
6465
; <ᵇ-inv-+ψ
6566
)

proofs/agda/Ordinal/Buchholz/WellFounded.agda

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ open import Ordinal.Buchholz.Order using
3434
; <ᵇ-Ωψ
3535
; <ᵇ-ψΩ
3636
; <ᵇ-ψΩ≤
37+
; <ᵇ-+ω
3738
; <ᵇ-+1
3839
)
3940

@@ -58,6 +59,15 @@ open import Ordinal.Buchholz.Order using
5859
<ᵇ-acc-bzero : Acc _<ᵇ_ bzero
5960
<ᵇ-acc-bzero = acc <ᵇ-pred-bzero
6061

62+
mutual
63+
64+
<ᵇ-pred-bplus-from : {α β x} Acc _<ᵇ_ α x <ᵇ bplus α β Acc _<ᵇ_ x
65+
<ᵇ-pred-bplus-from _ <ᵇ-0-+ = <ᵇ-acc-bzero
66+
<ᵇ-pred-bplus-from (acc rsα) (<ᵇ-+1 {x₂ = x₂} x₁<α) = <ᵇ-acc-bplus-from (rsα x₁<α) x₂
67+
68+
<ᵇ-acc-bplus-from : {α} Acc _<ᵇ_ α : BT) Acc _<ᵇ_ (bplus α β)
69+
<ᵇ-acc-bplus-from aα β = acc (<ᵇ-pred-bplus-from aα)
70+
6171
ΩBundle : OmegaIndex Set
6272
ΩBundle μ = Acc _<ᵇ_ (bOmega μ) × ((α : BT) Acc _<ᵇ_ (bpsi μ α))
6373

@@ -75,6 +85,7 @@ open import Ordinal.Buchholz.Order using
7585
predOmega (<ᵇ-ψΩ≤ {α = α} ν≤μ) with ≤Ω-split ν≤μ
7686
... | inj₁ ν<μ = proj₂ (<ᵇ-bundle-fromΩ (rsμ ν<μ)) α
7787
... | inj₂ refl = psiAcc α
88+
predOmega (<ᵇ-+ω {x = x} {y = y} x<ω) = <ᵇ-acc-bplus-from (predOmega x<ω) y
7889

7990
psiAcc :: BT) Acc _<ᵇ_ (bpsi μ α)
8091
psiAcc α = acc λ where
@@ -87,13 +98,6 @@ mutual
8798
<ᵇ-acc-bOmega :: OmegaIndex) Acc _<ᵇ_ (bOmega μ)
8899
<ᵇ-acc-bOmega μ = proj₁ (<ᵇ-bundle-fromΩ (<Ω-wf μ))
89100

90-
<ᵇ-pred-bplus-from : {α β x} Acc _<ᵇ_ α x <ᵇ bplus α β Acc _<ᵇ_ x
91-
<ᵇ-pred-bplus-from _ <ᵇ-0-+ = <ᵇ-acc-bzero
92-
<ᵇ-pred-bplus-from (acc rsα) (<ᵇ-+1 {x₂ = x₂} x₁<α) = <ᵇ-acc-bplus-from (rsα x₁<α) x₂
93-
94-
<ᵇ-acc-bplus-from : {α} Acc _<ᵇ_ α : BT) Acc _<ᵇ_ (bplus α β)
95-
<ᵇ-acc-bplus-from aα β = acc (<ᵇ-pred-bplus-from aα)
96-
97101
<ᵇ-acc-bplus : (α β : BT) Acc _<ᵇ_ (bplus α β)
98102
<ᵇ-acc-bplus α β = <ᵇ-acc-bplus-from (wf-<ᵇ α) β
99103

proofs/agda/Smoke.agda

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,12 @@ open import Ordinal.Buchholz.Order using
182182
; <ᵇ-Ωψ
183183
; <ᵇ-ψΩ
184184
; <ᵇ-ψΩ≤
185+
; <ᵇ-+ω
185186
; <ᵇ-+1
186187
; <ᵇ-irrefl
187188
; <ᵇ-trans
188189
; <ᵇ-inv-Ω+
189-
; <ᵇ-inv-+Ω
190+
; <ᵇ-inv-+Ωfin
190191
; <ᵇ-inv-ψ+
191192
; <ᵇ-inv-+ψ
192193
; bzero<Ω0

0 commit comments

Comments
 (0)