Skip to content

Commit 4d754a7

Browse files
hyperpolymathclaude
andcommitted
echo-types: open establishment track (Pillar A landed, B–D scaffolded)
New third workstream: path to recognised type-theoretic standing as a characterised graded comonad of structured loss, with the explicit verdict that the linear/dependent judgmental ladder is a category error (Echo is definitionally fib). - docs/echo-types/establishment-plan.adoc: five-pillar plan + guardrails - Pillar A (real): EchoFiberBridge.agda — echo↔fib bijection via mk↔ₛ′, refl round-trips; pinned in Smoke.agda, wired into All.agda - Pillars B–D: declaration-free doc scaffolds (EchoPullback, EchoGradedComonad, EchoSeparating, EchoRelModel) tracked in All.agda - CLAUDE.md: workstream 3 + 2026-05-17 rung state agda All.agda and agda Smoke.agda both exit 0 under --safe --without-K. No postulates introduced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a609c53 commit 4d754a7

9 files changed

Lines changed: 465 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,25 @@ Two active workstreams:
8282
* Push the surface-route WF back into `Order.agda`'s main
8383
`_<ᵇ_` package.
8484

85+
3. **Establishment track (`docs/echo-types/establishment-plan.adoc`).**
86+
Path to recognised type-theoretic standing as a *characterised
87+
graded comonad of structured loss* (coeffect/quantitative
88+
lineage) — explicitly NOT the linear/dependent judgmental ladder.
89+
Five pillars: A pin-the-identity, B universal property +
90+
graded-comonad laws, C separating model, D second model +
91+
conservativity, E external validation. Pillar A landed
92+
(`EchoFiberBridge.agda`: `echo↔fib` definitional bridge, pinned
93+
in `Smoke.agda`). Pillars B–D exist as declaration-free doc
94+
scaffolds in `All.agda` (`EchoPullback`, `EchoGradedComonad`,
95+
`EchoSeparating`, `EchoRelModel`) carrying intended signatures.
96+
97+
Open pieces on this track:
98+
* Pillar B `EchoPullback.echo-pullback-univ` — start by relating
99+
`EchoCategorical.SliceHom` to a pullback cone.
100+
* Pillar B `EchoGradedComonad` — graded counit/comult + 3 laws,
101+
reuse `EchoGraded._≤g_`/`_⊔g_`/`≤g-prop`.
102+
* Pillars C/D and Pillar E (TYPES/CPP-ITP/Zenodo) not started.
103+
85104
Cross-repo bridge status lives in `docs/echo-types/cross-repo-bridge-status.md`.
86105

87106
# Build
@@ -144,7 +163,39 @@ work to `main` and refresh all documentation:
144163
name, the commits folded in, the remaining open pieces of the
145164
milestone, and the proposed smallest useful next advance.
146165

147-
## Current rung state (2026-04-28)
166+
## Current rung state (2026-05-17)
167+
168+
Just landed: **Establishment-track opening rung.** New third
169+
workstream (`docs/echo-types/establishment-plan.adoc`): the path to
170+
recognised type-theoretic standing as a characterised *graded comonad
171+
of structured loss*, with the explicit verdict that the
172+
linear/dependent judgmental ladder is the wrong target (Echo adds no
173+
new judgment — it is definitionally `fib`).
174+
175+
* `docs/echo-types/establishment-plan.adoc` — five-pillar plan +
176+
guardrails (no postulates / no `--safe` weakening; quarantine
177+
funext; do not reopen EI-2).
178+
* **Pillar A (real, verified):** `proofs/agda/EchoFiberBridge.agda`
179+
defines `fiber` (stdlib v2.3 has none) and ships
180+
`echo↔fib : Echo f y ↔ fiber f y` via `mk↔ₛ′`, `refl` round-trips.
181+
Pinned in `Smoke.agda` (`fiber; echo→fib; fib→echo; echo↔fib`),
182+
wired into `All.agda`.
183+
* **Pillars B–D (scaffolds):** `EchoPullback`, `EchoGradedComonad`,
184+
`EchoSeparating`, `EchoRelModel` — declaration-free doc modules
185+
(no postulates, no holes), tracked in `All.agda`, carrying intended
186+
signatures as commented specs.
187+
188+
`agda proofs/agda/All.agda` and `agda proofs/agda/Smoke.agda` both
189+
exit 0 under `--safe --without-K`. No postulates introduced.
190+
191+
Smallest useful next advance: Pillar B `EchoPullback.echo-pullback-univ`
192+
— relate `EchoCategorical.SliceHom` to a pullback cone and prove the
193+
terminal-cone universal property; it unblocks the graded-comonad
194+
framing (`EchoGradedComonad`).
195+
196+
---
197+
198+
## Previous rung state (2026-04-28)
148199

