Repository navigation
probe(dr-math): associativity of Boolean relation composition [5/5] - #1707
Conversation
The first law the certified-compiler boundary can certify, per the amended charter. - Chain: composes bound DR64 operands only where column domain meets row domain, under one current frame issue, one focus, one scope, and only for two-valued Distinct relations (Boolean semiring). - Law admission: admit_composition_assoc admits associativity only for BooleanCompose over two-valued Distinct; Bag and K3 are refused. AdmittedLaw has no other constructor (compile_fail doctest). - Proof: egglog, given only the admitted rule, proves every reassociation of a 5-chain and checks its proofs; commutation gets no proof even with both terms present. - Lowering: push/compose steps that raise back to the same order. The kernel is checked against an independent pair enumeration. - certify_reassociation is the first issuer of a RecipeCertificate, which now carries egglog's proof text. admit_recipe's single-operand path still has no certifier. Example assoc_orders, release, 4-vCPU shared Xeon @ 2.10 GHz: 14 orders of one 5-chain, same relation, 6 414 to 15 310 row-ORs, ~4.4 to 10.8 µs per evaluation; cold egglog proof ~12.5 ms (reported, not a gate). Not done: order selection, certificate rebinding (X8), GF(2)/M4RI reduction, R2IL/Quack wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a554da1cc4
ℹ️ 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".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…lowering digest Two Codex findings on #1707: - Chain::new checked frame freshness once and kept no borrow of the store, so the store could be advanced or dropped before eval. The chain now borrows the store; advancing it while a chain is alive does not compile (compile_fail doctest). - certify_reassociation accepted any nonzero compiled_digest. The digest must now equal lowering_digest(lower(to)), a SHA-256 over a canonical encoding of the checked step list; anything else is CompiledMismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Source-grounded matrix of the math-compiler lab work (#1690/#1693/#1696/#1698/#1707): nothing SHIPPED; independent proof check, counterexample-driven refutation, full-domain lowering validation, second-fresh-binding reuse and Thought-Git linkage ABSENT. 34 tactics audited as a proposal vocabulary (no kernel emits a derivation; 15 unique signatures). Minimal typed ABI reusing existing names; stages S1-S6 with positive/negative/silent/disable tests. Plan only; no implementation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
entries_index.py takes the first id in an entry's heading. Both L1 headings named D-DRMC-5, which #1707's entry already holds, and the structural falsifier rejected the duplicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…certified-compiler row D-TGA-5D said In PR; #1739 merged as 9a458ca. X8: #1740 ran the fresh-frame half; the catalogue multi-binding half is untouched. Certified-compiler row: certify_reassociation (#1707) is an issuer; the single-operand admit_recipe path still refuses. Independent checker, second law and prover revision are still missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…ents recipe.rs and tests/contract_handoff.rs said no certified-compiler boundary exists for DR64 laws. The single-operand admit_recipe path still has no certifier, but relcomp::certify_reassociation (#1707) certifies one law: associativity of Boolean-Distinct composition over a DR64 chain. #1738 corrected two other sites; these two remained. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
… substrate Documentation only. ONNX GraphProto stays the graph at the membrane; no new AST, rewrite pass or interpreter. relalg takes only the Boolean/compare/reduce fragment; value maths has no existing home (OP-ONNX-1, operator). Value-indexed ops are refused under ADMISSION B; no float law is admitted; certified applies only to egglog-proved Boolean-Distinct composition associativity (#1707, #1740). The original DR64³ plan was not found (0 files; branch and PR search negative). The DR64³ section is a new, labelled proposal. Open points OP-ONNX-1..14. Board: STATUS_BOARD D-ONNX-0/1/3, INTEGRATION_PLANS, entry 2026-10-23-d-onnx-relalg-cap-s0, entries index regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…endent invalidation falsifier Corrects the binding-store wording: the generalized Quack Binding Store is planned/unbuilt, while numeric binding, RelAlg let reuse (#1649, #1653), witnessed DR populations (#1666), typed DR method binding (#1701/#1708) and compiled mathematical recipes (#1693/#1694/#1707/ #1740) exist in production or lab. Notes #1666 Pop's witness refusal in B.7(5). Replaces "a property change is harmless" with the three-way invalidation rule, and adds the falsifier it needs to the P2 lab: a property read by R's criteria is mutated; the reused R2 keeps 1,032 rows vs 31 fresh and a downstream read differs, silently (`--controls`, seed 0x0D0D_F00D). Disable run red (skipping the mutation fails the non-vacuity assertion). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
…, P2) Links the existing implementation spine with source and status: #1649, #1653, #1659, #1666, #1681, #1685, #1693, #1694 (landed via #1696/#1698), #1701/#1703 (via #1708), #1707, #1740. Separates production (Quack numeric binding, CompiledProgram, mask-risc terminals, r2il procedures, the contract's SetProgram type) from lab. Names the smallest missing seams with their owners: D-NFR-1 frame on a bound Query (needs NFR-OP-1), an input-generation dependency witness for kept planes (binding store; witness type is NFR-OP-3, so no new Pop), and the D-NFR-2 codebook generation. Shows how one certified recipe applies to many witnessed bindings without copying populations, re-reads the DuckDB harvest against what exists, and states the authorization boundary. Documentation only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
Stage 5 of the D-DRMC stack. Base is #1708, which lands the stranded stages 1–4 and the charter amendment on
main. This is the first law the certified-compiler boundary can certify, per the amended charter.(R ∘ S) ∘ T = R ∘ (S ∘ T)over OR/AND is established algebra. The probe tests whether the pieces around it preserve it.What
relcompaddsChaincomposes bound DR64 operands only where:admit_composition_assocadmits associativity only forBooleanComposeover two-valued Distinct relations. Bag (counting) and three-valued composition are refused.AdmittedLawhas no other constructor; acompile_faildoctest checks this.certify_reassociationis the first issuer of aRecipeCertificate, which now carries egglog's proof text. It refuses a law reference for another shape, a non-reassociation, and a missing code identity.admit_recipe's single-operand path still has no certifier.Measured
cargo run --release --example assoc_orderson one dense-to-sparse 5-chain (4-vCPU shared Xeon @ 2.10 GHz):Checks
-D warningsand fmt are clean.Not done
The crate now depends on egglog from git (public API only); no ndarray patch is needed.
Generated by Claude Code