Dear All,

   I'm preparing a patch which allows one to use generic_power (computing a^n)
for monoids and even semi groups. So I had to change the handling of
particular cases (a=0 or n=0). After this change all tests passes except for
one in matrix_mod2_dense:
**********************************************************************
File "/usr/local/sage/devel/sage-combinat/sage/matrix/matrix_mod2_dense.pyx", 
line 755:
    sage: A^(-1)
Expected:
    Traceback (most recent call last):
    ...
    ZeroDivisionError
Got:
    []
**********************************************************************
Here is the corresponding code
    TESTS:
        sage: A = matrix(GF(2),0,0)
        sage: A^(-1)    
        Traceback (most recent call last):
        ...
        ZeroDivisionError
    
Note that with my patch it answers without touching the matrix code the empty
matrix "[]". Even if the set of 0x0 matrix seems to be a strange ring (I think
a ring has to contains at least two *different* elements 0 and 1), it is a
perfectly acceptable multiplicative group. From this point of view, the empty
matrix seems to be the correct answer. So I'm tempted to replace this test by
testing the 1x1 zero matrix.

So my question is the following: is there a specific reason why this test has
been written ?

Cheers,

Florent


P.S.: this raise another question: should I discuss this on the mailing-list
or submit the patch and let things to be discussed during the review ?

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to