I rebased the patch to 5.1.beta5. In particular, this patch removes the line from matrix2.pyx
that producses the offending output
sage -t "devel/sage-main/sage/matrix/matrix2.pyx"
**********************************************************************
File "/home/vbraun/opt/sage-5.1.beta5/devel/sage-main/sage/matrix/matrix2.pyx", line 9813:
sage: L
Expected:
[ 3 0 0]
[ 4*a^2 + 1 1 0]
[ 3*a + 2 a^2 + 2*a + 3 3]
Got:
[ 2 0 0]
[ a^2 + 4 1 0]
[ 2*a + 3 a^2 + 2*a + 3 2]
**********************************************************************
The Cholesky decomposition is not unique over finite fields and we shouldn't test for the output (which can be random depending on which square-root is chosen) but test for L*LT == A. This is done by the line after the line removed in this patch. Hence, correctness is checked. Note that I discussed this off-list Rob Beezer who is the author of the line removed in this patch.