Skip to content

[Integration] Ground L3 (reversibility + equivalence + loss) theorems in echo-types LAYER3 module #51

Description

@hyperpolymath

Background

Audit 2026-06-01 (companion to deep audit #41-#46) found that valence-shell's three core L3 theorems are formalised independently across 6 proof systems, yet are exact L3 (echo-layer) shapes as defined in hyperpolymath/echo-types.

Current state

Aspect Finding
Active imports of echo-types 0 (zero Coq Require Import EchoTypes.*, zero Lean import EchoTypes, zero Agda open import EchoTypes)
Referenced-only mentions 1 (in proofs/agda/README.adoc — notes shared --safe --without-K discipline)
Cargo.toml / flake.nix echo-types entries none

L3-shape theorems already in valence-shell

# Theorem File Echo-types cousin
1 fsEquiv + fsEquivIsEquivalence FilesystemEquivalence.lean / filesystem_equivalence.v EchoObservationalEquivalence._≡m_ + ≡m-refl/sym/trans
2 reversibleCreatesEquiv FilesystemEquivalence.lean EchoObservationalEquivalence.mode-equality-strictly-finer-at-linear
3 obliterate_not_injective RMOOperations.lean EchoLossTaxonomy.const-fibre-↔-domain (CONST case)
4 operationSequenceReversible + isCNOSequence FilesystemComposition.lean EchoNoSectionGeneric.no-section-of-collapsing-map + EchoOFSUnivF5
5 copyFile_reversible CopyMoveOperations.lean EchoTotalCompletion / EchoNoSectionGeneric.no-section-when-non-injective-at-y

Per estate-memory directive [Proofs MUST check + cross-doc echo-types] (owner 2026-06-01), every proof in any repo with an echo-types link must first audit hyperpolymath/echo-types, reuse if applicable, extend upstream WITH proofs if not, then cross-document.

Why this matters

  1. Proof-debt reduction. The remaining obliterate_overwrites_all_blocks hole (per docs/PROOF_HOLES_AUDIT.md) drops out as a downstream consequence of EchoLossTaxonomy.const-fibre-↔-domain rather than needing a standalone axiom.
  2. Cross-language validation. echo-types' F5 (orthogonal factorisation) proofs would ground FilesystemComposition.cnO in EchoOFSUnivF5.echo-factorisation-strict — upgrading composition theory from "compositional-by-definition" to "compositionally-universal".
  3. L3 obligations are load-bearing per estate policy. The MAA framework IS L3: reversible operations + observational equivalence + loss taxonomy = the three-pillar L3 structure. Integrating echo-types makes this explicit and audit-trail-ready.

Smallest first step

Import EchoObservationalEquivalence in proofs/agda/FilesystemEquivalence.agda and re-state fsEquiv + fsEquivIsEquivalence as instances of _≡m_ at mode linear:

open import EchoObservationalEquivalence using (_≡m_; ≡m-refl; ≡m-sym; ≡m-trans)

fsEquiv : (fs1 fs2 : Filesystem)  Prop
fsEquiv fs1 fs2 = fs1 ≡m fs2   -- at mode linear

fsEquivTrans :  fs1 fs2 fs3  fs1 ≈ fs2  fs2 ≈ fs3  fs1 ≈ fs3
fsEquivTrans = ≡m-trans

Once Agda validates, extract bindings via the project's existing proofs/agda → proofs/lean4 → proofs/coq pipeline. The Rust CLI layer is unaffected.

Layer scope

  • L3 (echo): IN SCOPE — observational equivalence + reversibility + loss
  • L1 (regions/linear): not applicable to filesystem reversibility
  • L2 (modality): possibly relevant for read/write permissions but a stretch (out of scope for this issue)
  • L4 (dyadic): possibly relevant for transaction grouping (begin/commit/rollback) but out of scope

Refs

🤖 Filed by echo-types integration audit 2026-06-01

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    conformanceConformance to an external or internal specificationproofsFormal verification: Agda, Coq, Idris, Lean, Z3/SMT, axiom debttestingTests, benchmarks, fuzzing, property checks, coverage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions