Skip to content

Commit fecee18

Browse files
committed
agda: generalize Buchholz bplus target bridges
1 parent cf7ec23 commit fecee18

8 files changed

Lines changed: 74 additions & 57 deletions

File tree

docs/buchholz-plan.adoc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,25 +113,21 @@ The order / well-foundedness track now has an explicit staged split:
113113
* WF-1.7 (`Ordinal.Buchholz.VeblenObligations`): discharge
114114
same-binder obligation shapes in projection-model form; landed lemmas:
115115
`dec-+2-plus-right`, `dec-ψα-psi-arg`.
116-
* WF-2 (in progress): mixed-head bridge layer now includes
117-
`bpsi ν α <ᵇ bOmega μ` (under `ν ≤Ω μ`) and left-summand bridges
118-
into additive terms (`<ᵇ-Ω+`, `<ᵇ-ψ+`) with inversions.
116+
* WF-2 (completed for mixed-head cases): bridge layer now includes
117+
`bpsi ν α <ᵇ bOmega μ` (under `ν ≤Ω μ`), left-summand bridges into
118+
additive terms (`<ᵇ-Ω+`, `<ᵇ-ψ+`), and additive-target bridges
119+
(`<ᵇ-+Ω`, `<ᵇ-+ψ`) with inversions.
119120

120121
Remaining open comparison work after this update:
121122

122-
* Constructor-level comparison rules for non-top `bplus` vs `bOmega`
123-
(the `bplus → bOmega` direction beyond `<ᵇ-+ω`).
124-
* Constructor-level comparison rules for non-top `bplus` vs `bpsi`
125-
(the `bplus → bpsi` direction beyond `<ᵇ-+ψω`).
126123
* Shared-binder same-index/same-left sub-cases in a K-free style
127124
(do not return to the blocked direct reflexive-equation elimination
128125
route).
129126

130127
Risk-gated bridge currently admitted:
131128

132-
* `bplus x y <ᵇ bOmega ω` from `x <ᵇ bOmega ω` (top-marker-only
133-
directional bridge). This is intentionally narrow to avoid forcing
134-
immediate `bplus` vs `bpsi` constructor commitments.
129+
* The original top-marker bridges remain as named specialised lemmas
130+
(`<ᵇ-+ω`, `<ᵇ-+ψω`) over the now-general additive-target bridges.
135131

136132
== The very first Agda proof: `C-monotone`
137133

proofs/agda/Ordinal/Buchholz/Order.agda

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
-- Open cases (no constructor yet; must be discharged in follow-ups
2323
-- before `<ᵇ`-totality and well-foundedness can land):
2424
--
25-
-- * bplus vs bOmega (general case) — currently only the top-marker
26-
-- bridge `<ᵇ-+ω` is admitted.
27-
-- * bplus vs bpsi (general case) — currently only the top-marker
28-
-- bridge `<ᵇ-+ψω` is admitted.
2925
-- * Two same-binder sub-cases whose natural shapes run into Agda
3026
-- 2.6.3's `--without-K` restriction on reflexive-equation
3127
-- elimination and are deferred pending a K-free reformulation:
@@ -83,8 +79,8 @@ data _<ᵇ_ : BT → BT → Set where
8379
-- (compare right summands when lefts agree) is deferred for the
8480
-- same `--without-K` reason as `<ᵇ-ψα` above: its natural shape
8581
-- `bplus x y₂ <ᵇ bplus x z₂` shares the binder `x` on both sides.
86-
<ᵇ-+ω : {x y} x <ᵇ bOmega ω bplus x y <ᵇ bOmega ω
87-
<ᵇ-+ψω : {x y α} x <ᵇ bpsi ω α bplus x y <ᵇ bpsi ω α
82+
<ᵇ-+Ω : {x y μ} x <ᵇ bOmega μ bplus x y <ᵇ bOmega μ
83+
<ᵇ-+ψ : {x y ν α} x <ᵇ bpsi ν α bplus x y <ᵇ bpsi ν α
8884
<ᵇ-+1 : {x₁ x₂ y₁ y₂} x₁ <ᵇ y₁ bplus x₁ x₂ <ᵇ bplus y₁ y₂
8985

