cleanup ntheory typechecking
add jacobi, legendre, kronecker