Skip to content

D-POF-ANT-0: Position × Order × Law antennas (lab) - #395

Merged
AdaWorldAPI merged 4 commits into
masterfrom
claude/pof-antennas
Oct 29, 2026
Merged

AdaWorldAPI merged 4 commits into
masterfrom
claude/pof-antennas

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Six antennas, as isolated example and test code, testing whether a 64-way position basis can be reused across operations without materializing data. No facade word, backend, dispatch, storage owner, cache, registry, mask minting or public trait is added. #393 (E5) is untouched and its verdict stands.

Report: .claude/knowledge/pof-antennas-probe.md. It has the A0 census, timings per tier, loop bodies, the discovery matrix, the POSITION/ORDER/LAW/EXPOSURE/WITNESS mapping and answers to Q1–Q3.

What the antennas found

  • A1 position. Sharing a prepared basis is useful without sharing a mask: 0.79–0.93× of separate preparation on AVX-512.

    • Invariant results (count, signed sum) need no carry under a rebase.
    • The equivariant result (select) needs one conjugate_mask of the result, not one per input. That takes 6.3 ns instead of 16.4 ns on VNNI; a positional result is shown to refuse this deferral.
    • Perm64::conjugate_mask itself costs 4.4 ns, because it expands the mask to bytes with a scalar from_fn. One mask_blend makes it 5.6× faster on AVX-512 but 2.5× slower on AVX2. This is recorded as a fruit for the perm.rs owner, not changed here.
  • A2 exposure. E2 prepares the sign-routed operand once and the anchor narrows it (maskz(maskz(a,s),t) == maskz(a, s&t)). It is exact on all 511×511 pairs.

    • Lowering: E5's kandq/kandnq disappear, but all 4 zero-masked moves remain.
    • On AVX-512 without VNNI it beats E5 and B in every row (L1 end-to-end 4.69 vs 5.11 vs 5.63 ns per 64).
    • On VNNI it beats E5 but is still 1.10× B; on AVX2 it is 7× worse (per-lane mask_blend).
    • E3, two consumers fused with separate accumulator laws, wins on every tier (0.6–0.94×). On VNNI the second consumer reuses B's zero-masked copy of a.
  • A3/A4 order and law. Traversal, coordinate and effect order are tested separately. Each licensed rewrite has a negative example; reorder and defer also have disable runs.

    • The defer bound is computed (16,448 blocks), not assumed.
    • LLVM already fuses (a^b)&c into one vpternlogq, so an explicit ternlog is a TIE.
    • Skipping the map for an invariant count is 3 instructions instead of about 200.
  • A5 meta. A receipt-only second fold detects:

    • stale sources;
    • a policy change with unchanged evidence;
    • UNKNOWN coerced to FALSE;
    • reordered method effects;
    • lost provenance.

    It is a pure scalar oracle; no Thought-Git runtime is added.

  • A6 scale. The 64×64 field folded through PermTable12::exposure is the only form that holds on every tier (6.1–8.0 µs per field, one 8 KiB allocation). Per-cell conjugation is fastest on VNNI and worst on AVX2. Morton and row-major traversal tie at this working-set size.

  • Contract. All five elements already exist:

    • LAW in lance-graph mask-risc: commutativity from the ternlog table, per-terminal merge laws, ExtentUnsupported, row bounds;
    • WITNESS in OrderedLaneWitness / SealedFacetLane::validate;
    • POSITION and EXPOSURE in perm.rs.

    No new trait is proposed.

Verification

  • 41 tests pass on native (AVX-512 VNNI), v4, v3, AVX (qemu SandyBridge), v2 (qemu Nehalem), aarch64 (qemu) and nightly-simd.
  • Clippy -D warnings and rustfmt are clean; the facet-stride guard reports nothing on the added lines.
  • 14 disable runs, each red; the table is in the report.
  • Benchmarks: cargo run --release --example pof_antennas --features std (the tier is printed on the first line).

Note on the commits

The second commit's message says it "adds P2-lazy"; it does not. The lazy rebase and the blended-conjugation rows landed in the first commit (e12a33a), and the second commit adds only the report and the blackboard entry.


Generated by Claude Code

Six antennas as isolated example + test code, no facade, backend or
storage change: A1 position (shared and re-based bases over Perm64),
A2 exposure (E2 sign-routed operand reused by the anchor, E3 two fused
consumers), A3/A4 order and law (admitted and refused rewrites, each
with a negative example), A5 receipt-only meta fold, A6 64x64 field
per-cell vs exposure, row-major vs Morton.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
Adds P2-lazy (one conjugation of the equivariant result instead of three
of its inputs) and a blended mask expansion row to A1, with an exactness
test and a negative test for a positional result. Report records the A0
census, per-tier timings and loop bodies, 14 red disable runs, the
discovery matrix and the POSITION/ORDER/LAW/EXPOSURE/WITNESS mapping
onto existing types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9bfb3ea3-3c18-4523-b817-e13442d73641
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 29, 2026 23:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:40:50.659049Z 12b1b0e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12b1b0e8ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/pof_antennas/order_law.rs Resolved
Comment thread examples/pof_antennas/meta.rs Resolved
`commutes` admitted Add/Add and Mul/Mul unconditionally, but under
`run_effects`' checked semantics a swap can turn an overflow into a value
(Add(1), Add(-1) from i64::MAX; Mul(-1), Mul(0) from i64::MIN). Add pairs
now commute only without opposite signs, Mul pairs only when equal, one is
1, or both have magnitude >= 2; a brute-force test over boundary values
checks every admitted pair. `order_witness` truncated lane indices to u8,
so NegateFact(0) and NegateFact(256) shared a witness; it now encodes the
full index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
@AdaWorldAPI
AdaWorldAPI merged commit 03b3299 into master Oct 29, 2026
30 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 30, 2026
Records D-POF-ANT-0's verdicts and the rows they move: AVX2 mask_blend
is now the loss in three probes; E2 replaces E5 as the AVX-512-without-
VNNI U9 candidate; #395's A5 oracle can serve lance-graph's X1-X9 and
#1848 B0. New dots: conjugate_mask's scalar byte expansion can reuse
mask_byte_spread/BIT_IN_BYTE from #387; the per-tier U9 kernel choice
should be one table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
AdaWorldAPI added a commit that referenced this pull request Oct 30, 2026
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.

2 participants