Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 2026-10-06 — Difference and plateau as an expression (Round 5)

## MEASURED

`crates/lance-graph-quack/tests/diff_plateau.rs`, 3 tests, 5 disable runs
red.

Two resident planes `a`, `b` over one row space. The diff is `a XOR b`,
its size is `POPCOUNT`, and the plateau is `NOT ANY`. Four paths, each
checked against a bit-at-a-time row oracle on eleven cases:

- empty diff (1 row and ragged)
- one bit at row 0, at the last row of word 0 and the first of word 1
- one bit at the last row of tile 0 and the first of tile 1 (16384 rows)
- one bit at the last row of a ragged `3 × 16384 + 77`
- sparse scattered (every 997th row)
- dense

| path | ops | lowering | scratch slots | slot words written | heap | population bytes |
|---|---|---|---|---|---|---|
| A materialized `Vec<u64>` diff | — | — | — | — | — | 6160 (770 words) |
| B mask-risc `Xor` → Count / Any | 1 | `Ternlog` imm `0x3C` | 0 | 0 | 0 | 0 |
| C quack `lower`, `(a∧¬b)∨(¬a∧b)` | 5 | `Ternlog` imm `0x3C` | 0 | 0 | 0 | 0 |
| D quack `lower_fused`, same filter | 1 | `Ternlog` imm `0x3C` | 0 | 0 | 0 | 0 |

The can-fire twin is the same count with a `Range` pred stacked on the
`Xor` slot. It runs `Tiled` with 2 slots and 512 words written, and still
matches the oracle, so the zeros above are measurements.

Disable runs, each red: `Xor` replaced by `And`; plateau read as `ANY`;
quack diff spelled with `AND` instead of `OR`; reference path ANDing words;
oracle limited to the first word.

## FINDING

- **Diff count and plateau are each one ternlog fold over the two resident
planes.** No diff population is written, no scratch slot is provisioned,
and execution allocates nothing.
- **Quack's AND/OR/NOT spelling reaches the same single table** as a direct
`Xor`, under plain `lower` too. The program collapse sees through it.

## OPEN

- Two planes over one row space only. A diff between two Lance versions,
or between a horizon and `delta.resulting`, would first need both states
readable as resident planes over the same rows.
- A diff over a third plane (diff restricted to a gate) would still fold
(≤ 3 planes). A diff that needs a `Pred` (a range, a lane compare) runs
`Tiled` and writes slot words, per the twin.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately
opposite directions; the stranding this convention prevents shows up in
exactly one of them, never both.

224 entries, 2026-08-06 .. 2026-10-06.
225 entries, 2026-08-06 .. 2026-10-06.

| date | entry id | finding | file |
|---|---|---|---|
| 2026-10-06 | `v3-v4-dual-reading-round3` | | [2026-10-06-v3-v4-dual-reading-round3.md](2026-10-06-v3-v4-dual-reading-round3.md) |
| 2026-10-06 | `quack-r2il-one-evaluator-round4` | | [2026-10-06-quack-r2il-one-evaluator-round4.md](2026-10-06-quack-r2il-one-evaluator-round4.md) |
| 2026-10-06 | `D-MORTON-0` | | [2026-10-06-morton8x8-checked-address.md](2026-10-06-morton8x8-checked-address.md) |
| 2026-10-06 | `diff-plateau-as-expression-round5` | | [2026-10-06-diff-plateau-as-expression-round5.md](2026-10-06-diff-plateau-as-expression-round5.md) |
| 2026-10-06 | `dav-resident-reading-round2` | | [2026-10-06-dav-resident-reading-round2.md](2026-10-06-dav-resident-reading-round2.md) |
| 2026-10-06 | `dav-carrier-invariance-quack` | | [2026-10-06-dav-carrier-invariance-quack.md](2026-10-06-dav-carrier-invariance-quack.md) |
| 2026-10-05 | `text-to-numeric-boundary-inventory` | | [2026-10-05-text-to-numeric-boundary-inventory.md](2026-10-05-text-to-numeric-boundary-inventory.md) |
Expand Down
Loading
Loading