Project

General

Profile

Feature #1003

New syntax for creating poly rings?

Added by John Abbott about 7 years ago. Updated about 7 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
enhancing/improving
Target version:
Start date:
27 Jan 2017
Due date:
% Done:

10%

Estimated time:
Spent time:

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

Related to CoCoA-5 - Design #997: Using protected variable names for "bound variables" (e.g. for, try...endtry)Closed2017-01-18

Related to CoCoALib - Feature #1330: New syntax for NewQuotientRingClosed2019-10-08

Related to CoCoA-5 - Support #1418: Manual entry for NewPolyRingNew2020-02-15

Related to CoCoA-5 - Feature #657: use command, ring syntax, RingOfNew2015-01-20

Related to CoCoA-5 - Feature #1503: More flexible ring creation syntax (after use or ::=)New2020-10-08

History

#1 Updated by John Abbott about 7 years ago

Some advantages are:
  • 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 call ComputeResultIn(QQ["a,b,c"])
Some disadvantages are:
  • 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 about 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 about 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 is
X := "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 about 7 years ago

Remember the syntax NewPolyRing(QQ, "x,y,z");. That's very expressive!

#5 Updated by John Abbott about 7 years ago

  • Status changed from New to In Progress
I do not believe that there will be ambiguity: consider the expression 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
Note that 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 about 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 almost 4 years ago

#8 Updated by Anna Maria Bigatti almost 4 years ago

#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

Also available in: Atom PDF