Skip to content

Commit 9b70faa

Browse files
docs(bridges): ephapax Coq correspondence rows and RMR/RMO/OND note (#371)
## Summary This carries out the echo-types items in the ephapax v2 survey's cross-repo action list (`ephapax/docs/reports/2026-11-04-v2-survey/EPHAPAX-V2-ARCHITECTURE-AND-PLAN.adoc`, "Cross-repo action list"). The change is docs only and touches one file, `docs/bridges/cross-repo-bridge-status.adoc`. The survey calls it `.md`; the file is now `.adoc`. ## Changes - **New section "Ephapax Coq ↔ echo-types Agda correspondence"** with six rows: `weaken`, `degradeMode-comp`, no-section, DecorationStructure laws, `reversibility-via-totality` and `EchoResidueCell`. Each row gives the echo-types module and name and the ephapax `formal/Echo.v` / `formal/Modality.v` name, at ephapax `main` `32d8eb7`. - **Status: all rows are conceptual. None is RECONCILED** under standards PROOF-POLICY §2.2. Rows where both legs exist are `BRIDGE-PENDING`. `reversibility-via-totality`, `EchoResidueCell`, the abstract `DecorationStructure` record and the generic `no-section-of-collapsing-map` have no Coq leg; the survey plans them for ephapax rung P19. - I compared the statements by reading them, and the rows record what I found: - **Affine carrier differs.** Coq has `LEcho Affine = unit` and `weaken := tt`. Agda has `LEcho affine = EchoR ⊤ TrivialCert tt` and `weaken = collapse-to-residue`. - **No-section is the closest pair.** Agda states `¬ Σ` and Coq states `~ exists`. These are interderivable by an informal argument that is not checked here. - **The mode order is built differently.** In Coq it is a `Type`-sorted `mode_le` whose `mode_le_trans` goes through `eq_rect`. In Agda it is defined by clauses. - **The existing "Ephapax L3 bridge" row** now says its counts date from 2026-05-30 and points to the new section. - **New section "RMR / RMO / OND correspondence note".** It sets januskey's RMR (reversible transaction) and RMO (obliterative wipe), and absolute-zero's OND (Observational *Null Disclosure*, `is-OND`), against the nearest echo-types artefacts. For each, it states what the correspondence is not. For example, no-section is not physical erasure, and OND-5 non-composition means the Echo composition isos give no OND composition. The note adds no bridge module. - **Revision-history entry** for these changes. ## Checks run (2026-11-09) - **Agda, CI profile.** Toolchain from `bash scripts/setup-agda.sh`: Agda 2.7.0.1, agda-stdlib `8326c74`, absolute-zero `f486c29`. Then: ``` agda --no-libraries -i "$AGDA_STDLIB" -i "$ABSOLUTE_ZERO_AGDA" --safe --without-K --cubical-compatible -i proofs/agda proofs/agda/All.agda # exit 0 agda --no-libraries -i "$AGDA_STDLIB" -i "$ABSOLUTE_ZERO_AGDA" --safe --without-K --cubical-compatible -i proofs/agda proofs/agda/Smoke.agda # exit 0 ``` The only diagnostics are the `-W[no]UnsupportedIndexedMatch` warnings. - **Repo gates:** - `sh scripts/kernel-guard.sh` — PASS - `sh scripts/check-agda-invocations.sh` — OK - `bash tools/check-guardrails.sh proofs/agda` — OK - **Coq leg, for the table only.** `coqc -Q . Ephapax Echo.v` and `Modality.v` from ephapax `32d8eb7`, under Coq 8.18.0, both exit 0. `Print Assumptions` reports "Closed under the global context" for `degrade_mode_comp`, `no_section_collapse_to_residue`, `mode_le_prop`, `degrade_mode_via_join` and `strict_linear_example`. - **Not used as evidence.** The Agda 2.6.3 + stdlib 2.3 setup from `scripts/provision-agda.sh` fails at `EchoCNOPackaging`: absolute-zero's `CNO.agda` lacks `--cubical-compatible`. That failure is in the local profile, not this change. The CI invocation passes the flag on the command line, which is why it succeeds. The commit is SSH-signed with the session key, not the owner's GPG key. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9abd8a5 commit 9b70faa

1 file changed

Lines changed: 212 additions & 1 deletion

File tree

‎docs/bridges/cross-repo-bridge-status.adoc‎

Lines changed: 212 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ Coq headlines `+mode_le_prop+`, `+weaken_collapses_distinction+`,
120120
counterpart pinned in `+Smoke.agda+`. Scope: *L3 only* — ephapax-affine
121121
has Rust checkers only; L1 has 5 `+Axiom+` + 11 `+Admitted+`; L4 has no
122122
mechanised theorems yet (cf. ephapax `+formal/PRESERVATION-DESIGN.md+`,
123-
`+docs/echo-types/paper.adoc+` §"`Threats to validity`"). |Per-bridge
123+
`+docs/echo-types/paper.adoc+` §"`Threats to validity`"). The counts in
124+
this row date from 2026-05-30; the row-by-row status as of 2026-11-09
125+
is §"`Ephapax Coq ↔ echo-types Agda correspondence`" below. |Per-bridge
124126
docs `+docs/bridges/ECHO-EPHAPAX-BRIDGE.adoc+` (CNO-equivalent) not yet
125127
authored; tracked as follow-up issue. Full content bridge (round-trip CI
126128
between Agda + Coq) would require an Agda mirror of ephapax
@@ -345,8 +347,217 @@ in Coq as
345347
changes the headline’s logical shape. The 3 Coq axioms exist precisely
346348
to paper over this in the relational model.
347349

