Associahedron¶
Todo
- fix adjacency matrix 
- edit graph method to get proper vertex labellings 
- UniqueRepresentation? 
AUTHORS:
- Christian Stump 
- sage.combinat.root_system.associahedron.Associahedra(base_ring, ambient_dim, backend='ppl')[source]¶
- Construct a parent class of Associahedra according to - backend.- See also 
- class sage.combinat.root_system.associahedron.Associahedra_base[source]¶
- Bases: - object- Base class of parent of Associahedra of specified dimension - EXAMPLES: - sage: from sage.combinat.root_system.associahedron import Associahedra sage: parent = Associahedra(QQ,2,'ppl'); parent Polyhedra in QQ^2 sage: type(parent) <class 'sage.combinat.root_system.associahedron.Associahedra_ppl_with_category'> sage: parent(['A',2]) Generalized associahedron of type ['A', 2] with 5 vertices - >>> from sage.all import * >>> from sage.combinat.root_system.associahedron import Associahedra >>> parent = Associahedra(QQ,Integer(2),'ppl'); parent Polyhedra in QQ^2 >>> type(parent) <class 'sage.combinat.root_system.associahedron.Associahedra_ppl_with_category'> >>> parent(['A',Integer(2)]) Generalized associahedron of type ['A', 2] with 5 vertices - Importantly, the parent knows the dimension of the ambient space. If you try to construct an associahedron of a different dimension, a - ValueErroris raised:- sage: parent(['A',3]) Traceback (most recent call last): ... ValueError: V-representation data requires a list of length ambient_dim - >>> from sage.all import * >>> parent(['A',Integer(3)]) Traceback (most recent call last): ... ValueError: V-representation data requires a list of length ambient_dim 
- class sage.combinat.root_system.associahedron.Associahedra_cdd(base_ring, ambient_dim, backend)[source]¶
- Bases: - Associahedra_base,- Polyhedra_QQ_cdd- Element[source]¶
- alias of - Associahedron_class_cdd
 
- class sage.combinat.root_system.associahedron.Associahedra_field(base_ring, ambient_dim, backend)[source]¶
- Bases: - Associahedra_base,- Polyhedra_field- Element[source]¶
- alias of - Associahedron_class_field
 
- class sage.combinat.root_system.associahedron.Associahedra_normaliz(base_ring, ambient_dim, backend)[source]¶
- Bases: - Associahedra_base,- Polyhedra_QQ_normaliz- Element[source]¶
- alias of - Associahedron_class_normaliz
 
- class sage.combinat.root_system.associahedron.Associahedra_polymake(base_ring, ambient_dim, backend)[source]¶
- Bases: - Associahedra_base,- Polyhedra_polymake- Element[source]¶
- alias of - Associahedron_class_polymake
 
- class sage.combinat.root_system.associahedron.Associahedra_ppl(base_ring, ambient_dim, backend)[source]¶
- Bases: - Associahedra_base,- Polyhedra_QQ_ppl- Element[source]¶
- alias of - Associahedron_class_ppl
 
