[sage-devel] Re: opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Nils Bruin
On Saturday, 26 August 2023 at 00:22:39 UTC-7 Frédéric Chapoton wrote: I propose in https://github.com/sagemath/sage/pull/36138 a sketch of changes that would build a common polynomial ring by taking the union of variables. This does not break too many things. Instead many doctests checking

[sage-devel] Re: opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Nils Bruin
On Saturday, 26 August 2023 at 08:51:26 UTC-7 John H Palmieri wrote: In principle it seems okay, but to be honest, I don't think I understand Sage's polynomial rings. It seems like anything goes: sage: R. = GF(2)[] sage: S. = R[] sage: S sage: R.0 + S.0 x + x Why am I

Re: [sage-devel] Re: opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Edgar Costa
Frederic, Magma is quite pedantic and doesn't let you do that. > R := PolynomialRing(Integers(),2); > S := PolynomialRing(Integers(),2); > x1 + y1; >> x1 + y1; ^ Runtime error in '+': Arguments are not compatible Argument types given: RngMPolElt, RngMPolElt However, I should also point

[sage-devel] Re: opinions requested on x + y behaviour for polynomials

2023-08-26 Thread John H Palmieri
In principle it seems okay, but to be honest, I don't think I understand Sage's polynomial rings. It seems like anything goes: sage: R. = GF(2)[] sage: S. = R[] sage: S sage: R.0 + S.0 x + x Why am I allowed to construct S? With your proposed changes, what happens in the

Re: [sage-devel] opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Dima Pasechnik
On Sat, Aug 26, 2023 at 10:22 AM Frédéric Chapoton wrote: > > Dear all, > > currently, if x and y are in two different polynomial rings, one cannot add them. > > I propose in https://github.com/sagemath/sage/pull/36138 a sketch of changes that would build a common polynomial ring by taking the

Re: [sage-devel] pull requests recently updated

2023-08-26 Thread Michael Orlitzky
On Wed, 2023-08-23 at 01:36 -0700, 'Martin R' via sage-devel wrote: > > Is there a way to fix this? > Now's an OK time to stop adding meaningless milestones to every open ticket. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe

Re: [sage-devel] opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Vincent Delecroix
Hi Frederic, My opinion is that if there is a single non-ambiguous canonical parent, then yes. In the case of polynomial rings I think that the priority is to fix the following kind of non-commutativity in coercion ``` sage: cm = get_coercion_model() sage: cm.common_parent(QQ['x,y'], QQ['y,x'])

[sage-devel] opinions requested on x + y behaviour for polynomials

2023-08-26 Thread Frédéric Chapoton
Dear all, currently, if x and y are in two different polynomial rings, one cannot add them. I propose in https://github.com/sagemath/sage/pull/36138 a sketch of changes that would build a common polynomial ring by taking the union of variables. This does not break too many things. Instead