Skip to content

Commit c9f72b7

Browse files
committed
docs: consolidate budgeted-recursive-surface rung
Rung-consolidation pass per the policy added in CLAUDE.md. Main has now advanced past the Pentagon rung (cancel-iso + Echo-comp-iso-pent- {B, echo}, already merged via separate landings) into the **budgeted recursive-surface rung** — `RecursiveSurfaceBudget.agda` plus the surface/extended/iterated/Veblen layer modules that feed it. This commit does no code work; it brings the human docs (CLAUDE.md, composition.md, roadmap.md) into line with what is actually on main. Changes: CLAUDE.md Ordinal-track summary extended to name the new layer modules (Order.agda's 13-constructor admitted core; surface / extended / iterated / Veblen routes; RecursiveSurfaceBudget.agda's BudgetedBT + wf-<ᵇʳᶠᵇ + <ᵇʳᶠᵇ⇒lifted). Open pieces at this rung enumerated: shared-binder constructors, unbudgeted global `_<ᵇʳᶠ_` WF, pushback into Order.agda. Current-rung-state section refreshed. Still dated 2026-04-23 as a same-day consolidation. docs/echo-types/composition.md Q4 (associativity) moved from "conjecture" to "partially landed" with the two projection-pentagon lemmas called out explicitly. Compact statement item 4 marked (Partial). The "what to formalise next" ordering updated: pentagon struck through with pointer to the full Σ-associativity iso as the remaining piece. docs/echo-types/roadmap.md Formalisation list now includes the budgeted-recursive-surface rung as [partial] alongside the pentagon [partial] entry. Suggested immediate ordering gains a step 4 for unbudgeted `_<ᵇʳᶠ_` WF; subsequent steps renumbered. Verified: agda proofs/agda/All.agda and agda proofs/agda/Smoke.agda both exit 0 under --safe --without-K. No postulates anywhere in proofs/agda. https://claude.ai/code/session_01JRLz84fAaWvRBKyXuc4tyK
1 parent e9d4ad0 commit c9f72b7

3 files changed

Lines changed: 176 additions & 31 deletions

File tree

CLAUDE.md

Lines changed: 111 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,42 @@ Adjacent projects, in one line each, for session bootstrapping:
4242
echo-types — constructive Agda formalization of fiber-based structured loss
4343
("echo types"). Gated identity-claim development per roadmap-gates.adoc.
4444

45-
Current workstream: **E (ordinal-notation / Buchholz collapsing layer)**
46-
per docs/buchholz-plan.adoc. Aims to land a proof-theoretic collapsing-function
47-
target — first credible milestone Bachmann–Howard (ψ₀(Ω_ω)), stretch
48-
target ψ(Ω_Ω) ≈ TFBO.
45+
Two active workstreams:
4946

