Take any two non-zero ideals $I$ and $J$ in $R$. Since we know that ideals in a Dedekind domain factors uniquely into prime ideals
$$I = \prod_i P_i^{m_i}, J = \prod_i P_i^{n_i}$$
where $P_i$’s are distinct non-zero prime ideals in $R$ and $m_i, n_i \in \mathbb{Z}$, then the greatest common divisor and least common multiple of $I$ and $J$ are respectively as following,
$\gcd(I,J)=I+J=\prod_i P_i^{\min(n_i,m_i)}, \operatorname{lcm}(I,J)=I\cap J= \prod_i P_i^{\max(n_i,m_i)}.$
How do we get $\gcd(I, J)=I+J=\prod_i P_i^{\min(n_i,m_i)}$
and
$\operatorname{lcm}(I,J)=I\cap J=\prod_i P_i^{\max(n_i,m_i)}$ ?