Code accompaining the paper "The principal ideal problem for endomorphism rings of superspecial abelian varieties". This code contains some function for solving the principal ideal problem and the kernel to matrix problem in dimension 2. We refer to the paper for a more detailed explanation of the functions.
pip.py: main algorithmsideals.py: ideals helpersmisc.py: generic helpersbench.py: test functionsqmat_iso.pyandqmat_iso_q.py: isomorphisms between quaternion orders modulo n and 2x2 matrices
The following files can be used to test and benchmark the code, and as an example for its usage:
test_square.py: tests the functionfill_squareon random O0-ideals, checking that the matrix output has the correct norm and that the first column generates the input ideal; it also computes average timings and output sizes veryfing the claims of Sec. 4.4test_kernel.py: generates a pair of points(P, Q)ofl-torsion and checks that the functionkernel_to_matrixreturns a matrix of normlwith(P, Q)as a kernel
To run the tests simply run sage test_xxx.py or sage --python -O test_xxx.py
to skip assertions.