Design #647
Unique copies of free modules?
Description
Discuss having unique copies of free modules; or at least that the default creation mechanism should not produce distinct canonically isomorphic free modules.
Related issues
History
#1 Updated by John Abbott over 9 years ago
- a major use of modules in CoCoA is for syzygy modules (which have shifts in the homogeneous case) -- what to do about free modules which are identical except for the shifts?
#2 Updated by John Abbott over 9 years ago
- "create" a unique free module (of dim
n
over ringR
) -- a new free module is created the first time, thereafter a reference to that module is returned. - "create" a new free module (distinct from all other free modules created so far)
Approach (1) appears to need a sort of global registry; this is not ideal in a multithreaded setting, but I cannot imagine it'd ever be a bottleneck (who would ever create zillions of free modules?)
An alternative to approach (2) would be to have a function which "clones" an existing free module (perhaps changing the shifts?). Not sure this is a good idea.
#3 Updated by John Abbott over 9 years ago
Are the concepts of free module with shifts and free module without shifts distinct?
Note that the notion of shifts makes sense only if the underlying ring has a notion of degree.
If the two concepts are distinct; do we want to be able to "view" a free module with shifts as a free module without them? If so, how? C++ subclass?