9086
infix 4 _<ᵇ_
@@ -121,8 +117,8 @@ infix 4 _<ᵇ_
121117
<ᵇ-trans <ᵇ-0-Ω (<ᵇ-Ω+ _) = <ᵇ-0-+
122118
-- Left leg: <ᵇ-0-+ (x = bzero, y = bplus _ _)
123119
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+1 _) = <ᵇ-0-+
124-
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ω _) = <ᵇ-0-Ω
125-
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ψω _) = <ᵇ-0-ψ
120+
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+Ω _) = <ᵇ-0-Ω
121+
<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ψ _) = <ᵇ-0-ψ
126122
-- Left leg: <ᵇ-0-ψ (x = bzero, y = bpsi _ _)
127123
<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψΩ _) = <ᵇ-0-ψ
128124
<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψ+ _) = <ᵇ-0-+
@@ -143,57 +139,71 @@ infix 4 _<ᵇ_
143139
<ᵇ-trans (<ᵇ-ψΩ≤ p) (<ᵇ-Ω+ q) = <ᵇ-ψ+ (<ᵇ-trans (<ᵇ-ψΩ≤ p) q)
144140
-- Left leg: <ᵇ-+1 (x = bplus _ _, y = bplus _ _)
145141
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+1 q) = <ᵇ-+1 (<ᵇ-trans p q)
146-
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ω q) = <ᵇ-+ω (<ᵇ-trans p q)
147-
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ψω q) = <ᵇ-+ψω (<ᵇ-trans p q)
142+
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+Ω q) = <ᵇ-+Ω (<ᵇ-trans p q)
143+
<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ψ q) = <ᵇ-+ψ (<ᵇ-trans p q)
148144
-- Left leg: <ᵇ-Ω+ (x = bOmega _, y = bplus _ _)
149145
<ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+1 q) = <ᵇ-Ω+ (<ᵇ-trans p q)
150-
<ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+ω q) = <ᵇ-trans p q
151-
<ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+ψω q) = <ᵇ-trans p q
146+
<ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+Ω q) = <ᵇ-trans p q
147+
<ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+ψ q) = <ᵇ-trans p q
152148
-- Left leg: <ᵇ-ψ+ (x = bpsi _ _, y = bplus _ _)
153149
<ᵇ-trans (<ᵇ-ψ+ p) (<ᵇ-+1 q) = <ᵇ-ψ+ (<ᵇ-trans p q)
154-
<ᵇ-trans (<ᵇ-ψ+ p) (<ᵇ-+ω q) = <ᵇ-trans p q
155-
<ᵇ-trans (<ᵇ-ψ+ p) (<ᵇ-+ψω q) = <ᵇ-trans p q
156-
<ᵇ-trans (<ᵇ-+ω p) (<ᵇ-Ω+ q) = <ᵇ-+1 (<ᵇ-trans p q)
157-
<ᵇ-trans (<ᵇ-+ψω p) (<ᵇ-ψ+ q) = <ᵇ-+1 (<ᵇ-trans p q)
158-
-- Left leg: <ᵇ-+ψω (x = bplus _ _, y = bpsi ω _)
159-
<ᵇ-trans (<ᵇ-+ψω p) (<ᵇ-ψΩ≤ ω≤ω) = <ᵇ-+ω (<ᵇ-trans p (<ᵇ-ψΩ≤ ω≤ω))
150+
<ᵇ-trans (<ᵇ-ψ+ p) (<ᵇ-+Ω q) = <ᵇ-trans p q
151+
<ᵇ-trans (<ᵇ-ψ+ p) (<ᵇ-+ψ q) = <ᵇ-trans p q
152+
-- Left leg: <ᵇ-+Ω (x = bplus _ _, y = bOmega _)
153+
<ᵇ-trans (<ᵇ-+Ω p) (<ᵇ-ΩΩ q) = <ᵇ-+Ω (<ᵇ-trans p (<ᵇ-ΩΩ q))
154+
<ᵇ-trans (<ᵇ-+Ω p) (<ᵇ-Ωψ q) = <ᵇ-+ψ (<ᵇ-trans p (<ᵇ-Ωψ q))
155+
<ᵇ-trans (<ᵇ-+Ω p) (<ᵇ-Ω+ q) = <ᵇ-+1 (<ᵇ-trans p q)
156+
-- Left leg: <ᵇ-+ψ (x = bplus _ _, y = bpsi _ _)
157+
<ᵇ-trans (<ᵇ-+ψ p) (<ᵇ-ψΩ q) = <ᵇ-+ψ (<ᵇ-trans p (<ᵇ-ψΩ q))
158+
<ᵇ-trans (<ᵇ-+ψ p) (<ᵇ-ψΩ≤ q) = <ᵇ-+Ω (<ᵇ-trans p (<ᵇ-ψΩ≤ q))
159+
<ᵇ-trans (<ᵇ-+ψ p) (<ᵇ-ψ+ q) = <ᵇ-+1 (<ᵇ-trans p q)
160160
-- Right leg: <ᵇ-ψΩ≤ (y = bpsi _ _, z = bOmega _)
161161
<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψΩ≤ _) = <ᵇ-0-Ω
162162
<ᵇ-trans (<ᵇ-Ωψ p) (<ᵇ-ψΩ≤ q) = <ᵇ-ΩΩ (<Ω-≤Ω-trans p q)
163163

