11{-# OPTIONS --safe --without-K #-}
22
3- -- Stage E7 bridge scaffold for docs/buchholz-plan.adoc.
3+ -- Stage E7 of docs/buchholz-plan.adoc.
44--
5- -- Collapse a Buchholz term to a visible Ω-index marker and exhibit
6- -- non-injectivity at the plain-output level.
5+ -- Echo bridge for the ordinal notation layer. Reads the map that
6+ -- sends a Buchholz term to its "visible Ω-level" as a non-injective
7+ -- map, and shows that echoes retain the discarded structure —
8+ -- specifically the ψ-argument and the structural head.
9+ --
10+ -- The map is syntactic, not a semantic denotation of ψ: every
11+ -- `bpsi ν α` shares the same visible level ν regardless of the
12+ -- argument α, so distinct ψ-arguments over the same index appear as
13+ -- distinct echoes over the shared visible output.
714
815module EchoOrdinal where
916
1017open import Echo using (Echo; echo-intro)
1118
12- open import Data.Product.Base using (Σ; _×_; _,_; proj₁)
13- open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; cong)
19+ open import Data.Product.Base using (Σ; _×_; _,_; proj₁; proj₂)
20+ open import Data.Sum.Base using (_⊎_; inj₁; inj₂)
21+ open import Relation.Binary.PropositionalEquality using
22+ (_≡_; _≢_; refl; sym; trans; cong)
23+ open import Relation.Nullary using (¬_)
1424
15- open import Ordinal.OmegaMarkers using (OmegaIndex; Omega0)
25+ open import Ordinal.OmegaMarkers using (OmegaIndex; Omega0; Omega1 )
1626open import Ordinal.Buchholz.Syntax using (BT; bzero; bOmega; bplus; bpsi)
1727
28+ -- The visible Ω-level of a Buchholz term. `bpsi ν _` exposes ν and
29+ -- discards the argument; `bplus` is read by its left summand; base
30+ -- cases fall back to `Omega0`.
31+
1832ordinal-collapse : BT → OmegaIndex
1933ordinal-collapse bzero = Omega0
2034ordinal-collapse (bOmega μ) = μ
2135ordinal-collapse (bplus x y) = ordinal-collapse x
2236ordinal-collapse (bpsi μ α) = μ
2337
38+ ----------------------------------------------------------------------------
39+ -- Non-injectivity
40+ ----------------------------------------------------------------------------
41+
42+ -- Two distinct sources sharing the same visible Ω-level Omega0:
43+ -- one is the bare marker, the other is a ψ-term at index Ω₀.
44+
2445ordinal-left : BT
2546ordinal-left = bOmega Omega0
2647
@@ -35,6 +56,10 @@ ordinal-collapse-non-injective :
3556ordinal-collapse-non-injective =
3657 ordinal-left , ordinal-right , ordinal-left≢ordinal-right , refl
3758
59+ ----------------------------------------------------------------------------
60+ -- Echoes retain pre-collapse provenance
61+ ----------------------------------------------------------------------------
62+
3863ordinal-echo-left : Echo ordinal-collapse Omega0
3964ordinal-echo-left = echo-intro ordinal-collapse ordinal-left
4065
@@ -43,3 +68,78 @@ ordinal-echo-right = echo-intro ordinal-collapse ordinal-right
4368
4469ordinal-echo-left≢ordinal-echo-right : ordinal-echo-left ≢ ordinal-echo-right
4570ordinal-echo-left≢ordinal-echo-right p = ordinal-left≢ordinal-right (cong proj₁ p)
71+
72+ -- Shared alias matching the roadmap's naming of this theorem.
73+
74+ distinct-provenances-same-visible : ordinal-echo-left ≢ ordinal-echo-right
75+ distinct-provenances-same-visible = ordinal-echo-left≢ordinal-echo-right
76+
77+ -- Sharper example: two ψ-terms at the SAME Ω-index but with distinct
78+ -- ψ-arguments both land on the same visible level. This is the
79+ -- provenance-loss case that motivates the echo framing — the
80+ -- ψ-argument is exactly the collapsed data.
81+
82+ ordinal-psi-arg-bzero : BT
83+ ordinal-psi-arg-bzero = bpsi Omega0 bzero
84+
85+ ordinal-psi-arg-omega1 : BT
86+ ordinal-psi-arg-omega1 = bpsi Omega0 (bOmega Omega1)
87+
88+ ordinal-psi-args-distinct :
89+ ordinal-psi-arg-bzero ≢ ordinal-psi-arg-omega1
90+ ordinal-psi-args-distinct ()
91+
92+ ordinal-psi-arg-collapse-agree :
93+ ordinal-collapse ordinal-psi-arg-bzero ≡ ordinal-collapse ordinal-psi-arg-omega1
94+ ordinal-psi-arg-collapse-agree = refl
95+
96+ ordinal-echo-psi-bzero : Echo ordinal-collapse Omega0
97+ ordinal-echo-psi-bzero = echo-intro ordinal-collapse ordinal-psi-arg-bzero
98+
99+ ordinal-echo-psi-omega1 : Echo ordinal-collapse Omega0
100+ ordinal-echo-psi-omega1 = echo-intro ordinal-collapse ordinal-psi-arg-omega1
101+
102+ ordinal-echo-psi-distinct :
103+ ordinal-echo-psi-bzero ≢ ordinal-echo-psi-omega1
104+ ordinal-echo-psi-distinct p =
105+ ordinal-psi-args-distinct (cong proj₁ p)
106+
107+ ----------------------------------------------------------------------------
108+ -- No section through the collapse
109+ ----------------------------------------------------------------------------
110+
111+ -- The plain visible level cannot reconstruct the source: any
112+ -- right-inverse `g : OmegaIndex → BT` of `ordinal-collapse` would
113+ -- have to send the shared image `Omega0` back to a single source,
114+ -- but two distinct sources share that image.
115+
116+ no-section-ordinal-collapse :
117+ ¬ (Σ (OmegaIndex → BT) (λ g → ∀ t → g (ordinal-collapse t) ≡ t))
118+ no-section-ordinal-collapse (g , sec) =
119+ ordinal-left≢ordinal-right
120+ (trans (sym (sec ordinal-left)) (sec ordinal-right))
121+
122+ ----------------------------------------------------------------------------
123+ -- Preimage classification at Omega0
124+ ----------------------------------------------------------------------------
125+
126+ -- Any Buchholz term whose collapse is `Omega0` is structurally one of
127+ -- four cases, pinning the "visible = Omega0" preimage into a tractable
128+ -- classification. This is the echo-theoretic counterpart of
129+ -- `collapse-classification` from `EchoCharacteristic`, applied to the
130+ -- syntactic ordinal layer.
131+
132+ IsZeroSource : BT → Set
133+ IsZeroSource t = t ≡ bzero
134+ ⊎ (Σ BT (λ x → Σ BT (λ y → t ≡ bplus x y)))
135+ ⊎ t ≡ bOmega Omega0
136+ ⊎ (Σ BT (λ α → t ≡ bpsi Omega0 α))
137+
138+ ordinal-collapse-classification :
139+ ∀ (e : Echo ordinal-collapse Omega0) → IsZeroSource (proj₁ e)
140+ ordinal-collapse-classification (bzero , _) = inj₁ refl
141+ ordinal-collapse-classification (bOmega μ , refl) = inj₂ (inj₂ (inj₁ refl))
142+ ordinal-collapse-classification (bplus x y , _) =
143+ inj₂ (inj₁ (x , y , refl))
144+ ordinal-collapse-classification (bpsi μ α , refl) =
145+ inj₂ (inj₂ (inj₂ (α , refl)))
0 commit comments