I am a bit confused with the procedure of calculating the ideal class group of a quadratic field.
From what I understood the computation starts by finding the Minkowski's bound say $n$. Then we list all the primes up to $n$ and we claim that every ideal class in the class group will be represented by a prime ideal whose norm is a prime of our list. Then we find all of those and multiply them to figure out the multiplication table and we are done. What I don't like about that is the following:
Minkowski's bound tells us that in each class there is an integral ideal with norm less than $n$. However is not clear that in a given class there will be a prime ideal that will have norm less than $n$.
I am aware that every class contains prime ideals but I don't know what we can say about their norm and the method I described above makes sense to me only if we can always find a prime ideal with norm less than $n$.
So either I misunderstood something or given an integral ideal of norm less than $n$ I can always find a prime ideal in the same ideal class with norm less than $n$ so that it indeed suffices to just consider the prime ideals. Can anyone please clarify?
Edit: I have just read a post of calculating the ideal class group of $\mathbb{Q}(\sqrt{-103})$ (Ideal class group of $\mathbb{Q}(\sqrt{-103})$). Here OP starts as I say by remarking that it suffices to do the calculation just by considering prime ideals of norm $< n = 6$. Then he figures out that the only prime ideals with that property are $P = \left(2, \frac{2 + \sqrt{-103}}{2}\right)$ and its conjugate.He then proceeds to calculate $P^k$ and this turns out to be non trivial for $k<5$. But for me this contradicts the initial assumption that it suffices to do the calculation just for prime ideals. That is because for example we have $[P^2]\neq [P]$(or [$\bar P$]) but norm$(P^2) = 4$. Hence $P^2$ is an integral ideal that dosen't have in it's class a prime ideal with norm less than $n=6$. So as long as I am concerned there might also be an integral (not prime) ideal $I$ of norm say $2$ such that $I$ is not principal and $[I]\neq[P]$. The situation I just described wouldn't happen if we could assume that for each class of ideals there is a prime ideal of norm less than $n=6$. But the example I discussed above with $P^2$ shows that this result does not hold. So what is going on I am getting really confused about this stuff?
Thanks in advance.