#15289: Implement indexed monoids
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: algebra | Resolution:
Keywords: days54 | Merged in:
Authors: Travis Scrimshaw | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/monoids/15289-indexed | 7d27baacb4721ee041162cb280b7ee48d2b0da34
Dependencies: #15309 #15169 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nthiery):
Remaining two questions about the user interface.
Currently, the arguments passed to construct a free * are:
{{{
def free(n=None, names='x', index_set=None, ...):
}}}
Here is a proposal for a variant:
{{{
def free(index_set=None, names=None, prefix='x', ...)
}}}
where:
- `index_set=n` is a short hand for `index_set=[0,...,n-1]` (or the
equivalent `IntegerRange`?)
- `index_set='x,y,z'` is a short hand for `names='x,y,z'`
- `names` can either be a string like `'x,y,z'` or a list or iterables
of `names`.
Advantages:
- This supports simultaneously `C.free(I)`, `C.free('x,y,z')`, and
`C.free(3)`, which are the most common use cases.
- This still supports `F.<x,y,z> = C.free()`.
- This is consistent with both `FreeModule(QQ, 3)` and
`CombinatorialFreeModule(QQ, I)`, as well as with the upcoming
`FreeModule(QQ,I)` which will call `IndexedFreeModule(QQ, I)`.
- There is a clear distinction between the prefix and the names.
Otherwise `names='x'` is ambiguous: a singleton list of names, or a
prefix?
Second point: I am hesitant about the `abelian` argument. With #10963,
I definitely would prefer:
{{{
Groups().Commutative().free()
}}}
to
{{{
Groups().free(abelian=True)
}}}
Maybe, as a more consistent temporary measure, we could use:
{{{
Groups().free(commutative=True)
}}}
Once the above is settled, I guess this ticket is good to go!
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/15289#comment:31>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.