Add SecondaryExtAlgebra: the d2 differential layer - #241
Conversation
|
Warning Review limit reached
More reviews will be available in 19 minutes and 13 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new ChangesSecondary Ext algebra and examples
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ext/examples/secondary_product.rs`:
- Around line 62-73: The partial-job path in secondary_product.rs is doing too
much work because sec_e2.extend_all() and the full secondary-layer setup happen
before checking ext::utils::secondary_job(). Reorder the logic so the
secondary_job() branch is handled first, and only build the full secondary layer
with SecondaryExtAlgebra::new, extend_all(), and the survival assertion on the
non-partial path. Keep secondary_product_lift and lift.compute_partial(s) inside
the partial-job branch so it skips the full E3 computation.
In `@ext/src/ext_algebra/secondary.rs`:
- Around line 150-153: The survivors check in Secondary algebra should not treat
an unknown d2 differential as a surviving class. Update the survives method on
Secondary (and any related d2 lookup handling) so that self.d2(x) returning None
is treated as unknown/false rather than true, while still returning true only
when the computed d2 vector is zero. Keep the existing zero-vector case in
survives, but distinguish it from the uncomputed target case documented in d2.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0c0db09f-7e7c-4aaa-a278-03fb6ed053f6
📒 Files selected for processing (4)
ext/examples/secondary.rsext/examples/secondary_product.rsext/src/ext_algebra/mod.rsext/src/ext_algebra/secondary.rs
a16676e to
3e64fd2
Compare
Introduce `ext::ext_algebra::secondary::SecondaryExtAlgebra<CC>`, the secondary
layer over `ExtAlgebra`. It composes the primary algebra with the secondary
resolutions of M and the unit k, and exposes the secondary differential `d2`
(with a `survives`/permanent-cycle check), the E3-page `page_data`, and the
Mod_Cλ² secondary product `secondary_multiply_into`.
These wrap `SecondaryResolution` and `SecondaryResolutionHomomorphism`; no new
linear algebra is added. The layer is split from `ExtAlgebra` because the
secondary machinery requires `CC::Algebra: PairAlgebra`, a bound the primary
layer does not impose. To support this, `ext_algebra.rs` becomes the module
directory `ext_algebra/{mod,secondary}.rs`. A `compute_partial` passthrough and
a public `secondary_product_lift` preserve the per-`s` sharding workflow, and a
unit-free `ExtAlgebra::without_unit` constructor supports the d2-only path.
Refactors the `secondary` (d2 lister) and `secondary_product` examples onto the
layer; both produce byte-identical output to before (verified on S_2). Adds a
unit test asserting the first Adams differential d2(h4) = h0 h3^2 is nonzero and
that h0, h1, h2 are permanent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYWcvWZPm3YJkVpCmeGYsP
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
8682ef6 to
9d47357
Compare
* Add SecondaryExtAlgebra: the d2 differential layer
Introduce `ext::ext_algebra::secondary::SecondaryExtAlgebra<CC>`, the secondary
layer over `ExtAlgebra`. It composes the primary algebra with the secondary
resolutions of M and the unit k, and exposes the secondary differential `d2`
(with a `survives`/permanent-cycle check), the E3-page `page_data`, and the
Mod_Cλ² secondary product `secondary_multiply_into`.
These wrap `SecondaryResolution` and `SecondaryResolutionHomomorphism`; no new
linear algebra is added. The layer is split from `ExtAlgebra` because the
secondary machinery requires `CC::Algebra: PairAlgebra`, a bound the primary
layer does not impose. To support this, `ext_algebra.rs` becomes the module
directory `ext_algebra/{mod,secondary}.rs`. A `compute_partial` passthrough and
a public `secondary_product_lift` preserve the per-`s` sharding workflow, and a
unit-free `ExtAlgebra::without_unit` constructor supports the d2-only path.
Refactors the `secondary` (d2 lister) and `secondary_product` examples onto the
layer; both produce byte-identical output to before (verified on S_2). Adds a
unit test asserting the first Adams differential d2(h4) = h0 h3^2 is nonzero and
that h0, h1, h2 are permanent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYWcvWZPm3YJkVpCmeGYsP
* Re-export `SecondaryExtAlgebra`
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* Treat uncomputed targets as undefined, not 0
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Introduce
ext::ext_algebra::secondary::SecondaryExtAlgebra<CC>, the secondary layer overExtAlgebra. It composes the primary algebra with the secondary resolutions of M and the unit k, and exposes the secondary differentiald2(with asurvives/permanent-cycle check), the E3-pagepage_data, and the Mod_Cλ² secondary productsecondary_multiply_into.These wrap
SecondaryResolutionandSecondaryResolutionHomomorphism; no new linear algebra is added. The layer is split fromExtAlgebrabecause the secondary machinery requiresCC::Algebra: PairAlgebra, a bound the primary layer does not impose. To support this,ext_algebra.rsbecomes the module directoryext_algebra/{mod,secondary}.rs. Acompute_partialpassthrough and a publicsecondary_product_liftpreserve the per-ssharding workflow, and a unit-freeExtAlgebra::without_unitconstructor supports the d2-only path.Refactors the
secondary(d2 lister) andsecondary_productexamples onto the layer; both produce byte-identical output to before (verified on S_2). Adds a unit test asserting the first Adams differential d2(h4) = h0 h3^2 is nonzero and that h0, h1, h2 are permanent.Claude-Session: https://claude.ai/code/session_01XYWcvWZPm3YJkVpCmeGYsP
Summary by CodeRabbit