164-
----------------------------------------------------------------------------
165-
-- WF-2 open-case inversions (Ω vs +)
164+
-- WF-2 mixed-head inversions (Ω vs +)
166165
----------------------------------------------------------------------------
167166

168-
-- The Ω→+ bridge is admitted (`<ᵇ-Ω+`), while the non-top
169-
-- bplus→Ω case remains deferred.
167+
-- Mixed-head bridges now run both ways between `bplus` and `bOmega`.
170168

171169
<ᵇ-inv-Ω+ : {μ x y} bOmega μ <ᵇ bplus x y bOmega μ <ᵇ x
172170
<ᵇ-inv-Ω+ (<ᵇ-Ω+ Ω<x) = Ω<x
173171

174-
<ᵇ-inv-+Ωfin : {x y n} bplus x y <ᵇ bOmega (fin n)
175-
<ᵇ-inv-+Ωfin ()
172+
<ᵇ-inv-+Ω : {x y μ} bplus x y <ᵇ bOmega μ x <ᵇ bOmega μ
173+
<ᵇ-inv-+Ω (<ᵇ-+Ω x<Ω) = x<Ω
174+
175+
<ᵇ-inv-+Ωfin : {x y n} bplus x y <ᵇ bOmega (fin n) x <ᵇ bOmega (fin n)
176+
<ᵇ-inv-+Ωfin = <ᵇ-inv-+Ω
176177

177178
-- Inversion for the admitted top-marker bridge.
178179
<ᵇ-inv-+Ωω : {x y} bplus x y <ᵇ bOmega ω x <ᵇ bOmega ω
179-
<ᵇ-inv-+Ωω (<ᵇ-+ω x<ω) = x<ω
180+
<ᵇ-inv-+Ωω = <ᵇ-inv-+Ω
180181

181-
----------------------------------------------------------------------------
182-
-- WF-2 open-case inversions (ψ vs +)
182+
-- WF-2 mixed-head inversions (ψ vs +)
183183
----------------------------------------------------------------------------
184184

