sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Polynomials over fraction fields incorrectly converted to Singular #17696

Open ea1d0bf8-c27a-4548-8cb7-de0b1d02441a opened 9 years ago

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 9 years ago

Currently, we sometimes lose entries in the denominator when converting to Singular:

sage: k.<a> = GF(11^5)
sage: R.<t> = k[]
sage: R.<x> = R.fraction_field()[]
sage: f = x^4 + 1/(a*t)
sage: f._singular_()
x^4
sage: g = x^4 + 1/a * 1/t
sage: f == g
True
sage: g._singular_()
x^4 + (6*a^4 + 5*a)/t

The issue seems to be with elements in the denominator that are subject to a quotient, i.e., an a in the denominator in the above example.

CC: @simon-king-jena @malb @sagetrac-swewers

Component: interfaces

Keywords: Singular polynomial interface

Stopgaps: #23644

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

ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 9 years ago

Description changed:

--- 
+++ 
@@ -10,7 +10,6 @@
 sage: L=FractionField(R1)
 sage: R.<x>=L[]
 sage: f=x^4+1/(b*zzz)
-True
 sage: f._singular_()  #  where is the fraction 1/(b*zzz)  ?
 x^4
 sage: g = R(x^4)
ea1d0bf8-c27a-4548-8cb7-de0b1d02441a commented 9 years ago

Stopgaps: todo

saraedum commented 7 years ago

Description changed:

--- 
+++ 
@@ -1,51 +1,14 @@
-It seems that the interface to Singular has a bug,
-see example:

-sage: K0=GF(11) -sage: #K0=QQ -sage: R0.=K0[] -sage: K.=K0.extension(b^5+4) -sage: R1.=K[] -sage: L=FractionField(R1) -sage: R.=L[] -sage: f=x^4+1/(bzzz) -sage: f.singular() # where is the fraction 1/(bzzz) ? +sage: k. = GF(11^5) +sage: R. = k[] +sage: R. = R.fraction_field()[] +sage: f = x^4 + 1/(a*t) +sage: f.singular() x^4 -sage: g = R(x^4) -sage: f==g -False

+sage: g = x^4 + 1/a 1/t +sage: f == g +True +sage: g.singular() +x^4 + (6a^4 + 5*a)/t

-
-Note that already
-
-```
-sage: (1/(b*zzz))._singular_()
-0 
-```
-
-Remarkable is that `f = x^4+1/(b)*(1/zzz) ` is correctly translated to Singular:
-
-```
-sage: K0=GF(11)
-sage: #K0=QQ
-sage: R0.<b>=K0[]
-sage: K.<b>=K0.extension(b^5+4)
-sage: R1.<zzz>=K[]
-sage: L=FractionField(R1)
-sage: R.<x>=L[]
-sage: f=x^4+1/(b)*(1/zzz)
-sage: f._singular_() 
--1/(4*zzz)*b^4+x^4
-sage: g = -1/(4*zzz)*b^4+x^4
-sage: f == g 
-True
-```
-
-Please check  if there is a similar issue in other rings than in the example above.
-
-@simon-king-jena, @mantepse:
-should I Ccing someone else or remove you from Cc?
-
-
saraedum commented 7 years ago

Changed stopgaps from todo to #23644

saraedum commented 7 years ago