50-
First landed proof: `C-monotone` in proofs/agda/Ordinal/Closure.agda.
51-
Next planned: E3 CNF trichotomy, then E4 pedagogical `psi-notin-C`.
47+
1. **Composition track (Echo.agda + echo-types theory docs).** Base
48+
accumulation iso `Echo-comp-iso-{to, from, from-to, to-from}`
49+
landed. Cancellation forward/backward maps `cancel-iso-{to, from}`
50+
landed; full iso deferred pending triangle-identity coherence.
51+
Pentagon coherence partial: projection-pentagon lemmas
52+
`Echo-comp-iso-pent-{B, echo}` landed as `refl`; full
53+
Σ-associativity iso between the two nested Σ-shapes open.
54+
55+
2. **Ordinal track (buchholz-plan.adoc).** Target remains Bachmann–
56+
Howard (ψ₀(Ω_ω)) as first credible milestone, stretch to ψ(Ω_Ω)
57+
≈ TFBO. E1–E7 landed (OT syntax, ℕ-staged closure with
58+
`C-monotone`, CNF with `cnf-trichotomy`, pedagogical ψ with
59+
`psi-notin-C`/`psi-least`, Buchholz scaffold with `Cν-monotone`
60+
family, well-formedness with `BH-wf`/`psi-OmegaOmega-wf`, echo
61+
bridge with `ordinal-collapse-non-injective`). WF-0 partial
62+
Buchholz order `_<ᵇ_` and WF-1 well-foundedness `wf-<ᵇ` landed
63+
for the admitted core (currently `Order.agda`'s 13-constructor
64+
set including Ω/+ and ψ/+ bridges). Surface / extended / iterated
65+
/ Veblen layers now live under `Ordinal/Buchholz/*` and feed a
66+
second measure route via `VeblenComparisonModel.agda`.
67+
Recursive-surface route has a **budgeted** well-foundedness
68+
`wf-<ᵇʳᶠᵇ` in `RecursiveSurfaceBudget.agda` (carries ℕ budget
69+
alongside BT); the unbudgeted global WF theorem for `_<ᵇʳᶠ_`
70+
remains open.
71+
72+
Open pieces on this track:
73+
* Full constructor set beyond the admitted core (K-limited
74+
shared-binder cases such as `<ᵇ-ψα`, `<ᵇ-+2`).
75+
* Unbudgeted `_<ᵇʳᶠ_` global WF — eliminate the explicit ℕ
76+
budget from `wf-<ᵇʳᶠᵇ` without leaving `--safe --without-K`.
77+
* Push the surface-route WF back into `Order.agda`'s main
78+
`_<ᵇ_` package.
79+
80+
Cross-repo bridge status lives in `docs/echo-types/cross-repo-bridge-status.md`.
5281

5382
# Build
5483

