Ask Your Question

Revision history [back]

Reducing an expressing modulo a variable expression

I have some integer matrices, and I am interested in their behaviour mod p^2. I have declared variables using var('p a11 a12 a13, ...') etc, and after multiplying my matrices I am left with some very messy entries, involving lots of p^2,p^3,... terms. Since I only care about behaviour mod p^2, I would like Sage to just ignore those higher order terms. I feel like there must be an easy way to do this, but I don't know what it is. Any help would be much appreciated!