Skip to content

remove deprecated function about Simon 2-descent in BSD #40351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fchapoton
Copy link
Contributor

That was deprecated in #35621

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.

Copy link

github-actions bot commented Jul 1, 2025

Documentation preview for this PR (built with commit c2e94b9; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@JohnCremona JohnCremona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine, though I do not like the code which extracts the exponent from an integer power of 2 using real arithmetic. Note that the numbers returned by two_descent_by_two_isogeny() must be powers of 2, otherwise that function has done something incorrect. It would be better to (1) test that these numbers actually are powers of 2 and raise an error if not (that could be done in the function itself); (2) use n.valuation(2) to extract the exponent.

@fchapoton
Copy link
Contributor Author

I can do that. Do you mean that all 4 numbers are powers of 2 ? Then what was the use of ceil for ?

@JohnCremona
Copy link
Member

I can do that. Do you mean that all 4 numbers are powers of 2 ? Then what was the use of ceil for ?

All the numbers are powers of 2 by definition, since they are the orders of finite abelian groups with exponent 2. But the numbers are obtained by counting which if a set of equations has solutions, and it can happen that some of the equations do have solutions but the code did not find them, in which case there will be a shortfall (sometimes 1 less than a power of 2 is again a power of 2, but not usually!). Note that the code in descent_two_isogeny.pyx looks like a fairly straight rewrite of some of mwrank's code into cython, by Robert Miller in 2009, so I am well aware of the pitfalls. On the other hand, I just looked at the corresponding mwrank code (in dource file mrank2.cc) and it looks as if I build these groups up in a better way (adding generators, so doubling the order each time).

Somewhere along the line there should be a check that the numbers are powers of 2, with at least a warning if not. And if not, then you might get the right answer by rounding up, but there is no guarantee. I suggest raising an error if any are not powers of 2 and running the tests, to see if any of the test curves have this issue.

@fchapoton
Copy link
Contributor Author

fchapoton commented Jul 2, 2025

ok, here is a proposal. Doctests seem to meet no problem. Let's see if the CI agrees.

Copy link
Member

@JohnCremona JohnCremona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of the power of 2 check

@fchapoton
Copy link
Contributor Author

so is this a positive review, John ?

@fchapoton
Copy link
Contributor Author

I allowed myself to set to the status to "positive review" on your behalf, John. Is this ok ?

@JohnCremona
Copy link
Member

I allowed myself to set to the status to "positive review" on your behalf, John. Is this ok ?

Sorry, I forget that now we have to do two separate things to approve changes.

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

Successfully merging this pull request may close these issues.

3 participants