You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
F3 PASSED: GradedComonadStructure + two non-isomorphic-grade-monoid instances (#88)
## Summary
Gate **F3** of the earn-back plan (`docs/echo-types/earn-back-plan.adoc
§F3`)
now passes. Two non-isomorphic-grade-monoid instances of an
abstract graded-comonad interface, with no `⊑-prop`-equivalent field
in the interface itself, are mechanised:
* **`nat-instance`** at the **commutative** monoid `(ℕ, +, 0)` —
packages the F1 (#86) iterated-residue construction.
* **`list-instance`** at the **non-commutative** free monoid
`(List Tag, ++, [])` over a two-element `Tag` with per-element
residue layers `R smol A = A × Bool`, `R big A = A × ℕ`. All
three graded-comonad laws proved.
The non-isomorphism is constructively witnessed by
`tag-list-non-commutative` (one direction: only a non-commutative
monoid satisfies it). The two earn-back gates F1 and F3 — both
landed today — close the comonad-side earn-back programme as
specified.
## Three new modules
### `EchoGradedComonadInterface.agda` — abstract record
`GradedComonadStructure` fields:
* Grade monoid: `G`, `1G`, `_·G_`, the three monoid laws.
* Graded carrier: `D : G → Set → Set`, `mapD`, functor laws.
* Counit `ε : D 1G A → A` at the unit grade.
* **Nested** comultiplication `δ : D (g ·G h) A → D g (D h A)`.
* The three graded-comonad laws stated against `subst` along the
monoid's propositional identities.
**No `⊑-prop`-equivalent field** — F3 guardrail honoured by
construction. Inspect the field list at the top of the module.
### `EchoGradedComonadInstance1.agda` — F1 packaged
`nat-instance : GradedComonadStructure` reuses
`EchoGradedComonadF1.D / mapD / ε / δ / gc-counit-l / gc-counit-r /
gc-coassoc` verbatim; stdlib's `+-identityˡ / +-identityʳ / +-assoc`
supply the monoid laws. No adapter lemma needed — F1's signatures
already use `subst` along the corresponding ℕ-equation proofs.
### `EchoGradedComonadInstance2.agda` — free-monoid instance
`list-instance : GradedComonadStructure` at `(List Tag, ++, [])`.
Construction parallels F1:
* `D [] A = A`; `D (x ∷ xs) A = R x (D xs A)`.
* `mapD-id`, `mapD-∘` by structural induction (per Tag).
* `D-++` proves the type equality `D (xs ++ ys) A ≡ D xs (D ys A)`
inductively; `δ = coe (D-++ xs ys A)`.
* `gc-counit-r`: definitional (`++-identityˡ _ = refl` in stdlib).
* `gc-counit-l` / `gc-coassoc`: structural induction on the grade
list, cons step splitting on the head `Tag`. Same `δ`-naturality
+ `subst`-over-residue factoring as F1's `gc-coassoc`.
* `D-nontrivial`: separating witness that
`D (smol ∷ big ∷ []) Bool` is not collapsing to `⊤` / a prop.
## Build invariant
* `agda proofs/agda/All.agda` exit 0 under `--safe --without-K`
* `agda proofs/agda/Smoke.agda` exit 0 under `--safe --without-K`
* **zero postulates, no funext, no escape pragmas** anywhere in the
three new modules
* both instances wired into `All.agda`; record + both instances +
non-isomorphism witness + non-triviality witness pinned in
`Smoke.agda`
## Scope (please re-read with care)
F3 earns back the two-models claim **for the graded-comonad witness
introduced by F1** — there are two genuinely non-isomorphic
grade-monoid models of the `GradedComonadStructure` interface, the
laws hold at each, the interface itself is `⊑-prop`-free. That is
exactly what the gate asked for.
F3 does **NOT** earn back the older `EchoRelModel`/`GCLaws`
two-models claim retracted at R-2026-05-18 finding 3. That
retraction concerned `set-model` and `rel-model` (both at the same
grade poset, with `⊑-prop` baked in as a field, `rel-model = set-model
× ⊤`, agreement by `refl`). The `GradedLossModel` interface there
still has `⊑-prop`; that situation is unchanged. F3 here is about a
**different** abstract interface and a **different** pair of models.
The two earn-backs are not interconvertible — do not cite one as
evidence for the other.
`paper.adoc`, `types-abstract.adoc`, and `conservativity.adoc`
remain untouched. Their bodies are about `EchoGraded`'s thin-poset
structure, which neither F1 nor F3 changes. The combined F1+F3
result strengthens the case for a bounded "new contribution"
paragraph, but the title / thesis / reindexing-modality framing
should not move on these gates alone — owner-gated, as for F1.
## Doc updates (gated, scoped)
* `docs/echo-types/earn-back-plan.adoc` — ledger row A3
(Unstarted → PASSED), Sequencing entry added, Status entry with
the strict scope qualifier above.
* `docs/retractions.adoc` — follow-up **F-2026-05-20b** appended
(append-only revision policy preserved); the scope qualifier
pinned in prose.
## Dependencies
* Builds on **#86** (F1 PASSED). Branch based on
`f1-coassoc-earn-back`; will rebase cleanly onto `main` once #86
lands.
* Disjoint from **#82** (AbsInt) and **#84** (paper Evaluation —
already merged).
## Test plan
* [x] Interface module typechecks
* [x] Instance 1 (nat) typechecks
* [x] Instance 2 (list) typechecks — all three comonad laws
* [x] Full `All.agda` build green
* [x] `Smoke.agda` build green
* [x] No postulates, no escape pragmas, no funext in any new module
* [x] No `⊑-prop`-equivalent field in the interface record
* [x] Non-commutativity witness for the second grade monoid
* [x] Non-triviality witness for the second carrier
* [ ] (owner) inspect field list of `GradedComonadStructure` — flag
anything `⊑-prop`-shaped if present
* [ ] (owner) ratify the F-2026-05-20b scope language in
`retractions.adoc`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments