M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Improve error message in Ring ** Ideal over quotient rings

Open mahrud opened this issue 2 years ago • 1 comments
trafficstars

I think this error message should suggest that sub(ideal x, S) works:

i1 : S = QQ[x,y];

i2 : R = S/(x^2*y^2);

i3 : S ** ideal x;
stdio:3:3:(3): error: no method found for applying promote to:
     argument 1 :  | x | (of class Matrix)
     argument 2 :  R
     argument 3 :  S

i4 : S ** module ideal x

o4 = cokernel {1} | xy2 |
                             1
o4 : S-module, quotient of S

i6 : use S;

i7 : R ** ideal x;

o7 : Ideal of R

mahrud avatar Jul 01 '23 17:07 mahrud

Also, I think isSubset should either give an error when the rings aren't the same or attempt to promote to the same ring first:

i3 : isSubset(ideal R_0, ideal S_0)

o3 = false

i7 : isSubset(ideal R_0, R ** ideal S_0)

o7 = true

mahrud avatar Jul 01 '23 17:07 mahrud