@@ -60,10 +89,84 @@ for f in proofs/agda/*.agda proofs/agda/Ordinal/*.agda proofs/agda/Ordinal/Buchh
6089
done
6190
```
6291

92+
Requires Agda ≥ 2.6.3 with stdlib ≥ 2.0. On Ubuntu 24.04 with apt's
93+
`agda`/`agda-stdlib` (which ships stdlib 1.7.3 and lacks
94+
`Data.Product.Base`), check out stdlib 2.0 from source:
95+
```
96+
git clone --depth 1 --branch v2.0 https://github.com/agda/agda-stdlib.git /opt/agda-stdlib
97+
sed -i 's/^name: standard-library-2.0$/name: standard-library/' /opt/agda-stdlib/standard-library.agda-lib
98+
mkdir -p ~/.agda && echo /opt/agda-stdlib/standard-library.agda-lib > ~/.agda/libraries
99+
```
100+
Then `LC_ALL=C.UTF-8 agda proofs/agda/All.agda` exits 0.
101+
63102
# Working rules in this repo
64103

65104
- No postulates unless explicitly isolated and justified.
66105
- `--safe --without-K` throughout.
67106
- Every edit ends with an Agda compile command and captured output.
68-
- Every headline theorem must be pinned in Smoke.agda via `using` clause.
69-
- Branch for ordinal-notation work: claude/add-ordinal-notation-layer-9qhSf.
107+
- Every headline theorem must be pinned in `Smoke.agda` via `using` clause.
108+
- Every new module goes into `All.agda` as an `open import` so the
109+
verified suite covers it. Orphan modules that compile but are not
110+
in `All.agda` are treated as dead code.
111+
112+
## Rung-consolidation policy (added 2026-04-23)
113+
114+
Each time a new proof rung lands on the composition or ordinal
115+
tracks (a named theorem or iso-shape), consolidate all outstanding
116+
work to `main` and refresh all documentation:
117+
118+
1. **Branch housekeeping.** Enumerate all open remote branches
119+
ahead of `main`. Decide which are landing, which are superseded,
120+
and which are abandoned. Merge the landing ones; mark the
121+
superseded / abandoned ones in the session ledger.
122+
2. **Cherry-pick to a consolidation branch** off latest `main`, in
123+
dependency order. Resolve any conflicts (typically additive, in
124+
`Smoke.agda` and `All.agda`).
125+
3. **Update human docs.** `docs/echo-types/composition.md`,
126+
`docs/echo-types/roadmap.md`, `docs/echo-types/overview.md` and
127+
`cross-repo-bridge-status.md` get a sweep for stale `(Open)` /
128+
`[unblocked]` tags on anything that just landed. Honest labels:
129+
`(Landed)`, `(Partial)`, `(Open)`.
130+
4. **Update machine docs (this file).** Add the new rung under the
131+
active-workstream summary. Update the build instructions if the
132+
toolchain changed. Note any new structural constraints that would
133+
guide a fresh session's first steps.
134+
5. **Verify.** `agda proofs/agda/All.agda` and `agda proofs/agda/Smoke.agda`
135+
both exit 0 under `--safe --without-K`. No postulates introduced.
136+
6. **Fast-forward `main`** to the consolidation branch and push.
137+
7. **Session ledger.** In the session response, record the rung
138+
name, the commits folded in, the remaining open pieces of the
139+
milestone, and the proposed smallest useful next advance.
140+
141+
## Current rung state (2026-04-23)
142+
143+
Just consolidated: **Budgeted recursive-surface rung** (on top of
144+
the earlier **Pentagon rung**). Folded in:
145+
146+
* Composition-track (already upstream via separate landings):
147+
`cancel-iso-{to, from}`, `Echo-comp-iso-pent-{B, echo}`.
148+
* Ordinal-track (new on this sweep): `RecursiveSurfaceBudget.agda`
149+
with `BudgetedBT = ℕ × BT`, `_<ᵇʳᶠᵇ_`, `wf-<ᵇʳᶠᵇ`,
150+
`<ᵇʳᶠᵇ-irreflexive`, and the `<ᵇʳᶠᵇ⇒lifted` bridge into the
151+
iterated-wrapper tower. Auxiliary layers (`ExtendedOrder`,
152+
`LiftedExtendedOrder`, `IteratedExtendedOrder`,
153+
`RecursiveSurfaceOrder`, `SurfaceOrder`, `VeblenInterface`,
154+
`VeblenIdentityModel`, `VeblenMeasureTarget`,
155+
`VeblenProjectionMeasure`, `VeblenComparisonTarget`,
156+
`VeblenComparisonModel`, `VeblenObligations`) are all wired
157+
into `All.agda` and pinned in `Ordinal/Buchholz/Smoke.agda`.
158+
159+
Open at this rung:
160+
161+
* Composition side: full cancel-iso round-trips (needs triangle
162+
identity); full Σ-associativity iso for pentagon; approximate-echo
163+
skeleton `EchoApprox.agda`.
164+
* Ordinal side: unbudgeted global WF for `_<ᵇʳᶠ_` — eliminate the
165+
explicit ℕ budget from `wf-<ᵇʳᶠᵇ` without leaving `--safe --without-K`;
166+
then push that back into `Order.agda`'s `_<ᵇ_` package so the
167+
WF proof covers the full surface route rather than the admitted
168+
core only.
169+
170+
Verified post-rebase: `agda proofs/agda/All.agda` and
171+
`agda proofs/agda/Smoke.agda` both exit 0 under `--safe --without-K`.
172+
No postulates introduced.

docs/echo-types/composition.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,33 @@ coarser bounds.
153153
*Status.* Entirely speculative. Requires a formal definition of
154154
approximate echo first.
155155

156-
### Q4. Associativity
156+
### Q4. Associativity — partially landed
157157

158158
*Question.* Does the accumulation isomorphism above satisfy the
159159
pentagon coherence for three-fold composition? I.e., for
160-
`f : A → B`, `g : B → C`, `h : C → D`, does the two ways of
161-
associating `Echo((h ∘ g) ∘ f) = Echo(h ∘ (g ∘ f))` yield equivalent
160+
`f : A → B`, `g : B → C`, `h : C → D`, do the two ways of
161+
associating `Echo((h ∘ g) ∘ f) Echo(h ∘ (g ∘ f))` yield equivalent
162162
iso's?
163163

164-
*Expectation.* Yes, but the proof requires the iso to land as a
165-
`map-over` morphism whose `commute` field is itself proved by
166-
pentagon-style transitivity. `Echo.map-over-comp` already bottles
167-
the relevant shape. Proving pentagon on top is routine but not
168-
written down.
164+
*Answer (partial).* Yes for the load-bearing projections. The two
165+
pentagon-style lemmas `Echo-comp-iso-pent-B` and
166+
`Echo-comp-iso-pent-echo` (both `refl`) confirm that the two
167+
natural factorings — inner-first `(f, h∘g)` versus outer-first
168+
`(g∘f, h)` then `(f, g)` — produce the same `f x` at the B-component
169+
and the same `(x , refl) : Echo f (f x)` at the Echo-f witness. The
170+
full Σ-associativity iso between the two nested Σ-shapes (which
171+
differ by whether the intermediate `c : C` with `g b ≡ c` is
172+
carried or absorbed) is the remaining open piece of pentagon
173+
coherence.
174+
175+
*Evidence this is the right shape.* Both lemmas land as `refl`
176+
without any `trans-assoc` / `cong-trans` manipulation, because
177+
`Echo-comp-iso-to`'s body `(x , p) ↦ (f x , (x , refl) , p)` is
178+
structurally symmetric in the outer function — the f-component
179+
and witness do not depend on which outer is peeled off. If the
180+
iso had a `trans`-shaped body instead, pentagon would have
181+
required real coherence lemmas; the `refl` outcome is evidence
182+
the iso has the right design.
169183

170184
### Q5. Interaction with role-indexing, gradings, linearity
171185

@@ -209,7 +223,10 @@ Collecting the above:
209223
`s-right`). Round-trips deferred pending a triangle-identity
210224
coherence or a stdlib `Function.Bundles.Inverse` shim.
211225

212-
4. **(Open) Pentagon.** Three-fold composition associates.
226+
4. **(Partial) Pentagon.** Three-fold composition associates at
227+
the projections. `Echo-comp-iso-pent-B` and
228+
`Echo-comp-iso-pent-echo` both `refl`; full Σ-shape iso still
229+
open.
213230

214231
5. **(Open) Tolerance calculus.** For approximate echoes, tolerances
215232
compose with a Lipschitz-like law.
@@ -229,9 +246,10 @@ Ranked by unblock-value. (1) and (2) landed; (3) onwards is open.
229246
2. ~~**Cancellation corollary.**~~ Partially landed as
230247
`cancel-iso-to` / `cancel-iso-from`; full iso deferred pending
231248
triangle-identity coherence (see §3 above).
232-
3. **Pentagon coherence.** Three-fold composition associates.
233-
Moderate proof on top of `Echo-comp-iso`, probably one more
234-
lemma. Next concrete follow-up on this track.
249+
3. ~~**Pentagon coherence.**~~ Partially landed: the two
250+
projection-level pentagon lemmas (`-pent-B`, `-pent-echo`)
251+
ship as `refl`. The full Σ-associativity iso between the two
252+
nested shapes remains open.
235253
4. **Full cancel-iso with round-trips.** Needs an equivalence
236254
record that packages `s-left`, `s-right`, and the triangle
237255
identity as three fields, or direct use of stdlib's

docs/echo-types/roadmap.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,23 @@ Paths marked **[unblocked]** can proceed today. Paths marked
5858
needing only the relevant half of g's iso structure. Round-trips
5959
are **deferred** pending a triangle-identity coherence or a stdlib
6060
`Function.Bundles.Inverse` shim. See `composition.md` §3.
61-
- **[unblocked]** Pentagon coherence for three-fold composition.
62-
Routine proof on top of `Echo-comp-iso`; next concrete follow-up.
61+
- **[partial]** Pentagon coherence for three-fold composition.
62+
`Echo-comp-iso-pent-B` and `Echo-comp-iso-pent-echo` both `refl`
63+
in `Echo.agda`. The full Σ-associativity iso between the two
64+
nested Σ-shapes (outer-first carries an extra intermediate
65+
`c : C` with `g b ≡ c`; inner-first absorbs it) remains the open
66+
piece of pentagon.
67+
- **[partial]** Budgeted recursive-surface WF on the ordinal track.
68+
`Ordinal/Buchholz/RecursiveSurfaceBudget.agda` ships
69+
`BudgetedBT = ℕ × BT`, the budgeted relation `_<ᵇʳᶠᵇ_` with its
70+
`spend` constructor, `wf-<ᵇʳᶠᵇ : WellFounded _<ᵇʳᶠᵇ_` (via
71+
subrelation on ℕ), and `<ᵇʳᶠᵇ⇒lifted` transporting each budgeted
72+
step into the iterated-wrapper tower (`IteratedExtendedOrder`).
73+
The unbudgeted global theorem — eliminate the explicit ℕ budget
74+
from `wf-<ᵇʳᶠᵇ` to get `WellFounded _<ᵇʳᶠ_` — is the next
75+
concrete ordinal-track milestone. Pushing that result back into
76+
`Ordinal/Buchholz/Order.agda`'s main `_<ᵇ_` package is the step
77+
after that.
6378
- **[unblocked]** `EchoApprox.agda`: new module for ε-indexed echoes
6479
over a metric codomain. First-class taxonomy axis 2 artifact.
6580
- **[unblocked]** Per-decoration composition lemmas in `EchoGraded`,
@@ -157,23 +172,32 @@ tractable today:
157172
iso plus both cancellation maps now live in `Echo.agda`; the full
158173
cancellation iso (with round-trips) is the first deferred item —
159174
needs a triangle-identity coherence (see composition.md §3).
160-
3. **Agda: pentagon coherence for `Echo-comp-iso`** — 1 day. Next
161-
natural follow-up on the composition track.
162-
4. **Gate 1 adjacency refresh against the new taxonomy** — 1 day.
175+
3. ~~**Agda: pentagon coherence for `Echo-comp-iso`**~~ — projection
176+
pentagon landed as `Echo-comp-iso-pent-{B, echo}`. Full
177+
Σ-associativity iso between the two nested Σ-shapes is one of
178+
two next composition-track follow-ups (the other is
179+
full-cancel-iso round-trips, which needs a triangle identity).
180+
4. **Agda: unbudgeted `_<ᵇʳᶠ_` WF on the ordinal track** — eliminate
181+
the explicit ℕ budget from `wf-<ᵇʳᶠᵇ` in
182+
`RecursiveSurfaceBudget.agda`. Sharpest next ordinal-track move
183+
since the budgeted version already ships. Keep `--safe --without-K`.
184+
Pushing the result back into `Order.agda`'s `_<ᵇ_` is the step
185+
after.
186+
5. **Gate 1 adjacency refresh against the new taxonomy** — 1 day.
163187
Cheap coherence pass on existing docs.
164-
5. **Theory: pick one axis-8 refinement and formalise it** — 1–2
188+
6. **Theory: pick one axis-8 refinement and formalise it** — 1–2
165189
days. Four candidates in `taxonomy.md` §8 (cost-indexed echo,
166190
graded access modality, decidability-respecting echo, witness-
167191
search abstract machine). Choosing commits the repo to one
168192
formal handle on computational vs information-theoretic access.
169-
6. **Agda: `EchoApprox.agda`** — 2–3 days. First artifact of axis 2.
170-
7. **Applications chapter: compiler-analysis residue** — 2 days.
193+
7. **Agda: `EchoApprox.agda`** — 2–3 days. First artifact of axis 2.
194+
8. **Applications chapter: compiler-analysis residue** — 2 days.
171195
Largest reader value; entirely unblocked.
172-
8. **Per-decoration composition lemmas** — 1 day each. Useful
196+
9. **Per-decoration composition lemmas** — 1 day each. Useful
173197
coverage.
174198

175-
Steps 1–4 are ~5–6 days of honest work that require nothing from
176-
proof assistants, external repos, or the blocked Buchholz path.
199+
Steps 1 and 5–6 are ~5–6 days of honest work that require nothing
200+
from proof assistants, external repos, or the blocked Buchholz path.
177201
Steps 5–7 extend into Agda but depend only on infrastructure we
178202
already have in-suite.
179203

0 commit comments

Comments
 (0)