149200
Just landed: **Honest-thermo rung + 5-decoration sweep close +
150201
cancel-iso packaging + extended-order lex constructors.** Five
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
= Echo Types — Establishment Plan
2+
:toc: macro
3+
:toclevels: 3
4+
:sectnums:
5+
:sectnumlevels: 3
6+
:icons: font
7+
8+
[.lead]
9+
This document sets out the path by which "echo types" can acquire
10+
*recognised type-theoretic standing*. It is deliberately separate from
11+
`roadmap.md` (work partitioned by bottleneck) and `roadmap-gates.adoc`
12+
(the falsifiable identity claim). This document answers a different
13+
question: _given_ the gated identity claim, what makes a construction
14+
like this *established* in the sense that linear, dependent, or graded
15+
modal types are established — and what specifically must this repository
16+
ship to get there.
17+
18+
toc::[]
19+
20+
== The honest type-theoretic verdict
21+
22+
`Echo f y := Σ (x : A) , (f x ≡ y)` is *definitionally* the homotopy
23+
fibre `fib f y` (HoTT book Def. 4.2.4). This fact governs the entire
24+
strategy and is owned, not hedged:
25+
26+
* *"Linear" and "dependent" are the wrong target — comparing to them is
27+
a category error.* Dependent types are a _formation_ discipline
28+
(types depend on terms; semantics = LCCC / CwF). Linear and
29+
substructural types are a _structural-rule_ discipline
30+
(contraction/weakening restricted; semantics = symmetric monoidal
31+
closed categories / Benton's LNL). Both change the _judgmental_
32+
apparatus of the theory. Echo introduces no new judgment, context
33+
structure, or formation rule — it is a derived Σ-type. Shipping
34+
bespoke "echo introduction/elimination rules" dressed as primitive
35+
would be the fastest possible way to lose every informed reader.
36+
37+
* *The strength that befits echo is a graded comonadic modality —
38+
the coeffect / quantitative lineage.* That _is_ an established
39+
type strength in the modern sense (Petriček–Orchard–Mycroft
40+
coeffects; Brunel–Gaboardi–Mazza–Zdancewic; Atkey's Quantitative
41+
Type Theory; Orchard–Liepelt–Eades / Granule; Gaboardi et al.
42+
graded modal types). The repo's own code already has the shape:
43+
`EchoGraded`'s loss-grade lattice with join and universal property,
44+
`EchoLinear`'s two-mode degradation, `EchoCategorical`'s
45+
slice/fibration functor laws. It is not yet *named, characterised,
46+
and proved* as a graded comonad of structured loss.
47+
48+
[#thesis]
49+
.The establishment thesis
50+
****
51+
Echo is the homotopy fibre, equipped with a loss-grade lattice,
52+
forming a *definitionally-grounded graded comonad of structured loss*.
53+
Its authority comes not from being a new object but from being a
54+
*characterised* one: a universal property, multiple models, an
55+
irreducibility metatheorem, and a falsifiable retraction discipline.
56+
****
57+
58+
Owning "it is just `fib`" loudly is a credibility asset: it pre-empts
59+
the reviewer's first and strongest objection.
60+
61+
== The five pillars
62+
63+
Each pillar names the artefact it must ship and the *authority effect*
64+
— the specific reason a referee or community would upgrade their
65+
assessment.
66+
67+
=== Pillar A — Pin the identity
68+
69+
`Echo ≃ fib` currently lives in prose (`docs/gate-1-distinct-phenomenon.adoc`).
70+
Reviewers want the bridge as a checked lemma.
71+
72+
* Artefact: `proofs/agda/EchoFiberBridge.agda` — `echo↔fib :
73+
Echo f y ↔ fiber f y` (definitional; `refl`-level round-trips).
74+
Pinned in `Smoke.agda`, wired into `All.agda`. *(landed — see
75+
§"Status".)*
76+
* Authority effect: converts the project's most honest admission into
77+
a machine-checked artefact. Referees trust projects that formalise
78+
their own deflationary claims.
79+
80+
=== Pillar B — The universal property
81+
82+
The single biggest lever. Echo has functoriality (`map-over` + id/comp),
83+
the composition iso, cancel-iso, pentagon — but no _characterisation_.
84+
85+
* Artefact 1: `EchoPullback.agda` — `Echo f y` as the pullback of `f`
86+
along `y : ⊤ → B`, with the terminal-cone universal property
87+
`echo-pullback-univ`. The categorical-semantics anchor.
88+
* Artefact 2: `EchoGradedComonad.agda` (headline new family) — reuse
89+
`EchoGraded._≤g_`, `_⊔g_`, `≤g-prop`; define the graded counit /
90+
comultiplication and prove the three graded-comonad laws over the
91+
loss-grade lattice.
92+
* Authority effect: "has a universal property + is a graded comonad"
93+
is the line between a named lemma cluster and an established notion.
94+
95+
=== Pillar C — An irreducibility metatheorem
96+
97+
Harden Gate 2. The existing `VisibleConstraintAudit` /
98+
`IntegrationAudit` _negative_ exhibits (collapsing pseudo-theorems to
99+
`proj₂`) are exemplary practice; go one step further.
100+
101+
* Artefact: `EchoSeparating.agda` — a *separating model*: a structure
102+
satisfying generic Σ-functoriality in which the loss-grade
103+
composition law (`degrade-compose` / `degrade-via-join`) fails.
104+
* Authority effect: answers "isn't this all Σ-lemmas with new names?"
105+
with a model, not an argument. Separating models are the gold
106+
standard for "this structure is real, not bookkeeping".
107+
108+
=== Pillar D — A second model + conservativity
109+
110+
A notion is established only if it is model-independent.
111+
112+
* Artefact 1: `EchoRelModel.agda` — extend
113+
`EchoCategorical.Fibration` / `EchoRelational`; show the
114+
graded-comonad laws of Pillar B transport into the relational /
115+
presheaf model. Two independent models = robustness.
116+
* Artefact 2: `docs/echo-types/conservativity.adoc` (+ formal anchor)
117+
— because `Echo = Σ`, a small graded calculus with a loss modality
118+
embeds *conservatively and definitionally* into MLTT+Σ. State this
119+
as a metatheorem. "Conservative, definitionally-grounded extension"
120+
is exactly the clean result that earns trust.
121+
* Authority effect: model-independence + a conservativity theorem turn
122+
the deflation into a published positive result.
123+
124+
=== Pillar E — External validation
125+
126+
Authority is conferred socially, not internally. In cost/payoff order:
127+
128+
. TYPES abstract (low bar, fast expert feedback) — "Echo: a
129+
definitionally-grounded graded comonad of structured loss".
130+
. A mechanised-metatheory paper at CPP or ITP (natural venue for a
131+
`--safe --without-K` Agda artefact; these venues reward the
132+
retraction/gate discipline).
133+
. Zenodo DOI + installable library packaging (stable module API so
134+
others can `import echo-types`).
135+
. Circulate the strongest adjacency note (HoTT fibres / QTT-modal)
136+
to those communities; the adjacency docs already pre-empt referee
137+
objections — use them as outreach.
138+
. Keep the falsifiable gates and a public retraction log. This _is_
139+
the biggest authority asset; never soften it.
140+
141+
== Sequencing and guardrails
142+
143+
*Order:* A → B(pullback) → B(graded comonad) → C(separating model) →
144+
D(second model + conservativity) → E(write-up). A–C are the
145+
credibility core and need no external unblocker. The ordinal / Buchholz
146+
track is impressive _consumer evidence_, not foundation — keep it
147+
firewalled from the identity claim exactly as `roadmap.md` already does.
148+
149+
*Hard guardrails (credibility hazards):*
150+
151+
* Never add a postulate or drop `--safe --without-K` to force a
152+
"stronger" result — the conservativity _is_ the product.
153+
* The funext boundary is real and known (`examples/Transport.agda`
154+
stalls because `Field = Fin n → ℚ` forces funext, unavailable under
155+
`--safe`). Quarantine any funext-requiring result behind an
156+
explicitly labelled, isolated assumption module; never let it touch
157+
the core.
158+
* Do *not* reopen the five-axis simultaneous-integration claim — EI-2
159+
settled it negatively, and having cleanly killed it is part of the
160+
authority story.
161+
162+
== Status
163+
164+
[cols="1,4,1", options="header"]
165+
|===
166+
| Pillar | Artefact | State
167+
168+
| A | `EchoFiberBridge.agda` (`echo↔fib`, pinned in `Smoke.agda`) | Landed
169+
| B | `EchoPullback.agda` | Scaffolded (doc-only module, in `All.agda`)
170+
| B | `EchoGradedComonad.agda` | Scaffolded (doc-only module, in `All.agda`)
171+
| C | `EchoSeparating.agda` | Scaffolded (doc-only module, in `All.agda`)
172+
| D | `EchoRelModel.agda` | Scaffolded (doc-only module, in `All.agda`)
173+
| D | `docs/echo-types/conservativity.adoc` | Not started
174+
| E | TYPES abstract / CPP-ITP paper / Zenodo / library packaging | Not started
175+
|===
176+
177+
The Pillar B–D scaffolds are documentation-only Agda modules (no
178+
declarations, hence no postulates or holes — they typecheck under
179+
`--safe --without-K` and are tracked in `All.agda` per the
180+
rung-consolidation policy). They carry the intended theorem signatures
181+
as commented specifications so a fresh session can start filling them
182+
without re-deriving the design.
183+
184+
== Revision policy
185+
186+
Update this document when a pillar artefact changes state, when a
187+
guardrail is hit, or when external validation (Pillar E) advances.
188+
Append-only revision history, each entry annotated with its trigger.
189+
The stable thesis (<<thesis>>) does not change without a recorded
190+
reason.

proofs/agda/All.agda

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ open import EchoThermodynamics
3131
open import EchoStabilityTests
3232
open import VecRotation
3333

34+
-- Establishment-plan pillars (docs/echo-types/establishment-plan.adoc).
35+
-- A is a real bridge; B–D are doc-only scaffolds (no declarations,
36+
-- typecheck under --safe --without-K, tracked here per policy).
37+
open import EchoFiberBridge -- Pillar A (landed)
38+
open import EchoPullback -- Pillar B (scaffold)
39+
open import EchoGradedComonad -- Pillar B (scaffold)
40+
open import EchoSeparating -- Pillar C (scaffold)
41+
open import EchoRelModel -- Pillar D (scaffold)
42+
3443
open import Ordinal.Base
3544
open import Ordinal.Closure
3645
open import Ordinal.CNF

proofs/agda/EchoFiberBridge.agda

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{-# OPTIONS --safe --without-K #-}
2+
3+
-- Pillar A of docs/echo-types/establishment-plan.adoc.
4+
--
5+
-- `Echo f y` is *definitionally* the homotopy fibre of `f` at `y`
6+
-- (HoTT book Def. 4.2.4). The gate-1 distinctness argument states
7+
-- this in prose; this module turns it into a machine-checked
8+
-- artefact. The bijection is the identity with `refl` round-trips —
9+
-- that triviality is the entire point. Formalising the project's own
10+
-- deflationary admission ("Echo adds no new object; it *is* fib") is
11+
-- a credibility asset, not a redundancy: it pins the identity so the
12+
-- universal-property work (Pillar B) builds on a stated, not
13+
-- asserted, foundation.
14+
15+
module EchoFiberBridge where
16+
17+
open import Echo using (Echo)
18+
19+
open import Level using (Level; _⊔_)
20+
open import Data.Product.Base using (Σ; _,_)
21+
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
22+
open import Function.Bundles using (_↔_; mk↔ₛ′)
23+
24+
-- The homotopy fibre of `f` at `y`, in its standard MLTT / HoTT form:
25+
-- a point of the domain together with a proof that `f` sends it to
26+
-- `y`. The agda-stdlib (v2.3) ships no `fiber`, so it is defined here
27+
-- precisely so the bridge below is honest about being definitional.
28+
fiber : {a b} {A : Set a} {B : Set b} (f : A B) B Set (a ⊔ b)
29+
fiber {A = A} f y = Σ A (λ x f x ≡ y)
30+
31+
-- Echo IS the homotopy fibre. Not "equivalent up to homotopy" —
32+
-- definitionally equal, so both directions are the identity.
33+
echo→fib :
34+
{a b} {A : Set a} {B : Set b} (f : A B) (y : B)
35+
Echo f y fiber f y
36+
echo→fib _ _ e = e
37+
38+
fib→echo :
39+
{a b} {A : Set a} {B : Set b} (f : A B) (y : B)
40+
fiber f y Echo f y
41+
fib→echo _ _ e = e
42+
43+
-- The bijection, packaged via stdlib's `Function.Bundles._↔_` and
44+
-- `mk↔ₛ′` — the same equivalence-record convention used throughout
45+
-- `Echo.agda` (`Echo-comp-iso`, `cancel-iso`). Both round-trips are
46+
-- `refl`: there is no path algebra here because there is no gap to
47+
-- bridge.
48+
echo↔fib :
49+
{a b} {A : Set a} {B : Set b} (f : A B) (y : B)
50+
Echo f y ↔ fiber f y
51+
echo↔fib f y =
52+
mk↔ₛ′
53+
(echo→fib f y)
54+
(fib→echo f y)
55+
(λ _ refl)
56+
(λ _ refl)

proofs/agda/EchoGradedComonad.agda

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{-# OPTIONS --safe --without-K #-}
2+
3+
-- Pillar B (part 2) of docs/echo-types/establishment-plan.adoc.
4+
--
5+
-- SCAFFOLD ONLY. Documentation module (no declarations → no
6+
-- postulates, no holes; typechecks under `--safe --without-K`,
7+
-- tracked in `All.agda`).
8+
--
9+
-- Goal: exhibit echo, indexed by the loss-grade lattice, as a
10+
-- *graded comonad of structured loss*. This is the headline new
11+
-- theorem family: it is what makes "echo" a modality in the
12+
-- recognised (coeffect / quantitative) sense, slotting it into the
13+
-- QTT / Granule lineage rather than leaving it a Σ-lemma cluster.
14+
--
15+
-- Reuse from `EchoGraded.agda`: the grade order `_≤g_`, its
16+
-- propositionality `≤g-prop`, the join `_⊔g_` with
17+
-- `≤g-⊔g-{left,right,univ}`, and `degrade` / `degrade-comp`.
18+
--
19+
-- Intended signatures (to be filled, in dependency order):
20+
--
21+
-- -- Graded object map (Echo decorated by a loss grade).
22+
-- GEcho : Grade → (A → B) → B → Set
23+
--
24+
-- -- Graded counit: zero-loss grade extracts the bare echo.
25+
-- gextract : GEcho g0 f y → Echo f y
26+
--
27+
-- -- Graded comultiplication along the grade lattice.
28+
-- gduplicate : g₁ ≤g (g₁ ⊔g g₂) → GEcho (g₁ ⊔g g₂) f y
29+
-- → GEcho g₁ f (GEcho g₂ ...)
30+
--
31+
-- -- The three graded-comonad laws (left counit, right counit,
32+
-- -- coassociativity) stated over `_≤g_` / `_⊔g_`, each reduced
33+
-- -- to `degrade-compose` + `≤g-prop` where possible.
34+
-- gcomonad-counit-l : ...
35+
-- gcomonad-counit-r : ...
36+
-- gcomonad-coassoc : ...
37+
--
38+
-- Note: keep every law a corollary of an existing `EchoGraded`
39+
-- lemma plus `≤g-prop`. If a law needs genuinely new path algebra,
40+
-- that is a design signal worth recording in the establishment plan
41+
-- before proceeding.
42+
43+
module EchoGradedComonad where

0 commit comments

Comments
 (0)