Skip to content

Use Mazur-bound small-multiple torsion check in rank search#6

Open
asiryan wants to merge 4 commits into
codex/verify-and-implement-rank-calculation-algorithmfrom
codex-lfbj1v
Open

Use Mazur-bound small-multiple torsion check in rank search#6
asiryan wants to merge 4 commits into
codex/verify-and-implement-rank-calculation-algorithmfrom
codex-lfbj1v

Conversation

@asiryan
Copy link
Copy Markdown
Owner

@asiryan asiryan commented Dec 19, 2025

Motivation

  • The rank lower-bound search used a heavy torsion-filter 5040*P scalar multiplication which can be very expensive and may cause the example to hang for curves with positive rank.
  • Over Q, Mazur’s theorem bounds torsion orders ≤ 16; a small-multiple check up to 16 is sufficient to detect torsion while avoiding large scalar multiplications.
  • Replace the expensive global multiplier with a lightweight check to improve responsiveness of RankLowerBoundFromSearch for typical inputs.
  • Keep the bound conservative and still correct for torsion detection over Q.

Description

  • Replaced the previous torsionKiller = 5040 approach in RankLowerBoundFromSearch with a direct call to a new helper IsTorsionByMazurBound.
  • Added IsTorsionByMazurBound(EllipticCurvePoint) which tests whether a point is torsion by checking multiples k*P for 1..16 and returns true when a multiple is the point at infinity.
  • Updated comments to document that torsion orders over Q are ≤ 16, and removed the large constant and its usage.
  • Changes are localized to sources/EllipticCurveQ.Analysis.cs and only affect the torsion filtering step of the rational-point search used for rank lower bounds.

Testing

  • Attempted to run the example via dotnet run --project /workspace/EllipticCurves/examples; automated run failed because dotnet is not available in the environment.
  • No other automated tests were executed in this environment.
  • Static/compile-time checks were not performed here due to lack of build tooling in the sandbox.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant