Skip to content

Commit d08643b

Browse files
committed
feat(fidelity): build Fibre on Echo; reclassify EchoFidelity as Tier 1
Fibre T t is now Echo (account T) (mapped t) rather than a hand-written Sigma, so the structure theory of Echo applies to fibres with no transport (fibre-is-echo is refl). Adds mapped-in-fibre and the dropped-not-in-fibre lemma: an atom with a drop reason cannot also be the source of a target atom. The module now imports Echo and stdlib only, so it moves from the standalone-draft row to Tier 1 in the kernel note. Type-checks under Agda 2.6.3 / stdlib 2.3, --safe --without-K, no postulates. Still unwired from All.agda and Smoke.agda; docs/echos status updated from unverified to type-checked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
1 parent 09c9fce commit d08643b

6 files changed

Lines changed: 59 additions & 27 deletions

File tree

‎docs/echo-types/MAP.adoc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ directory move is implied.
119119
* *Autoformalisation fidelity (draft).* `docs/echos/` and
120120
`proofs/agda/EchoFidelity.agda` sketch a fibre-accounting model of a
121121
source-to-target translation step (what the checker sees versus what
122-
an auditor sees). `[DRAFT]` — standalone, stdlib-only, unwired from
123-
`All.agda` / `Smoke.agda`; no claim that fidelity is established.
122+
an auditor sees); its `Fibre` is `Echo (account T) (mapped t)`.
123+
`[DRAFT]` — Tier-1 derived, type-checked, unwired from `All.agda` /
124+
`Smoke.agda`; no claim that fidelity is established.
124125
* *Separate language embodiment / consumer.* `Ephapax`
125126
(https://github.com/hyperpolymath/ephapax) is a distinct language
126127
project in which Echo Types are intended to become an embodied

‎docs/echo-types/echo-kernel-note.adoc‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ kernel** — the boundary is real and lives outside this core.
6565
`EchoFiberBridge`, `EchoFiberCount`, `EchoFiberTriangulation`,
6666
`EchoIndexed`, `EchoRelational`, `EchoTruncation`,
6767
`EchoJanusBridge`, `EchoTropical`, `EchoSeparating`,
68-
`EchoTotalCompletion`, `EchoDisplayed`
68+
`EchoTotalCompletion`, `EchoDisplayed`, `EchoFidelity`
6969
| One hop off the kernel. `EchoJanusBridge`/`EchoTropical` are
7070
*Directions* (see MAP). `EchoFiberTriangulation` is the external
7171
stdlib triangulation hardening item. `EchoSeparating` carries
@@ -75,6 +75,10 @@ kernel** — the boundary is real and lives outside this core.
7575
displayed-type / `DispHom` / `fromHomOver` fibration packaging of
7676
the categorical base (faithful mirror of typed-wasm's Idris
7777
`Echo.idr`; no variance / graded-comonad claim, per R-2026-05-18).
78+
`EchoFidelity` models an autoformalisation step as a fibre record whose
79+
`Fibre` is literally `Echo (account T) (mapped t)`; it is `[DRAFT]` and
80+
deliberately unwired from `All.agda` / `Smoke.agda` until the maintainer
81+
asks (see `docs/echos/`).
7882

7983
| *Derived — Tier 2* +
8084
(depend on Tier-1 `Echo*`)
@@ -225,18 +229,6 @@ kernel** — the boundary is real and lives outside this core.
225229
`proofs/agda/Echo/` (dotted submodules), so they are outside the
226230
flat `Echo*.agda` glob that Check B lints; recorded here for
227231
discoverability. Not kernel (the kernel remains exactly `Echo`).
228-
229-
| *Standalone draft* +
230-
(stdlib only; outside the kernel cone)
231-
| `EchoFidelity`
232-
| Imports no in-repo module, not even `Echo`: its `Fibre` is a
233-
hand-written Σ-type, so it is neither Tier 1 nor Tier 2. A small model
234-
of an autoformalisation step as a fibre record (see
235-
`docs/echos/`). `--safe --without-K`, no postulates, type-checks under
236-
Agda 2.6.3 / stdlib 2.3, and is deliberately *not* wired into
237-
`All.agda` / `Smoke.agda` until the maintainer asks. Listed here so the
238-
classification-drift lint (kernel-guard check B) stays honest; it
239-
carries no claim about the kernel.
240232
|===
241233

242234
`EchoOrdinal` is Tier-1 off `Echo` but additionally pulls the

‎docs/echos/BOT-PROMPT.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Context you must read first:
1515
1616
* `docs/echos/README.adoc` (scope, status, ground truth)
1717
* `docs/echos/FIDELITY-FIBRE-DESIGN.adoc` (design and what is not claimed)
18-
* `proofs/agda/EchoFidelity.agda` (draft model, NOT yet type-checked)
18+
* `proofs/agda/EchoFidelity.agda` (draft model; type-checked under Agda 2.6.3 / stdlib 2.3 on 2026-10-19)
1919
* `proofs/agda/EchoEpistemic.agda` (existing knowledge/observation model)
2020
* `docs/CLAIMS_AUDIT.adoc` (how this repo audits its own claims)
2121

‎docs/echos/FIDELITY-FIBRE-DESIGN.adoc‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Verdict TA = mapped t | dropped reason
1515
----
1616

1717
The fibre of a target atom `t` is the set of source atoms whose verdict is
18-
`mapped t`. This is the echo-type reading: `Fibre t = Σ s. account s ≡ mapped t`.
18+
`mapped t`. This is the echo-type reading: `Fibre t = Σ s. account s ≡ mapped t`, which
19+
`EchoFidelity.agda` now states as `Echo (account T) (mapped t)` itself.
1920

2021
== What the types buy
2122

‎docs/echos/README.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ____
2222
|===
2323
|Item |Status |Where
2424

25-
|Fibre accounting model (Agda) |DRAFT, unverified |`proofs/agda/EchoFidelity.agda`
25+
|Fibre accounting model (Agda) |Type-checked (Agda 2.6.3, stdlib 2.3); `Fibre` is `Echo`; still a draft |`proofs/agda/EchoFidelity.agda`
2626
|Design note (what fibres do and do not give) |Draft |`FIDELITY-FIBRE-DESIGN.adoc`
2727
|Investigation brief for a repo-tied bot |Ready to use |`BOT-PROMPT.adoc`
2828
|Wired into `All.agda` / `Smoke.agda` |No |Deliberately not wired until checked

‎proofs/agda/EchoFidelity.agda‎

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
{-# OPTIONS --safe --without-K #-}
22
-- SPDX-License-Identifier: MPL-2.0
33
--
4-
-- STATUS: DRAFT, NOT YET TYPE-CHECKED. Agda was not available in the
5-
-- authoring environment. Before relying on this module, run
6-
-- agda proofs/agda/EchoFidelity.agda
7-
-- and fix any errors. It is deliberately NOT imported from All.agda or
8-
-- Smoke.agda until it has been checked.
4+
-- STATUS: type-checks under Agda 2.6.3 / agda-stdlib 2.3 (`--safe
5+
-- --without-K`, no postulates). Deliberately NOT imported from All.agda or
6+
-- Smoke.agda: it stays unwired until the maintainer asks for that.
97
--
108
-- Purpose: a small model of an autoformalisation step as a fibre record.
119
-- Every source atom (hypothesis, constant, bound, conclusion) receives a
1210
-- verdict: mapped to a target atom, or dropped with a recorded reason.
1311
-- The types enforce that nothing is silently lost. They do NOT establish
1412
-- semantic fidelity; see docs/echos/FIDELITY-FIBRE-DESIGN.adoc.
13+
--
14+
-- The fibre of a target atom IS an `Echo` of the accounting map: `Fibre`
15+
-- below is `Echo (account T) (mapped t)` by definition, so the structure
16+
-- theory of Echo (EchoKernel contract, `map-over`, ...) applies to it
17+
-- unchanged. This makes the module a Tier-1 derived module (only `Echo` +
18+
-- stdlib).
1519

1620
module EchoFidelity where
1721

1822
open import Agda.Builtin.String using (String)
1923
open import Data.Empty using (⊥)
24+
open import Echo using (Echo; echo-intro)
2025
open import Data.List.Base using (List)
2126
open import Data.Nat.Base using (ℕ; zero; suc)
2227
open import Data.Product.Base using (Σ; _,_)
23-
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
28+
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans)
2429

2530
------------------------------------------------------------------------
2631
-- Verdicts for a single source atom.
@@ -46,12 +51,45 @@ open Translation public
4651

4752
------------------------------------------------------------------------
4853
-- Fibres: the source atoms that a given target atom traces back to.
49-
-- A fibre is a Σ-type of source atoms together with a proof that the
50-
-- source atom is mapped to that target atom.
54+
-- A fibre is the Echo of the accounting map at the verdict `mapped t`:
55+
-- a source atom together with a proof that it is mapped to that target.
5156
------------------------------------------------------------------------
5257

5358
Fibre : {SA TA : Set} → Translation SA TA → TA → Set
54-
Fibre T t = Σ _ (λ s → account T s ≡ mapped t)
59+
Fibre T t = Echo (account T) (mapped t)
60+
61+
-- The identification with Echo is definitional, so the structure theory of
62+
-- Echo applies to fibres with no transport.
63+
fibre-is-echo :
64+
{SA TA : Set} (T : Translation SA TA) (t : TA) →
65+
Fibre T t ≡ Echo (account T) (mapped t)
66+
fibre-is-echo T t = refl
67+
68+
-- A source atom that the account maps to t lies in the fibre of t.
69+
mapped-in-fibre :
70+
{SA TA : Set} (T : Translation SA TA) (s : SA) (t : TA) →
71+
account T s ≡ mapped t → Fibre T t
72+
mapped-in-fibre T s t p = s , p
73+
74+
-- Every source atom lies in the fibre of the verdict it received, when that
75+
-- verdict is a mapping (`echo-intro` at the accounting map).
76+
fibre-of-image :
77+
{SA TA : Set} (T : Translation SA TA) (s : SA) (t : TA) →
78+
account T s ≡ mapped t → Echo (account T) (account T s)
79+
fibre-of-image T s t _ = echo-intro (account T) s
80+
81+
-- A dropped atom is in no fibre: the two verdicts are different
82+
-- constructors. This is the "dropped means recorded, not hidden" half of
83+
-- the accounting: an atom with a drop reason cannot also be claimed as the
84+
-- source of a target atom.
85+
dropped-not-mapped :
86+
{TA : Set} {r : String} {t : TA} → dropped r ≡ mapped t → ⊥
87+
dropped-not-mapped ()
88+
89+
dropped-not-in-fibre :
90+
{SA TA : Set} (T : Translation SA TA) (s : SA) (r : String) →
91+
account T s ≡ dropped r → (t : TA) → account T s ≡ mapped t → ⊥
92+
dropped-not-in-fibre T s r d t p = dropped-not-mapped (trans (sym d) p)
5593

5694
-- A target atom with an empty fibre has no source: it is fabricated
5795
-- relative to this step. Stated here as the definition of "fabricated";

0 commit comments

Comments
 (0)