# Obtaining mutation class of a quiver in Sage with Sage

Given a quiver $Q$ of finite mutation class (such as a Dynkin quiver), I want to use Sage to give me all quivers mutation equivalent to this quiver in terms of pictures. (I am using the Sage online cell for this https://sagecell.sagemath.org/ ) Here my attempts:

Attempt 1:

    Q = ClusterQuiver(['A',3])
Ts = Q.mutation_class()
[print(T) for T in Ts]


Attempt 2:

Q = ClusterQuiver(['A',3])
Ts = Q.mutation_class()
[plot(T) for T in Ts]


Both attempts do not work to produce visable pictures. Is there an easy fix? When I use Q.plot() , I get at least a picture of Q itself.

edit retag close merge delete

Sort by ยป oldest newest most voted

Try

graphics_array([plot(T) for T in Ts]).show(figsize=[3*len(Ts), 3], aspect_ratio=1)


or

cols = 10
rows = Integer(len(Ts)) // cols
graphics_array([plot(T) for T in Ts], ncols=cols).show(figsize=[3*cols, 3*rows], aspect_ratio=1)


or

for T in Ts:
T.plot().show()

more

Thank you very much. The first way works in the sage online cell, while the second outputs nothing (I dont know why). But there is a small problem: For big quivers the pictures are too small and barely visible. Is there an easy way to make them larger so that it might also work for quiver with around 6-8 vertices? Here an example showing that the sage online cell doesnt display things very nice:

Q = ClusterQuiver(['D',5])
Ts = Q.mutation_class()
graphics_array([plot(T) for T in Ts])

( 2024-02-09 09:24:32 +0200 )edit

( 2024-02-09 13:18:25 +0200 )edit

Thank you very much again! I noted that there is an error for E7:

Q = ClusterQuiver(['E',7])
Ts = Q.mutation_class()
graphics_array([plot(T) for T in Ts]).show(figsize=[3*len(Ts), 3], aspect_ratio=1)
display(len(Ts))


A last small question: Is there an easy command to filter out those quivers, which are not acyclic (as a directed graph)?

( 2024-02-09 13:51:58 +0200 )edit

You can add conditions to a list comprehension, e.g. [plot(T) for T in Ts if T.is_acyclic()] or [plot(T) for T in Ts if not T.is_acyclic()].

( 2024-02-09 14:04:31 +0200 )edit