Todo
AUTHORS:
Bases: sage.geometry.polyhedron.parent.Polyhedra_QQ_ppl
Parent of Associahedra of specified dimension
EXAMPLES:
sage: from sage.combinat.root_system.associahedron import Associahedra
sage: parent = Associahedra(QQ,2); parent
Polyhedra in QQ^2
sage: type(parent)
<class 'sage.combinat.root_system.associahedron.Associahedra_with_category'>
sage: parent(['A',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 ValueError is raised:
sage: parent(['A',3])
Traceback (most recent call last):
...
ValueError: V-representation data requires a list of length ambient_dim
alias of Associahedron_class
Construct an associahedron
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
is one way to realize the classical associahedron as defined in Wikipedia article Associahedron
A polytopal realization of the associahedron can be found in [CFZ]. The implementation is based on [CFZ, Theorem 1.5, Remark 1.6, and Corollary 1.9.].
EXAMPLES:
sage: Asso = 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: Associahedron(['B',2]) Generalized associahedron of type ['B', 2] with 6 vertices
The two pictures of [CFZ] can be recovered with:
sage: Asso = Associahedron(['A',3]); Asso
Generalized associahedron of type ['A', 3] with 14 vertices
sage: Asso.plot()
Graphics3d Object
sage: Asso = Associahedron(['B',3]); Asso
Generalized associahedron of type ['B', 3] with 20 vertices
sage: Asso.plot()
Graphics3d Object
TESTS::
sage: sorted(Associahedron(['A',3]).vertices())
[A vertex at (-3/2, 0, -1/2), A vertex at (-3/2, 0, 3/2),
A vertex at (-3/2, 1, -3/2), A vertex at (-3/2, 2, -3/2),
A vertex at (-3/2, 2, 3/2), A vertex at (-1/2, -1, -1/2),
A vertex at (-1/2, 0, -3/2), A vertex at (1/2, -2, 1/2),
A vertex at (1/2, -2, 3/2), A vertex at (3/2, -2, 1/2),
A vertex at (3/2, -2, 3/2), A vertex at (3/2, 0, -3/2),
A vertex at (3/2, 2, -3/2), A vertex at (3/2, 2, 3/2)]
sage: sorted(Associahedron(['B',3]).vertices())
[A vertex at (-3, 0, 0), A vertex at (-3, 0, 3),
A vertex at (-3, 2, -2), A vertex at (-3, 4, -3),
A vertex at (-3, 5, -3), A vertex at (-3, 5, 3),
A vertex at (-2, 1, -2), A vertex at (-2, 3, -3),
A vertex at (-1, -2, 0), A vertex at (-1, -1, -1),
A vertex at (1, -4, 1), A vertex at (1, -3, 0),
A vertex at (2, -5, 2), A vertex at (2, -5, 3),
A vertex at (3, -5, 2), A vertex at (3, -5, 3),
A vertex at (3, -3, 0), A vertex at (3, 3, -3),
A vertex at (3, 5, -3), A vertex at (3, 5, 3)]
sage: Associahedron(['A',4]).f_vector()
(1, 42, 84, 56, 14, 1)
sage: Associahedron(['B',4]).f_vector()
(1, 70, 140, 90, 20, 1)
REFERENCES:
- [CFZ] Chapoton, Fomin, Zelevinsky - Polytopal realizations of
generalized associahedra, arXiv:0202004.
Bases: sage.geometry.polyhedron.backend_ppl.Polyhedron_QQ_ppl
The Python class of an associahedron
You should use the Associahedron() convenience function to construct associahedra from the Cartan type.
TESTS:
sage: Asso = Associahedron(['A',2]); Asso
Generalized associahedron of type ['A', 2] with 5 vertices
sage: TestSuite(Asso).run()
Returns the Cartan type
EXAMPLES:
sage: Associahedron(['A',3]).cartan_type()
['A', 3]
Returns the vertices of self as elements in the root space
EXAMPLES:
sage: Asso = 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])