Skip to content

Commit 6938969

Browse files
hyperpolymathclaude
andcommitted
docs(gate-1): refresh adjacency notes with composition-iso evidence
Refresh Gate 1 adjacency notes to cite the composition-track theorems that landed since the original drafts: Echo-comp-iso-{to, from, from-to, to-from}, cancel-iso-{to, from}, and projection-pentagon Echo-comp-iso-pent-{B, echo} in proofs/agda/Echo.agda. These are content distinguishing echo types from refinement, lens/optic, HoTT- fiber, setoid-quotient, provenance-semiring, and cubical neighbours. Normalise cubical-systems.adoc to the canonical 5-section template the other notes use (1. Nearest construction, 2. What do echo types add, 3. What do they not add, 4. Honest risk, 5. Verdict for Gate 1) so all six notes discharge the Gate 1 test in the same shape. Add a "Compositional evidence (load-bearing across notes)" section to the README pointing at the iso family and cancellation, since these are now cited from multiple notes. Verdicts unchanged: refinement-types, lenses-and-optics, setoid- quotients, provenance-semirings, cubical-systems all survive Gate 1; hott-fibers remains a marginal pass dependent on Gate 2/3 outcomes. The refresh strengthens the supporting evidence rather than reopening the verdicts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e6eb983 commit 6938969

7 files changed

Lines changed: 146 additions & 40 deletions

File tree

docs/adjacency/README.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,20 @@ All notes are written against the current Agda development
6161
(`--safe --without-K`, no postulates). Claims reference specific
6262
theorems by module and name. Anything not backed by a compiled
6363
theorem is called out as conjectural.
64+
65+
== Compositional evidence (load-bearing across notes)
66+
67+
Two families of theorems in `proofs/agda/Echo.agda` are cited across
68+
multiple notes as content distinguishing echo types from neighbours:
69+
70+
* *Base-accumulation iso.* `Echo-comp-iso-{to, from, from-to, to-from}`
71+
proves `Echo (g ∘ f) y ≃ Σ b. Echo f b × (g b ≡ y)` with both
72+
round-trips, plus the projection-pentagon lemmas
73+
`Echo-comp-iso-pent-{B, echo}` for three-fold composites.
74+
* *Cancellation under section/retraction.* `cancel-iso-{to, from}`
75+
exhibit `Echo (g ∘ f) y → Echo f (s y)` and back when `g` admits a
76+
pointwise inverse `s`, without needing a triangle-identity coherence
77+
for the partial maps.
78+
79+
Each adjacency note flags whichever of these is load-bearing for its
80+
particular framework comparison.

docs/adjacency/cubical-systems.adoc

Lines changed: 73 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,97 @@
33

44
toc::[]
55

6-
== 1. Nearest existing constructions
6+
== 1. Nearest existing construction
77

88
The nearest cubical-side systems for this repository are:
99

1010
* Cubical Agda: Agda's built-in `--cubical` mode plus the separate
11-
Cubical Agda library.
11+
Cubical Agda library, supplying first-class path types, higher
12+
inductive types, and a definitional univalence principle.
1213
* `RedPRL`: a tactic-oriented assistant for computational Cartesian
1314
cubical type theory.
1415
* `redtt` and `cooltt`: experimental cubical proof assistants /
15-
typecheckers.
16+
typecheckers in the same family.
1617

1718
For this repository, Cubical Agda is the closest operational neighbour:
18-
it preserves the Agda language and keeps the migration cost lower than a
19-
move to a different prover.
19+
it preserves the Agda language and would keep the migration cost lower
20+
than a move to a different prover. The relevant cubical construction
21+
itself is the same sigma-of-equation, `Σ x , (f x = y)`, but read
22+
against path equality rather than `Relation.Binary.PropositionalEquality`.
2023

21-
== 2. What do they add?
24+
== 2. What do echo types add?
2225

