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

attempting to convert relative number field elements to Singular should fail quickly #3329

Closed
sagetrac-cwitty mannequin opened this issue May 29, 2008 · 4 comments
Closed

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented May 29, 2008

Consider this example:

  R.<a,b> = NumberField(x^2-3,'g').extension(x^2-7,'h')[]
  h = R.base_ring().gen()    
  S.<y> = R.fraction_field()[]
  xgcd(y^2, a*h*y+b) 

(reported by Gaëtan Bisson here: http://groups.google.com/group/sage-support/browse_thread/thread/5338608bd7508b00/cd1d6555592e472f#cd1d6555592e472f)

This fails because it tries to use Singular to take the gcd of multivariate polynomials over a relative number field, and Singular does not support relative number fields. However, the error message is quite poor; it would be better if it failed with a better error message.

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/3329

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-4.3.1 milestone May 29, 2008
@sagetrac-cwitty
Copy link
Mannequin Author

sagetrac-cwitty mannequin commented May 29, 2008

comment:1

See also #3330, which is about the exact same test case, but requests a working implementation of GCD (rather than just a better error message).

@malb
Copy link
Member

malb commented Aug 18, 2008

comment:2

This fails before Singular:

TypeError: unsupported operand parent(s) for '+': 'Univariate Polynomial Ring in y over Fraction Field of Multivariate Polynomial Ring in a, b over Number Field in h with defining polynomial x^2 - 7 over its base field' and 'Multivariate Polynomial Ring in a, b over Number Field in h with defining polynomial x^2 - 7 over its base field'

@malb
Copy link
Member

malb commented Jan 23, 2009

comment:3

This seems to work now because we avoid Singular

sage: R.<a,b> = NumberField(x^2-3,'g').extension(x^2-7,'h')[]
sage: h = R.base_ring().gen()
sage: S.<y> = R.fraction_field()[]
sage: xgcd(y^2, a*h*y+b)
(49*a^4*b^2/(343*a^6), 1, ((-1)/(h*a))*y + 49*a^4*b/(343*a^6))

Carl, any thoughts on this?

@malb malb assigned malb and unassigned williamstein Jan 25, 2009
@williamstein
Copy link
Contributor

comment:5

Since Carl's not involved any more, and this now works fine (in sage-4.3.1.rc0 too), I'm closing this as fixed:

bash$ sage
----------------------------------------------------------------------
| Sage Version 4.3.1.rc0, Release Date: 2010-01-15                   |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
sage:   R.<a,b> = NumberField(x^2-3,'g').extension(x^2-7,'h')[]
sage:   h = R.base_ring().gen()
sage:   S.<y> = R.fraction_field()[]
sage:   xgcd(y^2, a*h*y+b)
(7*a^2*b^2/(7*a^2*b^2), 7*a^2/b^2, (((-7)*a^2)/(h*a*b^2))*y + 7*a^2*b/(7*a^2*b^2))

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

2 participants