Skip to content

Commit

Permalink
Trac #24032: add noncrossing partition lattices to poset catalog
Browse files Browse the repository at this point in the history
and make them work for Coxeter groups

URL: https://trac.sagemath.org/24032
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Christian Stump
  • Loading branch information
Release Manager authored and vbraun committed Oct 20, 2017
2 parents bd56550 + 6f990dc commit 071f175
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 6 deletions.
22 changes: 22 additions & 0 deletions src/sage/combinat/posets/poset_examples.py
Expand Up @@ -35,6 +35,7 @@
:meth:`~Posets.IntegerCompositions` | Return the poset of integer compositions of `n`.
:meth:`~Posets.IntegerPartitions` | Return the poset of integer partitions of ``n``.
:meth:`~Posets.IntegerPartitionsDominanceOrder` | Return the lattice of integer partitions on the integer `n` ordered by dominance.
:meth:`~Posets.NoncrossingPartitions` | Return the poset of noncrossing partitions of a finite Coxeter group ``W``.
:meth:`~Posets.PentagonPoset` | Return the Pentagon poset.
:meth:`~Posets.RandomLattice` | Return a random lattice on `n` elements.
:meth:`~Posets.RandomPoset` | Return a random poset on `n` elements.
Expand Down Expand Up @@ -1157,6 +1158,27 @@ def CoxeterGroupAbsoluteOrderPoset(W, use_reduced_words=True):
return Poset({s: s.absolute_covers() for s in W}, element_labels)
return Poset({s: s.absolute_covers() for s in W})

@staticmethod
def NoncrossingPartitions(W):
"""
Return the lattice of noncrossing partitions.
INPUT:
- ``W`` -- a finite Coxeter group or a Weyl group
EXAMPLES::
sage: W = CoxeterGroup(['A', 3])
sage: posets.NoncrossingPartitions(W)
Finite lattice containing 14 elements
sage: W = WeylGroup(['B', 2], prefix='s')
sage: posets.NoncrossingPartitions(W)
Finite lattice containing 6 elements
"""
return W.noncrossing_partition_lattice()

@staticmethod
def SymmetricGroupAbsoluteOrderPoset(n, labels="permutations"):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/combinat/root_system/coxeter_group.py
Expand Up @@ -160,4 +160,3 @@ def CoxeterGroup(data, implementation="reflection", base_ring=None, index_set=No

from sage.structure.sage_object import register_unpickle_override
register_unpickle_override('sage.combinat.root_system.coxeter_group', 'CoxeterGroupAsPermutationGroup', ReflectionGroup)

17 changes: 16 additions & 1 deletion src/sage/combinat/root_system/coxeter_matrix.py
Expand Up @@ -905,7 +905,7 @@ def is_simply_laced(self):

def is_crystallographic(self):
"""
Return if ``self`` is crystallographic.
Return whether ``self`` is crystallographic.
A Coxeter matrix is crystallographic if all non-diagonal entries
are either 2, 4, or 6.
Expand All @@ -921,6 +921,21 @@ def is_crystallographic(self):
L = [1, 2, 3, 4, 6]
return all(x in L for row in self for x in row)

def is_irreducible(self):
"""
Return whether ``self`` is irreducible.
A Coxeter matrix is irreducible if the Coxeter graph is connected.
EXAMPLES::
sage: CoxeterMatrix([['F',4],['A',1]]).is_irreducible()
False
sage: CoxeterMatrix(['H',3]).is_irreducible()
True
"""
return self.coxeter_graph().is_connected()

def is_finite(self):
"""
Return if ``self`` is a finite type or ``False`` if unknown.
Expand Down
10 changes: 6 additions & 4 deletions src/sage/groups/matrix_gps/coxeter_group.py
Expand Up @@ -256,19 +256,19 @@ def __init__(self, coxeter_matrix, base_ring, index_set):
We check that :trac:`16630` is fixed::
sage: CoxeterGroup(['D',4], base_ring=QQ).category()
Category of finite coxeter groups
Category of finite irreducible coxeter groups
sage: CoxeterGroup(['H',4], base_ring=QQbar).category()
Category of finite coxeter groups
Category of finite irreducible coxeter groups
sage: F = CoxeterGroups().Finite()
sage: all(CoxeterGroup([letter,i]) in F
....: for i in range(2,5) for letter in ['A','B','D'])
True
sage: all(CoxeterGroup(['E',i]) in F for i in range(6,9))
True
sage: CoxeterGroup(['F',4]).category()
Category of finite coxeter groups
Category of finite irreducible coxeter groups
sage: CoxeterGroup(['G',2]).category()
Category of finite coxeter groups
Category of finite irreducible coxeter groups
sage: all(CoxeterGroup(['H',i]) in F for i in range(3,5))
True
sage: all(CoxeterGroup(['I',i]) in F for i in range(2,5))
Expand Down Expand Up @@ -318,6 +318,8 @@ def val(x):
category = category.Finite()
else:
category = category.Infinite()
if self._matrix.is_irreducible():
category = category.Irreducible()
self._index_set_inverse = {i: ii for ii,i in enumerate(self._matrix.index_set())}
FinitelyGeneratedMatrixGroup_generic.__init__(self, ZZ(n), base_ring,
gens, category=category)
Expand Down

0 comments on commit 071f175

Please sign in to comment.