AUTHORS:
Bases: sage.combinat.diagram_algebras.SubPartitionAlgebra
A Brauer algebra.
The Brauer algebra of rank is an algebra with basis indexed by the
collection of set partitions of
with block size 2.
This algebra is a subalgebra of the partition algebra. For more information, see PartitionAlgebra.
INPUT:
OPTIONAL ARGUMENTS:
EXAMPLES:
We now define the Brauer algebra of rank with parameter x over
:
sage: R.<x> = ZZ[]
sage: B = BrauerAlgebra(2, x, R)
sage: B
Brauer Algebra of rank 2 with parameter x over Univariate Polynomial Ring in x over Integer Ring
sage: B.basis()
Finite family {{{-2, -1}, {1, 2}}: B[{{-2, -1}, {1, 2}}], {{-2, 1}, {-1, 2}}: B[{{-2, 1}, {-1, 2}}], {{-2, 2}, {-1, 1}}: B[{{-2, 2}, {-1, 1}}]}
sage: b = B.basis().list()
sage: b
[B[{{-2, 1}, {-1, 2}}], B[{{-2, 2}, {-1, 1}}], B[{{-2, -1}, {1, 2}}]]
sage: b[2]
B[{{-2, -1}, {1, 2}}]
sage: b[2]^2
x*B[{{-2, -1}, {1, 2}}]
sage: b[2]^5
x^4*B[{{-2, -1}, {1, 2}}]
Bases: sage.combinat.free_module.CombinatorialFreeModule
Abstract class for diagram algebras and is not designed to be used directly. If used directly, the class could create an “algebra” that is not actually an algebra.
TESTS:
sage: import sage.combinat.diagram_algebras as da
sage: R.<x> = QQ[]
sage: D = da.DiagramAlgebra(2, x, R, 'P', da.partition_diagrams)
sage: sorted(D.basis())
[P[{{-2}, {-1}, {1}, {2}}],
P[{{-2}, {-1}, {1, 2}}],
P[{{-2}, {-1, 1}, {2}}],
P[{{-2}, {-1, 1, 2}}],
P[{{-2}, {-1, 2}, {1}}],
P[{{-2, -1}, {1}, {2}}],
P[{{-2, -1}, {1, 2}}],
P[{{-2, -1, 1}, {2}}],
P[{{-2, -1, 1, 2}}],
P[{{-2, -1, 2}, {1}}],
P[{{-2, 1}, {-1}, {2}}],
P[{{-2, 1}, {-1, 2}}],
P[{{-2, 1, 2}, {-1}}],
P[{{-2, 2}, {-1}, {1}}],
P[{{-2, 2}, {-1, 1}}]]
Bases: sage.combinat.free_module.CombinatorialFreeModuleElement
This subclass provides a few additional methods for partition algebra elements. Most element methods are already implemented elsewhere.
Return the underlying diagram of self if self is a basis element. Raises an error if self is not a basis element.
EXAMPLES:
sage: R.<x> = ZZ[]
sage: P = PartitionAlgebra(2, x, R)
sage: elt = 3*P([[1,2],[-2,-1]])
sage: elt.diagram()
{{-2, -1}, {1, 2}}
Return the diagrams in the support of self.
EXAMPLES:
sage: R.<x> = ZZ[]
sage: P = PartitionAlgebra(2, x, R)
sage: elt = 3*P([[1,2],[-2,-1]]) + P([[1,2],[-2], [-1]])
sage: elt.diagrams()
[{{-2}, {-1}, {1, 2}}, {{-2, -1}, {1, 2}}]
The following constructs the identity element of the diagram algebra.
It is not called directly; instead one should use DA.one() if DA is a defined diagram algebra.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: R.<x> = QQ[]
sage: D = da.DiagramAlgebra(2, x, R, 'P', da.partition_diagrams)
sage: D.one_basis()
{{-2, 2}, {-1, 1}}
Return the order of self.
The order of a partition algebra is defined as half of the number of nodes in the diagrams.
EXAMPLES:
sage: q = var('q')
sage: PA = PartitionAlgebra(2, q)
sage: PA.order()
2
Returns the product by two basis diagrams.
TESTS:
sage: import sage.combinat.diagram_algebras as da
sage: R.<x> = QQ[]
sage: D = da.DiagramAlgebra(2, x, R, 'P', da.partition_diagrams)
sage: sp = SetPartition([[1,2],[-1,-2]])
sage: D.product_on_basis(sp, sp)
x*P[{{-2, -1}, {1, 2}}]
Return the collection of underlying set partitions indexing the basis elements of a given diagram algebra.
TESTS:
sage: import sage.combinat.diagram_algebras as da
sage: R.<x> = QQ[]
sage: D = da.DiagramAlgebra(2, x, R, 'P', da.partition_diagrams)
sage: list(D.set_partitions()) == da.partition_diagrams(2)
True
Bases: sage.combinat.diagram_algebras.DiagramAlgebra
A partition algebra.
The partition algebra of rank is an algebra with basis indexed by the
collection of set partitions of
. Each
such set partition is regarded as a graph on nodes
arranged in two rows, with nodes
in the top
row from left to right and with nodes
in the bottom row
from left to right, and an edge connecting two nodes if and only if the
nodes lie in the same subset of the set partition.
The partition algebra is regarded as an example of a “diagram algebra” due to the fact that its natural basis is given by certain graphs often called diagrams.
The product of two basis elements is given by the rule
, where
is the composite set
partition obtained by placing diagram
above diagram
, identifying
the bottom row nodes of
with the top row nodes of
, and omitting
any closed “loops” in the middle. The number
is the number of
connected components of the omitted loops.
The parameter is a deformation parameter. Taking
produces the
semigroup algebra (over the base ring) of the partition monoid, in which
the product of two set partitions is simply given by their composition.
The Iwahori–Hecke algebra of type (with a single parameter) is
naturally a subalgebra of the partition algebra.
An excellent reference for partition algebras and its various subalgebras (Brauer algebra, Temperley–Lieb algebra, etc) is the paper [HR2005].
INPUT:
OPTIONAL ARGUMENTS:
EXAMPLES:
The following shorthand simultaneously define the univariate polynomial ring over the rationals as well as the variable x:
sage: R.<x> = PolynomialRing(QQ)
sage: R
Univariate Polynomial Ring in x over Rational Field
sage: x
x
sage: x.parent() is R
True
We now define the partition algebra of rank with parameter x
over
:
sage: R.<x> = ZZ[]
sage: P = PartitionAlgebra(2, x, R)
sage: P
Partition Algebra of rank 2 with parameter x over Univariate Polynomial Ring in x over Integer Ring
sage: P.basis().list()
[P[{{-2, -1, 1, 2}}], P[{{-2, -1, 2}, {1}}],
P[{{-2, -1, 1}, {2}}], P[{{-2}, {-1, 1, 2}}],
P[{{-2, 1, 2}, {-1}}], P[{{-2, 1}, {-1, 2}}],
P[{{-2, 2}, {-1, 1}}], P[{{-2, -1}, {1, 2}}],
P[{{-2, -1}, {1}, {2}}], P[{{-2}, {-1, 2}, {1}}],
P[{{-2, 2}, {-1}, {1}}], P[{{-2}, {-1, 1}, {2}}],
P[{{-2, 1}, {-1}, {2}}], P[{{-2}, {-1}, {1, 2}}],
P[{{-2}, {-1}, {1}, {2}}]]
sage: E = P([[1,2],[-2,-1]]); E
P[{{-2, -1}, {1, 2}}]
sage: E in P.basis()
True
sage: E^2
x*P[{{-2, -1}, {1, 2}}]
sage: E^5
x^4*P[{{-2, -1}, {1, 2}}]
sage: (P([[2,-2],[-1,1]]) - 2*P([[1,2],[-1,-2]]))^2
(4*x-4)*P[{{-2, -1}, {1, 2}}] + P[{{-2, 2}, {-1, 1}}]
One can work with partition algebras using a symbol for the parameter, leaving the base ring unspecified. This implies that the underlying base ring is Sage’s symbolic ring.
sage: q = var('q')
sage: PA = PartitionAlgebra(2, q); PA
Partition Algebra of rank 2 with parameter q over Symbolic Ring
sage: PA([[1,2],[-2,-1]])^2 == q*PA([[1,2],[-2,-1]])
True
sage: (PA([[2, -2], [1, -1]]) - 2*PA([[-2, -1], [1, 2]]))^2 == (4*q-4)*PA([[1, 2], [-2, -1]]) + PA([[2, -2], [1, -1]])
True
The identity element of the partition algebra is the diagram whose set
partition is :
sage: P = PA.basis().list()
sage: PA.one()
P[{{-2, 2}, {-1, 1}}]
sage: PA.one()*P[7] == P[7]
True
sage: P[7]*PA.one() == P[7]
True
We now give some further examples of the use of the other arguments. One may wish to “specialize” the parameter to a chosen element of the base ring:
sage: R.<q> = RR[]
sage: PA = PartitionAlgebra(2, q, R, prefix='B')
sage: PA
Partition Algebra of rank 2 with parameter q over
Univariate Polynomial Ring in q over Real Field with 53 bits of precision
sage: PA([[1,2],[-1,-2]])
1.00000000000000*B[{{-2, -1}, {1, 2}}]
sage: PA = PartitionAlgebra(2, 5, base_ring=ZZ, prefix='B')
sage: PA
Partition Algebra of rank 2 with parameter 5 over Integer Ring
sage: (PA([[2, -2], [1, -1]]) - 2*PA([[-2, -1], [1, 2]]))^2 == 16*PA([[-2, -1], [1, 2]]) + PA([[2, -2], [1, -1]])
True
REFERENCES:
[HR2005] | (1, 2) Tom Halverson and Arun Ram, Partition algebras. European Journal of Combinatorics 26 (2005), 869–921. |
Bases: sage.combinat.diagram_algebras.SubPartitionAlgebra
A planar algebra.
The planar algebra of rank is an algebra with basis indexed by the
collection of set partitions of
where each set partition is planar.
This algebra is thus a subalgebra of the partition algebra. For more information, see PartitionAlgebra.
INPUT:
OPTIONAL ARGUMENTS:
EXAMPLES:
We now define the planar algebra of rank with parameter
over
:
sage: R.<x> = ZZ[]
sage: Pl = PlanarAlgebra(2, x, R); Pl
Planar Algebra of rank 2 with parameter x over Univariate Polynomial Ring in x over Integer Ring
sage: Pl.basis().list()
[Pl[{{-2, -1, 1, 2}}], Pl[{{-2, -1, 2}, {1}}],
Pl[{{-2, -1, 1}, {2}}], Pl[{{-2}, {-1, 1, 2}}],
Pl[{{-2, 1, 2}, {-1}}], Pl[{{-2, 2}, {-1, 1}}],
Pl[{{-2, -1}, {1, 2}}], Pl[{{-2, -1}, {1}, {2}}],
Pl[{{-2}, {-1, 2}, {1}}], Pl[{{-2, 2}, {-1}, {1}}],
Pl[{{-2}, {-1, 1}, {2}}], Pl[{{-2, 1}, {-1}, {2}}],
Pl[{{-2}, {-1}, {1, 2}}], Pl[{{-2}, {-1}, {1}, {2}}]]
sage: E = Pl([[1,2],[-1,-2]])
sage: E^2 == x*E
True
sage: E^5 == x^4*E
True
Bases: sage.combinat.diagram_algebras.SubPartitionAlgebra
A propagating ideal.
The propagating ideal of rank is a non-unital algebra with basis
indexed by the collection of ideal set partitions of
. We say a set partition is ideal if its propagating
number is less than
.
This algebra is a non-unital subalgebra and an ideal of the partition algebra. For more information, see PartitionAlgebra.
EXAMPLES:
We now define the propagating ideal of rank with parameter
over
:
sage: R.<x> = QQ[]
sage: I = PropagatingIdeal(2, x, R); I
Propagating Ideal of rank 2 with parameter x over Univariate Polynomial Ring in x over Rational Field
sage: I.basis().list()
[I[{{-2, -1, 1, 2}}], I[{{-2, -1, 2}, {1}}],
I[{{-2, -1, 1}, {2}}], I[{{-2}, {-1, 1, 2}}],
I[{{-2, 1, 2}, {-1}}], I[{{-2, -1}, {1, 2}}],
I[{{-2, -1}, {1}, {2}}], I[{{-2}, {-1, 2}, {1}}],
I[{{-2, 2}, {-1}, {1}}], I[{{-2}, {-1, 1}, {2}}],
I[{{-2, 1}, {-1}, {2}}], I[{{-2}, {-1}, {1, 2}}],
I[{{-2}, {-1}, {1}, {2}}]]
sage: E = I([[1,2],[-1,-2]])
sage: E^2 == x*E
True
sage: E^5 == x^4*E
True
Bases: sage.combinat.diagram_algebras.DiagramAlgebra.Element
Need to take care of exponents since we are not unital.
The propagating ideal is a non-unital algebra, i.e. it does not have a multiplicative identity.
EXAMPLES:
sage: R.<q> = QQ[]
sage: I = PropagatingIdeal(2, q, R)
sage: I.one_basis()
Traceback (most recent call last):
...
ValueError: The ideal partition algebra is not unital
sage: I.one()
Traceback (most recent call last):
...
ValueError: The ideal partition algebra is not unital
Bases: sage.combinat.diagram_algebras.DiagramAlgebra
A subalgebra of the partition algebra indexed by a subset of the diagrams.
Return the partition algebra self is a sub-algebra of. Generally, this method is not called directly.
EXAMPLES:
sage: x = var('x')
sage: BA = BrauerAlgebra(2, x)
sage: BA.ambient()
Partition Algebra of rank 2 with parameter x over Symbolic Ring
Lift a diagram subalgebra element to the corresponding element in the ambient space. This method is not intended to be called directly.
EXAMPLES:
sage: R.<x> = QQ[]
sage: BA = BrauerAlgebra(2, x, R)
sage: E = BA([[1,2],[-1,-2]])
sage: lifted = BA.lift(E); lifted
B[{{-2, -1}, {1, 2}}]
sage: lifted.parent() is BA.ambient()
True
Retract an appropriate partition algebra element to the corresponding element in the partition subalgebra. This method is not intended to be called directly.
EXAMPLES:
sage: R.<x> = QQ[]
sage: BA = BrauerAlgebra(2, x, R)
sage: PA = BA.ambient()
sage: E = PA([[1,2], [-1,-2]])
sage: BA.retract(E) in BA
True
Bases: sage.combinat.diagram_algebras.SubPartitionAlgebra
A Temperley–Lieb algebra.
The Temperley–Lieb algebra of rank is an algebra with basis indexed
by the collection of planar set partitions of
with block size 2.
This algebra is thus a subalgebra of the partition algebra. For more information, see PartitionAlgebra.
INPUT:
OPTIONAL ARGUMENTS:
EXAMPLES:
We define the Temperley–Lieb algebra of rank with parameter
over
:
sage: R.<x> = ZZ[]
sage: T = TemperleyLiebAlgebra(2, x, R); T
Temperley-Lieb Algebra of rank 2 with parameter x over Univariate Polynomial Ring in x over Integer Ring
sage: T.basis()
Finite family {{{-2, 2}, {-1, 1}}: T[{{-2, 2}, {-1, 1}}], {{-2, -1}, {1, 2}}: T[{{-2, -1}, {1, 2}}]}
sage: b = T.basis().list()
sage: b
[T[{{-2, 2}, {-1, 1}}], T[{{-2, -1}, {1, 2}}]]
sage: b[1]
T[{{-2, -1}, {1, 2}}]
sage: b[1]^2 == x*b[1]
True
sage: b[1]^5 == x^4*b[1]
True
Return a list of all Brauer diagrams of order k.
A Brauer diagram of order is a partition diagram of order
with block size 2.
INPUT:
- k – the order of the Brauer diagrams
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.brauer_diagrams(2)
[{{-2, 1}, {-1, 2}}, {{-2, 2}, {-1, 1}}, {{-2, -1}, {1, 2}}]
sage: da.brauer_diagrams(5/2)
[{{-3, 3}, {-2, 1}, {-1, 2}}, {{-3, 3}, {-2, 2}, {-1, 1}}, {{-3, 3}, {-2, -1}, {1, 2}}]
Return a list of all “ideal” diagrams of order k.
An ideal diagram of order is a partition diagram of order
with
propagating number less than
.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.ideal_diagrams(2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, -1, 1}, {2}}, {{-2}, {-1, 1, 2}},
{{-2, 1, 2}, {-1}}, {{-2, -1}, {1, 2}}, {{-2, -1}, {1}, {2}},
{{-2}, {-1, 2}, {1}}, {{-2, 2}, {-1}, {1}}, {{-2}, {-1, 1}, {2}}, {{-2, 1},
{-1}, {2}}, {{-2}, {-1}, {1, 2}}, {{-2}, {-1}, {1}, {2}}]
sage: da.ideal_diagrams(3/2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, 1, 2}, {-1}}, {{-2, 2}, {-1}, {1}}]
Return the identity set partition
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.identity_set_partition(2)
{{-2, 2}, {-1, 1}}
Return True if the diagram corresponding to the set partition sp is planar; otherwise, it return False.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.is_planar( da.to_set_partition([[1,-2],[2,-1]]))
False
sage: da.is_planar( da.to_set_partition([[1,-1],[2,-2]]))
True
Return a graph consisting of the graphs of set partitions sp1 and sp2 along with edges joining the bottom row (negative numbers) of sp1 to the top row (positive numbers) of sp2.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: sp1 = da.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = da.to_set_partition([[1,-2],[2,-1]])
sage: g = da.pair_to_graph( sp1, sp2 ); g
Graph on 8 vertices
sage: g.vertices()
[(-2, 1), (-2, 2), (-1, 1), (-1, 2), (1, 1), (1, 2), (2, 1), (2, 2)]
sage: g.edges()
[((-2, 1), (1, 1), None), ((-2, 1), (2, 2), None),
((-2, 2), (1, 2), None), ((-1, 1), (1, 2), None),
((-1, 1), (2, 1), None), ((-1, 2), (2, 2), None)]
Return a list of all partition diagrams of order k.
A partition diagram of order to is a set partition of
. If we have
, then
a partition diagram of order
is a set partition of
with
and
in the same block. See [HR2005].
INPUT:
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.partition_diagrams(2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, -1, 1}, {2}},
{{-2}, {-1, 1, 2}}, {{-2, 1, 2}, {-1}}, {{-2, 1}, {-1, 2}},
{{-2, 2}, {-1, 1}}, {{-2, -1}, {1, 2}}, {{-2, -1}, {1}, {2}},
{{-2}, {-1, 2}, {1}}, {{-2, 2}, {-1}, {1}}, {{-2}, {-1, 1}, {2}},
{{-2, 1}, {-1}, {2}}, {{-2}, {-1}, {1, 2}}, {{-2}, {-1}, {1}, {2}}]
sage: da.partition_diagrams(3/2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, 2}, {-1, 1}},
{{-2, 1, 2}, {-1}}, {{-2, 2}, {-1}, {1}}]
Return a list of all planar diagrams of order k.
A planar diagram of order is a partition diagram of order
that has no crossings.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.planar_diagrams(2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, -1, 1}, {2}},
{{-2}, {-1, 1, 2}}, {{-2, 1, 2}, {-1}}, {{-2, 2}, {-1, 1}},
{{-2, -1}, {1, 2}}, {{-2, -1}, {1}, {2}}, {{-2}, {-1, 2}, {1}},
{{-2, 2}, {-1}, {1}}, {{-2}, {-1, 1}, {2}}, {{-2, 1}, {-1}, {2}},
{{-2}, {-1}, {1, 2}}, {{-2}, {-1}, {1}, {2}}]
sage: da.planar_diagrams(3/2)
[{{-2, -1, 1, 2}}, {{-2, -1, 2}, {1}}, {{-2, 2}, {-1, 1}},
{{-2, 1, 2}, {-1}}, {{-2, 2}, {-1}, {1}}]
Return the propagating number of the set partition sp.
The propagating number is the number of blocks with both a positive and negative number.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: sp1 = da.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = da.to_set_partition([[1,2],[-2,-1]])
sage: da.propagating_number(sp1)
2
sage: da.propagating_number(sp2)
0
Return a tuple consisting of the composition of the set partitions sp1 and sp2 and the number of components removed from the middle rows of the graph.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: sp1 = da.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = da.to_set_partition([[1,-2],[2,-1]])
sage: da.set_partition_composition(sp1, sp2) == (da.identity_set_partition(2), 0)
True
Return a list of all Temperley–Lieb diagrams of order k.
A Temperley–Lieb diagram of order is a partition diagram of order
with block size 2 and is planar.
INPUT:
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.temperley_lieb_diagrams(2)
[{{-2, 2}, {-1, 1}}, {{-2, -1}, {1, 2}}]
sage: da.temperley_lieb_diagrams(5/2)
[{{-3, 3}, {-2, 2}, {-1, 1}}, {{-3, 3}, {-2, -1}, {1, 2}}]
Same as to_set_partition() but assumes omitted elements are connected straight through.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.to_Brauer_partition([[1,2],[-1,-2]]) == SetPartition([[1,2],[-1,-2]])
True
sage: da.to_Brauer_partition([[1,3],[-1,-3]]) == SetPartition([[1,3],[-3,-1],[2,-2]])
True
sage: da.to_Brauer_partition([[1,2],[-1,-2]], k=4) == SetPartition([[1,2],[-1,-2],[3,-3],[4,-4]])
True
sage: da.to_Brauer_partition([[1,-4],[-3,-1],[3,4]]) == SetPartition([[-3,-1],[2,-2],[1,-4],[3,4]])
True
Return a graph representing the set partition sp.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: g = da.to_graph( da.to_set_partition([[1,-2],[2,-1]])); g
Graph on 4 vertices
sage: g.vertices()
[-2, -1, 1, 2]
sage: g.edges()
[(-2, 1, None), (-1, 2, None)]
Convert a list of a list of numbers to a set partitions. Each list of numbers in the outer list specifies the numbers contained in one of the blocks in the set partition.
If is specified, then the set partition will be a set partition
of
. Otherwise,
will default to
the minimum number needed to contain all of the specified numbers.
EXAMPLES:
sage: import sage.combinat.diagram_algebras as da
sage: da.to_set_partition([[1,-1],[2,-2]]) == da.identity_set_partition(2)
True