Skip to content

theory: antiecho-partition-dec — per-element classification (deferred obligation 5)#90

Merged
hyperpolymath merged 2 commits into
mainfrom
antiecho-partition-dec
May 20, 2026
Merged

theory: antiecho-partition-dec — per-element classification (deferred obligation 5)#90
hyperpolymath merged 2 commits into
mainfrom
antiecho-partition-dec

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Lands obligation 5 of coecho.md §5, deferred since the original
AntiEcho thin slice (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.

Correction to 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 not a theorem at any
decidability strength — counterexample with f : Bool → Bool,
f = id: both Echo f true (via (true, refl)) and AntiEcho f true
(via (false, false≢true)) are inhabited, so the joint statement is
refuted by the model. The actual content of the deferred "obligation
5" is the per-element classification above; the preamble is corrected
to say so explicitly.

Test plan

  • agda proofs/agda/AntiEcho.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
  • Both new lemmas pinned in Smoke.agda
  • No postulates, no funext, no escape pragmas

Scope

Tiny additive change. Disjoint from any open PR (#88 F3 touches
EchoGradedComonad* modules; this touches AntiEcho only).

The companion small deferral — generic-codomain antiecho-tropical-decompose
(lifting AntiEchoTropical.agda's concrete ℕ-scored version to an
abstract ordered-codomain interface) — is not addressed here; it
requires designing the interface and is a separate slice.

🤖 Generated with Claude Code

… (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>
@hyperpolymath hyperpolymath marked this pull request as ready for review May 20, 2026 20:28
@hyperpolymath hyperpolymath enabled auto-merge (squash) May 20, 2026 20:29
hyperpolymath added a commit that referenced this pull request May 20, 2026
…al decomposition (#91)

## 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

```agda
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

* [x] `agda proofs/agda/AntiEchoTropicalGeneric.agda` exit 0
* [x] `agda proofs/agda/All.agda` exit 0 under `--safe --without-K`
* [x] `agda proofs/agda/Smoke.agda` exit 0 under `--safe --without-K`
* [x] `OrderedCodomain`, `ℕ-ordered-codomain`, `module Generic` pinned
* [x] 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](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
…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>
@hyperpolymath hyperpolymath merged commit 1229dc9 into main May 20, 2026
3 of 10 checks passed
@hyperpolymath hyperpolymath deleted the antiecho-partition-dec branch May 20, 2026 21:30
@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