What is a good resource for computations in quadratic integer rings?

I am currently taking a course on arithmetic over domains and most of the exercises I have to solve involve things such as: check whether $5$ is a prime in $\mathbb{Z}[\sqrt{-7}]$, check whether it is irreducible, find the factorization of $633+135i$ into a product of irreducibles in $\mathbb{Z}[i]$, compute some gcd, etc.

I definitely understand how to do these, but I would like to know whether there is some software that can help me tackle such questions, i.e. if there is some software that can tell me whether $5$ is a prime in $\mathbb{Z}[\sqrt{-7}]$ and all the other things I listed. This would be really useful because it is frustrating to not be able to check whether your computations are correct when solving some problems (or wrongly conclude that some element is irreducible just because you messed up some diophantine equation).

The only computational algebra resources I have used so far have been the good old WolframAlpha (that doesn't do a really good job with quadratic integers) and Macaulay2 (this one only solves such tasks for polynomial rings as far as I know). I heard that PARI/GP can do the things I listed, but I tried to use it online and I couldn't figure it out. I also couldn't find any helpful guides on computations in quadratic integer rings, so this is why I decided to ask here.


Solution 1:

Are you really being asked if something is prime in $\mathbf Z[\sqrt{-7}]$ or did you just make up that example? I ask because $\mathbf Z[\sqrt{-7}]$ is not a UFD, so there is a distinction between primes and irreducibles.

By the way, how are you checking if something is prime in a quadratic ring? You wrote that you definitely know how to do this, but you didn’t indicate what it is you do.