Skip to content

Add SecondaryExtAlgebra: the d2 differential layer - #241

Merged
JoeyBF merged 3 commits into
SpectralSequences:masterfrom
JoeyBF:claude/ext-algebra-d2
Jun 25, 2026
Merged

Add SecondaryExtAlgebra: the d2 differential layer#241
JoeyBF merged 3 commits into
SpectralSequences:masterfrom
JoeyBF:claude/ext-algebra-d2

Conversation

@JoeyBF

@JoeyBF JoeyBF commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

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.

Claude-Session: https://claude.ai/code/session_01XYWcvWZPm3YJkVpCmeGYsP

Summary by CodeRabbit

  • New Features
    • Added a new secondary ($d_2$) layer for computing secondary differentials and secondary products via the Ext algebra API.
    • Introduced a new constructor to build Ext computations without requiring a separate unit.
    • Updated the secondary example programs to use the new secondary workflow and to produce clearer, structured output.
  • Bug Fixes
    • Improved secondary-product handling by switching to the dedicated secondary algebra implementation with built-in permanence checks.
  • Tests
    • Added/extended a test to validate $d_2$ behavior on a standard resolution.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@JoeyBF, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 75c52520-ab71-4407-9f18-3fa7b096cd55

📥 Commits

Reviewing files that changed from the base of the PR and between a16676e and 9d47357.

📒 Files selected for processing (4)
  • ext/examples/secondary.rs
  • ext/examples/secondary_product.rs
  • ext/src/ext_algebra/mod.rs
  • ext/src/ext_algebra/secondary.rs
📝 Walkthrough

Walkthrough

Adds a new secondary Ext algebra module, exposes ExtAlgebra::without_unit, and rewrites the secondary examples to use d2, survival checks, and secondary product computation through the new APIs.

Changes

Secondary Ext algebra and examples

Layer / File(s) Summary
Secondary module surface
ext/src/ext_algebra/mod.rs, ext/src/ext_algebra/secondary.rs
Exports secondary, adds ExtAlgebra::without_unit, and defines SecondaryExtAlgebra and SecondaryProduct.
Secondary d2 and product engine
ext/src/ext_algebra/secondary.rs
Implements new, extend_all, compute_partial, d2, survives, page accessors, secondary product lifts, secondary product computation, and the sphere d2 test.
Secondary differential example
ext/examples/secondary.rs
Builds SecondaryExtAlgebra from a unitless resolution, supports partial computation, and prints d2 values from sec_e2.d2(...).
Secondary product example
ext/examples/secondary_product.rs
Builds ExtAlgebra and SecondaryExtAlgebra, constructs the input class, checks survival, and prints secondary products from secondary_multiply_into.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • SpectralSequences/sseq#240: Introduces the ExtAlgebra API that this PR extends with without_unit and the new secondary algebra layer.

Suggested reviewers

  • hoodmane

Poem

A rabbit hopped where spectra glow,
and found new d2 winds to know.
With carrots of ext and lambda twine,
the secondary bunnies leap just fine. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main addition: a new SecondaryExtAlgebra layer for d2 computations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between cb256a6 and d1a7927.

📒 Files selected for processing (4)
  • ext/examples/secondary.rs
  • ext/examples/secondary_product.rs
  • ext/src/ext_algebra/mod.rs
  • ext/src/ext_algebra/secondary.rs

Comment thread ext/examples/secondary_product.rs
Comment thread ext/src/ext_algebra/secondary.rs Outdated
Comment thread ext/examples/secondary_product.rs Outdated
@JoeyBF
JoeyBF force-pushed the claude/ext-algebra-d2 branch from a16676e to 3e64fd2 Compare June 25, 2026 17:27
claude and others added 3 commits June 25, 2026 14:05
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>
@JoeyBF
JoeyBF force-pushed the claude/ext-algebra-d2 branch from 8682ef6 to 9d47357 Compare June 25, 2026 18:05
@JoeyBF
JoeyBF merged commit 9911bb2 into SpectralSequences:master Jun 25, 2026
19 of 20 checks passed
github-actions Bot added a commit that referenced this pull request Jun 25, 2026
* 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>
@JoeyBF JoeyBF mentioned this pull request Jul 8, 2026
4 tasks
@JoeyBF
JoeyBF deleted the claude/ext-algebra-d2 branch July 16, 2026 05:43
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.

3 participants