Feature #1003
New syntax for creating poly rings?
Description
Here is an idea which could make creating poly rings a "normal case" rather than a "special case".
Instead of having to use the special operator *::=
to allow a special syntax:
P ::= QQ[x,y,z];
we could use normal syntax if the indet names were inside a string:
P := QQ["x,y,z"];
Related issues
History
#1 Updated by John Abbott over 7 years ago
- do not need operator
::=
to introduce special syntax (valid only in a special context) - this would allow expressions such as
QQ["x,y,z"]
to be placed in normal formulas, for instance as args to a fn callComputeResultIn(QQ["a,b,c"])
- not as natural as the current special syntax (because you need to use quotes)
- not clear how the term ordering would be specified
There are some further matters to be decided: if I write QQ["x,y,z"]
twice, will that produce the same poly ring (JAA: probably it should -- achieving this may be not entirely straightforward).
#2 Updated by John Abbott over 7 years ago
One problem it does not solve is how to write something like QQ[alpha]/(alpha^2-2)
since we cannot create the ideal generated by alpha^2-2
until the ring has been successfully built.
#3 Updated by Anna Maria Bigatti over 7 years ago
- % Done changed from 0 to 10
Neat idea, but I think we would still have the ambiguity between:K["x"]
and F["factors"]
for records (very useful for making loops on the fields).
Anyway this is not a problem as there is for K[x]
, where x
is an undefined token for the interpreter.
Another ambiguity isX := "a,b,c"; use QQ[X];
Even though I agree that ::=
is confusing, I think this new syntax my cause more confusion. And I'd rather concentrate on finding a pretty syntax for quotient rings.
#4 Updated by Anna Maria Bigatti over 7 years ago
Remember the syntax NewPolyRing(QQ, "x,y,z");
. That's very expressive!
#5 Updated by John Abbott over 7 years ago
- Status changed from New to In Progress
OBJ[string]
- if
OBJ
is a record then it is clear what to do - if
OBJ
is a ring then we build a polynomial ring - otherwise error
OBJ[int]
already has three meanings:
- if
OBJ
is a list then get the corresponding entry - if
OBJ
is an INTMAP then get the corresponding entry - if
OBJ
is a matrix then get the corresponding row - otherwise error
#6 Updated by John Abbott over 7 years ago
- Related to Design #997: Using protected variable names for "bound variables" (e.g. for, try...endtry) added
#7 Updated by Anna Maria Bigatti about 4 years ago
- Related to Feature #1330: New syntax for NewQuotientRing added
#8 Updated by Anna Maria Bigatti about 4 years ago
- Related to Support #1418: Manual entry for NewPolyRing added
#9 Updated by John Abbott over 3 years ago
- Related to Feature #657: use command, ring syntax, RingOf added
#10 Updated by John Abbott over 3 years ago
- Related to Feature #1503: More flexible ring creation syntax (after use or ::=) added