Ticket #6442 (new defect)
Random(?) index error with determinant method
Description
On some occasions, the call A.det() for a matrix A results in an error, namely:
IndexError?: list index out of range
The error occurs during the dictionary lookup. It seems that rather than finding no item (and hence creating a new one and then computing determinant), an empty item D is found and indexing into D results in the error.
If run into this strange problem twice during the SAGE Days 16. I've attached an example file to this email, which contains a saved matrix. The code
sage: A = load("DetBugMatrix?.sobj") sage: A.det()
should trigger the problem. If I recall correctly, I obtained the matrix from the following code
sage: R = Zp(p=5,prec=3,type="capped-abs",print_mode="series") sage: A = random_matrix(R, 10, 10)
Strangely enough (although perhaps not that strange after checking that the error happens during the lookup), the call A.copy().det() returns the determinant without any problems.
I have no clue as to how one could systematically reproduce the bug.
In case it may help, I downloaded SAGE 4.0.2 and built it locally. The machine used is a Lenovo T500 laptop with two intel centrino, running Ubuntu. If there's any further information that would help, please let me know.

