Skip to content

Commit e92be7d

Browse files
docs/echo-types: sync composition and roadmap with landed work (#18)
Two files updated to match what actually ships on main: composition.md §1 (Accumulation). Retitled "landed"; inlined the shipped Agda names (Echo-comp-iso-to / -from / -from-to / -to-from) and noted both round-trips are definitional. §3 (Cancellation). Retitled "partial (Agda-backed maps, iso deferred)"; documents the two shipped maps (cancel-iso-to needs s-left, cancel-iso-from needs s-right); flags the triangle-identity coherence as the blocker for the full iso; corrects the earlier wording that claimed a bare section on g suffices. §"Composition laws — compact statement". Row 1 marked Landed, row 3 marked Partial with deferred round-trips. §"What to formalise next". Items 1 and 2 struck through as landed; pentagon promoted to item 3; full cancel-iso with round-trips added as item 4 with its specific blocker. roadmap.md Formalisation section. Echo-comp-iso tagged [landed], cancel-iso tagged [partial] with deferred round-trips, pentagon promoted. Suggested immediate ordering. Step 2 struck through; pentagon inserted as the next concrete composition-track follow-up; subsequent steps re-numbered 3–8. No content changes to overview.md, taxonomy.md, or examples.md. No code changed; pure doc sync. No postulates. https://claude.ai/code/session_01JRLz84fAaWvRBKyXuc4tyK Co-authored-by: Claude <noreply@anthropic.com>
1 parent cf7ec23 commit e92be7d

2 files changed

Lines changed: 88 additions & 49 deletions

File tree

docs/echo-types/composition.md

Lines changed: 68 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,70 @@ the shadow level but not generally at the intensional core.
2626

2727
---
2828

29-
## Accumulation — Agda-backed (base case)
29+
## Accumulation — Agda-backed (base case, landed)
3030

3131
*Lemma.* For `f : A → B` and `g : B → C`, the type
3232
`Echo(g ∘ f) y` is canonically isomorphic to
3333
`Σ B (λ b → Echo(f) b × (g b ≡ y))`.
3434

35-
*Proof sketch.* Σ-associativity plus propositional-equality
36-
rearrangement. In Agda terms, given
35+
*Proof.* Σ-associativity plus propositional-equality rearrangement.
36+
In Agda terms, given
3737
```
38-
Echo f b = Σ A (λ x → f x ≡ b)
39-
Echo g y = Σ B (λ b → g b ≡ y)
38+
Echo f b = Σ A (λ x → f x ≡ b)
39+
Echo g y = Σ B (λ b → g b ≡ y)
4040
Echo (g ∘ f) y = Σ A (λ x → g (f x) ≡ y)
4141
```
4242
the iso is witnessed by
4343
```
44-
to : Σ A (λ x → g (f x) ≡ y) → Σ B (λ b → Σ A (λ x → f x ≡ b) × (g b ≡ y))
45-
to (x , p) = (f x , (x , refl) , p)
46-
from : Σ B (λ b → Σ A (λ x → f x ≡ b) × (g b ≡ y)) → Σ A (λ x → g (f x) ≡ y)
44+
to (x , p) = (f x , (x , refl) , p)
4745
from (b , (x , refl) , p) = (x , p)
4846
```
49-
and both round-trips are `refl`. Formalisation is routine and not
50-
yet in the repo; it is the cleanest candidate for the next
51-
composition lemma to land.
47+
and both round-trips reduce to `refl` definitionally once the
48+
`refl` pattern has pinned the intermediate `b` to `f x`. Landed
49+
in `proofs/agda/Echo.agda` as `Echo-comp-iso-to`, `Echo-comp-iso-from`,
50+
`Echo-comp-iso-from-to`, `Echo-comp-iso-to-from` (all pinned in
51+
`Smoke.agda`).
5252

5353
*Agda adjacency.* `Echo.map-over-comp` proves functoriality of the
5454
derived action on echoes; this is the morphism side of the same
55-
composition law. The *object-side* isomorphism above is not yet
56-
proved but is a straightforward next milestone.
55+
composition law. The object-side iso above and the morphism-side
56+
composition law together give a coherent two-level story for
57+
composition.
5758

5859
---
5960

60-
## Cancellation — expected corollary
61+
## Cancellation — partial (Agda-backed maps, iso deferred)
6162

62-
*Conjecture.* If `g : B → C` has a section `s : C → B` with
63-
`g ∘ s ≡ id`, then `Echo(g ∘ f) y ≃ Echo(f) (s y)` for every `y`.
63+
*Statement.* If `g : B → C` has a two-sided inverse `s : C → B`
64+
with `s-left : ∀ b → s (g b) ≡ b` and `s-right : ∀ y → g (s y) ≡ y`,
65+
then `Echo(g ∘ f) y` and `Echo(f) (s y)` are related by a canonical
66+
forward and backward map.
6467

65-
*Rationale.* Composing with an injection loses no information, so
66-
the intermediate factor in the accumulation law collapses to a
67-
single witnessed point.
68-
69-
*Status.* Not proved. Depends on the accumulation isomorphism plus
70-
a section lemma that the current repo has pieces of (see
71-
`no-section-weaken` in `EchoLinear` for the negative direction).
68+
*What is landed.* Two maps in `proofs/agda/Echo.agda`, each
69+
requiring only the relevant half of the iso structure:
70+
```
71+
cancel-iso-to : (s-left : ∀ b → s (g b) ≡ b) → Echo (g ∘ f) y → Echo f (s y)
72+
cancel-iso-from : (s-right : ∀ y → g (s y) ≡ y) → Echo f (s y) → Echo (g ∘ f) y
73+
```
74+
Pinned in `Smoke.agda` as `cancel-iso-to`, `cancel-iso-from`.
75+
76+
*What is deferred.* The round-trips that would promote these two
77+
maps to a full iso are *not* proved. Under `--without-K`, the two
78+
round-trips require a triangle-identity coherence between `s-left`
79+
and `s-right` (roughly `cong g (s-left b) ≡ s-right (g b)`), which
80+
is not a consequence of the two pointwise inverse laws alone — a
81+
bare "both-way inverse" is weaker than an equivalence in HoTT
82+
terms. The in-file comment in `Echo.agda` flags this explicitly.
83+
Options for the full iso: (a) an equivalence record that packages
84+
the triangle identity as a field, or (b) stdlib's
85+
`Function.Bundles.Inverse`.
86+
87+
*Correction to earlier wording.* A bare section on `g` (i.e.,
88+
`s-right` only) is not enough to collapse the Σ-over-intermediate
89+
in the accumulation law; the earlier version of this section
90+
claimed otherwise. The correction is that both `s-left` and
91+
`s-right` are needed, and even then the full iso needs triangle
92+
coherence.
7293

7394
---
7495

@@ -175,15 +196,18 @@ hypothetical 2-category of Q1. Not attempted.
175196

176197
Collecting the above:
177198

178-
1. **(Agda-backed) Base accumulation iso.**
179-
`Echo(g ∘ f) y ≃ Σ B (λ b → Echo(f) b × (g b ≡ y))`.
199+
1. **(Landed) Base accumulation iso.**
200+
`Echo(g ∘ f) y ≃ Σ B (λ b → Echo(f) b × (g b ≡ y))`. Proved in
201+
`Echo.agda` as `Echo-comp-iso-{to, from, from-to, to-from}`.
180202

181203
2. **(Agda-backed) Functorial action.** `map-over` respects
182204
composition: `map-over (g' , c₁) ∘ map-over (f' , c₂) ≡ map-over
183205
((g' ∘ f') , coherence)`. Proved in `Echo.map-over-comp`.
184206

185-
3. **(Expected) Cancellation.** `Echo(g ∘ f) y ≃ Echo(f) (s y)` when
186-
`g` has a section `s`.
207+
3. **(Partial) Cancellation.** Forward and backward maps landed as
208+
`cancel-iso-to` (needs `s-left`) and `cancel-iso-from` (needs
209+
`s-right`). Round-trips deferred pending a triangle-identity
210+
coherence or a stdlib `Function.Bundles.Inverse` shim.
187211

188212
4. **(Open) Pentagon.** Three-fold composition associates.
189213

@@ -198,19 +222,27 @@ Collecting the above:
198222

199223
## What to formalise next
200224

201-
Ranked by unblock-value:
202-
203-
1. **Base accumulation iso.** Single Agda proof, no new modules
204-
needed. Would add `Echo-comp-iso` to `Echo.agda`.
205-
2. **Cancellation corollary.** One paragraph on top of (1).
206-
3. **Pentagon coherence.** Moderate proof, probably one more lemma.
207-
4. **Approximate-echo skeleton.** New module
225+
Ranked by unblock-value. (1) and (2) landed; (3) onwards is open.
226+
227+
1. ~~**Base accumulation iso.**~~ Landed in `Echo.agda` as
228+
`Echo-comp-iso-{to, from, from-to, to-from}`.
229+
2. ~~**Cancellation corollary.**~~ Partially landed as
230+
`cancel-iso-to` / `cancel-iso-from`; full iso deferred pending
231+
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.
235+
4. **Full cancel-iso with round-trips.** Needs an equivalence
236+
record that packages `s-left`, `s-right`, and the triangle
237+
identity as three fields, or direct use of stdlib's
238+
`Function.Bundles.Inverse`. Then the round-trip refls go through.
239+
5. **Approximate-echo skeleton.** New module
208240
`EchoApprox.agda` defining ε-echoes and restating (1) in the
209241
approximate setting. This is where axis 2 of the taxonomy gets
210242
teeth.
211-
5. **Decoration commuting.** Per-decoration lemmas in the existing
243+
6. **Decoration commuting.** Per-decoration lemmas in the existing
212244
`EchoGraded`, `EchoLinear`, `EchoIndexed` modules.
213245

214246
None of these depend on the blocked Buchholz-WF / shared-binder
215-
work. All are Sonnet-class proofs; (4) is Opus 4.7 design and
247+
work. All are Sonnet-class proofs; (5) is Opus 4.7 design and
216248
Sonnet execution.

docs/echo-types/roadmap.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ Paths marked **[unblocked]** can proceed today. Paths marked
4646

4747
## Formalisation work — Agda, no bottleneck
4848

49-
- **[unblocked]** `Echo-comp-iso` in `Echo.agda`: the accumulation
49+
- **[landed]** `Echo-comp-iso` in `Echo.agda`: the accumulation
5050
isomorphism `Echo(g ∘ f) y ≃ Σ B (λ b → Echo(f) b × (g b ≡ y))`.
51-
Sonnet-class proof; see composition.md §1.
52-
- **[unblocked]** `Echo-comp-cancellation`: corollary for sectioned
53-
`g`. Follows from the iso plus an existing section-lemma pattern
54-
(`no-section-weaken` in `EchoLinear`).
51+
Shipped as `Echo-comp-iso-{to, from, from-to, to-from}`; both
52+
round-trips are definitional. See `composition.md` §1.
53+
- **[partial]** `cancel-iso-to` / `cancel-iso-from` in `Echo.agda`:
54+
forward and backward maps for the cancellation corollary, each
55+
needing only the relevant half of g's iso structure. Round-trips
56+
are **deferred** pending a triangle-identity coherence or a stdlib
57+
`Function.Bundles.Inverse` shim. See `composition.md` §3.
5558
- **[unblocked]** Pentagon coherence for three-fold composition.
56-
Routine.
59+
Routine proof on top of `Echo-comp-iso`; next concrete follow-up.
5760
- **[unblocked]** `EchoApprox.agda`: new module for ε-indexed echoes
5861
over a metric codomain. First-class taxonomy axis 2 artifact.
5962
- **[unblocked]** Per-decoration composition lemmas in `EchoGraded`,
@@ -146,19 +149,23 @@ tractable today:
146149

147150
1. **Theory: axis 2 formal definition** — 1–2 days.
148151
Unblocks `EchoApprox.agda`, which is required for examples 6 and 10.
149-
2. **Agda: `Echo-comp-iso` + cancellation** — 1 day.
150-
Concrete, compiling, unblocks the composition roadmap.
151-
3. **Gate 1 adjacency refresh against the new taxonomy** — 1 day.
152+
2. ~~**Agda: `Echo-comp-iso` + cancellation**~~ — landed. Accumulation
153+
iso plus both cancellation maps now live in `Echo.agda`; the full
154+
cancellation iso (with round-trips) is the first deferred item —
155+
needs a triangle-identity coherence (see composition.md §3).
156+
3. **Agda: pentagon coherence for `Echo-comp-iso`** — 1 day. Next
157+
natural follow-up on the composition track.
158+
4. **Gate 1 adjacency refresh against the new taxonomy** — 1 day.
152159
Cheap coherence pass on existing docs.
153-
4. **Theory: pick one axis-8 refinement and formalise it** — 1–2
160+
5. **Theory: pick one axis-8 refinement and formalise it** — 1–2
154161
days. Four candidates in `taxonomy.md` §8 (cost-indexed echo,
155162
graded access modality, decidability-respecting echo, witness-
156163
search abstract machine). Choosing commits the repo to one
157164
formal handle on computational vs information-theoretic access.
158-
5. **Agda: `EchoApprox.agda`** — 2–3 days. First artifact of axis 2.
159-
6. **Applications chapter: compiler-analysis residue** — 2 days.
165+
6. **Agda: `EchoApprox.agda`** — 2–3 days. First artifact of axis 2.
166+
7. **Applications chapter: compiler-analysis residue** — 2 days.
160167
Largest reader value; entirely unblocked.
161-
7. **Per-decoration composition lemmas** — 1 day each. Useful
168+
8. **Per-decoration composition lemmas** — 1 day each. Useful
162169
coverage.
163170

164171
Steps 1–4 are ~5–6 days of honest work that require nothing from

0 commit comments

Comments
 (0)