Project

General

Profile

Feature #812

PPMonoid pseudo-ctor without explicit ordering

Added by John Abbott over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
New Function
Target version:
Start date:
23 Nov 2015
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Mario asked about having an easy way to create a PPMonoid without specifying explicitly the ordering (or even the names of the indets). He notes that we do allow a PolyRing to be created specifying just the number of indets: for instance PPM(NewPolyRing(ZZ,10)) will create a PPMonoid with 10 indets using StdDegRevLex.

He is hoping for something as simple as NewPPMonoidEv(10) to create a PPMonoid with 10 indets (called x[0] to x[9]) and with the default ordering StdDegRevLex.

Discuss; implement if appropriate.


Related issues

Related to CoCoALib - Feature #320: PPMonoid pseudo-ctors without symbol namesRejected2013-02-21

History

#1 Updated by John Abbott over 8 years ago

I note that in issue #320 the main reason for rejection is that J and A disagreed about what symbol names should be used.

We could slightly modify Mario's request:
have new pseudo-ctors which do not need the ordering (the default ordering will be StdDegRevLex), so one could write NewPPMonoidEv(SymbolRange("x",1,10)) or NewPPMonoidEv(NewSymbols(10)). This is certainly longer than just NewPPMonoidEv(10), but it does make explicit the names of the indets.

What do you think?

#2 Updated by Anna Maria Bigatti over 8 years ago

John Abbott wrote:

We could slightly modify Mario's request:
have new pseudo-ctors which do not need the ordering (the default ordering will be StdDegRevLex), so one could write NewPPMonoidEv(SymbolRange("x",1,10)) or NewPPMonoidEv(NewSymbols(10)). This is certainly longer than just NewPPMonoidEv(10), but it does make explicit the names of the indets.

Yes!

#3 Updated by John Abbott over 8 years ago

What about NewPPMonoid("x", 10) as a shorthand for NewPPMonoid(SymbolRange("x",0,10-1), StdDegRevLex)?
Or should it be NewPPMonoid(SymbolRange("x",1,10), StdDegRevLex)?

Mario says that whatever we offer for NewPolyRing, we should offer the equivalent for NewPPMonoid. Indeed, one of Scott Meyers's videos implies more or less the same thing.

#4 Updated by Anna Maria Bigatti over 8 years ago

John Abbott wrote:

What about NewPPMonoid("x", 10) as a shorthand for NewPPMonoid(SymbolRange("x",0,10-1), StdDegRevLex)?
Or should it be NewPPMonoid(SymbolRange("x",1,10), StdDegRevLex)?

Indeed, I think NewPPMonoid("x", 10) is ambiguous.
If we want this kind of syntax then it should be NewPPMonoid("x", from, to)

Mario says that whatever we offer for NewPolyRing, we should offer the equivalent for NewPPMonoid. Indeed, one of Scott Meyers's videos implies more or less the same thing.

I believe he's right, but I didn't realize it wasn't already like that... ;-)

#5 Updated by John Abbott over 8 years ago

A (minor) disadvantage of having to pass in a vector of symbol when creating a PPMonoid is that the monoid is obliged to check that the symbols are distinct and compatible (fixed arity for a given head). This can become a bit costly when there are many (thousands) indets; nevertheless the cost was not prohibitive even when I created a poly ring with 1000000 indets.

#6 Updated by Anna Maria Bigatti over 8 years ago

John Abbott wrote:

A (minor) disadvantage of having to pass in a vector of symbol when creating a PPMonoid is that the monoid is obliged to check that the symbols are distinct and compatible (fixed arity for a given head). This can become a bit costly when there are many (thousands) indets; nevertheless the cost was not prohibitive even when I created a poly ring with 1000000 indets.

with the syntax NewPPMonoid("x", from, to) it would not need to check.

Also available in: Atom PDF