Failing test in gp_simon.py - possible bug?

26 views
Skip to first unread message

Alice Postovskiy

unread,
Apr 29, 2026, 12:02:55 PM (2 days ago) Apr 29
to sage-...@googlegroups.com

Hello all,

I found a test that fails or succeeds depending on the random seed. Failure:

Running doctests with ID 2026-04-29-11-35-22-e64d9aca.
Running with SAGE_LOCAL='/nix/store/20gs29km6xznvdac6pfksf2pw6zzp46c-python3-3.13.11-env' and SAGE_VENV='/nix/store/20gs29km6xznvdac6pfksf2pw6zzp46c-python3-3.13.11-env'
Using --optional=pip,sage
Features to be detected: 4ti2,SAGE_SRC,benzene,bliss,buckygen,conway_polynomials,coxeter3,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_ellcurves,database_graphs,database_jones_numfield,database_knotinfo,dot2tex,dvipng,ecm,flatter,fpylll,fricas,gap_package_atlasrep,gap_package_design,gap_package_grape,gap_package_guava,gap_package_hap,gap_package_polenta,gap_package_polycyclic,gap_package_qpa,gap_package_quagroup,gfan,giac,glucose,graphviz,imagemagick,info,ipython,jmol,jupymake,jupyter_sphinx,kenzo,kissat,latte_int,lrcalc_python,lrslib,mathics,matroid_database,mcqd,meataxe,meson_editable,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pycosat,pycryptosat,pynormaliz,pyparsing,python_igraph,requests,rpy2,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.braiding,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.giac,sage.libs.homfly,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.sat,sage.schemes,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sirocco,sloane_database,sphinx,symengine_py,sympy,tdlib,threejs,topcom
Doctesting 1 file.
sage -t --long --warn-long 30.0 --random-seed=70230975845479525684870153916266790110 /nix/store/xhk332147j4ipq7fxpjgxfk6p6wqx1jw-sage-src-10.7/src/sage/schemes/elliptic_curves/gp_simon.py
**********************************************************************
File "/nix/store/xhk332147j4ipq7fxpjgxfk6p6wqx1jw-sage-src-10.7/src/sage/schemes/elliptic_curves/gp_simon.py", line 84, in sage.schemes.elliptic_curves.gp_simon.?
Failed example:
    E.simon_two_descent()                             # long time
Expected:
    (0, 2, [])
Got:
    (2, 2, [(-121/64*w - 2719/64 : -15555/512*w - 186181/512 : 1)])
**********************************************************************
1 item had failures:
   1 of  17 in sage.schemes.elliptic_curves.gp_simon.?
    [16 tests, 1 failure, 29.26s wall]
----------------------------------------------------------------------
sage -t --long --warn-long 30.0 --random-seed=70230975845479525684870153916266790110 /nix/store/xhk332147j4ipq7fxpjgxfk6p6wqx1jw-sage-src-10.7/src/sage/schemes/elliptic_curves/gp_simon.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 29.3 seconds
    cpu time: 29.0 seconds
    cumulative wall time: 29.3 seconds
Features detected for doctesting: sage.libs.pari,sage.rings.number_field

Success:

Running doctests with ID 2026-04-29-11-37-34-8ee9562b.
Running with SAGE_LOCAL='/nix/store/20gs29km6xznvdac6pfksf2pw6zzp46c-python3-3.13.11-env' and SAGE_VENV='/nix/store/20gs29km6xznvdac6pfksf2pw6zzp46c-python3-3.13.11-env'
Using --optional=pip,sage
Features to be detected: 4ti2,SAGE_SRC,benzene,bliss,buckygen,conway_polynomials,coxeter3,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_ellcurves,database_graphs,database_jones_numfield,database_knotinfo,dot2tex,dvipng,ecm,flatter,fpylll,fricas,gap_package_atlasrep,gap_package_design,gap_package_grape,gap_package_guava,gap_package_hap,gap_package_polenta,gap_package_polycyclic,gap_package_qpa,gap_package_quagroup,gfan,giac,glucose,graphviz,imagemagick,info,ipython,jmol,jupymake,jupyter_sphinx,kenzo,kissat,latte_int,lrcalc_python,lrslib,mathics,matroid_database,mcqd,meataxe,meson_editable,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pycosat,pycryptosat,pynormaliz,pyparsing,python_igraph,requests,rpy2,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.braiding,sage.libs.ecl,sage.libs.flint,sage.libs.gap,sage.libs.giac,sage.libs.homfly,sage.libs.linbox,sage.libs.m4ri,sage.libs.ntl,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modular,sage.modules,sage.numerical.mip,sage.plot,sage.rings.complex_double,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.polynomial.pbori,sage.rings.real_double,sage.rings.real_mpfr,sage.sat,sage.schemes,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sirocco,sloane_database,sphinx,symengine_py,sympy,tdlib,threejs,topcom
Doctesting 1 file.
sage -t --long --warn-long 30.0 --random-seed=70230975845479525684870153916266790227 /nix/store/xhk332147j4ipq7fxpjgxfk6p6wqx1jw-sage-src-10.7/src/sage/schemes/elliptic_curves/gp_simon.py
    [16 tests, 2.79s wall]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 2.8 seconds
    cpu time: 2.8 seconds
    cumulative wall time: 2.8 seconds
Features detected for doctesting: sage.libs.pari,sage.rings.number_field

Running on NixOS with Sage 10.7. I found the failing test only because the Nix version of Sage runs all tests on update/install by default.

Best,
Alice Postovskiy

Nils Bruin

unread,
Apr 29, 2026, 2:00:52 PM (2 days ago) Apr 29
to sage-devel
I can confirm the failure can be replicated (with the seed!) on 10.9.beta9. I'm not sure it's an error, though: the example in question tries to find solutions to an equation; apparently in a non-deterministic way (mathematically, these equations are hard). The expected output is that no solutions are found. With this specific seed, a solution is found. It is indeed a solution, so it's not wrong. I suspect this is just a very "lucky" seed.
Reply all
Reply to author
Forward
0 new messages