[sage-support] Re: Intersection (and quotient) of ideals in a single variable polynomial ring

2020-08-18 Thread William
Link:  
https://share.cocalc.com/share/df81e09e5b8f16f28b3a2e818dcdd4560e7818ae/support/2020-08-18-mpoly.ipynb?viewer=share
  

On Tuesday, August 18, 2020 at 9:56:00 AM UTC-7 William wrote:

>   Hi Luis,
>
> It's actually not a bug, but a missing feature.   The problem is that in 
> the first case R is a *univariate* polynomial ring, and in the second case 
> it is a multivariate polynomial ring and different functionality is 
> available in each case.  Read the docs for PolynomialRing (via 
> PolynomialRing?) for more details.  To fix your code, just use the 
> implementation="singular" option to get a multivariate polynomial ring in 1 
> variable:
>
>  R. = PolynomialRing(QQ, implementation="singular") 
>
> -William
>
> On Tuesday, August 18, 2020 at 6:31:55 AM UTC-7 Luis Garcia-Puente wrote:
>
>> The following code does not run in a Jupyter notebook inside cocalc 
>>
>> R. = PolynomialRing(QQ) 
>> f = x^3+6*x^2+12*x+8;
>> g = x^2+x-2;
>> I = R.ideal([f]);
>> J = R.ideal([g]);
>> I.intersection(J)
>>
>> This produces an error that ends with the line:
>>
>> AttributeError: 'Ideal_1poly_field' object has no attribute 'intersection'
>>
>> Similarly,  we get an error in the following line
>>
>> I.quotient(J)
>>
>> AttributeError: 'Ideal_1poly_field' object has no attribute 'quotient'
>>
>> However, if we use the ring on 2 variables
>>
>> R. = PolynomialRing(QQ) 
>>
>> all computations execute.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/525ad011-8c83-4eae-8058-597e034be223n%40googlegroups.com.


[sage-support] Re: Intersection (and quotient) of ideals in a single variable polynomial ring

2020-08-18 Thread William
  Hi Luis,

It's actually not a bug, but a missing feature.   The problem is that in 
the first case R is a *univariate* polynomial ring, and in the second case 
it is a multivariate polynomial ring and different functionality is 
available in each case.  Read the docs for PolynomialRing (via 
PolynomialRing?) for more details.  To fix your code, just use the 
implementation="singular" option to get a multivariate polynomial ring in 1 
variable:

 R. = PolynomialRing(QQ, implementation="singular") 

-William

On Tuesday, August 18, 2020 at 6:31:55 AM UTC-7 Luis Garcia-Puente wrote:

> The following code does not run in a Jupyter notebook inside cocalc 
>
> R. = PolynomialRing(QQ) 
> f = x^3+6*x^2+12*x+8;
> g = x^2+x-2;
> I = R.ideal([f]);
> J = R.ideal([g]);
> I.intersection(J)
>
> This produces an error that ends with the line:
>
> AttributeError: 'Ideal_1poly_field' object has no attribute 'intersection'
>
> Similarly,  we get an error in the following line
>
> I.quotient(J)
>
> AttributeError: 'Ideal_1poly_field' object has no attribute 'quotient'
>
> However, if we use the ring on 2 variables
>
> R. = PolynomialRing(QQ) 
>
> all computations execute.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e22e6b65-eb8f-4cb9-a78b-11c69ad0a155n%40googlegroups.com.