Lifting matrices to SL2(Z)
Is there a way to lift a matrix in Sl2(Z/NZ) to SL2(Z) for an arbitrary N ?
I found this algorithm : here
But it seems to work only when N is prime. I think that the algorithm described in Shimura (which the implementation cited above is base on) works for arbitrary N. But I don't know how to modify the one above to make it work. Does anyone know how to do it.
Ultimately my goal is to iterate through a list of representatives of SL2(Z/24Z) in SL2(Z) so if anyone knows how to it without the above I would be equally (in fact probably more) grateful.
edit : Ok now I see at least one reason why the code mentionned above fails and in fact it isn't because of the arbitrary ring but because the smith normal form function doesn't return elements in SL2(Z) but only invertible matrices. Anyone knows how to bypass this ?