- sage.combinat.root_system.associahedron.Associahedron(cartan_type, backend='ppl')[source]¶
- Construct an associahedron. - The generalized associahedron is a polytopal complex with vertices in one-to-one correspondence with clusters in the cluster complex, and with edges between two vertices if and only if the associated two clusters intersect in codimension 1. - The associahedron of type \(A_n\) is one way to realize the classical associahedron as defined in the Wikipedia article Associahedron. - A polytopal realization of the associahedron can be found in [CFZ2002]. The implementation is based on [CFZ2002], Theorem 1.5, Remark 1.6, and Corollary 1.9. - INPUT: - cartan_type– a cartan type according to- sage.combinat.root_system.cartan_type.CartanTypeFactory
- backend– string (- 'ppl'); the backend to use; see- sage.geometry.polyhedron.constructor.Polyhedron()
 - EXAMPLES: - sage: Asso = polytopes.associahedron(['A',2]); Asso Generalized associahedron of type ['A', 2] with 5 vertices sage: sorted(Asso.Hrepresentation(), key=repr) [An inequality (-1, 0) x + 1 >= 0, An inequality (0, -1) x + 1 >= 0, An inequality (0, 1) x + 1 >= 0, An inequality (1, 0) x + 1 >= 0, An inequality (1, 1) x + 1 >= 0] sage: Asso.Vrepresentation() (A vertex at (1, -1), A vertex at (1, 1), A vertex at (-1, 1), A vertex at (-1, 0), A vertex at (0, -1)) sage: polytopes.associahedron(['B',2]) Generalized associahedron of type ['B', 2] with 6 vertices - >>> from sage.all import * >>> Asso = polytopes.associahedron(['A',Integer(2)]); Asso Generalized associahedron of type ['A', 2] with 5 vertices >>> sorted(Asso.Hrepresentation(), key=repr) [An inequality (-1, 0) x + 1 >= 0, An inequality (0, -1) x + 1 >= 0, An inequality (0, 1) x + 1 >= 0, An inequality (1, 0) x + 1 >= 0, An inequality (1, 1) x + 1 >= 0] >>> Asso.Vrepresentation() (A vertex at (1, -1), A vertex at (1, 1), A vertex at (-1, 1), A vertex at (-1, 0), A vertex at (0, -1)) >>> polytopes.associahedron(['B',Integer(2)]) Generalized associahedron of type ['B', 2] with 6 vertices - The two pictures of [CFZ2002] can be recovered with: - sage: Asso = polytopes.associahedron(['A',3]); Asso Generalized associahedron of type ['A', 3] with 14 vertices sage: Asso.plot() # long time Graphics3d Object sage: Asso = polytopes.associahedron(['B',3]); Asso Generalized associahedron of type ['B', 3] with 20 vertices sage: Asso.plot() # long time Graphics3d Object - >>> from sage.all import * >>> Asso = polytopes.associahedron(['A',Integer(3)]); Asso Generalized associahedron of type ['A', 3] with 14 vertices >>> Asso.plot() # long time Graphics3d Object >>> Asso = polytopes.associahedron(['B',Integer(3)]); Asso Generalized associahedron of type ['B', 3] with 20 vertices >>> Asso.plot() # long time Graphics3d Object 
- class sage.combinat.root_system.associahedron.Associahedron_class_base(parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds)[source]¶
- Bases: - object- The base class of the Python class of an associahedron - You should use the - Associahedron()convenience function to construct associahedra from the Cartan type.- cartan_type()[source]¶
- Return the Cartan type of - self.- EXAMPLES: - sage: polytopes.associahedron(['A',3]).cartan_type() ['A', 3] - >>> from sage.all import * >>> polytopes.associahedron(['A',Integer(3)]).cartan_type() ['A', 3] 
 - vertices_in_root_space()[source]¶
- Return the vertices of - selfas elements in the root space.- EXAMPLES: - sage: Asso = polytopes.associahedron(['A',2]) sage: Asso.vertices() (A vertex at (1, -1), A vertex at (1, 1), A vertex at (-1, 1), A vertex at (-1, 0), A vertex at (0, -1)) sage: Asso.vertices_in_root_space() (alpha[1] - alpha[2], alpha[1] + alpha[2], -alpha[1] + alpha[2], -alpha[1], -alpha[2]) - >>> from sage.all import * >>> Asso = polytopes.associahedron(['A',Integer(2)]) >>> Asso.vertices() (A vertex at (1, -1), A vertex at (1, 1), A vertex at (-1, 1), A vertex at (-1, 0), A vertex at (0, -1)) >>> Asso.vertices_in_root_space() (alpha[1] - alpha[2], alpha[1] + alpha[2], -alpha[1] + alpha[2], -alpha[1], -alpha[2]) 
 
- class sage.combinat.root_system.associahedron.Associahedron_class_cdd(parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds)[source]¶
- class sage.combinat.root_system.associahedron.Associahedron_class_field(parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds)[source]¶
- class sage.combinat.root_system.associahedron.Associahedron_class_normaliz(parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds)[source]¶
- class sage.combinat.root_system.associahedron.Associahedron_class_polymake(parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds)[source]¶