23-
* First-class path/cubical equality and higher-dimensional structure.
24-
* Higher inductive and quotient-like reasoning that plain
25-
`--safe --without-K` Agda does not provide directly.
26-
* A plausible route for roadmap item `R2` in `roadmap.adoc`: treating
27-
indistinguishability with equivalence-aware identity rather than only
28-
propositional/set-level relations.
26+
. *Plain intensional setting, deliberately.* The Agda development uses
27+
`--safe --without-K` and keeps `_≡_` as ordinary
28+
propositional equality. `EchoCharacteristic.echo-true≢echo-false`
29+
exploits exactly that: it is a disequality of two inhabitants of the
30+
same fiber that a cubical reader, working up to higher equivalence,
31+
would not recover automatically. The retained witness is meaningful
32+
because the equality is _not_ identifying it.
33+
. *Composition machinery proved by `refl`/`cong`/`trans`.* The
34+
recently-landed `Echo-comp-iso-{to, from, from-to, to-from}` in
35+
`proofs/agda/Echo.agda` gives a base-accumulation isomorphism
36+
`Echo (g ∘ f) y ≃ Σ b. Echo f b × (g b ≡ y)` directly in plain
37+
Agda. `cancel-iso-{to, from}` and the projection-pentagon lemmas
38+
`Echo-comp-iso-pent-{B, echo}` follow the same pattern. A cubical
39+
setting would supply more powerful tools (path induction, transport
40+
along univalence) but is not _required_ for these statements; they
41+
hold without higher-dimensional machinery.
42+
. *Residue / graded / linear / epistemic stack.* `EchoResidue`,
43+
`EchoGraded`, `EchoLinear`, `EchoEpistemic`, `EchoIntegration` build
44+
the structured-loss hierarchy without HITs, truncations, or path
45+
algebra. A cubical reformulation would not, by itself, supply this
46+
stack; it would be a re-host of content that already lives in plain
47+
Agda.
2948

30-
== 3. What do they _not_ add?
49+
== 3. What do echo types _not_ add?
3150

32-
* No automatic reuse guarantee for the current Buchholz work. Moving to
33-
`RedPRL`, `redtt`, or `cooltt` is a prover migration, not a local
34-
refactor.
35-
* No evidence yet that the blocked direct same-binder route in plain
36-
Agda disappears automatically in a cubical setting.
37-
* No requirement for the current echo-types evidence base, which still
38-
compiles in plain Agda with the standard library.
51+
* No path/cubical equality, no higher-dimensional structure, no HITs.
52+
* No quotient _types_, no automatic respect-of-relations through
53+
univalence.
54+
* No direct route for roadmap item `R2` of `roadmap.adoc`
55+
(equivalence-aware indistinguishability), which is plausibly best
56+
expressed cubically. That work is tracked as a future migration, not
57+
as a current claim.
58+
* No reuse guarantee for the Buchholz / ordinal track if the prover
59+
changes. Moving to `RedPRL`, `redtt`, or `cooltt` would be a prover
60+
migration rather than a local refactor.
3961

40-
== 4. Working decision
62+
== 4. Honest risk to the distinction
4163

42-
* Active repository tooling stays Agda-first.
43-
* Optional exploratory extension: Agda `--cubical` plus the Cubical
44-
Agda library.
45-
* `RedPRL`, `redtt`, and `cooltt` are tracked as adjacent references,
46-
not installed or required for normal builds.
64+
The sharpest cubical-side reading is: "every echo theorem is a
65+
shadow of a cubical statement; what you call an `_≡_` proof is a
66+
0-dimensional path, and your insistence on intensional equality is a
67+
self-imposed restriction without mathematical content." Under that
68+
reading, echo types are just fibers in plain Agda, awaiting a port to
69+
a cubical assistant where the proofs would be cleaner.
4770

48-
== 5. Why this matters here
71+
The reply is that the deliberately-intensional setting is _what
72+
generates the structured-loss content_:
73+
`echo-true≢echo-false`, `state₁≢state₂`, and
74+
`no-section-collapse-to-residue` rely on intensional equality being
75+
non-trivial. A cubical port would have to add explicit truncation
76+
levels to recover the same proof-relevance distinctions, at which
77+
point the echo development reappears as a 0-truncated specialisation
78+
of the cubical theory. The framing question — "study fibers in plain
79+
Agda with structured loss" vs. "study fibers cubically with chosen
80+
truncation" — is editorial; both are coherent.
4981

