Project

General

Profile

Feature #451

Port function NewSymbol/NewSymbols to CoCoA-5

Added by Anna Maria Bigatti about 10 years ago. Updated over 8 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
CoCoA-5 function: new
Target version:
Start date:
28 Feb 2014
Due date:
% Done:

10%

Estimated time:
Spent time:

Description

In CoCoALib there are functions for making anonynous symbols (i.e. name of indeterminates).
Should we port them to CoCoA-5?
They are useful for making temporary polynomial rings (which should not be visible to the final user) ensuring no name conflict for symbols.

History

#1 Updated by Anna Maria Bigatti about 10 years ago

I'm already writing the code (taking some rust off my C++) and I'll wait for JAA's approval ;-)

#2 Updated by Anna Maria Bigatti about 10 years ago

  • Target version set to CoCoA-5.1.0 Easter14
  • % Done changed from 0 to 10

I think I made a fool of myself: we cannot have anonymous symbols in CoCoA because we do not have symbols. (we just use strings for names)
That's why what I thought to be a trivial function turned out to be so difficult to compile!

All the same: we should invent a mechanism to allow these temporary rings with anonymous indets. So this task is now a design issue. (much more difficult)

#3 Updated by John Abbott about 10 years ago

One possible solution is to supply an "impossible name" for those indets we want to be "anonymous".

An impossible name could be:
  • an empty string;
  • a special string;
  • a value which is not a string.

A related question: might we want to create two or more rings using the same "anonymous symbol"? If so, perhaps we could use the special string "#" to mean a new anonymous symbol, and "#[3]" to recall a pre-existing anonymous symbol (gives error if the index has not yet been issued). This syntax is similar to the syntax used when printing anonymous symbols.

#4 Updated by John Abbott about 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.?.?

#5 Updated by John Abbott over 8 years ago

  • Status changed from New to In Progress

Recall that the use command automatically sets CoCoA-5 variables whose names coincide with the indets. What will happen if some of the indets are "anonymous"?

Assuming an "anonymous" indet has a "strange" name, the standard mechanism of setting CoCoA-5 variables will not work (since a variable cannot have a "strange" name). This may not matter too much, since the setting of the CoCoA-5 variables is simply a convenience for the user; the anon indet can always be accessed via the indet(..) function, though it might be a little tedious determining precisely which index to give.

Maybe there should be a function which returns a list of the indices of the anon indets? (empty list if there are none?)

Also available in: Atom PDF