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

Modify tests in ell_point.py to be more generic for Conway database update #37967

Merged
merged 2 commits into from May 12, 2024

Conversation

S17A05
Copy link
Contributor

@S17A05 S17A05 commented May 8, 2024

As part of the Conway polynomials database update, two tests in schemes.elliptic_curves.ell_point caused issues due to their dependency on the precise implementation of the finite field GF(65537^2):

  • The first test (of .weil_pairing) checks whether the Sage implementation still works for an example of fixed 7282-torsion points
  • The second test (of .tate_pairing) checks whether the new implementation, which uses PARI up to reduction of the pairing, coincides with the old Sage implementation (still used e.g. in SageMathCell, but not available in the current code anymore)

To help with the database update, we adapt these tests to not be dependent on the exact minimal polynomial used for finite field generation:

  • We turn both tests into examples (with fixed moduli) for their respective methods
  • We modify the test of .weil_pairing to check for two randomly chosen 7282-torsion points whether algorithm="sage" and algorithm="pari" yield the same result

Please let me know if you think other polynomial-independent tests are better suited as replacements.

See sagemath/conway-polynomials#5 (especially comment 10 and Update 2 in comment 11) for more details.

CC: @yyyyx4 @GiacomoPope @JohnCremona

Make the tests of `.weil_pairing` and `.tate_pairing` independent of the implementation of `GF(65537^2)`, in view of Conway database update
@tornaria
Copy link
Contributor

tornaria commented May 8, 2024

LGTM. Otherwise, either one in sagemath/conway-polynomials#5 (comment) works and avoids removing the tests.

Amend: Fixed typo
@tornaria
Copy link
Contributor

tornaria commented May 8, 2024

Nice, thanks.

Copy link

github-actions bot commented May 8, 2024

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

vbraun pushed a commit to vbraun/sage that referenced this pull request May 11, 2024
…or Conway database update

    
As part of the Conway polynomials database update, two tests in
`schemes.elliptic_curves.ell_point` caused issues due to their
dependency on the precise implementation of the finite field
`GF(65537^2)`:
- The first test (of `.weil_pairing`) checks whether the Sage
implementation still works for an example of fixed `7282`-torsion points
- The second test (of `.tate_pairing`) checks whether the new
implementation, which uses PARI up to reduction of the pairing,
coincides with the old Sage implementation (still used e.g. in
SageMathCell, but not available in the current code anymore)

To help with the database update, we adapt these tests to not be
dependent on the exact minimal polynomial used for finite field
generation:
- We turn both tests into examples (with fixed moduli) for their
respective methods
- We modify the test of `.weil_pairing` to check for two randomly chosen
`7282`-torsion points whether `algorithm="sage"` and `algorithm="pari"`
yield the same result

Please let me know if you think other polynomial-independent tests are
better suited as replacements.

See sagemath/conway-polynomials#5 (especially [comment
10](https://github.com/sagemath/conway-
polynomials/pull/5#issuecomment-2101462886) and Update 2 in [comment
11](https://github.com/sagemath/conway-
polynomials/pull/5#issuecomment-2101498241)) for more details.

CC: @yyyyx4 @GiacomoPope @JohnCremona
    
URL: sagemath#37967
Reported by: Sebastian A. Spindler
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request May 12, 2024
…or Conway database update

    
As part of the Conway polynomials database update, two tests in
`schemes.elliptic_curves.ell_point` caused issues due to their
dependency on the precise implementation of the finite field
`GF(65537^2)`:
- The first test (of `.weil_pairing`) checks whether the Sage
implementation still works for an example of fixed `7282`-torsion points
- The second test (of `.tate_pairing`) checks whether the new
implementation, which uses PARI up to reduction of the pairing,
coincides with the old Sage implementation (still used e.g. in
SageMathCell, but not available in the current code anymore)

To help with the database update, we adapt these tests to not be
dependent on the exact minimal polynomial used for finite field
generation:
- We turn both tests into examples (with fixed moduli) for their
respective methods
- We modify the test of `.weil_pairing` to check for two randomly chosen
`7282`-torsion points whether `algorithm="sage"` and `algorithm="pari"`
yield the same result

Please let me know if you think other polynomial-independent tests are
better suited as replacements.

See sagemath/conway-polynomials#5 (especially [comment
10](https://github.com/sagemath/conway-
polynomials/pull/5#issuecomment-2101462886) and Update 2 in [comment
11](https://github.com/sagemath/conway-
polynomials/pull/5#issuecomment-2101498241)) for more details.

CC: @yyyyx4 @GiacomoPope @JohnCremona
    
URL: sagemath#37967
Reported by: Sebastian A. Spindler
Reviewer(s):
@vbraun vbraun merged commit 4e0bbaf into sagemath:develop May 12, 2024
14 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone May 12, 2024
@S17A05 S17A05 deleted the ell_point_fix branch May 13, 2024 09:36
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.

None yet

4 participants