185-
-- The ψ→+ bridge is admitted (`<ᵇ-ψ+`), while the non-top
186-
-- bplus→ψ case remains deferred.
185+
-- Mixed-head bridges now run both ways between `bplus` and `bpsi`.
187186

188187
<ᵇ-inv-ψ+ : {μ α x y} bpsi μ α <ᵇ bplus x y bpsi μ α <ᵇ x
189188
<ᵇ-inv-ψ+ (<ᵇ-ψ+ ψ<x) = ψ<x
190189

191-
<ᵇ-inv-+ψfin : {x y n α} bplus x y <ᵇ bpsi (fin n) α
192-
<ᵇ-inv-+ψfin ()
190+
<ᵇ-inv-+ψ : {x y ν α} bplus x y <ᵇ bpsi ν α x <ᵇ bpsi ν α
191+
<ᵇ-inv-+ψ (<ᵇ-+ψ x<ψ) = x<ψ
192+
193+
<ᵇ-inv-+ψfin : {x y n α} bplus x y <ᵇ bpsi (fin n) α x <ᵇ bpsi (fin n) α
194+
<ᵇ-inv-+ψfin = <ᵇ-inv-+ψ
193195

194196
-- Inversion for the admitted top-marker bridge.
195197
<ᵇ-inv-+ψω : {x y α} bplus x y <ᵇ bpsi ω α x <ᵇ bpsi ω α
196-
<ᵇ-inv-+ψω (<ᵇ-+ψω x<ψω) = x<ψω
198+
<ᵇ-inv-+ψω = <ᵇ-inv-+ψ
199+
200+
-- Backwards-compatible specialised names for the former top-marker-only
201+
-- constructors.
202+
<ᵇ-+ω : {x y} x <ᵇ bOmega ω bplus x y <ᵇ bOmega ω
203+
<ᵇ-+ω = <ᵇ-+Ω
204+
205+
<ᵇ-+ψω : {x y α} x <ᵇ bpsi ω α bplus x y <ᵇ bpsi ω α
206+
<ᵇ-+ψω = <ᵇ-+ψ
197207

198208
----------------------------------------------------------------------------
199209
-- Strict-below-ψ examples, for downstream ordering checks

proofs/agda/Ordinal/Buchholz/Smoke.agda

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,19 @@ open import Ordinal.Buchholz.Order using
5757
; <ᵇ-ψΩ≤
5858
; <ᵇ-Ω+
5959
; <ᵇ-ψ+
60+
; <ᵇ-+Ω
61+
; <ᵇ-+ψ
6062
; <ᵇ-+ω
6163
; <ᵇ-+ψω
6264
; <ᵇ-+1
6365
; <ᵇ-irrefl
6466
; <ᵇ-trans
6567
; <ᵇ-inv-Ω+
68+
; <ᵇ-inv-+Ω
6669
; <ᵇ-inv-+Ωfin
6770
; <ᵇ-inv-+Ωω
6871
; <ᵇ-inv-ψ+
72+
; <ᵇ-inv-+ψ
6973
; <ᵇ-inv-+ψfin
7074
; <ᵇ-inv-+ψω
7175
)

proofs/agda/Ordinal/Buchholz/VeblenIdentityModel.agda

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ open import Ordinal.Buchholz.Order using
2323
; <ᵇ-ψΩ≤
2424
; <ᵇ-Ω+
2525
; <ᵇ-ψ+
26-
; <ᵇ-+ω
27-
; <ᵇ-+ψω
26+
; <ᵇ-+Ω
27+
; <ᵇ-+ψ
2828
; <ᵇ-+1
2929
)
3030
open import Ordinal.Buchholz.WellFounded using (wf-<ᵇ)
@@ -46,8 +46,8 @@ identity-interface dec-ψα dec-+2 = record
4646
; dec-ψΩ≤ = <ᵇ-ψΩ≤
4747
; dec-Ω+ = <ᵇ-Ω+
4848
; dec-ψ+ = <ᵇ-ψ+
49-
; dec-+ω = <ᵇ-+ω
50-
; dec-+ψω = <ᵇ-+ψω
49+
; dec-+Ω = <ᵇ-+Ω
50+
; dec-+ψ = <ᵇ-+ψ
5151
; dec-+1 = <ᵇ-+1
5252
; dec-ψα = dec-ψα
5353
; dec-+2 = dec-+2

