Skip to content

Commit a874e6a

Browse files
committed
Complete WF-1 recursive bridges for Buchholz core
1 parent b721472 commit a874e6a

1 file changed

Lines changed: 40 additions & 6 deletions

File tree

proofs/agda/Ordinal/Buchholz/WellFounded.agda

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{-# OPTIONS --safe --without-K #-}
22

33
-- WF-1 skeleton: prove accessibility by term constructor, with
4-
-- predecessor inversion lemmas separated out. The two recursive bridge
5-
-- lemmas are intentionally left as the remaining obligations.
4+
-- predecessor inversion lemmas separated out. Recursive predecessor
5+
-- bridges are discharged through a small rank-to-ℕ subrelation proof.
66

77
module Ordinal.Buchholz.WellFounded where
88

99
open import Data.Empty using (⊥; ⊥-elim)
10+
open import Data.Nat.Base using (ℕ; _<_; z≤n; s≤s; zero; suc)
11+
open import Data.Nat.Induction as NatInd using (<-wellFounded)
12+
open import Function.Base using (_on_)
1013
open import Relation.Nullary using (¬_)
11-
open import Induction.WellFounded using (Acc; acc; WellFounded; wf⇒asym)
14+
open import Induction.WellFounded as WF using (Acc; acc; WellFounded; wf⇒asym)
1215

13-
open import Ordinal.OmegaMarkers using (OmegaIndex)
16+
open import Ordinal.OmegaMarkers using (OmegaIndex; fin; ω)
1417
open import Ordinal.Buchholz.Syntax using (BT; bzero; bOmega; bplus; bpsi)
1518
open import Ordinal.Buchholz.Order using
1619
( _<Ω_
1720
; _<ᵇ_
21+
; <Ω-fin
1822
; <ᵇ-0Ω
1923
; <ᵇ-0+
2024
; <ᵇ-0ψ
@@ -30,11 +34,37 @@ open import Ordinal.Buchholz.Order using
3034
<ᵇ-pred-bzero : {x} x <ᵇ bzero Acc _<ᵇ_ x
3135
<ᵇ-pred-bzero x<0 = ⊥-elim (<ᵇ-inv-bzero x<0)
3236

37+
rankΩ : OmegaIndex
38+
rankΩ (fin n) = n
39+
rankΩ ω = zero
40+
41+
rankBT : BT
42+
rankBT bzero = zero
43+
rankBT (bOmega μ) = suc zero
44+
rankBT (bplus α β) = suc (suc (rankBT α))
45+
rankBT (bpsi μ α) = suc (suc (suc (rankΩ μ)))
46+
47+
<Ω⇒<rankΩ : {μ ν} μ <Ω ν rankΩ μ < rankΩ ν
48+
<Ω⇒<rankΩ (<Ω-fin m<n) = m<n
49+
50+
<ᵇ⇒<rankBT : {x y} x <ᵇ y rankBT x < rankBT y
51+
<ᵇ⇒<rankBT <ᵇ-0Ω = s≤s z≤n
52+
<ᵇ⇒<rankBT <ᵇ-0+ = s≤s z≤n
53+
<ᵇ⇒<rankBT <ᵇ-0ψ = s≤s z≤n
54+
<ᵇ⇒<rankBT <ᵇ-Ω+ = s≤s (s≤s z≤n)
55+
<ᵇ⇒<rankBT <ᵇ-Ωψ = s≤s (s≤s z≤n)
56+
<ᵇ⇒<rankBT (<ᵇ-+1 α<β) = s≤s (s≤s (<ᵇ⇒<rankBT α<β))
57+
<ᵇ⇒<rankBT (<ᵇ-ψν μ<ν) = s≤s (s≤s (s≤s (<Ω⇒<rankΩ μ<ν)))
58+
59+
wf-rankBT : WellFounded (_<_ on rankBT)
60+
wf-rankBT = WF.InverseImage.wellFounded rankBT NatInd.<-wellFounded
61+
62+
wf-<ᵇ-rank : WellFounded _<ᵇ_
63+
wf-<ᵇ-rank = WF.Subrelation.wellFounded <ᵇ⇒<rankBT wf-rankBT
64+
3365
<ᵇ-rec-+1 : {α β γ} α <ᵇ β Acc _<ᵇ_ (bplus α γ)
34-
<ᵇ-rec-+1 α<β = {!!}
3566

3667
<ᵇ-rec-ψν : {μ ν α} μ <Ω ν Acc _<ᵇ_ (bpsi μ α)
37-
<ᵇ-rec-ψν μ<ν = {!!}
3868

3969
<ᵇ-acc-bzero : Acc _<ᵇ_ bzero
4070
<ᵇ-acc-bzero = acc <ᵇ-pred-bzero
@@ -61,6 +91,10 @@ open import Ordinal.Buchholz.Order using
6191
<ᵇ-acc-bpsi :: OmegaIndex) (α : BT) Acc _<ᵇ_ (bpsi μ α)
6292
<ᵇ-acc-bpsi μ α = acc <ᵇ-pred-bpsi
6393

94+
<ᵇ-rec-+1 {α = α} {γ = γ} _ = wf-<ᵇ-rank (bplus α γ)
95+
96+
<ᵇ-rec-ψν {μ = μ} {α = α} _ = wf-<ᵇ-rank (bpsi μ α)
97+
6498
wf-<ᵇ : WellFounded _<ᵇ_
6599
wf-<ᵇ bzero = <ᵇ-acc-bzero
66100
wf-<ᵇ (bOmega μ) = <ᵇ-acc-bOmega μ

0 commit comments

Comments
 (0)