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
feat(aggregation): general EchoAggregation monoid/group form (#175) + long-form prose relicense (#239)
## What
Two commits closing housekeeping loose ends from the EchoAggregation /
oikos-alib work.
### A — `docs(licence): long-form prose → CC-BY-SA-4.0 (9 docs)`
(`879ec9b`)
Re-applies the owner-authorised prose relicensing (`f6cc023`) that never
re-landed. Header-line swap only (`SPDX-License-Identifier: MPL-2.0` →
`…: CC-BY-SA-4.0`), copyright lines untouched, on:
`FOUNDATION_CONTRACT.md`, `docs/theorem-index.md`,
`docs/CLAIMS_AUDIT.adoc`,
`docs/echo-types/{fibration-package,universal-property}.adoc`,
`wiki/{Architecture,Overview,Roadmap,Working-Rules}.adoc`.
`CC-BY-SA-4.0` is the designated estate prose licence (already on 29+
files); `MPL-2.0` stays for code.
### B — `feat(aggregation): generalize EchoAggregation to monoid/group
form (#175)` (`c97d0c4`)
The merged economics module (#230) squatted the name **#175** wants for
the *general* monoid/group aggregation. Per the owner's decision,
`EchoAggregation` becomes the general / fundamental form; the macro
economics reading moves to oikos under a distinct name. Key fact making
this loss-free: `pairSum (a,b) = a+b` **is** literally the `sumMonoid`
fold, so the macro result is just an *instance* of the general form.
`proofs/agda/EchoAggregation.agda` now ships:
- `record Monoid ℓ`
(`Elem`/`ε`/`_⊕_`/`assoc`/`identity-l`/`identity-r`);
- `⊕-fold` + `⊕-fold-++` (the fold is a monoid homomorphism over
`_++_`);
- `record GroupAggregator {ℓ} (K V) (M)` (`agg : V → Elem`) +
`aggregate-values`;
- **`aggregation-as-fold`** — the #175 headline law, *proved* (not
merely signed): aggregating a concatenation equals combining the
aggregates;
- `sumMonoid` / `countMonoid` / `maxMonoid` (ℕ) + `minMonoid` over
`Maybe ℕ` (`nothing` = ∞) + a worked `countAggregator`;
- `no-canonical-disaggregation-of` — generic non-disaggregability (any
collision ⇒ no section, via `no-section-of-collapsing-map`); **also
discharges #174's no-section sibling**;
- `module Example-PairSum` — the macro `ℕ × ℕ → ℕ` ledger, neutrally
framed: `pairSum-is-fold` (it IS the `sumMonoid` fold),
`pairSum-non-injective`, `no-canonical-disaggregation` (the
Sonnenschein–Mantel–Debreu / representative-agent critique
type-theoretically). This instance is the mechanised anchor the oikos
alib note cites (where it is read at macro scale and named
`MacroAggregation`).
Docs swept: `Smoke.agda` pins, `MAP.adoc`, `echo-kernel-note.adoc`,
`docs/bridges/cross-repo-bridge-status.md`, `CLAUDE.md`.
## Honest scope
`aggregation-as-fold` is the fold's monoid-homomorphism law, NOT full
SQL GROUP-BY operational semantics. `avg` is deliberately absent (not a
monoid — express as `sum / count`, per #175).
`no-canonical-disaggregation-of` refutes a *section* (left inverse), NOT
the existence of *some* representative choice.
## Verification
```
agda proofs/agda/EchoAggregation.agda exit 0 (--safe --without-K)
agda proofs/agda/All.agda exit 0
agda proofs/agda/Smoke.agda exit 0
scripts/kernel-guard.sh PASS (Check A funext-free + Check B classification)
grep postulate none (zero postulates)
```
## Companion
oikos draft PR extends `docs/alib-aggregate-bridge.adoc` with the macro
reading (`MacroAggregation`) citing this general theorem — no Agda in
oikos (Rust); citation-level per its own §8.
Refs #175, #174 (owner decides closure).
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01VwbFNQJw23tW8tqM7utWku
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VwbFNQJw23tW8tqM7utWku)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/bridges/cross-repo-bridge-status.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ touches other repositories.
22
22
|**Verdict-provenance (phronesis)**|`Echo`, `echo-intro`|`phronesis/academic/formal-verification/agda/PhronesisEcho.agda` (imports echo-types directly) |**Content bridge done (2026-06-12).** An ethical verdict's provenance IS `Echo verdict v`: `eval` is non-injective, so the fiber retains *which* expressions justify a verdict the bare `Bool` forgets (`verdict-forgets-provenance`); `proj₁` is the recovering section. Machine-checked vs real echo-types. (Also fixed 4 pre-existing bugs making `Phronesis.agda` compile.) | — (closed; downstream consumer in the agentic-ethics language). |
23
23
|**KitchenSpeak `@` witness (nextgen-languages)**|`Echo`|`nextgen-languages/kitchenspeak/proofs/agda/EchoBridge.agda`|**Status upgraded to MACHINE-CHECKED (2026-06-12).** Previously "hand-verified, not machine-checked"; now typechecks against the real `Echo`. The `@` sensor witness IS `Echo (fired sensor thr) true` (`witness⇒echo` / `echo⇒witness`). PoachedEgg stdlib-v2.3 drift (`toWitness {Q=}`→`{a?=}`) fixed so the suite type-checks. | — (the `--` comments in `kitchenspeak.agda-lib` need Agda ≥ 2.6.4; on the 2.6.3 CI toolchain use the explicit `-i` form, documented in the module). |
24
24
|**Invariant Path application (invariant-path)**| Structured-loss vocabulary (the `Echo` fiber concept) — citation-level |`invariant-path` (Rust): `classify_candidate` + `docs/ECHO-TYPES.md` + `crates/invariant-path-core/{examples,tests}/echo_structured_loss.rs`|**Application example (2026-06-12).**`classify_candidate` is a non-injective classifier; the retained `ClaimCandidate` + `ClassificationOutcome.losses` IS the echo (fiber) over a `Classification`. Invariant Path is "a claim-path debugger, not a truth engine" precisely because it retains echoes. Runnable example + 2 CI-covered tests. | No Agda↔Rust import path; citation-level — the application *uses* the echo principle; no mechanised cross-repo theorem. |
25
-
| **oikos alib aggregation bridge (economics)** | `proofs/agda/EchoAggregation.agda` (`aggregate : MicroLedger → MacroTotal` IS an `Echo`; `no-canonical-disaggregation = no-section-of-collapsing-map`) | `oikos/docs/alib-aggregate-bridge.adoc` (toolchain-free design note for the alib aggregate library; oikos is the Rust SFC-macro DSL) | **Keystone formalisation + design note landed (2026-06-18).** Micro→macro economic aggregation is mechanised as an `Echo` map: the fibre over a macro total is exactly the set of micro ledgers consistent with it, and non-disaggregability is `no-section-of-collapsing-map` (no canonical `raise : MacroTotal → MicroLedger` left-inverse exists). This is the type-theoretic form of the Sonnenschein–Mantel–Debreu / representative-agent critique — it refutes a *section* (left inverse), not a representative *choice*. `EchoAggregation.agda` is self-contained in echo-types (imports `Echo` + `EchoNoSectionGeneric` only), `--safe --without-K`, zero postulates, pinned in `Smoke.agda`, classified in the kernel-note. The oikos design note recommends Route B (alib as an aggregation-morphism library over `MacroState`). | No Agda↔Rust import path; citation-level — echo-types proves the aggregation principle, oikos's alib will *consume* it. The alib library itself is not yet built (design-note stage; open questions §"Route A vs B" pending owner decision). |
25
+
| **oikos alib aggregation bridge (economics)** | `proofs/agda/EchoAggregation.agda` — the GENERAL aggregation form (`Monoid` + `GroupAggregator` + `aggregation-as-fold` homomorphism + `sumMonoid`/`countMonoid`/`maxMonoid`/`minMonoid` + `no-canonical-disaggregation-of`); the macro economics is the `Example-PairSum` instance (`pairSum` IS the `sumMonoid` fold) | `oikos/docs/alib-aggregate-bridge.adoc` (toolchain-free design note; oikos is the Rust SFC-macro DSL) — names the macro reading `MacroAggregation`, cited back to echo-types | **General/macro split landed (2026-06-18, gen. rung).** echo-types now hosts the *general* monoid-aggregation form requested by issue #175 (SQL GROUP-BY as a monoid homomorphism; consumer = affinescript db-theory #3); the `aggregation-as-fold` law is *proved*, not merely signed, and generic non-disaggregability `no-canonical-disaggregation-of` also discharges #174's no-section sibling. The *macro→micro economics* reading — micro ledger rolled up to a Godley total, the Sonnenschein–Mantel–Debreu / representative-agent critique (refuting a *section* / left inverse, not a representative *choice*) — is the `Example-PairSum` instance, read at macro scale in oikos under the name `MacroAggregation` (naming it `EchoAggregation` there would be odd: aggregation is a *fundamental* of echo-types). `EchoAggregation.agda` is self-contained (imports `Echo` + `EchoNoSectionGeneric` only), `--safe --without-K`, zero postulates, pinned in `Smoke.agda`, classified in the kernel-note + `MAP.adoc`. The oikos design note recommends Route B (alib as an aggregation-morphism library over `MacroState`). | No Agda↔Rust import path; citation-level — echo-types proves the general aggregation principle (and its macro instance), oikos's alib will *consume* it. The alib library itself is not yet built (design-note stage; Route A vs B pending owner decision). |
26
26
27
27
## Immediate next actions
28
28
@@ -72,6 +72,19 @@ precisely to paper over this in the relational model.
0 commit comments