# Ticket #11122: trac_11122-demazure_product-cs.patch

File trac_11122-demazure_product-cs.patch, 2.2 KB (added by stumpc5, 11 years ago)
• ## sage/categories/coxeter_groups.py

# HG changeset patch
diff --git a/sage/categories/coxeter_groups.py b/sage/categories/coxeter_groups.py
 a class CoxeterGroups(Category): from sage.sets.family import Family return Family(self.index_set(), lambda i: self.simple_projection(i, side = side, toward_max = toward_max)) def demazure_product(self, Q): r""" Returns the Demazure product of the list Q in self. The Demazure product \delta is recursively defined as follows: - if Q is empty: \delta(Q) = 1 - if Q equals Q' \cup \{ s \}: - if \ell(\delta(Q')s) < \ell(\delta(Q')): \delta(Q') - if \ell(\delta(Q')s) > \ell(\delta(Q')): \delta(Q')s` EXAMPLES:: sage: W = CoxeterGroup(['A',2],index_set=[1,2]) sage: w = W.demazure_product([2,2,1]) sage: w.reduced_word() word: 21 sage: w = W.demazure_product([2,1,2,1,2]) sage: w.reduced_word() word: 121 sage: W = CoxeterGroup(['B',2],index_set=[1,2]) sage: w = W.demazure_product([2,1,2,1,2]) sage: w.reduced_word() word: 2121 """ Q = [ x for x in Q ] I = self.index_set() if not all( i in I for i in Q ): raise ValueError, "All elements in Q = %s must be contained in the index set of %s"%(Q,self) if len(Q) == 0: return self.one() else: i = Q.pop(-1) w = self.demazure_product(Q) if i in w.descents(side='right'): return w else: return w.apply_simple_reflection(i,side="right") def bruhat_interval(self, x, y): """ Returns the list of t such that x <= t <= y.