SingularError in rational_parameterization

185 views
Skip to first unread message

Peter Mueller

unread,
Apr 17, 2024, 11:12:35 AM4/17/24
to sage-devel
The following code raises a SingularError in SageMath version 10.4.beta3 (with system singular enabled), and the same at https://sagecell.sagemath.org/ :

R.<x, y> = QQ[]
f = -2*x^2*y^2 - x^3 - x^2*y + x*y^2 + y^3 + 2*x^2 + 2*y^2 - 2
C = Curve(f)
assert C.genus() == 0
print(C.rational_parameterization())

The polynomial f is absolutely irreducible, and the given curve is rationally parametrized e.g. by (x, y) = (1/2*(t^3+t^2+t-1)/t^2, 1/2/t*(t^3+t^2-t+1)).

-- Peter Mueller

PS: To me as a naive end user, it looks like Singular has had recurring problems with basic things for many years that have worked smoothly in systems like Maple (and its algcurves package) for more than 30 years.

Nils Bruin

unread,
Apr 17, 2024, 11:54:13 AM4/17/24
to sage-devel
Thanks. It looks like the error occurs in integralbasis.lib. It's last version data is fairly recent, so the file may be under active maintenance.

sagemath has grown enough divisor machinery that it can probably compute a conic model of a genus 0 curve, which would be more standard to try and parametrize. Alternatively, with point searching methods (which may not be implemented comprehensively in sage) one could perhaps find a degree 1 place on the genus 0 curve directly and use Riemann-Roch machinery to compute the parametrization without going through a conic model.

So, if this functionality in integralbasis.lib in singular is not comprensive enough, it may be a doable project to do it in sage directly now.

