M2
M2 copied to clipboard
Operator wishlist
In addition to the operators I added recently in #3183 and #3193, I'd like to add the following, but they involve subtle breaking changes or carefully making things remain backwards compatible.
S_+for positively graded part of a ring (and similarly_- ^- ^+)- we need to be careful so things like
C_+2orC_-1or2^-1still work.
- we need to be careful so things like
<v,u>for inner product- currently
<and>are binary operators only, which would need to be changed
- currently
f^#for the ring map corresponding to a map of affine varieties- we need to be careful so
x^#Lstill works.
- we need to be careful so
@d-torrance do you think it's possible to have < and > act as binary comparison operators, while also allowing <v,u> for inner product or even K<x,y,z> for a free algebra? I know the latter is currently K<|x,y,z|> but that's kind of unusual I think.
I'm a bit worried that it might be impossible to avoid ambiguities like whether x < 2 , 3 > y means (x < 2), (3 > y) or x (<2, 3>) y. On the other hand, we already have similar ambiguities, e.g. print #L gives an error because it's interpreting the unary op #L as binary op print#L.