50-
Cubical systems may matter later for quotient-like or
51-
equivalence-sensitive extensions of echo types, especially roadmap item
52-
`R2`. They are not part of the evidential base for the current identity
53-
claim. That claim still stands or falls on the plain-Agda development
54-
already in the repository.
82+
The current development asserts that the plain-Agda framing is the
83+
right base camp, with cubical extensions as an optional later step.
5584

56-
== 6. References
85+
== 5. Verdict for Gate 1
86+
87+
Survives. Cubical systems are an _extensional richer_ neighbour rather
88+
than a refutation: they could host an echo development with stronger
89+
equality, but they do not subsume the structured-loss machinery, and
90+
the bare type former `Σ x , f x = y` is identical content under either
91+
reading. The identity claim does not stand on cubical avoidance; it
92+
stands on the residue / graded / linear / epistemic stack and on the
93+
composition / cancellation / pentagon rungs proved without higher-path
94+
machinery.
95+
96+
== References
5797

5898
* Cubical Agda library: `https://github.com/agda/cubical`
5999
* `RedPRL` family: `https://redprl.org/`

docs/adjacency/hott-fibers.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ on top of it.
3535
`map-over-comp` is a rewrite on `trans-assoc`; the square proof
3636
`map-square` uses only `cong` and `trans`. These are reusable
3737
outside of a HoTT library.
38+
. *Base-accumulation isomorphism, cancellation, and projection
39+
pentagon, proved intensionally.* `Echo-comp-iso-{to, from, from-to,
40+
to-from}` proves
41+
`Echo (g ∘ f) y ≃ Σ b. Echo f b × (g b ≡ y)` with both round-trips
42+
on the nose; `cancel-iso-{to, from}` give the section / retraction
43+
reduction in both directions when `g` admits a pointwise inverse;
44+
`Echo-comp-iso-pent-{B, echo}` show the two natural three-fold
45+
factorings agree by `refl` on the A-origin and the inner echo.
46+
These are not new HoTT results — they are corollaries of
47+
Σ-associativity and J — but they ship as named theorems in the echo
48+
development, with a deliberately minimal `--without-K` proof, and
49+
feed the residue / graded / linear bridges below. A standard HoTT
50+
library would re-derive them through transport; the echo version is
51+
reusable wherever ordinary intensional equality is enough.
3852
. *Residue, graded, linear, epistemic extensions sit on top of the
3953
intensional core.* Modules `EchoResidue`, `EchoGraded`,
4054
`EchoLinear`, `EchoEpistemic`, `EchoIntegration` do not require

docs/adjacency/lenses-and-optics.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ the "first projection lens" `_1 : Lens (A × B) A`.
4242
square `f' ∘ u ≡ v ∘ f`. This is adjacent to lens composition but
4343
the morphism data is different: morphisms of source and target
4444
codomains plus a coherence, not a get/put pair at each step.
45+
Sequential composition has its own theorem:
46+
`Echo-comp-iso-{to, from, from-to, to-from}` exhibits
47+
`Echo (g ∘ f) y ≃ Σ b. Echo f b × (g b ≡ y)`, with the projection-
48+
pentagon lemmas `Echo-comp-iso-pent-{B, echo}` enforcing coherence
49+
for three-fold composites. Lenses ship the analogous "compose two
50+
lenses to get a lens" as a definition; echoes ship it as an
51+
isomorphism theorem in plain Agda. `cancel-iso-{to, from}`
52+
additionally captures the optic intuition "if the outer step is
53+
invertible, peel it off" as `Echo (g ∘ f) y → Echo f (s y)` and
54+
back, _without_ requiring a `put` half.
4555
. *Residue as first-class lowering.* `EchoResidue.echo-to-residue`
4656
lowers a full echo to a certificate, with
4757
`no-section-collapse-to-residue` witnessing strict loss. Lenses