Note that algcurves is sometimes a little too eager in finding a parametrization: it might just adjoin a point over an extension to get a parametrization (also when that's not required). If you need the parametrization for arithmetic applications, that's a problem. But indeed, Mark van Hoeij did an amazing job on that maple package!

Kwankyu Lee

unread,
Apr 18, 2024, 12:02:53 AM4/18/24
to sage-devel
No problem with Singular 4.3.2 included in sage (on mac).

Antonio Rojas

unread,
Apr 18, 2024, 3:03:22 AM4/18/24
to sage-devel
Works fine with system singular 4.3.2.p16 too, so this may be a bug in that particular Singular version.

Peter Mueller

unread,
Apr 19, 2024, 5:56:27 AM4/19/24
to sage-devel
I just figured out that the installation from source (even with  the explicit configure option `--with-system-singular`) on an up to date arch linux machine ignores the installed singular (`pacman -Q singular` returns `singular 4.3.2.p16-1`). Not sure if it is a path problem that makes the configure script fail to detect the singular installation.

dim...@gmail.com

unread,
Apr 19, 2024, 6:08:01 AM4/19/24
to 'Peter Mueller' via sage-devel
On Fri, Apr 19, 2024 at 02:28:13AM -0700, 'Peter Mueller' via sage-devel wrote:
> I just figured out that the installation from source (even with the
> explicit configure option `--with-system-singular`) on an up to date arch
> linux machine ignores the installed singular (`pacman -Q singular` returns
> `singular 4.3.2.p16-1`). Not sure if it is a path problem that makes the
> configure script fail to detect the singular installation.
The 1st thing 1st,
if your source install already has singular built, you need to uninstall
it, for ./configure to pick up the system-wide one.

if you post your config.log we can tell you more on why it goes wrong.

Dima

>
> Antonio Rojas schrieb am Donnerstag, 18. April 2024 um 09:03:22 UTC+2:
>
> Works fine with system singular 4.3.2.p16 too, so this may be a bug in that
> particular Singular version.
>
> El jueves, 18 de abril de 2024 a las 6:02:53 UTC+2, Kwankyu Lee escribió:
>
> No problem with Singular 4.3.2 included in sage (on mac).
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a671ea8e-e0c5-4dbe-9510-5139c9bb24ffn%40googlegroups.com.

signature.asc

Peter Mueller

unread,
Apr 19, 2024, 7:36:26 AM4/19/24
to sage-devel
@Dima, thanks, I know that though. Nevertheless, I now started from anew (that is I removed the sage directory and git-cloned sage to make sure that there are no remains causing trouble). After running configure, the script suggests to `sudo pacman -S eclib fflas-ffpack linbox nauty singular`. However, all these packages are installed: `pacman -Q eclib fflas-ffpack linbox nauty singular` returns
eclib 20240408-1
fflas-ffpack 2.5.0-1
linbox 1.7.0-1
nauty 1:2.8.8-2
singular 4.3.2.p16-1

The possibly relevant snippets of the config.log are

[...]
It was created by Sage configure 10.4.beta3, which was
generated by GNU Autoconf 2.72.  Invocation command line was

  $ ./configure --enable-bliss --enable-cbc --enable-csdp --enable-dsdp --enable-gap_p
ackages --enable-libnauty --enable-mcqd --enable-msolve --enable-pari_galpol --enable-
scip --enable-scip_sdp --no-create --no-recursion
[...]
hostname = wma7117
uname -m = x86_64
uname -r = 6.8.5-arch1-1
uname -s = Linux
uname -v = #1 SMP PREEMPT_DYNAMIC Thu, 11 Apr 2024 01:47:33 +0000

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/mueller/.codon/bin/
PATH: /home/mueller/.codon/bin/
PATH: /home/mueller/local/copt/bin/
PATH: /usr/local/sbin/
PATH: /usr/local/bin/
PATH: /usr/bin/
PATH: /usr/bin/site_perl/
PATH: /usr/bin/vendor_perl/
PATH: /usr/bin/core_perl/
PATH: /home/mueller/local/bin/
PATH: /home/mueller/Adm/local/bin/
PATH: /home/mueller/local/gurobi/linux64/bin/

and

## Checking whether SageMath should install SPKG singular... ##
## --------------------------------------------------------- ##
configure:49864: checking whether any of gmp ntl flint readline mpfr cddlib is installed as or will be installed as SPKG
configure:49869: result: yes; install singular as well
configure:50085: no suitable system package found for SPKG singular

Dima Pasechnik

unread,
Apr 20, 2024, 11:57:05 AM4/20/24
to sage-devel
On Friday, April 19, 2024 at 12:36:26 PM UTC+1 Peter Mueller wrote:
@Dima, thanks, I know that though. Nevertheless, I now started from anew (that is I removed the sage directory and git-cloned sage to make sure that there are no remains causing trouble). After running configure, the script suggests to `sudo pacman -S eclib fflas-ffpack linbox nauty singular`.

these suggestions are often bogus (and it's the case here). There is not check done on whether these are actually installed - it's only checking
whether such a package is available for your OS, but not going to be used by Sage.
well, this looks relevant.  "any of gmp ntl flint readline mpfr cddlib is installed as or will be installed as SPKG"
these are Singular's dependencies, and possibly not all of them are on your OS.
In particular, flint is not there - you need Flint 3, and it's only in the very latest Ubuntu, cf.

You might want to install latest flint3, 3.1.2, into /usr/local/, and
try again.
This will be dodgy, and not really very good idea,
as your Singular is built with flint2,  I suppose...

Dima

Peter Mueller

unread,
Apr 20, 2024, 12:10:41 PM4/20/24
to sage-devel
Dima Pasechnik schrieb am Samstag, 20. April 2024 um 17:57:05 UTC+2:
[...] well, this looks relevant.  "any of gmp ntl flint readline mpfr cddlib is installed as or will be installed as SPKG"
these are Singular's dependencies, and possibly not all of them are on your OS.
In particular, flint is not there - you need Flint 3, and it's only in the very latest Ubuntu, cf.

You might want to install latest flint3, 3.1.2, into /usr/local/, and
try again.
This will be dodgy, and not really very good idea,
as your Singular is built with flint2,  I suppose...

well, all these packages were installed when I compiled sage: 

`pacman -Q gmp ntl flint readline mpfr cddlib` returns

gmp 6.3.0-1
ntl 11.5.1-1
flint 3.1.2-1
readline 8.2.010-1
mpfr 4.2.1-2
cddlib 1:0.94m-1

-- Peter

Dima Pasechnik

unread,
Apr 20, 2024, 12:34:45 PM4/20/24
to sage-devel
Sorry, this is the  usual careless reviewing of late, preventing people from using their own Singular (too "new")
The check should have been conditional on building Sage's own Singular - otherwise it should have been ignored.

You can revert the this PR, and re-run ./bootstrap

Dima Pasechnik

unread,
Apr 20, 2024, 1:42:53 PM4/20/24
to sage-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages