Skip to content
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

Removed BUG method and include a docstring for matrix_of_frobenius() #37615

Merged

Conversation

GiacomoPope
Copy link
Contributor

When reviewing code for hyperelliptic curves I found a method labeled bug with a typo in the name which was unnecessary. I have removed this method and included doctests which were previously absent.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

@GiacomoPope
Copy link
Contributor Author

@kwankyu maybe you'll have time to review this? One question have is why is this method defined for curves over the rationals if we explicitly change the ring anyway? Feels like maybe I should move it to generic?

@grhkm21
Copy link
Contributor

grhkm21 commented Apr 3, 2024

Because only rational elements are coercable to p-adic numbers, probably.

sage: x = var("x")
....: K.<a> = NumberField(x^3 + 2)
....: R.<x> = K[]
....: H = HyperellipticCurve(x^5 + a*x + 3)
....: monsky_washnitzer.matrix_of_frobenius_hyperelliptic(H.change_ring(Qp(7)))
# TypeError: Unable to coerce a to a rational

Copy link
Contributor

@grhkm21 grhkm21 left a comment

Choose a reason for hiding this comment

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

General comments.

Fun fact: The bug is from this line. No further comment.

@grhkm21
Copy link
Contributor

grhkm21 commented Apr 3, 2024

If CI passes then it looks good to me

@GiacomoPope
Copy link
Contributor Author

CI failure from some other unrelated bug i think

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 7, 2024

CI failure from some other unrelated bug i think

Yes, #37734 is unrelated and fixed in #37750

@GiacomoPope
Copy link
Contributor Author

Thanks for helping with the labels and confirming about the failure.

Copy link

github-actions bot commented Apr 9, 2024

Documentation preview for this PR (built with commit 4faa6a8; changes) is ready! 🎉

@vbraun vbraun merged commit 3552314 into sagemath:develop Apr 12, 2024
11 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone Apr 12, 2024
@GiacomoPope GiacomoPope deleted the fix_bug_in_rational_hyperelliptic branch August 21, 2024 14:35
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.

4 participants