proofs/agda/Ordinal/Buchholz/VeblenInterface.agda

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ open import Ordinal.Buchholz.Order using
3030
; <ᵇ-ψΩ≤
3131
; <ᵇ-Ω+
3232
; <ᵇ-ψ+
33-
; <ᵇ-+ω
34-
; <ᵇ-+ψω
33+
; <ᵇ-+Ω
34+
; <ᵇ-+ψ
3535
; <ᵇ-+1
3636
)
3737

@@ -57,8 +57,8 @@ record VeblenWFInterface {ℓm ℓr : Level}
5757
dec-ψ+ : {ν α x y} measure (bpsi ν α) ≺ measure x
5858
measure (bpsi ν α) ≺ measure (bplus x y)
5959

60-
dec-+ω : {x y} x <ᵇ bOmega ω measure (bplus x y) ≺ measure (bOmega ω)
61-
dec-+ψω : {x y α} x <ᵇ bpsi ω α measure (bplus x y) ≺ measure (bpsi ω α)
60+
dec-+Ω : {x y μ} x <ᵇ bOmega μ measure (bplus x y) ≺ measure (bOmega μ)
61+
dec-+ψ : {x y ν α} x <ᵇ bpsi ν α measure (bplus x y) ≺ measure (bpsi ν α)
6262
dec-+1 : {x₁ x₂ y₁ y₂} x₁ <ᵇ y₁ measure (bplus x₁ x₂) ≺ measure (bplus y₁ y₂)
6363

6464
-- Deferred same-binder obligations for the extended comparison layer.
@@ -75,8 +75,8 @@ record VeblenWFInterface {ℓm ℓr : Level}
7575
core-monotone (<ᵇ-ψΩ≤ ν≤μ) = dec-ψΩ≤ ν≤μ
7676
core-monotone (<ᵇ-Ω+ Ω<x) = dec-Ω+ (core-monotone Ω<x)
7777
core-monotone (<ᵇ-ψ+ ψ<x) = dec-ψ+ (core-monotone ψ<x)
78-
core-monotone (<ᵇ-+ω x<ω) = dec-+ω x<ω
79-
core-monotone (<ᵇ-+ψω x<ψω) = dec-+ψω x<ψω
78+
core-monotone (<ᵇ-+Ω x<Ω) = dec-+Ω x<Ω
79+
core-monotone (<ᵇ-+ψ x<ψ) = dec-+ψ x<ψ
8080
core-monotone (<ᵇ-+1 x₁<y₁) = dec-+1 x₁<y₁
8181

8282
-- Generic derivation route: well-founded target + constructor monotonicity

proofs/agda/Ordinal/Buchholz/WellFounded.agda

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ open import Ordinal.Buchholz.Order using
3636
; <ᵇ-ψΩ≤
3737
; <ᵇ-Ω+
3838
; <ᵇ-ψ+
39-
; <ᵇ-+ω
40-
; <ᵇ-+ψω
39+
; <ᵇ-+Ω
40+
; <ᵇ-+ψ
4141
; <ᵇ-+1
4242
)
4343

@@ -90,13 +90,13 @@ mutual
9090
predOmega (<ᵇ-ψΩ≤ {α = α} ν≤μ) with ≤Ω-split ν≤μ
9191
... | inj₁ ν<μ = proj₂ (<ᵇ-bundle-fromΩ (rsμ ν<μ)) α
9292
... | inj₂ refl = psiAcc α
93-
predOmega (<ᵇ-+ω {x = x} {y = y} x<ω) = <ᵇ-acc-bplus-from (predOmega x<ω) y
93+
predOmega (<ᵇ-+Ω {x = x} {y = y} x<μ) = <ᵇ-acc-bplus-from (predOmega x<μ) y
9494

