Skip to content

Commit 55fedf9

Browse files
hyperpolymathclaude
andcommitted
docs: ephapax bridge package (#125 + #127) + EchoTypes.jl v0.2.0 surfacing (#132)
Resolves three tightly-coupled open documentation issues with shared inputs from a coordinated proposal at /tmp/ephapax-bridge-proposal.md (a background-agent research dump consumed verbatim where citation- quality matched, lightly edited for context). ============================================= * README.md — one-line "Executable companion" callout below the synopsis, pointing at hyperpolymath/EchoTypes.jl with explicit R-2026-05-18 honest-scope clause (retracted surface NOT mirrored; F5 funext-qualified clauses NOT mirrored — Julia has no funext). * CLAUDE.md ecosystem-context block — new bullet matching the existing one-line style of Ephapax / VeriSim entries; same scope caveats. * docs/bridges/cross-repo-bridge-status.md — new row in the Tracks table for the executable-mirror correspondence. Row uses the existing 5-column shape; "Current status" cell carries the scope-inheritance discipline so the row stays falsifiable by an outside reviewer. * docs/echo-types/MAP.adoc §Tooling — new §"EchoTypes.jl — Executable Julia companion `[REAL]`" subsection adjacent to the ArghDA subsection. Records repo URL + registry + v0.2.0 module list + honest-scope clause + bridge-status pointer. The companion makes no proof claims and the Agda here remains the sole source of truth; these edits exist so contributors and reviewers can discover the companion without already knowing it's there. ========================================== Adds a new "Anti-pattern — closing a degrade-map obligation within an endpoint" subsection at the end of docs/echo-types/composition.md. Captures the lesson surfaced by the 2026-05-27 ephapax four-layer redesign work: when a decoration `D₁ ≤ D₂` connects two indexed instances of a fiber, an obligation that mentions BOTH endpoints does not close inside either endpoint alone — the load-bearing content lives on the degrade arrow. The note pairs the upstream Agda theorem (`EchoLinear.degradeMode-comp` at `proofs/agda/EchoLinear.agda:93-101`, three `refl` clauses) with an empirical downstream test from ephapax (PR #170 strengthened the L1 variable rule with a region-well-formedness premise; the resulting axiom remained false on a concrete typing-level counterexample; the honest closure path identified in PRESERVATION-DESIGN.md §4.8.1 is cross-layer at the L1→L2 boundary). The downstream test is empirical evidence that the discipline detects ill-shaped attempts at the point the abstraction predicts — NOT a proof of the upstream theorem. Composition.md is Markdown, so the note is rendered as Markdown rather than the AsciiDoc requested in the issue body (composition.md / examples.md / overview.md / taxonomy.md / tropical-correspondence.md / types-list-note.md are all .md while the other dozen docs are .adoc; the split is pre-existing and the policy direction isn't documented — flagging as a seam observation only, not migrating the file extension here). ========================================== Two edits: * docs/echo-types/examples.md — new entry 11 "Region exit in a linear type system (ephapax L3)" inserted after entry 10 (Abstract interpretation widening) and before §"Cross-cutting observations". Matches the existing 6-bullet template (Source map / What is lost / What remains / Echo / Extensional- intensional / Reference). The Reference bullet cites both echo-types-side `tutorial/region_exit_audit/RegionExitAudit.agda` (the type-level audit walkthrough) AND ephapax-side `formal/Echo.v` with tight line ranges (291-301 for affine_canonical / affine_all_equal; 502-517 for no_section_collapse_to_residue). * docs/echo-types/paper.adoc §"Threats to validity" §"Sample-size on consumer evidence" — new paragraph after the existing two (absolute-zero and Buchholz), before §"Conservativity is evidence, not a theorem". Adds the ephapax L3 layer as the third partial external-corroboration stream, tone matched to the existing "validates one technical bridge, not the modality thesis" framing. R-2026-05-18 narrowings preserved (no graded-comonad / two-models / UP / model-independence language). Honestly scoped to L3 ONLY — not implying anything about ephapax's overall proof posture (L1 has 5 Axiom + 11 Admitted, L2 has 1 Admitted, L4 is skeleton; only L3 is Qed-closed and safe to cite). Background-agent seam observations folded in ============================================= Three observations the agent caught while assembling the proposal were applied in-PR (none scope-creep): 1. composition.md is Markdown not AsciiDoc — draft rendered as Markdown to match file. Noted in commit body. 2. #127's cited line range 33-73 covers the block; the tight theorem range is 52-65. Tight range used in both examples.md and paper.adoc. 3. MEMORY.md entry `feedback_ephapax_affine_proofs_not_done.md` warns that ephapax's overall proof posture is mixed; §3.2 paper paragraph is scoped to L3 specifically. Test plan ========= * All edits are pure docs — Agda suite unaffected. * References to other-repo line numbers verified at the agent's cited points before paste. * No retraction-watch violations: scanned the diff for "graded comonad", "model-independence", "categorical universal property", "conservativity metatheorem" — none introduced. Refs ==== * Closes #125 * Closes #127 * Closes #132 * Refs #128 (umbrella will close when #126 also lands) * Refs #126 (handled in a separate Agda PR — NARROW stub per agent's verdict) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5ac2d9d commit 55fedf9

