#12630: Add representations of quivers and quiver algebras to sage
-------------------------------------------------+-------------------------
Reporter: JStarx | Owner:
Type: enhancement | AlexGhitza
Priority: major | Status:
Component: algebra | needs_work
Keywords: algebra, quiver, module, | Milestone: sage-5.13
days49 | Resolution:
Authors: Jim Stark, Simon King, | Merged in:
Mathieu Guay-Paquet, Aladin Virmaux | Reviewers: Simon
Report Upstream: N/A | King
Branch: | Work issues:
Dependencies: #12412, #12413, #14806 | Commit:
| Stopgaps:
-------------------------------------------------+-------------------------
Comment (by SimonKing):
Hi Nathann,
I had recently focused on different things, but now want to resume work
here---and need some pointers/advice from you.
Replying to [comment:131 ncohen]:
> Well. As a DiGraph user I would personally prefer "path magma", because
even if I have no idea what a path magma is there is "path" in there at
least. "free small category" really rings no bell at all.
I somehow agree. An argument against "path magma" was the fact that this
particular magma is associative. And "associative path magma" sounds not
good to me.
> But well.. It's not mine to decide `^^;`
>
> What about `path_monoid` (if it is a monoid) ? `:-P`
This would have been my choice, too. But sadly it is a monoid if and only
if the quiver has precisely one vertex (which is certainly not always the
case).
> > - `.quiver_algebra(R)` (or just `.algebra(R)`?): Return the monomial
algebra
> > over R whose monomials are given by the free small category
>
> What about `path_alebra` ?
> http://en.wikipedia.org/wiki/Quiver_(mathematics)#Path_algebra
I'd totally agree. However, note that the original code is due to Jim
Stark, and he chose to call it quiver algebra/representation. I refactored
the code and added "free small category", but I think it would be undue to
change the terminology of the pre-existing stuff.
> > - `.quiver_representation(...)`: Create a module over the quiver
algebra.
>
> To me this should be `.quiver_algebra().representation()`.
To me as well. But it seems that some people really think of it in terms
of the graph.
> > Right, you could always say that you have a class `FreeSmallCategory`
> > inheriting from `UniqueRepresentation`, and then
`G.free_small_category()`
> > should return `FreeSmallCategory(G)` if G is immutable,
> > but `FreeSmallCategory(immutable_copy(G))` otherwise.
>
> Yep ! And I swear, it's cheap. And much more efficient than current
graphs.
It could be that you have answered the following question already; in this
case please give me a remainder: Is #14806 really enough to have immutable
graphs, in the sense of "official methods such as `add_vertex` will not be
able to change the ==- and cmp-classes of the graph"?
Note that I don't care about the possibility to have mutable labels and
change these in-place. This is a misuse that is in the user's own
responsibility.
If you answer this question affirmatively, then the question is what we
shall do with the hash:
{{{
sage: g = graphs.CompleteGraph(400)
sage: gi = Graph(g,data_structure="static_sparse")
sage: hash(gi)
Traceback (most recent call last):
...
TypeError: graphs are mutable, and thus not hashable
}}}
So, if you answer my question affirmatively, then apparently the flag
`gi._immutable` should be set to `True` when using the immutable graph
backend. Shall I open a new ticket for this?
And what is the preferred way of creating an immutable copy? Is it (as
above) `Graph(g, data_structure="static_sparse")`? Or is there a faster
way to create an immutable copy?
Best regards,
Simon
--
Ticket URL: <http://trac.sagemath.org/ticket/12630#comment:132>
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/groups/opt_out.