Open pzinn opened 6 months ago
I'm working on this. Here's another example that fails and should work:
i1 : R=QQ[x,y]
o1 = R
o1 : PolynomialRing
i2 : S=QQ[z]
o2 = S
o2 : PolynomialRing
i3 : T=R**S
o3 = T
o3 : PolynomialRing
i4 : R_0*T_2
stdio:4:3:(3): error: expected pair to have a method for '*'
also, some of these remarks also apply to lift
.
incidentally, shouldn't liftable
be renamed isLiftable
?
incidentally, shouldn't
liftable
be renamedisLiftable
?
This was brought up before too, I think. I think it would be good to deprecate liftable
in favor of isLiftable
.
Keeping open, we're not quite there yet:
i1 : R=QQ[x]
o1 = R
o1 : PolynomialRing
i2 : S=R[y]
o2 = S
o2 : PolynomialRing
i3 : 1/y+1/x
stdio:3:3:(3): error: expected pair to have a method for '+'
3177 let M2 create fraction fields of iterated rings. Even though this works now, there is an issue which is not easily fixed: promotion. For example:
Easy, add promotion from
frac R
tofrac S
? but that's not currently possible because one can only promote from one ring to another if the former is in the base rings of the latter, and it's not the case here:Basically, the current system is based on a "linear chain" of promotion whereas in the situation above we have a graph of the form One possibility would be to replace the current test of "promotability" which is pretty much what I wrote above with a more flexible
This would have other advantages, like define "natural" maps between rings say A and B which should be applied automatically when multiplying an element of A and an element of B. (typical situation is when A is a subring of B, since M2 doesn't have a concept of subring). It wouldn't solve every problem (what if one tries to add an element of
S
and an element offrac R
in the situation above?) but it would be a start.