|
| 1 | += Gate 3 Example: Transport-Echo — Handoff Notes |
| 2 | +:toc: macro |
| 3 | +:sectnums: |
| 4 | +:icons: font |
| 5 | + |
| 6 | +[.lead] |
| 7 | +Worked Gate 3 example: structured loss under transport (explicit-Euler |
| 8 | +diffusion) and coarse-graining (block averaging) on rational-valued |
| 9 | +fields over a periodic grid. Subject file: |
| 10 | +`proofs/agda/examples/Transport.agda`. |
| 11 | + |
| 12 | +*Status:* Gate 3 example, complete; both former gaps now *closed*. |
| 13 | +5(a) (the `∀ n` generalisation) via the extracted `VecRotation` |
| 14 | +module; 5(b) (the rank-1 characterisation at n = 4) via the ℚ ring |
| 15 | +solver. Compiles `--safe --without-K`, no postulates. |
| 16 | + |
| 17 | +toc::[] |
| 18 | + |
| 19 | +== What this example demonstrates |
| 20 | + |
| 21 | +The example exhibits structured loss from two distinguishable sources |
| 22 | +on `Field n = Vec ℚ n` over a periodic grid. (i) The explicit-Euler |
| 23 | +diffusion step `step` at `λ = ¼` is *singular at the Nyquist mode* on |
| 24 | +even grids: the alternating vector is annihilated. (ii) Block |
| 25 | +averaging `avg` is non-injective (rung 2). (iii) Their composition |
| 26 | +`avg ∘ step` has a kernel that *strictly enlarges* beyond either |
| 27 | +source taken alone. It is a worked instance of `EchoGraded`'s |
| 28 | +base-Echo structure — rung 4's `echoStep-is-Echo` shows the |
| 29 | +transport-echo family is definitionally `Echo (avg …)` — and it |
| 30 | +introduces no new bridge axis. |
| 31 | + |
| 32 | +== Load-bearing theorems |
| 33 | + |
| 34 | +* `step-kernel-nontrivial` — explicit-Euler diffusion at `λ = ¼` on a |
| 35 | + periodic n-cycle is singular at the Nyquist mode for even `n`: |
| 36 | + an explicit nonzero field `f` with `step f ≡ 0` at `n = 2`. |
| 37 | +* `step-kernel-contains-nyquist-multiples` — every scalar multiple of |
| 38 | + the Nyquist mode is annihilated: |
| 39 | + `∀ c → step (map (c *_) (nyquist 2)) ≡ replicate 4 0ℚ` |
| 40 | + (containment, at the fixed even size). |
| 41 | +* `nyquist-in-step-kernel` — the `∀ n` form: |
| 42 | + `∀ n → step (nyquist n) ≡ replicate (2·n) 0ℚ` (closes former gap |
| 43 | + (a), via the extracted `VecRotation` module). |
| 44 | +* `step-kernel-at-4-is-nyquist-line` — the rank-1 converse at n = 4: |
| 45 | + `step f ≡ 0 → Σ[ c ] f ≡ map (c *_) (nyquist 2)` (closes former |
| 46 | + gap (b), 4×4 ℚ solve via the ring solver). |
| 47 | +* `compose-kernel-strictly-larger` — the kernel of `avg ∘ step` |
| 48 | + strictly contains both the step-then-`avg` loss and `ker step` |
| 49 | + alone. Witness `g6 = [1, -1, -1, 1]` at `n = 4`, block size 2 |
| 50 | + (`step-then-avg = avg {1} {2} ∘ step`): `g6` lies in |
| 51 | + `ker (avg ∘ step)`, is not a scalar multiple of `nyquist 2`, and |
| 52 | + has `step g6 ≠ 0`. |
| 53 | + |
| 54 | +== Infrastructure |
| 55 | + |
| 56 | +The `step`-specific algebra below stays local to this file. The one |
| 57 | +genuinely reusable Vec-rotation fact has been *extracted* to the |
| 58 | +top-level `VecRotation` module (polymorphic over any carrier with an |
| 59 | +involutive negation): `rotL-alternating` / `rotR-alternating`, plus |
| 60 | +the `map-alternating` corollary. That module is what closes gap (a). |
| 61 | + |
| 62 | +* `step-homog` — `step (map (c *_) v) ≡ map (c *_) (step v)` |
| 63 | + (ℚ-scalar homogeneity of `step`). |
| 64 | +* `step-additive` — `step (v + w) ≡ step v + step w` (additivity). |
| 65 | + Together with `step-homog` this is the ℚ-linearity of `step`. |
| 66 | +* `StepKernelSubspace` — record bundling `closed-+` and `closed-*ₗ`; |
| 67 | + with the `StepKernel` predicate and witness `step-kernel-subspace`, |
| 68 | + it packages the kernel as a ℚ-subspace. |
| 69 | + |
| 70 | +Eight Vec-over-ℚ lemmas, reusable for future Vec-valued-field work: |
| 71 | + |
| 72 | +[cols="1,3", options="header"] |
| 73 | +|=== |
| 74 | +| Lemma | One-line statement |
| 75 | + |
| 76 | +| `zip-interchange` | `(A+B)+(C+D) ≡ (A+C)+(B+D)` pointwise on vectors |
| 77 | +| `zip-sub-exchange` | `(A+C)-(B+D) ≡ (A-B)+(C-D)` pointwise on vectors |
| 78 | +| `++∷ʳ` | `zipWith _+_` distributes over snoc `_∷ʳ_` |
| 79 | +| `reverse-zipWith` | `reverse` distributes over `zipWith _+_` |
| 80 | +| `add-rotL` | left rotation distributes over `zipWith _+_` |
| 81 | +| `add-rotR` | right rotation distributes over `zipWith _+_` |
| 82 | +| `scale-+` | `map (c *_)` distributes over `zipWith _+_` |
| 83 | +| `scale-zero` | `map (c *_)` annihilates the zero vector |
| 84 | +|=== |
| 85 | + |
| 86 | +== Former gaps (both closed) |
| 87 | + |
| 88 | +=== (a) `∀ n` generalisation of `nyquist-in-step-kernel` — CLOSED |
| 89 | + |
| 90 | +The general `nyquist-in-step-kernel : ∀ n → step (nyquist n) ≡ |
| 91 | +replicate (2·n) 0ℚ` now lands (no postulate, no size restriction). |
| 92 | +The Vec-rotation fact stdlib does not provide — |
| 93 | +`rotL (nyquist n) ≡ map -_ (nyquist n)`, and the `rotR` twin — |
| 94 | +was extracted to the `VecRotation` module as the polymorphic |
| 95 | +`rotL-alternating` / `rotR-alternating` (each requiring an |
| 96 | +involution hypothesis, discharged for ℚ by the ring solver). The |
| 97 | +in-file wiring (Rung 5a (closed)) bridges `step`'s local rotations |
| 98 | +to the module, lifts the per-entry Nyquist eigenvalue-0 identity |
| 99 | +pointwise, and transports across the `vcast ∘ concat ∘ replicate` |
| 100 | +builder. `nyquist-in-step-kernel-1` / `-2` are retained as fast |
| 101 | +`refl` sanity checks at the smallest sizes. |
| 102 | + |
| 103 | +=== (b) `step-kernel-at-4-is-nyquist-line` (rank-1 characterisation) — CLOSED |
| 104 | + |
| 105 | +`step-kernel-at-4-is-nyquist-line : ∀ (f : Field 4) → step f ≡ |
| 106 | +replicate 4 0ℚ → Σ[ c ∈ ℚ ] f ≡ map (c *_) (nyquist 2)` now lands. |
| 107 | +The subspace closures (`step-additive`, `step-homog`, |
| 108 | +`StepKernelSubspace`) establish that `ker step` is a ℚ-subspace; this |
| 109 | +pins *which* subspace — the Nyquist line. The rank-1 fact is the 4×4 |
| 110 | +ℚ system `step [a,b,c,d] ≡ 0`, whose only solution is |
| 111 | +`[a,−a,a,−a] = a·(nyquist 2)`. It is discharged with the stdlib ℚ |
| 112 | +ring solver (`Data.Rational.Solver`): constant folding does the |
| 113 | +linear algebra (4·¼ = 1, ½·2 = 1), so no cancellation lemma, nonzero |
| 114 | +side condition, or matrix module is needed. The containment result |
| 115 | +`step-kernel-contains-nyquist-multiples` remains as the easy |
| 116 | +direction. |
| 117 | + |
| 118 | +== Why this stays in Gate 3 |
| 119 | + |
| 120 | +The example is a concrete worked instance demonstrating existing echo |
| 121 | +machinery on a real domain (rational fields over a periodic grid). It |
| 122 | +introduces no new bridge axis; it does not claim transport and |
| 123 | +coarse-graining are independent decorations producing substantive |
| 124 | +cross-axis content (the EI-2 investigation settled that question |
| 125 | +negatively); and it does not reach toward Gate 2's |
| 126 | +characteristic-theorem-family criteria. The strictly-larger kernel of |
| 127 | +`avg ∘ step` is *structured loss* — two distinguishable annihilation |
| 128 | +sources composing — not bridge-axis interaction. |
| 129 | + |
| 130 | +== Build and verification |
| 131 | + |
| 132 | +`proofs/agda/examples/Transport.agda` compiles under Agda 2.8.0 with |
| 133 | +agda-stdlib v2.3, `--safe --without-K`, no postulates, no |
| 134 | +`{-# TERMINATING #-}` pragmas, no `--rewriting`. |
0 commit comments