Feature #1503
More flexible ring creation syntax (after use or ::=)
Description
This request comes from Florian Walsh.
The suggestion is permit the following syntax:
use QQ(a,b)[x,y];
which is intended to be shorthand for the cumbersome
QQab ::= Q[a,b]; k := NewFractionField(QQab); use k[x,y];
Note that the cumbersome approach also uses two variables (and someone has to think of names for them).
Related issues
History
#1 Updated by John Abbott over 3 years ago
- Related to Feature #657: use command, ring syntax, RingOf added
#2 Updated by John Abbott over 3 years ago
- Related to Feature #1003: New syntax for creating poly rings? added
#3 Updated by John Abbott over 3 years ago
We discussed this over lunch today.
JAA thinks that this is not incompatible with #657.
Which term order should be used in the implicitly created ring QQ[a,b]
?
JAA thinks the default order can be used; if the user really wants to specify some other order then the current "cumbersome" approach can be used.
If we want to implement this then we must change the parser/interpreter... ouch!
Relevant places in the source code are:Parser.C: 356
inside parseUseStatement
Parser.C: 1397
inside parseFunBodyStatement
Parser.C: 1428
inside parseRingDefinition
Looks pretty scary to me!
#4 Updated by John Abbott over 3 years ago
How flexible/limited should a new syntax be?
Should it be possible to make arbitrarily long extensions? Such as
QQ(a)[x](b)[y][z]
A first attempt should probably allow just two levels (incl.
QQ[x][y]
???)
JAA is inclined to exclude quotient rings; so it would not be possible to write something like
(QQ[sqrt2]/ideal(sqrt2^2-2))[x]