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

Test failure with elliptic point addition #39191

Open
2 tasks done
user202729 opened this issue Dec 23, 2024 · 2 comments
Open
2 tasks done

Test failure with elliptic point addition #39191

user202729 opened this issue Dec 23, 2024 · 2 comments

Comments

@user202729
Copy link
Contributor

user202729 commented Dec 23, 2024

CI: https://github.com/sagemath/sage/actions/runs/12462007486/job/34782318635

sage -t --warn-long 5.0 --random-seed=48801491517978841838174003125576793861 src/sage/schemes/elliptic_curves/ell_point.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/ell_point.py", line 277, in sage.schemes.elliptic_curves.ell_point.?._add_
Failed example:
    for d in N.divisors():
        if d > 1:
            assert R.change_ring(Zmod(d)) == P.change_ring(Zmod(d)) + Q.change_ring(Zmod(d))
Exception raised:
    Traceback (most recent call last):
      File "/home/runner/work/sage/sage/src/sage/doctest/forker.py", line 716, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/runner/work/sage/sage/src/sage/doctest/forker.py", line 1137, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.elliptic_curves.ell_point.?._add_[14]>", line 3, in <module>
        assert R.change_ring(Zmod(d)) == P.change_ring(Zmod(d)) + Q.change_ring(Zmod(d))
    AssertionError
**********************************************************************
1 item had failures:
   1 of  34 in sage.schemes.elliptic_curves.ell_point.?._add_
    [1025 tests, 1 failure, 16.38s wall]

Looks like it's in the code touched by #39036 . @yyyyx4 ?

Environment

  • OS: CI
  • Sage Version: latest develop

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@S17A05
Copy link
Member

S17A05 commented Jan 9, 2025

Here is a simplified version of what fails (simplified from the same failure for random_seed = 312749927201941374195931348514437892724):

sage: E = EllipticCurve(Zmod(4), [2, 2, 3, 3, 3])
sage: P = E(2,1,0)
sage: Q = E(0,1,0)
sage: R = P + Q
sage: R == P
False

@vincentmacri
Copy link
Contributor

Here is a simplified version of what fails (simplified from the same failure for random_seed = 312749927201941374195931348514437892724):

sage: E = EllipticCurve(Zmod(4), [2, 2, 3, 3, 3])
sage: P = E(2,1,0)
sage: Q = E(0,1,0)
sage: R = P + Q
sage: R == P
False

This also gives False in Sage 10.5, which released before #39036 was merged into the develop branch. So I don't think #39036 broke anything, but it may have touched code that already had a bug or maybe added tests that cover this case.

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

No branches or pull requests

4 participants