My aim is to check whether a matrix (i.e. a 2D array) modulo d is Symplectic (see condition on wikipedia: https://en.wikipedia.org/wiki/Symplectic_matrix). That is, whether there is any Symplectic matrix in the set of matrices that are element-wise equal modulo some number d.
Is there any logical and especially efficient way to check such a condition involving matrixmultiplication without the need to loop through (possible) infinite matrices? The target language is Julia, however, if anyone has a python solution that's fine as well. The condition without modulo d condition in Julia is now implemented this way (with tolerance 0.001 and M an 2n x 2n array):
omega = [zeros((n,n)) Matrix(1I, n, n)); -Matrix(1I, n, n) zeros((n,n))]
isSymplec = maximum(abs.(transpose(M)*(omega*M) - omega)) < 0.001
Just as an simple example: The array/matrix [1 0 0 0; 1 1 0 0; 0 0 1 1; 0 0 0 1] is not symplectic but has a modulo 2 symplectic "equivalent" partner: [1 0 0 0; 1 1 0 0; 0 0 1 -1; 0 0 0 1]