Skip to content

theory: AntiEchoTropicalGeneric — generic-codomain lift of the tropical decomposition#91

Merged
hyperpolymath merged 2 commits into
mainfrom
antiecho-tropical-generic
May 20, 2026
Merged

theory: AntiEchoTropicalGeneric — generic-codomain lift of the tropical decomposition#91
hyperpolymath merged 2 commits into
mainfrom
antiecho-tropical-generic

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Lifts the concrete ℕ-scored tropical decomposition from
AntiEchoTropical.agda to an arbitrary ordered codomain. Closes the
"generic-codomain version is deferred (would need a `≤`-bearing
ordered codomain)" remark that has lived in AntiEchoTropical's
preamble since #72.

What lands

AntiEchoTropicalGeneric.agda — new module

record OrderedCodomain : Set₁ where
  field
    B    : Set
    _≤_  : B  B  Set
    _<_  : B  B  Set
    ≤⇒¬< :  {y n : B}  y ≤ n  n < y ¬<⇒≤ :  {y n : B}  (n < y  ⊥)  y ≤ n

The first three fields are pure structure; the latter two are the
order conversions. ≤⇒¬< is always available; ¬<⇒≤ is the entire
content of the "decidable order" hypothesis in the concrete ℕ case —
factored out as a field rather than baked into the codomain.

Three theorems in module Generic (OC : OrderedCodomain):

  • antiecho-tropical-decompose-gen — pure Σ-reshape iso between
    TropEchoG s y and Echo s y × (∀ z → y ≤ s z). refl round-trips,
    does NOT use the order at all (structural only).
  • optimality-as-antiecho-flavour-gen-to/from(∀ z → y ≤ s z)
    (∀ z → s z < y → ⊥). Uses ≤⇒¬< / ¬<⇒≤ from the interface.
  • tropdecomp-antiecho-gen-to/from — composite
    TropEchoG ↔ Echo × (Π-of-AntiEcho-flavoured-misses).

Sanity instance ℕ-ordered-codomain : OrderedCodomain pinned in
Smoke.agda so the interface is demonstrably inhabitable.

Preamble updates (zero Agda content change)

  • AntiEcho.agda — obligation 6 line updated to point at both the
    concrete and generic landings
  • AntiEchoTropical.agda — "generic-codomain version is deferred"
    replaced by pointer to the new module

Test plan

  • agda proofs/agda/AntiEchoTropicalGeneric.agda exit 0
  • agda proofs/agda/All.agda exit 0 under --safe --without-K
  • agda proofs/agda/Smoke.agda exit 0 under --safe --without-K
  • OrderedCodomain, ℕ-ordered-codomain, module Generic pinned
  • No postulates, no funext, no escape pragmas

Scope

The concrete AntiEchoTropical.agda module is unchanged (only its
preamble comment updated). The two coexist: concrete remains the
canonical landing for ℕ-scored tropical; generic is the abstract
sibling for downstream users at other ordered codomains.

Dependencies

Depends on #90 (antiecho-partition-dec). Branch based on
antiecho-partition-dec; will rebase onto main once #90 lands.
Disjoint from #88 (F3).

🤖 Generated with Claude Code

hyperpolymath and others added 2 commits May 20, 2026 19:14
… (f x ≡ y)

