arithmetic.clj: finished diagonalization function and did some cleanups