|
| 1 | +{-# OPTIONS --safe --without-K #-} |
| 2 | + |
| 3 | +-- Direct recursive same-binder closure over the current Buchholz core. |
| 4 | +-- |
| 5 | +-- Unlike the blocked `SurfaceLiftInterface` route, this relation does |
| 6 | +-- not ask a single wrapper to be self-stable. Instead each derivation |
| 7 | +-- carries a finite same-binder depth, which can be extracted and |
| 8 | +-- embedded into the iterated wrapper tower. |
| 9 | + |
| 10 | +module Ordinal.Buchholz.RecursiveSurfaceOrder where |
| 11 | + |
| 12 | +open import Data.Nat.Base using (ℕ; zero; suc) |
| 13 | +open import Data.Product.Base using (Σ; _,_) |
| 14 | +open import Relation.Nullary using (¬_) |
| 15 | + |
| 16 | +open import Ordinal.Buchholz.Syntax using (BT; bplus; bpsi) |
| 17 | +open import Ordinal.Buchholz.Order using (_<ᵇ_) |
| 18 | +open import Ordinal.Buchholz.IteratedExtendedOrder using |
| 19 | + ( LiftedOrder |
| 20 | + ; SurfaceDepth |
| 21 | + ; surf-core |
| 22 | + ; surf-ψα |
| 23 | + ; surf-+2 |
| 24 | + ; surface⇒lifted |
| 25 | + ; LiftedOrder-irreflexive |
| 26 | + ) |
| 27 | + |
| 28 | +infix 4 _<ᵇʳᶠ_ |
| 29 | + |
| 30 | +data _<ᵇʳᶠ_ : BT → BT → Set where |
| 31 | + <ᵇʳᶠ-core : ∀ {x y} → x <ᵇ y → x <ᵇʳᶠ y |
| 32 | + <ᵇʳᶠ-ψα : ∀ {ν α β} → α <ᵇʳᶠ β → bpsi ν α <ᵇʳᶠ bpsi ν β |
| 33 | + <ᵇʳᶠ-+2 : ∀ {x y z} → y <ᵇʳᶠ z → bplus x y <ᵇʳᶠ bplus x z |
| 34 | + |
| 35 | +<ᵇʳᶠ-depth : ∀ {x y} → x <ᵇʳᶠ y → ℕ |
| 36 | +<ᵇʳᶠ-depth (<ᵇʳᶠ-core _) = zero |
| 37 | +<ᵇʳᶠ-depth (<ᵇʳᶠ-ψα p) = suc (<ᵇʳᶠ-depth p) |
| 38 | +<ᵇʳᶠ-depth (<ᵇʳᶠ-+2 p) = suc (<ᵇʳᶠ-depth p) |
| 39 | + |
| 40 | +<ᵇʳᶠ⇒SurfaceDepth : ∀ {x y} (p : x <ᵇʳᶠ y) → SurfaceDepth (<ᵇʳᶠ-depth p) x y |
| 41 | +<ᵇʳᶠ⇒SurfaceDepth (<ᵇʳᶠ-core x<y) = surf-core x<y |
| 42 | +<ᵇʳᶠ⇒SurfaceDepth (<ᵇʳᶠ-ψα p) = surf-ψα (<ᵇʳᶠ⇒SurfaceDepth p) |
| 43 | +<ᵇʳᶠ⇒SurfaceDepth (<ᵇʳᶠ-+2 p) = surf-+2 (<ᵇʳᶠ⇒SurfaceDepth p) |
| 44 | + |
| 45 | +SurfaceDepth⇒<ᵇʳᶠ : ∀ {n x y} → SurfaceDepth n x y → x <ᵇʳᶠ y |
| 46 | +SurfaceDepth⇒<ᵇʳᶠ (surf-core x<y) = <ᵇʳᶠ-core x<y |
| 47 | +SurfaceDepth⇒<ᵇʳᶠ (surf-ψα p) = <ᵇʳᶠ-ψα (SurfaceDepth⇒<ᵇʳᶠ p) |
| 48 | +SurfaceDepth⇒<ᵇʳᶠ (surf-+2 p) = <ᵇʳᶠ-+2 (SurfaceDepth⇒<ᵇʳᶠ p) |
| 49 | + |
| 50 | +<ᵇʳᶠ-depth-witness : ∀ {x y} (p : x <ᵇʳᶠ y) → Σ ℕ (λ n → SurfaceDepth n x y) |
| 51 | +<ᵇʳᶠ-depth-witness p = <ᵇʳᶠ-depth p , <ᵇʳᶠ⇒SurfaceDepth p |
| 52 | + |
| 53 | +<ᵇʳᶠ⇒lifted : ∀ {x y} (p : x <ᵇʳᶠ y) → LiftedOrder (suc (<ᵇʳᶠ-depth p)) x y |
| 54 | +<ᵇʳᶠ⇒lifted p = surface⇒lifted (<ᵇʳᶠ⇒SurfaceDepth p) |
| 55 | + |
| 56 | +<ᵇʳᶠ-irreflexive : ∀ {x} → ¬ (x <ᵇʳᶠ x) |
| 57 | +<ᵇʳᶠ-irreflexive {x} p = LiftedOrder-irreflexive (suc (<ᵇʳᶠ-depth p)) (<ᵇʳᶠ⇒lifted p) |
0 commit comments