Helper functions for mutation types of quivers#

This file contains helper functions for detecting the mutation type of a cluster algebra or quiver.

For the compendium on the cluster algebra and quiver package see [MS2011]

AUTHORS:

  • Gregg Musiker

  • Christian Stump

sage.combinat.cluster_algebra_quiver.mutation_type.is_mutation_finite(M, nr_of_checks=None)[source]#

Use a non-deterministic method by random mutations in various directions. Can result in a wrong answer.

Warning

This method modifies the input matrix M!

INPUT:

  • nr_of_checks – (default: None) number of mutations applied. Standard is 500*(number of vertices of self).

ALGORITHM:

A quiver is mutation infinite if and only if every edge label (a,-b) satisfy a*b > 4. Thus, we apply random mutations in random directions

EXAMPLES:

sage: from sage.combinat.cluster_algebra_quiver.mutation_type import is_mutation_finite

sage: Q = ClusterQuiver(['A',10])                                               # needs sage.modules
sage: M = Q.b_matrix()                                                          # needs sage.modules
sage: is_mutation_finite(M)                                                     # needs sage.modules
(True, None)

sage: # needs sage.modules
sage: Q = ClusterQuiver([(0,1),(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(2,9)])
sage: M = Q.b_matrix()
sage: is_mutation_finite(M)  # random
(False, [9, 6, 9, 8, 9, 4, 0, 4, 5, 2, 1, 0, 1, 0, 7, 1, 9, 2, 5, 7, 8, 6, 3, 0, 2, 5, 4, 2, 6, 9, 2, 7, 3, 5, 3, 7, 9, 5, 9, 0, 2, 7, 9, 2, 4, 2, 1, 6, 9, 4, 3, 5, 0, 8, 2, 9, 5, 3, 7, 0, 1, 8, 3, 7, 2, 7, 3, 4, 8, 0, 4, 9, 5, 2, 8, 4, 8, 1, 7, 8, 9, 1, 5, 0, 8, 7, 4, 8, 9, 8, 0, 7, 4, 7, 1, 2, 8, 6, 1, 3, 9, 3, 9, 1, 3, 2, 4, 9, 5, 1, 2, 9, 4, 8, 5, 3, 4, 6, 8, 9, 2, 5, 9, 4, 6, 2, 1, 4, 9, 6, 0, 9, 8, 0, 4, 7, 9, 2, 1, 6])
>>> from sage.all import *
>>> from sage.combinat.cluster_algebra_quiver.mutation_type import is_mutation_finite

>>> Q = ClusterQuiver(['A',Integer(10)])                                               # needs sage.modules
>>> M = Q.b_matrix()                                                          # needs sage.modules
>>> is_mutation_finite(M)                                                     # needs sage.modules
(True, None)

>>> # needs sage.modules
>>> Q = ClusterQuiver([(Integer(0),Integer(1)),(Integer(1),Integer(2)),(Integer(2),Integer(3)),(Integer(3),Integer(4)),(Integer(4),Integer(5)),(Integer(5),Integer(6)),(Integer(6),Integer(7)),(Integer(7),Integer(8)),(Integer(2),Integer(9))])
>>> M = Q.b_matrix()
>>> is_mutation_finite(M)  # random
(False, [9, 6, 9, 8, 9, 4, 0, 4, 5, 2, 1, 0, 1, 0, 7, 1, 9, 2, 5, 7, 8, 6, 3, 0, 2, 5, 4, 2, 6, 9, 2, 7, 3, 5, 3, 7, 9, 5, 9, 0, 2, 7, 9, 2, 4, 2, 1, 6, 9, 4, 3, 5, 0, 8, 2, 9, 5, 3, 7, 0, 1, 8, 3, 7, 2, 7, 3, 4, 8, 0, 4, 9, 5, 2, 8, 4, 8, 1, 7, 8, 9, 1, 5, 0, 8, 7, 4, 8, 9, 8, 0, 7, 4, 7, 1, 2, 8, 6, 1, 3, 9, 3, 9, 1, 3, 2, 4, 9, 5, 1, 2, 9, 4, 8, 5, 3, 4, 6, 8, 9, 2, 5, 9, 4, 6, 2, 1, 4, 9, 6, 0, 9, 8, 0, 4, 7, 9, 2, 1, 6])

Check that Issue #19495 is fixed:

sage: dg = DiGraph(); dg.add_vertex(0); S = ClusterSeed(dg); S                  # needs sage.modules
A seed for a cluster algebra of rank 1
sage: S.is_mutation_finite()                                                    # needs sage.modules
True
>>> from sage.all import *
>>> dg = DiGraph(); dg.add_vertex(Integer(0)); S = ClusterSeed(dg); S                  # needs sage.modules
A seed for a cluster algebra of rank 1
>>> S.is_mutation_finite()                                                    # needs sage.modules
True
sage.combinat.cluster_algebra_quiver.mutation_type.load_data(user=True)[source]#

Load a dict with keys being tuples representing exceptional QuiverMutationTypes, and with values being lists or sets containing all mutation equivalent quivers as dig6 data.

We check

  • the data stored by the user (unless user=False was given)

  • and the data installed by the optional package database_mutation_class.

INPUT:

  • user – boolean (default: True) whether to look at user data. If not, only consider the optional package.

EXAMPLES:

sage: from sage.combinat.cluster_algebra_quiver.mutation_type import load_data
sage: load_data(2) # random - depends on the data the user has stored
{('G', 2): [('AO', (((0, 1), (1, -3)),)), ('AO', (((0, 1), (3, -1)),))]}
>>> from sage.all import *
>>> from sage.combinat.cluster_algebra_quiver.mutation_type import load_data
>>> load_data(Integer(2)) # random - depends on the data the user has stored
{('G', 2): [('AO', (((0, 1), (1, -3)),)), ('AO', (((0, 1), (3, -1)),))]}