88-- the term heads naturally determine. Totality is *not* proved here
99-- and neither is well-foundedness; those are WF-1 and WF-2.
1010--
11- -- Scope of this module. The 7 constructors below cover the head
11+ -- Scope of this module. The constructors below cover the head
1212-- pairs marked ✓ in the matrix, with the lex-on-left-summand case
1313-- for bplus and the lex-on-Ω-index case for bpsi:
1414--
1515-- head of x \ head of y │ bzero │ bOmega │ bplus │ bpsi
1616-- ──────────────────────┼───────┼────────┼───────┼──────
1717-- bzero │ – │ ✓ │ ✓ │ ✓
18- -- bOmega │ │ ✓ │ │ ✓ (when μ <Ω ν)
18+ -- bOmega │ │ ✓ │ ✓ │ ✓ (when μ <Ω ν)
1919-- bplus │ │ │ ✓ │
20- -- bpsi │ │ ✓ │ │ ✓ (when μ <Ω ν)
20+ -- bpsi │ │ ✓ │ ✓ │ ✓ (when μ <Ω ν)
2121--
2222-- Open cases (no constructor yet; must be discharged in follow-ups
2323-- before `<ᵇ`-totality and well-foundedness can land):
2424--
25- -- * bOmega vs bplus (general case) — requires a comparison
26- -- between atomic heads and additive normal forms. A narrow
27- -- top-marker bridge is admitted by `<ᵇ-+ω`.
28- -- * bpsi vs bplus (either direction) — same reason, mediated by
29- -- the leading bpsi summand of a bplus in CNF.
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.
3029-- * Two same-binder sub-cases whose natural shapes run into Agda
3130-- 2.6.3's `--without-K` restriction on reflexive-equation
3231-- elimination and are deferred pending a K-free reformulation:
@@ -76,6 +75,10 @@ data _<ᵇ_ : BT → BT → Set where
7675 <ᵇ-ψΩ : ∀ {μ ν α β} → μ <Ω ν → bpsi μ α <ᵇ bpsi ν β
7776 <ᵇ-ψΩ≤ : ∀ {ν μ α} → ν ≤Ω μ → bpsi ν α <ᵇ bOmega μ
7877
78+ -- Left-summand bridge into additive terms.
79+ <ᵇ-Ω+ : ∀ {μ x y} → bOmega μ <ᵇ x → bOmega μ <ᵇ bplus x y
80+ <ᵇ-ψ+ : ∀ {ν α x y} → bpsi ν α <ᵇ x → bpsi ν α <ᵇ bplus x y
81+
7982 -- bplus comparison by the left summand. The same-left sub-case
8083 -- (compare right summands when lefts agree) is deferred for the
8184 -- same `--without-K` reason as `<ᵇ-ψα` above: its natural shape
@@ -115,27 +118,43 @@ infix 4 _<ᵇ_
115118-- Left leg: <ᵇ-0-Ω (x = bzero, y = bOmega _)
116119<ᵇ-trans <ᵇ-0-Ω (<ᵇ-ΩΩ _) = <ᵇ-0-Ω
117120<ᵇ-trans <ᵇ-0-Ω (<ᵇ-Ωψ _) = <ᵇ-0-ψ
121+ <ᵇ-trans <ᵇ-0-Ω (<ᵇ-Ω+ _) = <ᵇ-0-+
118122-- Left leg: <ᵇ-0-+ (x = bzero, y = bplus _ _)
119123<ᵇ-trans <ᵇ-0-+ (<ᵇ-+1 _) = <ᵇ-0-+
120124<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ω _) = <ᵇ-0-Ω
121125<ᵇ-trans <ᵇ-0-+ (<ᵇ-+ψω _) = <ᵇ-0-ψ
122126-- Left leg: <ᵇ-0-ψ (x = bzero, y = bpsi _ _)
123127<ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψΩ _) = <ᵇ-0-ψ
128+ <ᵇ-trans <ᵇ-0-ψ (<ᵇ-ψ+ _) = <ᵇ-0-+
124129-- Left leg: <ᵇ-ΩΩ (x = bOmega _, y = bOmega _)
125130<ᵇ-trans (<ᵇ-ΩΩ p) (<ᵇ-ΩΩ q) = <ᵇ-ΩΩ (<Ω-trans p q)
126131<ᵇ-trans (<ᵇ-ΩΩ p) (<ᵇ-Ωψ q) = <ᵇ-Ωψ (<Ω-trans p q)
132+ <ᵇ-trans (<ᵇ-ΩΩ p) (<ᵇ-Ω+ q) = <ᵇ-Ω+ (<ᵇ-trans (<ᵇ-ΩΩ p) q)
127133-- Left leg: <ᵇ-Ωψ (x = bOmega _, y = bpsi _ _)
128134<ᵇ-trans (<ᵇ-Ωψ p) (<ᵇ-ψΩ q) = <ᵇ-Ωψ (<Ω-trans p q)
135+ <ᵇ-trans (<ᵇ-Ωψ p) (<ᵇ-ψ+ q) = <ᵇ-Ω+ (<ᵇ-trans (<ᵇ-Ωψ p) q)
129136-- Left leg: <ᵇ-ψΩ (x = bpsi _ _, y = bpsi _ _)
130137<ᵇ-trans (<ᵇ-ψΩ p) (<ᵇ-ψΩ q) = <ᵇ-ψΩ (<Ω-trans p q)
131138<ᵇ-trans (<ᵇ-ψΩ p) (<ᵇ-ψΩ≤ q) = <ᵇ-ψΩ≤ (≤Ω-trans (<Ω→≤Ω p) q)
139+ <ᵇ-trans (<ᵇ-ψΩ p) (<ᵇ-ψ+ q) = <ᵇ-ψ+ (<ᵇ-trans (<ᵇ-ψΩ p) q)
132140-- Left leg: <ᵇ-ψΩ≤ (x = bpsi _ _, y = bOmega _)
133141<ᵇ-trans (<ᵇ-ψΩ≤ p) (<ᵇ-ΩΩ q) = <ᵇ-ψΩ≤ (≤Ω-trans p (<Ω→≤Ω q))
134142<ᵇ-trans (<ᵇ-ψΩ≤ p) (<ᵇ-Ωψ q) = <ᵇ-ψΩ (≤Ω-<Ω-trans p q)
143+ <ᵇ-trans (<ᵇ-ψΩ≤ p) (<ᵇ-Ω+ q) = <ᵇ-ψ+ (<ᵇ-trans (<ᵇ-ψΩ≤ p) q)
135144-- Left leg: <ᵇ-+1 (x = bplus _ _, y = bplus _ _)
136145<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+1 q) = <ᵇ-+1 (<ᵇ-trans p q)
137146<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ω q) = <ᵇ-+ω (<ᵇ-trans p q)
138147<ᵇ-trans (<ᵇ-+1 p) (<ᵇ-+ψω q) = <ᵇ-+ψω (<ᵇ-trans p q)
148+ -- Left leg: <ᵇ-Ω+ (x = bOmega _, y = bplus _ _)
149+ <ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+1 q) = <ᵇ-Ω+ (<ᵇ-trans p q)
150+ <ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+ω q) = <ᵇ-trans p q
151+ <ᵇ-trans (<ᵇ-Ω+ p) (<ᵇ-+ψω q) = <ᵇ-trans p q
152+ -- Left leg: <ᵇ-ψ+ (x = bpsi _ _, y = bplus _ _)
153+ <ᵇ-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)
139158-- Left leg: <ᵇ-+ψω (x = bplus _ _, y = bpsi ω _)
140159<ᵇ-trans (<ᵇ-+ψω p) (<ᵇ-ψΩ≤ ω≤ω) = <ᵇ-+ω (<ᵇ-trans p (<ᵇ-ψΩ≤ ω≤ω))
141160-- Right leg: <ᵇ-ψΩ≤ (y = bpsi _ _, z = bOmega _)
@@ -146,12 +165,11 @@ infix 4 _<ᵇ_
146165-- WF-2 open-case inversions (Ω vs +)
147166----------------------------------------------------------------------------
148167
149- -- The current 7-constructor core has no witness for either direction.
150- -- These inversion lemmas pin that fact explicitly for downstream case
151- -- splits while the comparison rule is still deferred.
168+ -- The Ω→+ bridge is admitted (`<ᵇ-Ω+`), while the non-top
169+ -- bplus→Ω case remains deferred.
152170
153- <ᵇ-inv-Ω+ : ∀ {μ x y} → bOmega μ <ᵇ bplus x y → ⊥
154- <ᵇ-inv-Ω+ ()
171+ <ᵇ-inv-Ω+ : ∀ {μ x y} → bOmega μ <ᵇ bplus x y → bOmega μ <ᵇ x
172+ <ᵇ-inv-Ω+ (<ᵇ-Ω+ Ω<x) = Ω<x
155173
156174<ᵇ-inv-+Ωfin : ∀ {x y n} → bplus x y <ᵇ bOmega (fin n) → ⊥
157175<ᵇ-inv-+Ωfin ()
@@ -164,11 +182,11 @@ infix 4 _<ᵇ_
164182-- WF-2 open-case inversions (ψ vs +)
165183----------------------------------------------------------------------------
166184
167- -- Like Ω-vs-+, these comparisons are still deferred and currently
168- -- have no constructors in either direction .
185+ -- The ψ→+ bridge is admitted (`<ᵇ-ψ+`), while the non-top
186+ -- bplus→ψ case remains deferred .
169187
170- <ᵇ-inv-ψ+ : ∀ {μ α x y} → bpsi μ α <ᵇ bplus x y → ⊥
171- <ᵇ-inv-ψ+ ()
188+ <ᵇ-inv-ψ+ : ∀ {μ α x y} → bpsi μ α <ᵇ bplus x y → bpsi μ α <ᵇ x
189+ <ᵇ-inv-ψ+ (<ᵇ-ψ+ ψ<x) = ψ<x
172190
173191<ᵇ-inv-+ψfin : ∀ {x y n α} → bplus x y <ᵇ bpsi (fin n) α → ⊥
174192<ᵇ-inv-+ψfin ()
0 commit comments