Lands obligation 5 of `coecho.md` §5 (deferred since the original
AntiEcho thin slice in PR #69 / commit 428b4b8): the per-element
partition of A into the Echo-side and the AntiEcho-side, given
decidability of `f x ≡ y`.

  antiecho-partition-dec : ∀ {A B} {f : A → B} {y : B}
    (x : A) → Dec (f x ≡ y) → Echo f y ⊎ AntiEcho f y
  antiecho-partition-codomain-dec : ∀ {A B} {f : A → B} {y : B}
    → (∀ b → Dec (b ≡ y)) → (x : A) → Echo f y ⊎ AntiEcho f y

Companion to the existing `antiecho-disjoint` (per-element). Together
they exhibit A as the disjoint union of the Echo-side and AntiEcho-
side parameterised by y: every x classifies to one side, and no x
appears on both.

Also corrects a misleading line in the prior preamble. The earlier
comment claimed the asymmetric joint statement
`Echo f y → AntiEcho f y → ⊥` (with possibly distinct domain witnesses)
"requires decidability on the codomain to collapse the two witnesses".
That joint statement is genuinely *not* a theorem at any decidability
strength — Bool counterexample with `f = id` simultaneously inhabits
both sides at `y = true`. The deferred-but-now-landed obligation 5 is
the per-element classification above, not joint disjointness; the
preamble is rewritten to say so.

Build: --safe --without-K, zero postulates, no funext. Both
`antiecho-partition-dec` and `antiecho-partition-codomain-dec`
pinned in `Smoke.agda`. `agda proofs/agda/All.agda` and
`agda proofs/agda/Smoke.agda` exit 0.

Refs: project_echo_types_swarm_2026_05_20 (small deferrals)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…al decomposition

Lifts the concrete ℕ-scored tropical decomposition from
`AntiEchoTropical.agda` to an arbitrary ordered codomain. Closes the
"deferred (would need a `≤`-bearing ordered codomain)" remark in the
concrete module's preamble.

New module: `EchoGradedComonadInstance2.agda`-style — concrete
interface, sanity instance at ℕ, all theorems parameterised by the
interface.

`OrderedCodomain` interface:

  record OrderedCodomain : Set₁ where
    field
      B    : Set
      _≤_  : B → B → Set
      _<_  : B → B → Set
      ≤⇒¬< : ∀ {y n : B} → y ≤ n → n < y → ⊥
      ¬<⇒≤ : ∀ {y n : B} → (n < y → ⊥) → y ≤ n

The first three are pure structure; the latter two are the order
conversions. `≤⇒¬<` is always available; `¬<⇒≤` is the entire content
of the "decidable order" hypothesis in the concrete ℕ case — factored
out as a field rather than baked into the codomain.

Three theorems land in `module Generic (OC : OrderedCodomain)`:

  * antiecho-tropical-decompose-gen — pure Σ-reshape iso, refl
    round-trips, does NOT use the order at all
  * optimality-as-antiecho-flavour-gen-to/from — uses ≤⇒¬< / ¬<⇒≤
  * tropdecomp-antiecho-gen-to/from — the composite

Sanity instance `ℕ-ordered-codomain : OrderedCodomain` is pinned in
Smoke.agda so the interface is demonstrably inhabitable. Downstream
users can build their own instances at other ordered codomains
(integers, rationals, abstract semirings) without modifying this
module.

Preamble updates in two existing files (zero-diff to Agda content):

  * AntiEcho.agda — obligation 6 line updated: now points to both
    the concrete and generic landings
  * AntiEchoTropical.agda — "generic-codomain version is deferred"
    replaced by a pointer to the new module

Build: --safe --without-K, zero postulates, no funext, no escape
pragmas. Wired into All.agda; OrderedCodomain, ℕ-ordered-codomain,
and module Generic pinned in Smoke.agda. `agda proofs/agda/All.agda`
and `agda proofs/agda/Smoke.agda` exit 0.

Depends on: #90 (antiecho-partition-dec). Branch based on
antiecho-partition-dec; will rebase onto main once #90 lands.

Refs: project_echo_types_swarm_2026_05_20 (small deferrals)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath marked this pull request as ready for review May 20, 2026 20:28
@hyperpolymath hyperpolymath merged commit 0fb7587 into main May 20, 2026
4 of 10 checks passed
@hyperpolymath hyperpolymath deleted the antiecho-tropical-generic branch May 20, 2026 20:29
hyperpolymath added a commit that referenced this pull request May 20, 2026
…re (#93)

## Summary

Brings `.machine_readable/6a2/STATE.a2ml` and `META.a2ml` in line
with the prose docs after this session's Pillar F earn-back closure
and §"Theory work" closing.

## `META.a2ml` — three new ADRs (append-only)

No existing ADR is edited. Three appended after `adr-006`:

* **`adr-007`** — F1 earn-back via monoid-graded iterated-residue
  construction. `EchoGradedComonadF1.agda` at `(ℕ, +, 0)` with
  Echo as grade-unit object, nested δ, all three comonad laws,
  `D2-nontrivial` separating witness. (PR #86 merged 2026-05-20.)
* **`adr-008`** — F3 earn-back via two non-isomorphic-grade-monoid
  instances of an abstract `GradedComonadStructure` interface. No
  `⊑-prop`-equivalent field. `nat-instance` at commutative
  `(ℕ, +, 0)`; `list-instance` at non-commutative `(List Tag, ++, [])`.
  (PR #88 open.)
* **`adr-009`** — Retraction-discipline succeeded: the R-2026-05-18
  reframing converted into four earn-back gate passes (F4, F2, F1,
  F3); one retraction stays retracted (conservativity metatheorem,
  finding 5); none silently re-inflated.

Each ADR carries the strict scope qualifier — F1/F3 earn back claims
**for a separate side-construction**; `EchoGraded` itself remains a
thin-poset reindexing modality per R-2026-05-18, and `paper.adoc` /
`types-abstract.adoc` / `conservativity.adoc` are intentionally not
moved.

## `STATE.a2ml` — `next-actions` pruned + two closure sections appended

**Pruned**: 3 of 5 April `next-actions` were stale and are resolved
in the prose:
* `integration` (apply 7-commit sequence) — done long ago
* `t-3` (Gate-1 falsification test 3) — superseded by Gate 1
  adjacency refresh (`decisions/gate1-adjacency-refresh.adoc`, PR #77)
* `q2-4` (falsifier attempts) — absorbed by `IntegrationAudit.agda`
  EI-2 negative result; remaining attempts are bookkeeping

**Remaining + added**: `q2-1` (echo-not-prop generalisation, still
high), `q2-3` (RoleGraded as N5, still low), new
`owner-gated-paper-update` entry, new `ordinal-track-path-1` entry
(in-flight in other session), and the original `v0-2-recipe-extension`
parked entry.

**Two new closure sections** at the end of STATE.a2ml:

* **`earn-back-summary`** — closure record for all four gates with
  module paths, claim wording, retraction-followup citations, and a
  `forbidden-rebrandings` list to prevent later mis-framing.
* **`theory-work-summary`** — closure record for §"Theory work — no
  proof assistant needed": axes fully mechanised list, ruled-out
  items, refreshed items, canonical examples cluster.

## Test plan

* [x] Pure machine-readable data; no Agda touched
* [x] `agda proofs/agda/All.agda` exit 0
* [x] `agda proofs/agda/Smoke.agda` exit 0
* [x] Append-only ADR discipline preserved (adr-001 through adr-006
      unchanged; new ADRs at the end)
* [x] No retracted claim moved; no earned-back claim overclaimed
* [ ] (owner) confirm a2ml schema validation if you run a validator
      against the standards/state-a2ml + meta-a2ml specs

## Scope

Pure machine-readable data update. Disjoint from all currently-open
PRs (#88 F3, #90 partition-dec, #91 generic-codomain, #92 docs tidy).
`paper.adoc` / `types-abstract.adoc` / `conservativity.adoc` are
intentionally not touched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request May 20, 2026
…luster landed (#92)

## Summary

Three small accuracy passes through `docs/echo-types/` after the
earn-back programme, the §"Theory work — no proof assistant needed"
section, and the canonical examples cluster (5/9/10) all closed in
this session. Pure prose; no Agda changes.

### 1. `roadmap.md` §"Theory work" — two stale items refreshed

* **Axis 8** line said the *decidability-respecting* candidate had
  shipped but listed the other three as still candidate refinements.
  All four have now shipped: `EchoDecidable`, `EchoCost` (#85),
  `EchoAccess` (#68 / #75), `EchoSearch` (#80). Updated to credit all
  four.
* **Negative / co-echoes** line was `[unblocked]`; now `[landed]` —
  `AntiEcho` (#69), tropical decomposition concrete + generic (#72 +
  #91), `antiecho-partition-dec` (#90). Names the `coecho.md` §5
  obligation-5 / obligation-6 closures explicitly.

After these edits, every item in §"Theory work — no proof assistant
needed" is either `[landed]` or `[ruled out]`/`[refreshed]` — the
section is genuinely closed.

### 2. `roadmap.md` §"Example work" — three items landed

* ex. 5 (`EchoExampleProvenance`, #81) → `[landed]`
* ex. 9 (`EchoExampleParser`, #83) → `[landed]`
* ex. 10 (`EchoExampleAbsInt`, #82) → `[landed]`

Only ex. 6 (approximate-echo numeric example) remains `[unblocked]`.

### 3. `earn-back-plan.adoc` — stale `roadmap-gates.adoc` claim
corrected

* Header note used to say "the gate discipline was historically
  attributed to a `roadmap-gates.adoc`; that file does not exist
  in-tree". The file **does** exist (created 2026-05-18; see its
  preamble). Header rewritten to list `roadmap-gates.adoc` alongside
  `retractions.adoc` / this plan / `next-questions.adoc` as the four
  canonical loci.
* Ledger row D (the "doesn't exist" entry) marked **CLOSED 2026-05-20**
  with the cite reflecting current reality.

## Test plan

* [x] Pure docs / `.adoc` / `.md` edits — no Agda touched
* [x] `agda proofs/agda/All.agda` exit 0 (confirms docs match code)
* [x] `agda proofs/agda/Smoke.agda` exit 0
* [x] No retracted-claim language moved; no earned-back claim
      overclaimed; `paper.adoc` / `types-abstract.adoc` /
      `conservativity.adoc` untouched

## Scope

Disjoint from all currently-open PRs:
* #88 (F3) — touches Agda + `retractions.adoc` (different sections)
  + `earn-back-plan.adoc` Status (different section from header /
  ledger-D)
* #90 (partition-dec) — touches Agda only
* #91 (generic-codomain) — touches Agda + preamble comments

No retracted claim is moved. No earned-back claim is overclaimed.
`paper.adoc` / `types-abstract.adoc` / `conservativity.adoc` are
intentionally untouched (owner-gated, per the posture set by #86 /
#88).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 10 issues detected

Severity Count
🔴 Critical 0
🟠 High 5
🟡 Medium 5
View findings
[
  {
    "reason": "No test directory or test files found",
    "type": "no_tests",
    "file": "/home/runner/work/echo-types/echo-types",
    "action": "flag",
    "rule_module": "honest_completion",
    "severity": "high",
    "deduction": 20
  },
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in secret-scanner.yml",
    "type": "missing_workflow",
    "file": "secret-scanner.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Action actions/cache@v4 needs attention",
    "type": "unpinned_action",
    "file": "agda.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "No dependabot.yml or renovate.json found in echo-types",
    "type": "DependencyUpdate",
    "file": "/home/runner/work/echo-types/echo-types",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "high",
    "remediation": "Add .github/dependabot.yml or renovate.json configuration.",
    "scorecard_check": "Dependency-Update-Tool"
  },
  {
    "reason": "Nominal-only SAST in echo-types: codeql.yml language matrix contains no language present in the repo and lacks `actions`, so CodeQL records zero results on every commit. Remediation: set the CodeQL matrix to `language: actions`.",
    "type": "StaticAnalysis",
    "file": "/home/runner/work/echo-types/echo-types",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Add CodeQL or equivalent SAST workflow.",
    "scorecard_check": "SAST"
  },
  {
    "reason": "1 workflow(s) with tag-pinned (not SHA-pinned) actions in echo-types",
    "type": "DependencyPinning",
    "file": "/home/runner/work/echo-types/echo-types",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Pin GitHub Actions and Docker base images by SHA hash.",
    "scorecard_check": "Pinned-Dependencies"
  },
  {
    "reason": "Repository has 1 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant