Skip to content

Commit 03b1148

Browse files
hyperpolymathclaude
andcommitted
docs(proof-log): add 2026-04-28 — C1→A2→A1→B3 session log
Records the full session chain with decisions made and why: * C1 — `FiberSize-fin` defined as pure recursive enumeration (no stdlib `count` shim); `bennett-reversible` parameterised by `FiberSize-fin ≡ 1` rather than a `Bijection f` typeclass input; infinite-domain `ProgramState = ℕ → ℕ` explicitly out of scope. * A2 — `_⊑c_` defined as a one-way order on roles (Client → Server only) rather than an equivalence — keeps the join structure non-trivial. * A1 — packaged via stdlib's `Function.Bundles._↔_` and `mk↔ₛ′`; per-fiber `(y : C) → ↔` rather than a global equivalence object. * B3 — separate relation `_<ᵇ⁺_` rather than extending `_<ᵇ_` (preserves WF on the K-free core); explicit equality witness on shared-binder constructors (sidesteps K-restriction); four `extend-{lhs,rhs}` helpers for the mixed-shape trans cases. Plus a "what I'd do differently" retrospective: try Route B first for `_<ᵇ⁺_` WF (rank-embedding has a clearer failure mode than Agda's structural-decrease checker); always force clean Agda rebuild via `find -name '*.agdai' -delete` before each task switch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 865a2ea commit 03b1148

1 file changed

Lines changed: 205 additions & 0 deletions

File tree

docs/proof-log/2026-04-28.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Proof-direction log — 2026-04-28
2+
3+
## Session shape
4+
5+
Recovery from 2026-04-28 morning XFS-induced crash, then a chain
6+
of four landed proof rungs:
7+
8+
1. **C1** — redeem Landauer/Bennett bounds (PR #23, merged).
9+
2. **A2**`EchoChoreo` per-decoration composition rung (PR #24, merged).
10+
3. **A1** — equivalence-record packaging for cancel-iso (PR #25, merged).
11+
4. **B3** — extended order `_<ᵇ⁺_` with shared-binder lex
12+
constructors (this PR, in flight).
13+
14+
Plus extensive cross-repo and cross-doc updates (CLAUDE.md, roadmap.md,
15+
overview.md, composition.md, taxonomy.md, ECHO-CNO-BRIDGE.adoc).
16+
17+
The user requested all four in sequence ("do c1 then a2 then a1"
18+
followed by "yes" for B3) with the documentation pass at the end.
19+
20+
## Decisions made and why
21+
22+
### C1 — `FiberSize-fin` definition
23+
24+
**Decision.** Pure recursive enumeration over `Fin n`, asking the
25+
decidable equality at each index. No `count` from stdlib (which
26+
isn't directly available at the right shape under the version we
27+
have).
28+
29+
**Why.** Keeps the definition transparent, lets us prove the
30+
extremal lemmas (`-id-zero`, `-const`, `-no-hit`, `-all-hit`,
31+
`≡0⟺¬Echo`) by structural recursion on the same `Fin`-shape,
32+
no external dependencies.
33+
34+
**Trade-off.** Quadratic-style proofs in some cases (e.g.
35+
`FiberSize-fin-id-zero` needs `fs-no-hit` for the `suc`-shifted
36+
tail). Acceptable at this scale.
37+
38+
### C1 — `bennett-reversible` parameterised, not `Bijection`-typed
39+
40+
**Decision.** `bennett-reversible` takes a `FiberSize-fin f y _≟_ ≡ 1`
41+
hypothesis directly, rather than a `Bijection f` typeclass-style
42+
input. The `bennett-reversible-id-zero` instance discharges the
43+
hypothesis for the canonical `id : Fin (suc m) → Fin (suc m)` at
44+
zero.
45+
46+
**Why.** The user's spec mentioned "Bijection f" but the spec also
47+
explicitly noted "(a corollary of `FiberSize-fin id ≡ 1` and
48+
`⌊log₂ 1⌋ ≡ 0`)" — the corollary form IS the cleanest statement.
49+
Bringing in a real `Bijection` type would require either depending
50+
on stdlib's `Function.Bundles.Bijection` or rolling our own; both
51+
add ceremony for what's a one-line corollary.
52+
53+
**Trade-off.** Callers wanting "if it's a bijection, the bound is
54+
zero" need to derive the FiberSize=1 fact themselves. Acceptable
55+
because the `id` instance is provided ready-made.
56+
57+
### C1 — infinite-domain ProgramState explicitly out of scope
58+
59+
**Decision.** Strip the `ProgramState = ℕ → ℕ` carrier and the
60+
trivial `cno-zero-energy-at-zero T=0` corollary from the new
61+
`EchoThermodynamics`. Document infinite-domain as out of reach
62+
in both the module preamble and `docs/ECHO-CNO-BRIDGE.adoc`.
63+
64+
**Why.** Keeping the old infinite-domain machinery would invite
65+
future readers to mistake the trivial T=0 corollary for the full
66+
"CNOs dissipate zero energy" claim — exactly the original sin
67+
that made the deleted `ECHO-CNO-BRIDGE-SUMMARY.md` wrong.
68+
69+
### A2 — `_⊑c_` as a one-way order, not an equivalence
70+
71+
**Decision.** Restrict the choreographic-reachability order to
72+
`Client ⊑c Server` (one-way) plus reflexive self-loops. Three
73+
constructors (`c⊑c`, `c⊑s`, `s⊑s`).
74+
75+
**Why.** The reverse `Server → Client` move via the same swap
76+
exists (swap is involutive), but including it would make `_⊑c_`
77+
an equivalence and collapse the join structure (every two roles
78+
would be mutually upper-bound). The whole point of the
79+
per-decoration composition rung is to test the recipe on a
80+
non-trivial order.
81+
82+
**Trade-off.** Choreography in real life isn't directional this
83+
way. The order here is a pedagogical artefact, not a model of
84+
choreography. Documented as such in the module preamble.
85+
86+
### A1 — packaging via `Function.Bundles._↔_` and `mk↔ₛ′`
87+
88+
**Decision.** Use stdlib's `mk↔ₛ′` which takes `to`, `from`, and
89+
both `StrictlyInverse{ˡ,ʳ}` proofs. Both round-trips of the
90+
existing cancel-iso quartet feed in directly.
91+
92+
**Why.** Keeps the package minimal — no need to define our own
93+
equivalence record. `mk↔ₛ′` builds the full `Inverse` (with
94+
`to-cong` / `from-cong` filled in via `≡.cong`). Downstream
95+
consumers can use any of the standard projections.
96+
97+
**Trade-off.** Per-fiber `(y : C) → ↔` rather than a single global
98+
equivalence object. That's a consequence of the codomain `s y`
99+
varying with `y`; a global object would require a Σ-type or a
100+
reformulation. Per-fiber is the cleanest match for how
101+
`Echo (g ∘ f) y` is used downstream.
102+
103+
### B3 — separate relation `_<ᵇ⁺_` rather than extending `_<ᵇ_`
104+
105+
**Decision.** Define a new module `Ordinal.Buchholz.OrderExtended`
106+
with `_<ᵇ⁺_` (which lifts `_<ᵇ_` and adds `<ᵇ⁺-ψα`, `<ᵇ⁺-+2`),
107+
rather than adding the constructors directly to `_<ᵇ_`.
108+
109+
**Why.** Adding the constructors to `_<ᵇ_` breaks the existing
110+
`wf-<ᵇ` proof's bundle structure. A single-mutual restructure
111+
that threads `Acc _<ᵇ_ α` and `Acc _<ᵇ_ β` through the bundle
112+
**and** uses `wf-<ᵇ` mutually was attempted twice today (once
113+
by this session, once by a parallel session) — both attempts
114+
produce code that scope-checks but fails Agda's termination
115+
checker on the `pred-bpsi-from → wf-<ᵇ → ...` cycle.
116+
117+
**Trade-off.** Two relations now live side-by-side: the K-free
118+
core `_<ᵇ_` (with proven WF) and the extended `_<ᵇ⁺_` (with
119+
proven irrefl + trans, WF still open). Downstream consumers
120+
need to pick which one they need. Documented in
121+
`docs/echo-types/buchholz-extended-wf.md`; the next attempt
122+
should be Route B (rank-embedding into Brouwer).
123+
124+
### B3 — explicit equality witness on `<ᵇ⁺-ψα` and `<ᵇ⁺-+2`
125+
126+
**Decision.** Each constructor has the shape
127+
`∀ {ν₁ ν₂ α β} → ν₁ ≡ ν₂ → α <ᵇ β → bpsi ν₁ α <ᵇ⁺ bpsi ν₂ β`
128+
(equivalent for `+2`). The equality is an explicit argument, not
129+
an implicit binder identification.
130+
131+
**Why.** The natural shape `bpsi ν α <ᵇ⁺ bpsi ν β` (sharing `ν`
132+
across both sides of `<ᵇ⁺`) triggers a reflexive `ν = ν` equation
133+
in irrefl's pattern unification, which `--without-K` rejects.
134+
Carrying the equality explicitly keeps all four constructor
135+
implicits as pattern variables, sidestepping the K-restriction.
136+
The equality is then NOT pattern-matched on `refl` in irrefl
137+
(matching `refl : x ≡ x` ALSO triggers K-restriction once the
138+
LHS/RHS of `<ᵇ⁺` have been unified to a common carrier); it is
139+
only matched in `<ᵇ⁺-trans` where the equality is on FRESH
140+
pattern variables, satisfying the Cockx–Sjöberg criterion.
141+
142+
**Trade-off.** Callers must provide a `refl` argument explicitly
143+
(`<ᵇ⁺-ψα refl p`). Convenience wrappers `<ᵇ⁺-ψα-refl` and
144+
`<ᵇ⁺-+2-refl` paper over this for the common case.
145+
146+
### B3 — four `extend-{lhs,rhs}` helpers in `<ᵇ⁺-trans`
147+
148+
**Decision.** The mixed-shape transitivity cases
149+
(`base × shared-binder`) factor through four helper lemmas that
150+
walk the base witness's structure to swap the shared binder
151+
freely.
152+
153+
**Why.** The base constructors that put `bpsi` (or `bplus`) on
154+
either side of `<ᵇ` (`<ᵇ-0-ψ`, `<ᵇ-Ωψ`, `<ᵇ-ψΩ`, `<ᵇ-+ψ`,
155+
`<ᵇ-ψ+`, etc.) do not constrain the relevant binder, so we can
156+
re-apply the constructor at a different binder value. The
157+
helpers make this explicit and bundle the case analysis once.
158+
159+
**Trade-off.** Adds ~30 lines of explicit case work. Could be
160+
collapsed by using `cong` on a constructor parameter, but the
161+
explicit form is more readable.
162+
163+
## Open at end of session
164+
165+
* `_<ᵇ⁺_` well-foundedness — Route A failed twice, Route B is
166+
the recommended next attempt. See
167+
`docs/echo-types/buchholz-extended-wf.md`.
168+
* Brouwer Phase 1.3 limit case of `≤′-refl` — drafted by the
169+
parallel session, reverted pending discharge.
170+
* Unbudgeted `_<ᵇʳᶠ_` global WF (pre-existing, not touched this
171+
session).
172+
* C2 (Shannon-entropy formalisation), C3 (infinite-domain
173+
Landauer), C4 (physical heat dissipation) — all noted in
174+
roadmap.md as gated on prerequisites we don't have.
175+
176+
## Files touched (this session, in order)
177+
178+
* `proofs/agda/EchoFiberCount.agda` (new)
179+
* `proofs/agda/EchoThermodynamics.agda` (rewritten)
180+
* `proofs/agda/EchoStabilityTests.agda` (Section 2 rewritten)
181+
* `proofs/agda/All.agda` (wire EchoFiberCount + OrderExtended)
182+
* `proofs/agda/Smoke.agda` (pin all new headlines)
183+
* `proofs/agda/EchoChoreo.agda` (added _⊑c_ rung)
184+
* `proofs/agda/Echo.agda` (added Echo-comp-iso + cancel-iso packagers)
185+
* `proofs/agda/Ordinal/Buchholz/OrderExtended.agda` (new)
186+
* `docs/echo-types/composition.md` (rung sweep + cancel-iso closed)
187+
* `docs/echo-types/taxonomy.md` (§8 EchoFiberCount reference)
188+
* `docs/echo-types/roadmap.md` (rung-state refresh)
189+
* `docs/echo-types/overview.md` (Buchholz state refresh)
190+
* `docs/echo-types/buchholz-extended-wf.md` (new design note)
191+
* `docs/proof-log/2026-04-28.md` (this file)
192+
* `docs/ECHO-CNO-BRIDGE.adoc` (four overclaim sites swept)
193+
* `CLAUDE.md` (current rung state refresh)
194+
195+
## What I'd do differently
196+
197+
* **Try Route B first for `_<ᵇ⁺_` WF.** Two sessions burned on
198+
Route A's termination problem; the rank-embedding route is
199+
algebraic rather than proof-engineering and has a clearer
200+
failure mode (a missing strict-monotonicity lemma is easier
201+
to debug than Agda's structural-decrease checker).
202+
* **Verify build with `find -name '*.agdai' -delete` before each
203+
task switch.** Cached `.agdai` files masked a broken
204+
`WellFounded.agda` for several tool-invocations until I forced
205+
a clean rebuild.

0 commit comments

Comments
 (0)