Skip to content

E5: add index monotonicity/inversion and psi0(Omega1) path#7

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/e5-monotone-inversion-target-u9K8x
Apr 22, 2026
Merged

E5: add index monotonicity/inversion and psi0(Omega1) path#7
hyperpolymath merged 1 commit into
mainfrom
claude/e5-monotone-inversion-target-u9K8x

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • add Omega marker bridge lemmas Omega0≤Omega1, Omega0≤Omegaω, Omega1≤Omegaω
  • add Cν index monotonicity and combined monotonicity lemmas
  • add Cν inversion/decomposition lemmas for bOmega and bpsi constructors
  • add psiν-index-bound
  • strengthen examples with direct psi0(Omega1) witnesses at ν = Omega1 and lifts to Omegaω
  • pin new names in Buchholz and top-level smoke manifests

Verification

  • agda -i proofs/agda proofs/agda/All.agda
  • agda -i proofs/agda proofs/agda/Smoke.agda

@hyperpolymath hyperpolymath merged commit 878d69f into main Apr 22, 2026
2 checks passed
@hyperpolymath hyperpolymath deleted the claude/e5-monotone-inversion-target-u9K8x branch April 22, 2026 13:04
hyperpolymath added a commit that referenced this pull request May 19, 2026
…y) (#63)

2 files, SPDX-value-only suffix fix. NOT a relicence (same licence).
Owner-sanctioned carve-out, standards LICENCE-POLICY A8(1). Refs
LICENCE-DEBT-LEDGER-2026-05-18. 🤖 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
…#70)

## Summary

Extends `proofs/agda/EchoApprox.agda` with the first slice of the
axis-2 composition rung from the design note (drafted in
`/tmp/echo-types-exploration/axis2-approximate.md`, §7 obligations
2 + 6, plus the canonical-split retract direction). Refs
`docs/echo-types/roadmap.md` Axis 2 entry and
`docs/echo-types/composition.md`
§Q3 — does **not** close either.

## Obligations landed

- **`echo-strict→approx`** (§7 #2). General strict ⇒ zero-tolerance
  approximate. Generalises `echo-approx-intro` from own-fibre points
  to arbitrary `y` via the codomain equation `p : f x ≡ y`. One
  extra `subst` along `p`.

- **`echo-approx-comp-sound`** (§7 #6). Sound RHS-to-LHS direction
  of the retract shape from `composition.md` §Q3 / design-note §5.
  Unpacks the existential and calls `echo-approx-compose`.

- **`echo-approx-comp-retract-to`**. Canonical-split LHS → RHS-Σ
  section of the retract: picks `b := f x`, `ε₁ := zero`, `ε₂ := ε`.
  Uses `echo-approx-intro` for the inner echo, original bound for
  the outer.

- **`echo-approx-comp-retract-A`**. A-component round-trip
  `proj₁ ∘ sound ∘ retract-to ≡ proj₁`, proved by `refl`. The
  retraction direction holds definitionally on the A-component as
  the design note (§5) predicts.

## Obligations deferred (out of this rung)

- §7 #7 separated zero-collapse — needs a separation predicate on
  the `PseudoMetric` record.
- §7 #8 axis-1 shadow agreement — cross-axis classification.
- Full retract B-component and tolerance-budget round-trip — needs a
  `+`-left-identity axiom on `Tolerance` (`zero + ε ≡ ε`) not in the
  current record. Adding it commits the carrier to a left-unital
  monoid; deferred as a separate decision.
- Lipschitz generalisation (`L_g ≠ 1`) — needs scalar multiplication
  on `Tol`.

## Docs updated

- `docs/echo-types/composition.md` §Q3 promoted from "entirely
  speculative" to landed-retract-shape with deferred items called out.
- `docs/echo-types/roadmap.md` adds a "landed" entry for the
  composition rung first slice.

## Invariants preserved

- `--safe --without-K`
- No postulates
- No escape pragmas
- Funext untouched

## Test plan

- [x] `LC_ALL=C.UTF-8 agda -i proofs/agda proofs/agda/All.agda` exits 0
- [x] `LC_ALL=C.UTF-8 agda -i proofs/agda proofs/agda/Smoke.agda` exits
0
- [x] No new `postulate`, no escape pragmas, funext not imported
- [x] `Smoke.agda` already pins `module Approx` following project
      convention (per-lemma pins inside parameterised modules require
      instantiation, which the project does not do for `EchoApprox`).

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

## Summary

Picks up two of three §7 deferrals from PR #70 in
`/tmp/echo-types-exploration/axis2-approximate.md`. Refs not Closes
because §7 is multi-rung and one rung (B-component +
tolerance-budget retract round-trip) stays deferred pending a
`Tolerance` interface design call (see below).

## Rungs landed

### Rung A — separated zero-collapse (§7 #7)

- `Separated : Set` — separation predicate on the pseudo-metric:
  `∀ b₁ b₂ → dist b₁ b₂ ≤ zero → b₁ ≡ b₂`. Kept out of the
  `PseudoMetric` record; supplied as an explicit hypothesis at the
  lemma site (pseudo-metrics in general only guarantee `dist y y ≡
  zero`, not the converse — making them a *metric proper* is an
  optional refinement the record deliberately does not bake in).
- `echo-approx-zero-collapses-strict : Separated → EchoR zero f y → Echo
f y`
  formalises the §4 "Approximate → strict (only when separated, at
  ε = 0)" statement.

### Rung B — axis-1 shadow agreement (§7 #8)

- `echo-shadow-A` — A-component projection (axis-1 shadow of an
  approximate echo).
- `echo-shadow-iso-{to,from}` — pins the §7 #8 obligation
  explicitly (definitional both ways: `EchoR ε f y` IS the
  existential `Σ A (λ x → dist (f x) y ≤ ε)`).
- `echo-strict→approx-shadow-A` — cross-axis cohere: the
  A-component of `echo-strict→approx` agrees with the strict
  A-component on the nose (`refl`).
- `echo-strict→approx-collapse-shadow-A` — round-trip under
  separation: `zero-collapses-strict ∘ strict→approx ≡ id` on the
  A-component, definitionally.

## DESIGN-DECISION STOP — Rung C deferred

The full B-component + tolerance-budget retract round-trip
(`echo-approx-comp-retract-from-to` and friends) requires a
`+`-left-identity axiom on `Tolerance` (`zero + ε ≡ ε`, plus
right-identity for the symmetric variants).

### Current shape of `Tolerance`

```agda
record Tolerance ℓ : Set (suc ℓ) where
  field
    Tol      : Set ℓ
    zero     : Tol
    _+_      : Tol → Tol → Tol
    _≤_      : Tol → Tol → Set ℓ
    ≤-refl   : ∀ {ε}             → ε ≤ ε
    ≤-trans  : ∀ {ε₁ ε₂ ε₃}      → ε₁ ≤ ε₂ → ε₂ ≤ ε₃ → ε₁ ≤ ε₃
    +-mono-≤ : ∀ {a b c d}       → a ≤ b → c ≤ d → (a + c) ≤ (b + d)
```

No identity laws on `+`. Minimal interface, lets us state
`echo-approx-compose`; that's all it currently does.

### What needs to be added

For the symmetric retract round-trip:

```agda
+-identityˡ : ∀ {ε} → (zero + ε) ≡ ε
+-identityʳ : ∀ {ε} → (ε + zero) ≡ ε
```

(`≡`, not `≤` — the round-trip is a definitional retract on the
tolerance budget, so we need a propositional equality, not just
mutual `≤`.)

### Two options

**(a)** Extend `Tolerance` with the two identity-law fields.

- Pro: minimal scaffolding; one type to thread through.
- Con: ripples to every `Tolerance` instance — currently just
  `EchoApproxInstance.trivialTolerance` (trivial discharge), but
  consumers may grow. Makes `Tolerance` strictly stronger than
  the "ordered commutative-monoid-flavoured" framing in §3 of the
  axis-2 design note.

**(b)** Add a separate `BalancedTolerance` record on top of
`Tolerance` carrying just the identity laws.

- Pro: additive; no interface breakage; layered/opt-in. Matches
  the design pattern of `PseudoMetric` (which is *separately*
  refined to a metric by adding `Separated`, not by widening the
  base record). Keeps the §3 "minimal moving parts" promise.
- Con: an extra record name to thread through retract-round-trip
  lemmas.

### Recommendation

**(b).** The current `Tolerance` is deliberately the minimal
interface that lets us state `echo-approx-compose` (triangle +
additive monotonicity, nothing else). Identity laws are needed
only by the retract round-trip, which is a downstream refinement
— keeping them out of the core interface preserves the "minimal
moving parts" design from §3 of the axis-2 design note. The
analogue is `PseudoMetric` vs. (`PseudoMetric` + `Separated`):
the refinement lives outside the base record.

Rung C is deferred pending owner decision.

## Rung D — also deferred

The Lipschitz generalisation `L_g ≠ 1` would need scalar
multiplication on `Tolerance` — a third interface call (whether
to add it to the core record, or layer a `ScalableTolerance`
refinement). Deferred alongside Rung C; same recommendation shape
applies.

## Hygiene

All new headlines pinned via the per-lemma proof-of-life pattern
from PR #71: `EchoApproxInstance.agda` adds top-level identifiers
at the trivial-pseudometric-on-`⊤` instance, `Smoke.agda`
enumerates them in its `using` clause.

## Verification

```
$ agda -i proofs/agda proofs/agda/All.agda     # exit 0
$ agda -i proofs/agda proofs/agda/Smoke.agda   # exit 0
```

`--safe --without-K` throughout. No postulates. No escape pragmas.
No funext.

## Refs

- PR #70 (retract direction)
- `/tmp/echo-types-exploration/axis2-approximate.md` §7

Refs not Closes — §7 obligations 7 and 8 are landed, but
obligation 6's "full retract round-trip" (Rung C) and the
Lipschitz generalisation remain.

## Test plan

- [x] `agda proofs/agda/All.agda` exits 0
- [x] `agda proofs/agda/Smoke.agda` exits 0
- [x] No postulates / escape pragmas / funext introduced
- [x] All new headlines pinned in `Smoke.agda` via `EchoApproxInstance`
- [ ] Owner decides Rung C `Tolerance` interface question (a vs. b)
- [ ] After decision: implement chosen option, land full retract
      round-trip

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

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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