|
| 1 | +{-# OPTIONS --safe --without-K #-} |
| 2 | + |
| 3 | +-- Comparison-model follow-up for the Veblen route. |
| 4 | +-- |
| 5 | +-- This packages the new lexicographic comparison target into a |
| 6 | +-- near-concrete interface instantiation. The two original deferred |
| 7 | +-- same-binder obligations are discharged internally; the remaining |
| 8 | +-- assumption is the lifted same-index ψ-to-plus case. |
| 9 | + |
| 10 | +module Ordinal.Buchholz.VeblenComparisonModel where |
| 11 | + |
| 12 | +open import Induction.WellFounded using (WellFounded) |
| 13 | +open import Data.Product.Base using (_,_) |
| 14 | +open import Data.Sum.Base using (inj₁; inj₂) |
| 15 | + |
| 16 | +open import Ordinal.OmegaMarkers using (_<Ω_; _≤Ω_) |
| 17 | +open import Ordinal.Buchholz.Syntax using (BT; bzero; bOmega; bplus; bpsi) |
| 18 | +open import Ordinal.Buchholz.Order using |
| 19 | + ( _<ᵇ_ |
| 20 | + ; <ᵇ-0-Ω |
| 21 | + ; <ᵇ-0-+ |
| 22 | + ; <ᵇ-0-ψ |
| 23 | + ; <ᵇ-ΩΩ |
| 24 | + ; <ᵇ-Ωψ |
| 25 | + ; <ᵇ-ψΩ |
| 26 | + ; <ᵇ-ψΩ≤ |
| 27 | + ; <ᵇ-Ω+ |
| 28 | + ; <ᵇ-ψ+ |
| 29 | + ; <ᵇ-+Ω |
| 30 | + ; <ᵇ-+ψ |
| 31 | + ; <ᵇ-+1 |
| 32 | + ) |
| 33 | +open import Ordinal.Buchholz.VeblenInterface using (VeblenWFInterface) |
| 34 | +open import Ordinal.Buchholz.VeblenComparisonTarget using |
| 35 | + ( ComparisonMeasure |
| 36 | + ; _≈ᶜ_ |
| 37 | + ; ≈ᶜ-+ |
| 38 | + ; ≈ᶜ-ψ |
| 39 | + ; ≈ᶜ-Ω |
| 40 | + ; _≺C_ |
| 41 | + ; by-first |
| 42 | + ; by-second |
| 43 | + ; ≺C-wf |
| 44 | + ) |
| 45 | + |
| 46 | +cmp-payload : BT → BT |
| 47 | +cmp-payload bzero = bzero |
| 48 | +cmp-payload (bOmega _) = bzero |
| 49 | +cmp-payload (bplus _ y) = y |
| 50 | +cmp-payload (bpsi _ α) = α |
| 51 | + |
| 52 | +cmp-measure : BT → ComparisonMeasure |
| 53 | +cmp-measure t = t , cmp-payload t |
| 54 | + |
| 55 | +cmp-dec-Ω+ : |
| 56 | + ∀ {μ x y} → |
| 57 | + cmp-measure (bOmega μ) ≺C cmp-measure x → |
| 58 | + cmp-measure (bOmega μ) ≺C cmp-measure (bplus x y) |
| 59 | +cmp-dec-Ω+ (inj₁ Ω<x) = by-first (<ᵇ-Ω+ Ω<x) |
| 60 | +cmp-dec-Ω+ (inj₂ (≈ᶜ-Ω , ())) |
| 61 | + |
| 62 | +cmp-dec-ψ+ : |
| 63 | + (dec-ψ+-same-index : |
| 64 | + ∀ {ν α β y} → |
| 65 | + α <ᵇ β → |
| 66 | + cmp-measure (bpsi ν α) ≺C cmp-measure (bplus (bpsi ν β) y)) → |
| 67 | + ∀ {ν α x y} → |
| 68 | + cmp-measure (bpsi ν α) ≺C cmp-measure x → |
| 69 | + cmp-measure (bpsi ν α) ≺C cmp-measure (bplus x y) |
| 70 | +cmp-dec-ψ+ dec-ψ+-same-index (inj₁ ψ<x) = by-first (<ᵇ-ψ+ ψ<x) |
| 71 | +cmp-dec-ψ+ dec-ψ+-same-index (inj₂ (≈ᶜ-ψ , α<β)) = dec-ψ+-same-index α<β |
| 72 | + |
| 73 | +comparison-interface : |
| 74 | + (dec-ψ+-same-index : |
| 75 | + ∀ {ν α β y} → |
| 76 | + α <ᵇ β → |
| 77 | + cmp-measure (bpsi ν α) ≺C cmp-measure (bplus (bpsi ν β) y)) → |
| 78 | + VeblenWFInterface ComparisonMeasure _≺C_ |
| 79 | +comparison-interface dec-ψ+-same-index = record |
| 80 | + { measure = cmp-measure |
| 81 | + ; ≺-wf = ≺C-wf |
| 82 | + ; dec-0-Ω = by-first <ᵇ-0-Ω |
| 83 | + ; dec-0-+ = by-first <ᵇ-0-+ |
| 84 | + ; dec-0-ψ = by-first <ᵇ-0-ψ |
| 85 | + ; dec-ΩΩ = λ μ<ν → by-first (<ᵇ-ΩΩ μ<ν) |
| 86 | + ; dec-Ωψ = λ μ<ν → by-first (<ᵇ-Ωψ μ<ν) |
| 87 | + ; dec-ψΩ = λ μ<ν → by-first (<ᵇ-ψΩ μ<ν) |
| 88 | + ; dec-ψΩ≤ = λ ν≤μ → by-first (<ᵇ-ψΩ≤ ν≤μ) |
| 89 | + ; dec-Ω+ = cmp-dec-Ω+ |
| 90 | + ; dec-ψ+ = cmp-dec-ψ+ dec-ψ+-same-index |
| 91 | + ; dec-+Ω = λ x<Ω → by-first (<ᵇ-+Ω x<Ω) |
| 92 | + ; dec-+ψ = λ x<ψ → by-first (<ᵇ-+ψ x<ψ) |
| 93 | + ; dec-+1 = λ x₁<y₁ → by-first (<ᵇ-+1 x₁<y₁) |
| 94 | + ; dec-ψα = λ α<β → by-second ≈ᶜ-ψ α<β |
| 95 | + ; dec-+2 = λ y₂<z₂ → by-second ≈ᶜ-+ y₂<z₂ |
| 96 | + } |
| 97 | + |
| 98 | +core-wf-from-comparison : |
| 99 | + (dec-ψ+-same-index : |
| 100 | + ∀ {ν α β y} → |
| 101 | + α <ᵇ β → |
| 102 | + cmp-measure (bpsi ν α) ≺C cmp-measure (bplus (bpsi ν β) y)) → |
| 103 | + WellFounded _<ᵇ_ |
| 104 | +core-wf-from-comparison dec-ψ+-same-index = |
| 105 | + VeblenWFInterface.core-wf (comparison-interface dec-ψ+-same-index) |
0 commit comments