Patch for Sage 4.7
This is a workaround for this very unfortunate bug in Sage, based on Sage 4.7. The patch is a horrible kludge (it just turns multi-modular matrix multiplication off completely) but will at least fix the problem until I get time to work up a proper patch. Save the file, remove the ‘.txt’ extension, clone a new copy of Sage, and then apply the patch using:
hg_sage.apply("<full-path-and-filename.patch>")
from the Sage command line.