350+
=== Ephapax Coq ↔ echo-types Agda correspondence
351+
352+
Added 2026-11-09 from the ephapax v2 survey
353+
(`+ephapax/docs/reports/2026-11-04-v2-survey/EPHAPAX-V2-ARCHITECTURE-AND-PLAN.adoc+`,
354+
"`Cross-repo action list`"). The survey plans Coq ports of the
355+
echo-types artefacts below for ephapax's L3 layer, recorded on the
356+
ephapax side in `+formal/v2/CORRESPONDENCE.adoc+` (not yet written).
357+
358+
*Revisions.* echo-types `+main+` at `+ccec4d7+`. ephapax `+main+` at
359+
`+32d8eb7+`; `+formal/Echo.v+` has sha256 `+f2eb75ec…5cd6+`, and
360+
`+formal/Modality.v+` is also from that revision.
361+
362+
*What these rows are.* Each row is a *conceptual* correspondence. The
363+
names were looked up on both sides and the statement shapes were
364+
compared by reading them. No row is `+RECONCILED+` under standards
365+
PROOF-POLICY §2.2. No checked bridge exists, no transported or
366+
re-proved statement was produced, and no written justification ties
367+
the two semantics together. Rows with both legs are `+BRIDGE-PENDING+`.
368+
Rows with no Coq statement are Agda-only, with no Coq leg.
369+
370+
*Checks run for this table (2026-11-09).*
371+
372+
* Agda leg: the CI profile
373+
`+agda --no-libraries -i $AGDA_STDLIB -i $ABSOLUTE_ZERO_AGDA --safe --without-K --cubical-compatible -i proofs/agda proofs/agda/{All,Smoke}.agda+`.
374+
The toolchain is `+scripts/setup-agda.sh+`: Agda 2.7.0.1,
375+
agda-stdlib `+8326c74+`, absolute-zero `+f486c29+`. Both roots exit 0.
376+
The only diagnostics are the `+-W[no]UnsupportedIndexedMatch+`
377+
warnings the CI log also shows.
378+
* Coq leg: `+coqc -Q . Ephapax Echo.v+` and `+coqc -Q . Ephapax Modality.v+`
379+
under Coq 8.18.0, on the files at ephapax `+32d8eb7+`. Both exit 0.
380+
`+Print Assumptions+` reports "Closed under the global context" for
381+
`+degrade_mode_comp+`, `+no_section_collapse_to_residue+`,
382+
`+mode_le_prop+`, `+degrade_mode_via_join+` and
383+
`+strict_linear_example+`. A green check in each prover does not
384+
show that both proved the same proposition (PROOF-POLICY §2.2).
385+
386+
[width="100%",cols="16%,26%,26%,32%",options="header",]
387+
|===
388+
|Artefact |echo-types (Agda) |ephapax (Coq) |Correspondence state and observed divergences
389+
390+
|`+weaken+`
391+
|`+EchoLinear.weaken : LEcho linear → LEcho affine+`, defined as
392+
`+collapse-to-residue+`. Companions: `+weaken-collapses-distinction+`,
393+
`+strict-linear-example+`, `+affine-canonical+`. Alias:
394+
`+EchoEphapaxBridge.ephapax-L3-weaken+`.
395+
|`+formal/Echo.v+`: `+weaken : LEcho Linear -> LEcho Affine := tt+`.
396+
Companions: `+weaken_collapses_distinction+`, `+strict_linear_example+`,
397+
`+affine_canonical+`, `+affine_all_equal+`.
398+
|`+BRIDGE-PENDING+`. *Divergent carrier.* Agda has
399+
`+LEcho affine = EchoR ⊤ TrivialCert tt+`, a Σ of `+⊤+` and `+⊤+`, and
400+
`+weaken+` is the residue lowering. Coq has `+LEcho Affine = unit+`, and
401+
`+weaken+` is the constant map. Coq's lowering `+collapse_to_residue+`
402+
is a separate definition, not `+weaken+`. Also, `+strict_linear_example+`
403+
uses a `+Prop+` `+exists+` where Agda uses a `+Σ+`.
404+
405+
|`+degradeMode-comp+`
406+
|`+EchoLinear.degradeMode-comp+`, with `+degradeMode+`, `+≤m-trans+`,
407+
`+degradeMode-compose+`, `+degradeMode-id-{linear,affine}+` and
408+
`+degradeMode-strict-is-weaken+`.
409+
|`+formal/Echo.v+`: `+degrade_mode_comp+`, with `+degrade_mode+`,
410+
`+mode_le_trans+`, `+degrade_mode_compose+`,
411+
`+degrade_mode_id_{linear,affine}+` and `+degrade_mode_strict_is_weaken+`.
412+
|`+BRIDGE-PENDING+`. Same quantifier shape:
413+
`+degrade p23 (degrade p12 e) = degrade (trans p12 p23) e+`. The
414+
divergences are the affine carrier (see `+weaken+`), and how the order is
415+
built. Agda's `+_≤m_ : … → Set+` is defined by clauses. Coq's
416+
`+mode_le : … → Type+` uses `+mode_le_trans+`, which is `+Defined+`
417+
through an `+eq_rect+` transport. The Agda proof is `+refl+` in each
418+
clause. The Coq proof uses `+mode_le_prop+`.
419+
420+
|no-section
421+
|`+EchoResidue.no-section-collapse-to-residue+`,
422+
`+EchoLinear.no-section-weaken+` (the same statement, since
423+
`+weaken = collapse-to-residue+`), and the generic
424+
`+EchoNoSectionGeneric.no-section-of-collapsing-map+`. Alias:
425+
`+EchoEphapaxBridge.ephapax-L3-no-section-collapse+`.
426+
|`+formal/Echo.v+`: `+no_section_collapse_to_residue+` and
427+
`+strict_weakening_collapse+`. There is no Coq counterpart of the
428+
generic `+no-section-of-collapsing-map+`. There is no no-section lemma
429+
for Coq's own `+weaken+`, whose codomain is `+unit+`.
430+
|`+BRIDGE-PENDING+`. This is the closest pair. Agda states
431+
`+¬ Σ (EchoR ⊤ TrivialCert tt → Echo collapse tt) (λ reify → ∀ e → reify (collapse-to-residue e) ≡ e)+`.
432+
Coq states
433+
`+~ exists reify : EchoR unit TrivialCert tt -> Echo collapse tt, forall e, reify (collapse_to_residue e) = e+`.
434+
`+¬ Σ+` and `+¬ ∃+` (into `+Prop+`) are interderivable, by an informal
435+
argument that is not checked here. `+EchoR+` is a `+Σ+` in Agda and a
436+
`+Record+` in Coq. The lowering uses `+subst+` in Agda and `+eq_rect+` in
437+
Coq. Only the generic form is Agda-only.
438+
439+
|DecorationStructure laws
440+
|`+EchoDecorationStructure.DecorationStructure+`, with fields
441+
`+_≤_+`, `+≤-refl+`, `+≤-trans+`, `+≤-prop+`, `+join+` and
442+
`+≤-join-{left,right,univ}+`. Mode instance:
443+
`+linear-decoration-structure+`. Generic laws:
444+
`+DegradeAbstract.degrade-compose-abstract+` and
445+
`+degrade-via-join-abstract+`. Concrete Mode laws: `+EchoLinear.≤m-prop+`,
446+
`+_⊔m_+`, `+≤m-⊔m-{left,right,univ}+` and `+degradeMode-via-join+`.
447+
|There is no record abstraction. Mode instance only, in
448+
`+formal/Echo.v+`: `+mode_le_refl+`, `+mode_le_trans+`, `+mode_le_prop+`,
449+
`+mode_join+`, `+mode_le_join_{left,right,univ}+`,
450+
`+degrade_mode_compose+` and `+degrade_mode_via_join+`. In
451+
`+formal/Modality.v+` (the L2 modality, which has no join):
452+
`+modality_le_refl+`, `+modality_le_trans+` and `+modality_le_prop+`.
453+
|Mode-instance laws are `+BRIDGE-PENDING+`. The join clauses agree
454+
(`+linear ⊔m m = m+`, `+affine ⊔m _ = affine+`; Coq `+mode_join+` is
455+
the same). The abstract record and `+DegradeAbstract+` are Agda-only,
456+
with no Coq leg. `+Modality.v+` is a second, separate Coq copy of the
457+
same order, used by L2, and it has no join.
458+
459+
|`+reversibility-via-totality+`
460+
|`+EchoReversibilityBridge.reversibility-via-totality : Σ B (Echo f) ↔ A+`,
461+
built from `+EchoTotalCompletion.{encode,decode}+`. Companions:
462+
`+ReversibleCompletion+`, `+echo-reversible+`,
463+
`+capability-can-be-dropped+` and `+no-recovery-once-dropped+`.
464+
|None. `+formal/+` at `+32d8eb7+` has no total-completion or
465+
reversibility statement. The survey plans `+rmr_restores+` in
466+
`+EchoBridge.v+` (rung P19).
467+
|Agda-only, with no Coq leg. Nothing to compare yet.
468+
469+
|`+EchoResidueCell+`
470+
|`+EchoResidueCell.{ResidueCell, holding, spent, takeForReverse, consume}+`,
471+
with headlines `+holding-reverses+`, `+spent-does-not-reverse+`,
472+
`+consume-spends+` and `+once-only+`. This is the Agda mirror of 007's
473+
Idris `+ResidueCell+`.
474+
|None at `+32d8eb7+`. The survey plans `+residue_once_only+` (rung P19).
475+
|Agda-only, with no Coq leg. Nothing to compare yet.
476+
|===
477+
478+
*Constraint carried from the survey.* echo-types' variance verdict
479+
(`+EchoVariance+`: a graded monad of accumulation, not a graded comonad)
480+
limits how residues may compose on the ephapax side. A port must not add
481+
a comonadic "`recover from residue`" rule. `+no-section-weaken+` and
482+
`+no-section-of-collapsing-map+` refute such a recovery.
483+
484+
=== RMR / RMO / OND correspondence note
485+
486+
The ephapax v2 survey ties three sibling vocabularies to its L3 layer.
487+
This note records how each one relates to echo-types. All three are
488+
*conceptual* correspondences. None has a bridge module, none is
489+
`+RECONCILED+`, and nothing in this note was added to `+All.agda+` or
490+
`+Smoke.agda+`.
491+
492+
[width="100%",cols="12%,29%,29%,30%",options="header",]
493+
|===
494+
|Term |Source and status there |Nearest echo-types artefact |What the correspondence is, and is not
495+
496+
|*RMR* (Reversible Transaction)
497+
|januskey, `+docs/wiki/theory/rmr-primitive.md+`. The target property:
498+
for each operation `+F+` on state `+S+`, JanusKey records enough to apply
499+
an inverse with `+F⁻¹(F(S)) = S+`. The general claim is OPEN in
500+
januskey's `+PROOF-NEEDS.adoc+`. Only conditional transaction-model
501+
lemmas are proved in Agda.
502+
|`+EchoReversibilityBridge.reversibility-via-totality+` and
503+
`+echo-reversible+` (retaining the full fibre makes the forgetful map
504+
invertible). Also `+EchoResidueCell.once-only+` (a held residue can be
505+
taken for reversal at most once).
506+
|RMR is reversal by *retention*. echo-types' version is about types: if
507+
the fibre is kept, nothing is lost. It is not a statement about
508+
filesystem state or about JanusKey's operations, and there is no
509+
Agda↔Rust/Idris2 import path. The survey reads ephapax's full-fibre
510+
Linear drop echo as RMR (retention), never as erasure. Per the survey,
511+
januskey's MAA draft expired on 2026-04-13 and must be restated before
512+
ephapax cites it. `+EchoJanusBridge+` remains name-only (see the JanusKey
513+
row above).
514+
515+
|*RMO* (Obliterative Wipe)
516+
|januskey, `+docs/wiki/theory/rmo-primitive.md+`. This is what
517+
`+jk obliterate+` does. It is an engineering primitive, best effort, and
518+
not a theorem. It does not establish that the data is unrecoverable.
519+
|The no-section family: `+EchoLinear.no-section-weaken+`,
520+
`+EchoResidue.no-section-collapse-to-residue+` and
521+
`+EchoNoSectionGeneric.no-section-of-collapsing-map+`.
522+
|No-section says that inside the type theory there is no left inverse
523+
from the residue back to the witness. It is *not* physical erasure,
524+
secure deletion or data remanence. echo-types makes no claim about any
525+
of these (see the Valence Shell row). Linear→Affine weakening is not RMO.
526+
For RMO, the survey's D12 recommends non-interference shaped like OND,
527+
stated over a declared observation model, together with a tagged
528+
METAL-BOUNDARY scrub assumption. That is an ephapax decision, not an
529+
echo-types result.
530+
531+
|*OND* (Observational Null Disclosure)
532+
|absolute-zero `+proofs/agda/OND.agda+` (at `+f486c29+`):
533+
`+is-OND O o+`, stated relative to a declared observation model `+O+`.
534+
OND-1..5 are discharged. `+OND5-composition-leaks+` and
535+
`+OND5-non-composition+` show that two OND operations can compose into a
536+
leaking one. OND-6 (conditional composition) is open.
537+
|`+EchoObservationalEquivalence._≡m_+` and
538+
`+mode-equality-strictly-finer-at-linear+` (affine observation cannot
539+
see witness distinctions). Also `+EchoDeniability.IsDeniable+` and
540+
`+perfect-deniable+`.
541+
|Both say that a chosen observation cannot tell inputs apart. They differ
542+
in kind. `+is-OND+` quantifies over a program's runs under an observation
543+
function on executions. `+_≡m_+` is an equality indexed by mode on echo
544+
carriers. There is no bridge. echo-types imports absolute-zero's
545+
`+CNO.agda+` (see `+EchoCNOBridge+`) but not `+OND.agda+`. OND-5 is a
546+
caution: the composition isos echo-types has for `+Echo+` do not give
547+
OND composition, and none should be assumed.
548+
|===
549+
348550
=== Revision history
349551

552+
* 2026-11-09: *Ephapax correspondence + RMR/RMO/OND note.* Added
553+
§"`Ephapax Coq ↔ echo-types Agda correspondence`" (six rows:
554+
`+weaken+`, `+degradeMode-comp+`, no-section, the DecorationStructure
555+
laws, `+reversibility-via-totality+` and `+EchoResidueCell+`). All are
556+
conceptual: `+BRIDGE-PENDING+`, or Agda-only with no Coq leg. None is
557+
`+RECONCILED+` under PROOF-POLICY §2.2. Added
558+
§"`RMR / RMO / OND correspondence note`". Both come from the ephapax v2
559+
survey's cross-repo action list. Docs only; no `+.agda+` file changed.
560+
350561
* 2026-06-18: *EchoAggregation general/macro split.* Generalised
351562
`+EchoAggregation.agda+` from the macro-economics-specific module into
352563
the general monoid-aggregation form requested by issue #175 (`+Monoid+`

0 commit comments

Comments
 (0)