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
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