diff --git a/src/sage/combinat/posets/poset_examples.py b/src/sage/combinat/posets/poset_examples.py index 49f20332646..f57bf96db00 100644 --- a/src/sage/combinat/posets/poset_examples.py +++ b/src/sage/combinat/posets/poset_examples.py @@ -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. @@ -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""" diff --git a/src/sage/combinat/root_system/coxeter_group.py b/src/sage/combinat/root_system/coxeter_group.py index 386dd8aff24..88b5a3b147b 100644 --- a/src/sage/combinat/root_system/coxeter_group.py +++ b/src/sage/combinat/root_system/coxeter_group.py @@ -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) - diff --git a/src/sage/combinat/root_system/coxeter_matrix.py b/src/sage/combinat/root_system/coxeter_matrix.py index 9b57ca65795..92d92ca8c77 100644 --- a/src/sage/combinat/root_system/coxeter_matrix.py +++ b/src/sage/combinat/root_system/coxeter_matrix.py @@ -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. @@ -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. diff --git a/src/sage/groups/matrix_gps/coxeter_group.py b/src/sage/groups/matrix_gps/coxeter_group.py index b14f3802df6..c69bbb43dc5 100644 --- a/src/sage/groups/matrix_gps/coxeter_group.py +++ b/src/sage/groups/matrix_gps/coxeter_group.py @@ -256,9 +256,9 @@ 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']) @@ -266,9 +266,9 @@ def __init__(self, coxeter_matrix, base_ring, index_set): 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)) @@ -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)