Re: [sage-devel] Re: Coercion for multi-variate polynomials

2018-06-13 Thread Jeroen Demeyer
On 2018-06-13 01:33, Simon King wrote: It is, if the absence of a direct coercion triggers the construction of a pushout that uses a more efficient implementation than the two rings under consideration. What do you have against R[x][y]? There are certainly cases where that's a much more natura

Re: [sage-devel] Re: Coercion for multi-variate polynomials

2018-06-13 Thread Jeroen Demeyer
On 2018-06-12 17:39, Nils Bruin wrote: Possibly a nice test for seeing if the list of coercions and conversions present is sufficient is to see if all those maps can be defined by giving a list of images of generators. No, that won't be sufficient because you need to give a map from the base r

[sage-devel] Re: Coercion for multi-variate polynomials

2018-06-12 Thread Simon King
On 2018-06-12, Jeroen Demeyer wrote: >> However, >> these iterated polynomial ring constructions are quite inefficient. > > True, but I don't see that as an argument to have no coercion. It is, if the absence of a direct coercion triggers the construction of a pushout that uses a more efficient i

[sage-devel] Re: Coercion for multi-variate polynomials

2018-06-12 Thread Nils Bruin
On Tuesday, June 12, 2018 at 2:09:53 PM UTC-7, Simon King wrote: > > > Problem: > It is currently possible to create the polynomial ring R[x][x] > (hence, x occurs twice). If "x" has two different meanings in the > same ring, the notion "name preserving map" makes no sense. I believe > it shoul

Re: [sage-devel] Re: Coercion for multi-variate polynomials

2018-06-12 Thread Jeroen Demeyer
On 2018-06-12 23:07, Simon King wrote: And now think about quotients of polynomial rings. Let A,B have the same variable names in the same positions, but let the monomial orderings be different. Let I be an ideal in A and J the corresponding ideal in B. So, if we say that there is a name and posi

[sage-devel] Re: Coercion for multi-variate polynomials

2018-06-12 Thread Simon King
Hi! We are talking about rings that mathematically are multivariate polynomial rings over a commutative ring R. So, R[x,y], R[y,x], R[x][y], R[y][x], PolynomialRing(R,['x','y'],'lex'), PolynomialRing(R,['x','y'], 'degrevlex'),... About conversions: They can basically be anything. But: i) There

[sage-devel] Re: Coercion for multi-variate polynomials

2018-06-12 Thread Nils Bruin
On Tuesday, June 12, 2018 at 7:24:45 AM UTC-7, Jeroen Demeyer wrote: > > I'd like to say that the following should be coercions: > R -> R[x,y] > R[x] -> R[x,y] > R[y] -> R[x,y] > R[x][y] -> R[x,y] > > But not the following: > R[x,y] -> R[x][y] > R[x,y] -> R[y,x] > R[x,y][z] -> R[x][y,z] >