M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Operator wishlist

Open mahrud opened this issue 1 year ago • 1 comments

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_+2 or C_-1 or 2^-1 still work.
  • <v,u> for inner product
    • currently < and > are binary operators only, which would need to be changed
  • f^# for the ring map corresponding to a map of affine varieties
    • we need to be careful so x^#L still works.

mahrud avatar May 02 '24 07:05 mahrud

@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.

mahrud avatar Oct 13 '24 23:10 mahrud