docs/adjacency/provenance-semirings.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ collapsing computation" is in the same genre.
3333
types indexed by observer.
3434
. *Graded degradation with composition.* `EchoGraded.degrade-comp`
3535
in `proofs/agda/EchoGraded.agda` composes lowerings along
36-
`_≤g_`. K-provenance has a natural homomorphism story ("evaluate in
37-
a simpler semiring"), but a homomorphism between semirings is a
38-
different mathematical object from a typed lowering of witnesses.
36+
`_≤g_`. K-provenance has a natural homomorphism story ("evaluate
37+
in a simpler semiring"), but a homomorphism between semirings is
38+
a different mathematical object from a typed lowering of witnesses
39+
indexed over a pre-order on grades.
3940
. *Strict non-recoverability as a theorem.*
4041
`no-section-collapse-to-residue` in `EchoResidue` _proves_ that the
4142
lowering from echo to residue has no inverse. Provenance

docs/adjacency/refinement-types.adoc

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ current development:
4848
with no section. Refinement-type presentations usually collapse at
4949
the propositional level and do not admit an analogous hierarchy of
5050
strictly weaker certificates.
51+
. *Compositional structure as theorems, not as user-supplied glue.*
52+
`Echo-comp-iso-{to, from, from-to, to-from}` in `proofs/agda/Echo.agda`
53+
proves `Echo (g ∘ f) y ≃ Σ b. Echo f b × (g b ≡ y)` directly. With a
54+
bijection on the outer leg, `cancel-iso-{to, from}` exhibits the
55+
cancellation `Echo (g ∘ f) y → Echo f (s y)` and back; the projection-
56+
pentagon lemmas `Echo-comp-iso-pent-{B, echo}` show two natural
57+
three-fold factorings agree. None of this is standard refinement-type
58+
machinery: refinement subsets have no ambient theorem stating that
59+
`{ x | (g ∘ f) x = y }` is canonically isomorphic to a Σ over an
60+
intermediate refinement, because the predicate carrier does not
61+
isolate the intermediate point as proof-relevant data.
5162

5263
== 3. What do echo types _not_ add?
5364

@@ -71,10 +82,15 @@ echo types as such.
7182
The residue-based strict weakening in `EchoResidue` is the part most
7283
resistant to this reading: a refinement type has no natural
7384
counterpart to "lower to a certificate, and prove no section exists".
74-
That is where the identity claim, if it survives, is load-bearing.
85+
The composition-iso family is the second load-bearing piece: it
86+
states a property of the family `Echo f` that has no obvious
87+
refinement-subset counterpart unless one re-imports dependent-pair
88+
machinery, at which point the refinement reading is no longer
89+
faithful.
7590

7691
== 5. Verdict for Gate 1
7792

7893
Survives, with caveat: the distinction from refinement types rests
79-
materially on (a) the family indexing by `f` and (b) the residue
80-
hierarchy, rather than on the subset-type form itself.
94+
materially on (a) the family indexing by `f`, (b) the residue
95+
hierarchy, and (c) the composition / cancellation / pentagon iso
96+
family — rather than on the subset-type form itself.

docs/adjacency/setoid-quotients.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ be read as "quotient by the kernel of `f`".
3838
`degrade-comp` compose lowerings in a pre-ordered family. A
3939
setoid presentation would need one relation per grade and explicit
4040
respect proofs; the graded presentation collapses this into a
41-
single function family indexed by `g₁ ≤g g₂`.
41+
single function family indexed by `g₁ ≤g g₂` with composition
42+
pinned by `refl`.
43+
. *Functorial composition for the family itself.* `Echo-comp-iso-*`
44+
in `proofs/agda/Echo.agda` exhibits `Echo (g ∘ f) y` as
45+
isomorphic to `Σ b. Echo f b × (g b ≡ y)`, with pentagon coherence
46+
for three-fold composites. This is structure on the _family_
47+
`Echo f`, not on a setoid carrier; a setoid translation would need
48+
to carry the equivalence relation through the iso explicitly,
49+
losing the reading "echoes glue along the intermediate visible".
4250

4351
== 3. What do echo types _not_ add?
4452

0 commit comments

Comments
 (0)