#20489: A and B bases for Iwahori-Hecke algebras
-------------------------------------+-------------------------------------
       Reporter:  andrew.mathas      |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  combinatorics      |   Resolution:
       Keywords:  Iwahori-Hecke      |    Merged in:
  algebra                            |    Reviewers:
        Authors:  Andrew Mathas      |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  74ba6e2f2c7cf9cf1a63f654ba8fd108407416f9
  u/andrew.mathas/TwoIwahoriHeckeBases|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by andrew.mathas):

 Replying to [comment:8 tscrim]:
 >
 > IMO a better test would be
 > {{{#!python
 > R = self.base_ring()
 > try:
 >     R.one() / R(2)
 > except ZeroDivisionError:
 >     raise ValueError("2 must be invertible")
 > }}}

 Thanks Travis. I realised that this doesn't catch 2 not being invertible
 in ZZ, for example, but a slight variation catches both cases:
 {{{#!python
 try:
     R(R.one()/2)
 except (TypeError, ZeroDivisionError):
     raise TypeError('The A-basis is defined only when 2 is invertible ')
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/20489#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to