9595
predPsi :: BT) {x} x <ᵇ bpsi μ α Acc _<ᵇ_ x
9696
predPsi α <ᵇ-0-ψ = <ᵇ-acc-bzero
9797
predPsi α (<ᵇ-Ωψ κ<μ) = proj₁ (<ᵇ-bundle-fromΩ (rsμ κ<μ))
9898
predPsi α (<ᵇ-ψΩ {α = β} κ<μ) = proj₂ (<ᵇ-bundle-fromΩ (rsμ κ<μ)) β
99-
predPsi α (<ᵇ-+ψω {x = x} {y = y} x<ψω) = <ᵇ-acc-bplus-from (predPsi α x<ψω) y
99+
predPsi α (<ᵇ-+ψ {x = x} {y = y} x<ψ) = <ᵇ-acc-bplus-from (predPsi α x<ψ) y
100100

101101
psiAcc :: BT) Acc _<ᵇ_ (bpsi μ α)
102102
psiAcc α = acc (predPsi α)

proofs/agda/Smoke.agda

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,19 @@ open import Ordinal.Buchholz.Order using
184184
; <ᵇ-ψΩ≤
185185
; <ᵇ-Ω+
186186
; <ᵇ-ψ+
187+
; <ᵇ-+Ω
188+
; <ᵇ-+ψ
187189
; <ᵇ-+ω
188190
; <ᵇ-+ψω
189191
; <ᵇ-+1
190192
; <ᵇ-irrefl
191193
; <ᵇ-trans
192194
; <ᵇ-inv-Ω+
195+
; <ᵇ-inv-+Ω
193196
; <ᵇ-inv-+Ωfin
194197
; <ᵇ-inv-+Ωω
195198
; <ᵇ-inv-ψ+
199+
; <ᵇ-inv-+ψ
196200
; <ᵇ-inv-+ψfin
197201
; <ᵇ-inv-+ψω
198202
; bzero<Ω0

readme.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ Ordinal/Buchholz track status:
8383
* Left-summand bridges into additive terms are admitted and inverted:
8484
** `<ᵇ-Ω+`, `<ᵇ-ψ+`
8585
** `<ᵇ-inv-Ω+`, `<ᵇ-inv-ψ+`
86+
* General additive-target bridges are now admitted and inverted:
87+
** `<ᵇ-+Ω`, `<ᵇ-+ψ`
88+
** `<ᵇ-inv-+Ω`, `<ᵇ-inv-+ψ`
8689
* `Ordinal.Buchholz.VeblenInterface` now pins a measure-based WF interface with explicit constructor obligations and deferred same-binder obligations (`dec-ψα`, `dec-+2`) for the Veblen-route follow-up.
8790
* `Ordinal.Buchholz.VeblenIdentityModel` provides a first concrete instantiation of that interface (identity measure bootstrap), with `dec-ψα` / `dec-+2` kept as explicit parameters.
8891
* `Ordinal.Buchholz.VeblenObligations` advances the hard-obligation discharge track with concrete projection-model lemmas for both same-binder shapes:
8992
** `dec-+2-plus-right`
9093
** `dec-ψα-psi-arg`
91-
* Open work remains for non-top `bplus` vs `bOmega`/`bpsi` comparisons and for the shared-binder cases (`<ᵇ-ψα`, `<ᵇ-+2`) in a `--without-K`-compatible style.
94+
* Open work is now concentrated in the shared-binder cases (`<ᵇ-ψα`, `<ᵇ-+2`) and their discharge into a `--without-K`-compatible measure model.
9295

9396
== External Bridge Targets (local workspace)
9497

0 commit comments

Comments
 (0)