7 files changed

Lines changed: 153 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ Adjacent projects, in one line each, for session bootstrapping:
4040
repo 2026-05-30 — see echo-types#159) + `arghda-panll`
4141
(Gossamer/ReScript presentation, planned). See docs/buchholz-plan.adoc
4242
appendix for the motivating proof pipeline.
43+
- EchoTypes.jl — executable Julia companion to echo-types, mirroring the
44+
finite-domain shadow of the Tier-1 + Tier-2 spine + the unconditional
45+
F5 OFS fragment. v0.2.0 (2026-05-27) extends v0.1.0's `Echo` /
46+
`EchoResidue` / `EchoFiberCount` / `EchoThermodynamics` coverage with
47+
seven new modules (`EchoTotalCompletion`, `EchoOrthogonalFactorizationSystem`,
48+
`EchoImageFactorization`, `EchoNoSectionGeneric`, `EchoLossTaxonomy`,
49+
`EchoEntropy`, `EchoObservationalEquivalence`). Honestly scoped under
50+
R-2026-05-18 — the retracted surface and the funext-qualified F5
51+
clauses are NOT mirrored. Falsifies-by-counterexample on concrete
52+
data; the Agda here remains the source of truth.
53+
https://github.com/hyperpolymath/EchoTypes.jl
4354

4455
# This repo
4556

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Constructive Agda development for echo types as a first-class notion of structur
1515

1616
loss that is not total erasure.
1717

