Ideal Class Group Calculation: How to conclude the classes of two ideals are distinct I am frequently attempting to compute class groups, with a pretty standard approach:


*

*Calculate the Minkowski bound, and list the primes less than this bound.

*Factor $(p)$ into prime ideals (usually using Dedekind's criterion) for each prime $p$ less than the Minkowski bound.

*Conclude that the class group is generated by the factors of these $(p)$, and hence determine the group.
I do not understand how to show that ideal classes are distinct in general. For example, let $K=\mathbb{Q}(\sqrt{-23})$ with the ring of algebraic integers $O_K = \mathbb{Z}[\frac{1+\sqrt{23}}{2}]$. The discriminant is -23 and the Minkowski bound is less than 4. So, it will suffice to factor 2,3 into ideals, as the class group will be generated by such ideals.  Writing $\omega = \frac{1+\sqrt{23}}{2}$, I can show that $(2)=(2,\omega)(2,\bar\omega)$, $(3)=(3,2\omega)$, $(\omega)=(2,\omega)(3,\omega)$. 
By the factorisation of $(\omega)$, $[(3,\omega)]^{-1}=[(2,\omega)]$ in the class group. By the factorisation of $(2)$, $[(2,\omega)]=[(2,\bar\omega)]^{-1}$. Note that $(3,2\omega) \subset (3,\omega)$ so by primality these are equal, and $(3,\omega-1)=(3,2\omega-2)$ simlarly. By the factorisation of $(3)$, $[(3,\omega)]=[(3,\omega-1)]^{-1}$. 
So, comparing these equations I can conclude that $[(2,\bar\omega)]=[(3,\omega)], [(2,\omega)]=[(3,\omega-1)]$. 
Then, if I can show that $[(3,\omega)]\not = [(2,\omega)]$, I can conclude that the class group his $C_3$, but I don't know how to get this last step. This is purely an example of the problem that I am having; I would like to know in general how to deal with this sort of issue.
 A: I believe computer algebra packages use the class number formula. I don't know if this is just an efficiency thing or because you need to in order to systematically do the computation in general.
Since you're looking at imaginary quadratic fields, this has the simpler form
$$ h = \frac{w \sqrt{|d|}}{2\pi} L(1, \chi) $$
You presumably already know the number of roots of unity $w$ and the discriminant $d$, so all that's left is to obtain the value of the Dirichlet $L$-series $L(1, \chi)$.
Since $h$ has to divide the order of the group you've computed, you don't even need a good estimate of $L(1, \chi)$ in order to prove you've computed the class group — even knowing $L(1, \chi)$ to within a factor of $\sqrt{2}$ is enough to determine what the right value for $h$ is.
And if $h$ is the order of the group you've computed, then you have the correct class group.
But in the case of a quadratic field, the wiki page I link to gives a finite sum that should let you exactly calculate $L(1, \chi)$.

Note that for fields that aren't $\mathbb{Q}$ or imaginary quadratics, the regulator appears in this formula as well. Fortunately, the approach you describe to finding the class group is also an approach for finding the unit group, so you can do both at the same time.
A: I will answer your separate question here:
I think it is computationally efficient to find all elements of a given norm, up to multiplication by units. 
One possible speed up in your calculations: you can use the Kronecker lemma that says that if $F= \sum a_k x^k$ and $G= \sum b_l x^l$ are two polynomials then 
the  product ideal $(a_k) \cdot (b_l)$ is generated by the coefficients of $F\cdot G$. That speeds up raising to power $m$ an ideal given as generated by $2$ elements. You produce the $m$-th power as generated by $m+1$ elements, rather than $2^m$. 
As for the class number of quadratic fields, there are different algorithms. Some determine only the number, not the group structure. For instance the analytic class number formula. It should be fun to compare results obtained in different ways. 
A: A more computational approach, along the lines of your original formulation:
It always helps to write down the norm form, i.e. $\mathbf N^K_{\Bbb Q}(m+n\omega)=m^2+mn+6n^2$, where $\omega=\frac{1+\lambda}2$, $\lambda^2=-23$.
Since $2$ and $3$ both split, we have $(2)=\mathfrak p_2\overline{\mathfrak p_2}$ and $(3)=\mathfrak p_3\overline{\mathfrak p_3}$, and I’m setting $\mathfrak p_2=(2,\omega)$, $\overline{\mathfrak p_2}=(2,\bar\omega)$ as you have, and $\mathfrak p_3=(3,2\omega)=(3,\omega)$, $\overline{\mathfrak p_3}=(3,2\bar\omega)=(3,\bar\omega)$. As you note, $\overline{\mathfrak p_2}\sim\mathfrak p_2^{-1}$ and $\overline{\mathfrak p_3}\sim\mathfrak p_3^{-1}$, where I’m using “$\sim$” to say “in the same class as”.
When we calculate $\mathfrak p_2\mathfrak p_3$, we get
\begin{align}
\mathfrak p_2\mathfrak p_3&=(2,\omega)(3,\omega)\\
&=(6,3\omega,2\omega,\omega^2)\\
&=(6,\omega)=(\omega)\sim(1)\,,
\end{align}
since $6=\omega\bar\omega$. Thus $\mathfrak p_2\sim\overline{\mathfrak p_3}$ and $\overline{\mathfrak p_2}\sim\mathfrak p_3$.
We might finish off by verifying directly that $\mathfrak p_2^3\sim(1)$, even though I think that the foregoing shows this fact already. Certainly $\mathfrak p_2^2$ is not principal: its norm is $4$, and that would necessitate an integer of $K$ of norm $4$. But if you look at the norm form equation $m^2+mn+6n^2=4$, you see that the only solution in integers is $(2,0)$. On the other hand, there is a nontrivial solution of $m^2+mn+6n^2=8$, namely $(1,1)$, so that we expect to find something like
$\mathfrak p_2^3=(1+\omega)$ or else $\mathfrak p_2^3=(1+\bar\omega)$. Indeed,
\begin{align}
\mathfrak p_2^3=(2,\omega)^3&=(8,4\omega,2\omega^2,\omega^3)\\
&=(8,4\omega,-12+2\omega,-6-5\omega)\\
8/(1+\bar\omega)&=1+\omega\\
4\omega/(1+\bar\omega)&=-3+\omega\\
2\omega^2/(1+\bar\omega)&=-3-\omega\\
\omega^3/(1+\bar\omega)&=3-2\omega\,.
\end{align}
Unnecessarily long, I’ll admit, but it shows how things fit together.