18+
> **Executable companion.** [`hyperpolymath/EchoTypes.jl`](https://github.com/hyperpolymath/EchoTypes.jl)
19+
> (v0.2.0, 2026-05-27) runs the finite-domain shadow of the Tier-1 +
20+
> Tier-2 spine + the unconditional F5 OFS fragment on concrete data.
21+
> The Julia mirror is honestly scoped under R-2026-05-18 — it does
22+
> NOT replay the retracted graded-comonad / two-models / UP /
23+
> conservativity surface, nor the funext-qualified F5 clauses (Julia
24+
> has no funext). It falsifies-by-counterexample; the Agda here
25+
> remains the source of truth.
26+
1827
## Contents
1928

2029
- [Where things are](#️-where-things-are)

docs/bridges/cross-repo-bridge-status.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ touches other repositories.
1515
| CNO core theorem alignment | `EchoCNOBridge` theorem family | `absolute-zero/proofs/coq/common/CNO.v`, `absolute-zero/proofs/lean4/CNO.lean` | Name-by-name correspondence table drafted (see §"CNO Agda↔Coq↔Lean4 correspondence" below). | (1) Coq's `eval` is relational; Agda+Lean are functional. (2) Coq has no `absolute_zero` alias. (3) Coq's single-instruction CNO is `nop_is_cno`; Agda+Lean use `halt_is_cno`. (4) Coq carries 3 axioms (`eval_deterministic`, `eval_respects_state_eq_{left,right}`) that echo-types' `--safe --without-K` policy forbids — porting must re-route through a functional formulation, where they hold by `refl`. (5) `ProgramEcho`/`Echo` itself is currently unilateral (Agda-only). |
1616
| JanusKey bridge | `proofs/agda/EchoJanusBridge.agda` | `januskey/src/abi/Types.idr` (`OpKind`, `IsFileOp`, `IsKeyOp`); `januskey/PROOF-NEEDS.md` | Name-bridge only — Agda side has a *local* 4-variant `JanusOp = Create \| Delete \| Modify \| Move`; canonical Idris2 ABI defines 8-variant `OpKind = Copy \| Move \| Delete \| Modify \| Obliterate \| KeyGen \| KeyRotate \| KeyRevoke` plus `IsFileOp`/`IsKeyOp` predicates. Already drifted (Create vs Copy; missing Obliterate + 3 key ops). | Decision recorded: structural-mirror the Agda enum to januskey's Idris2 `OpKind`; content-bridge deferred until januskey's `PROOF-NEEDS.md` lands content-bearing semantics. Agda↔Idris2 has no FFI, so any content-bridge must run via shared schema or trusted extraction. |
1717
| Tropical alignment | `proofs/agda/EchoTropical.agda` | `tropical-resource-typing/Tropical.thy`, `tropical-resource-typing/TropicalSessionTypes.lean` (and 8 other `.thy` files) | Adjacent repo audit complete (2026-05-20). Repo present at `repos-monorepo/verification-ecosystem/tropical-resource-typing`; remote `hyperpolymath/tropical-resource-typing` active (last push 2026-05-18, language=Isabelle). First alignable theorem pair identified: Agda `⊕-idem` ↔ Isabelle `trop_add_idem` ↔ Lean `add_comm_trop`+`add_assoc_trop`. | Agda cannot import `.thy` or `.lean` directly; alignment is citation-level (statement correspondence with build-side independent proof per language), not import-level. Long-game target: `Tropical_Ordinal_Bridge.thy` ↔ echo-types ordinal track. |
18+
| EchoTypes.jl executable mirror | Tier-1+Tier-2 spine + unconditional F5 OFS fragment (modules: `Echo`, `EchoResidue`, `EchoFiberCount`, `EchoThermodynamics`, plus 2026-05-27 v0.2.0 additions: `EchoTotalCompletion`, `EchoOrthogonalFactorizationSystem`, `EchoImageFactorization`, `EchoNoSectionGeneric`, `EchoLossTaxonomy`, `EchoEntropy`, `EchoObservationalEquivalence`) | [`hyperpolymath/EchoTypes.jl`](https://github.com/hyperpolymath/EchoTypes.jl) v0.2.0 (pinned to `e7dded6`); registered in `julia-professional-registry` | **Executable companion shipped.** Mirrors run the finite-domain shadow of the upstream theorems on concrete data and falsify-by-counterexample; the companion makes no proof claims, the Agda here remains the source of truth. R-2026-05-18 retraction surface NOT mirrored; F5 funext-qualified clauses (uniqueness up to iso, diagonal lifting) NOT mirrored — Julia has no funext, the claims would be vacuous. UIP- and truncation-strength upgrades likewise honestly not mirrored. | — (shipped; honest scope holds verbatim from upstream). Future advances on the Tier-1+Tier-2 spine are candidates for new shadows in subsequent EchoTypes.jl releases, but no in-repo CI dependency exists in either direction. |
1819

1920
## Immediate next actions
2021

docs/echo-types/MAP.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,30 @@ the move record); was previously in-tree under `arghda-core/`.
358358
but operates on any `--safe --without-K` Agda workspace; not a
359359
build-dependency.
360360

361+
=== EchoTypes.jl — Executable Julia companion `[REAL]`
362+
Mirrors the finite-domain shadow of the Tier-1 + Tier-2 spine + the
363+
unconditional fragment of the F5 OFS earn-back. v0.2.0 (2026-05-27,
364+
pinned to `e7dded6`) extends the original v0.1.0 coverage (`Echo`,
365+
`EchoResidue`, `EchoFiberCount`, `EchoThermodynamics`) with seven
366+
new shadows for the canonical-identity spine: `EchoTotalCompletion`,
367+
`EchoOrthogonalFactorizationSystem` (unconditional fragment),
368+
`EchoImageFactorization`, `EchoNoSectionGeneric`, `EchoLossTaxonomy`,
369+
`EchoEntropy`, `EchoObservationalEquivalence`.
370+
371+
* Repo: https://github.com/hyperpolymath/EchoTypes.jl
372+
* Registry: `julia-professional-registry` (registered via PR #16).
373+
* Scope inheritance: R-2026-05-18 retraction surface NOT mirrored;
374+
F5 funext-qualified clauses (uniqueness up to iso, diagonal
375+
lifting) NOT mirrored — Julia has no funext, the claims would be
376+
vacuous; UIP- and truncation-strength upgrades likewise honestly
377+
not mirrored.
378+
* Discipline: falsifies-by-counterexample over concrete finite data;
379+
the companion makes no proof claims, the Agda here remains the
380+
source of truth. No in-repo CI dependency in either direction.
381+
382+
Bridge-status row: `docs/bridges/cross-repo-bridge-status.md`
383+
§"EchoTypes.jl executable mirror".
384+
361385
== Governance — proof-debt & retraction
362386

363387
The honesty layer. *Read before citing any claim above as final.*

docs/echo-types/composition.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,54 @@ Ranked by unblock-value. (1) and (2) landed; (3) onwards is open.
397397
None of these depend on the blocked Buchholz-WF / shared-binder
398398
work. All are Sonnet-class proofs; (5) is Opus 4.7 design and
399399
Sonnet execution.
400+
401+
---
402+
403+
## Anti-pattern — closing a degrade-map obligation within an endpoint
404+
405+
*Status: methodological note (2026-05-30). Not Agda-backed; the
406+
upstream theorem it abstracts from IS Agda-backed.*
407+
408+
The per-decoration composition rung (§6, "Decoration commuting") proves
409+
that for each decoration `D` the degrade map `degrade : ⊑ → Echo D₁ →
410+
Echo D₂` commutes with composition under a recipe: order →
411+
propositionality → join → factoring-free compose → via-join restatement.
412+
The recipe makes the cross-decoration obligation — "two successive
413+
weakenings agree with a single weakening along the composed proof" —
414+
*explicitly* a property of the degrade map, not of either endpoint.
415+
The upstream theorem is `EchoLinear.degradeMode-comp`
416+
(`proofs/agda/EchoLinear.agda:93-101`), three `refl` clauses pinning
417+
each reachable constructor pair.
418+
419+
**The anti-pattern.** When a decoration `D₁ ≤ D₂` connects two
420+
indexed instances of a fiber, an obligation that mentions *both*
421+
endpoints does not close inside either endpoint alone. Attempting to
422+
discharge it by strengthening a typing rule of `D₁` (or `D₂`) with a
423+
premise that references the other endpoint's invariant is structurally
424+
ill-shaped: the load-bearing content lives on the degrade arrow.
425+
426+
**Detection heuristic.** If a proof attempt requires adding a premise
427+
to a rule of one decoration that mentions a *different* decoration's
428+
invariant (e.g. a region-presence premise on a modality-indexed rule),
429+
the discipline is being violated. The corrective is to relocate the
430+
obligation to the decoration map, not to thicken the endpoint.
431+
432+
**Empirical downstream test.** The `hyperpolymath/ephapax` project's
433+
L1 region-capability layer admits an analogue cross-decoration
434+
obligation. An empirical closure attempt (ephapax PR #170, merged
435+
2026-05-27) strengthened the L1 variable rule
436+
`T_Var_*_L1` with a region-well-formedness premise and verified the
437+
resulting axiom remained false on a concrete typing-level
438+
counterexample (`ERegion rv (EI32 5) : TBase TI32 at R = [rv]`). The
439+
honest closure path identified in ephapax's `PRESERVATION-DESIGN.md`
440+
§4.8.1 is cross-layer — the obligation lives at the L1→L2 boundary
441+
where the effect-typed `TFun` of `T_Lam_Linear_L2` carries the
442+
region-effect that L1's R-threading lacks. The pattern matches the
443+
echo-types abstraction: visible source-level discrepancies *can* be
444+
absorbed inside an endpoint (and PR #170 absorbed one), but the
445+
cross-decoration obligation cannot.
446+
447+
The downstream test is not a proof of the upstream theorem — it is
448+
empirical evidence that the discipline detects ill-shaped attempts at
449+
the point the abstraction predicts. See echo-types#125 for the
450+
issue thread that surfaced this observation.

docs/echo-types/examples.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,45 @@ Template used for every entry:
205205

206206
---
207207

208+
## 11. Region exit in a linear type system (ephapax L3)
209+
210+
- **Source map.** `collapse_r : LiveAt r → ExitedAt r`, the
211+
operational `S_Region_Exit` rule of the ephapax calculus: a region
212+
scope `ERegion r e` reducing on a value `v` produces
213+
`(mem_free_region μ r, remove_first r R, v)`. The map sends a
214+
configuration with `r ∈ R` to one with `r ∉ R`, freeing the
215+
region's memory.
216+
- **What is lost.** Which linear values (of types `TString r`,
217+
`TRef Lin (TString r)`, …) were live in `r` immediately before
218+
exit. After the step, `r` is unrecoverable as a region name,
219+
and the typing system cannot reconstruct which preimage
220+
configuration produced the post-step state.
221+
- **What remains.** A proof-relevant residue: the residue value typed
222+
at `TEcho` in ephapax's L3 layer carries a witness of *which*
223+
value-shape was erased. Under Linear mode the residue must be
224+
observed (`T_Observe` consumes it); under Affine mode the residue
225+
may be silently lowered to the trivial residue
226+
`EchoR ⊤ TrivCert y`.
227+
- **Echo.** `Echo collapse_r exited = Σ (LiveAt r) (λ s → collapse_r s ≡ exited)`.
228+
Under Linear mode the full fiber is retained; under Affine mode the
229+
codomain collapses to ⊤ and the inhabitants become propositionally
230+
equal (cf. `affine_canonical` / `affine_all_equal` in ephapax
231+
`formal/Echo.v:291-301`).
232+
- **Extensional / intensional.** Intensional. The shadow
233+
(`{R-after-exit : list region_name}`) lets the typing system
234+
see the post-exit capability set, but the intensional core
235+
distinguishes *which* configuration produced it.
236+
- **Reference.** `tutorial/region_exit_audit/RegionExitAudit.agda`
237+
(the echo-types-side type-level audit walkthrough); ephapax
238+
`formal/Echo.v` (Coq port of `EchoLinear.agda`); ephapax
239+
`no_section_collapse_to_residue` (`formal/Echo.v:502-517`,
240+
`Qed`, zero axioms) matches
241+
`EchoResidue.no-section-collapse-to-residue`
242+
(`proofs/agda/EchoResidue.agda:52-65`). See echo-types#127 for
243+
the issue thread that seeded this entry.
244+
245+
---
246+
208247
## Cross-cutting observations
209248

210249
1. **Shadow collapse is the same across cases.** Every example's

docs/echo-types/paper.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,24 @@ particular technical bridges (the Echo–CNO bridge and the eventual
798798
Echo–`<ᵇ` bridge respectively), and not of "Echo as a recognised
799799
modality" in the field.
800800

801+
A third partial external-corroboration stream is the
802+
`hyperpolymath/ephapax` programming-language project, whose L3
803+
layer (`formal/Echo.v`) is an explicit Coq port of `EchoLinear.agda`
804+
and `EchoResidue.agda` under the same `--safe --without-K`-equivalent
805+
discipline (K-free, zero axioms, 24 `Qed`). The ephapax headline
806+
`no_section_collapse_to_residue` (`formal/Echo.v:502-517`) is the
807+
same theorem, stated again in Coq, as
808+
`EchoResidue.no-section-collapse-to-residue`
809+
(`proofs/agda/EchoResidue.agda:52-65`), and lands constructively in
810+
both mechanisations. We claim only that this is a faithful
811+
re-statement: the two artefacts are not independent derivations —
812+
ephapax was written *against* the Agda upstream — so the
813+
corroboration is at the level of "the Coq port carries through
814+
without uncovering a mechanisation gap," not at the level of
815+
independent corroboration of the fiber + thin-poset shape. As with
816+
the `absolute-zero` consumer evidence, this validates one technical
817+
bridge, not the modality thesis.
818+
801819
==== Conservativity is evidence, not a theorem
802820

803821
`docs/echo-types/conservativity.adoc` was retracted from

0 commit comments

Comments
 (0)