I know the following Theorem:
Let $R$ be an integral domain with 1$\neq$0. Let $p_{1}$,...,$p_{n}$ and $q_{1}$,...$q_{m}$be prime elements $R$ such that $$p_{1}....p_{n}=uq_{1}...q_{m}$$
for some unit $u$ in R. Then $m=n$ and there exists a pertmutation $\sigma \in S_{n}$ such that $p_{i}$ and $q_{\sigma (i)}$ are
associate in $R$ for $i = 1,..., n$.
Now, I want to prove the following:
Let $R$ be an integral domain with 1$\neq$0. Let $p_{1}$,...,$p_{n}$ be prime elements and $q_{1}$,...$q_{m}$ be irreducible elements of $R$ such that $$p_{1}....p_{n}=uq_{1}...q_{m}$$
for some unit $u$ in R. Then $m=n$ and there exists a pertmutation $\sigma \in S_{n}$ such that $p_{i}$ and $q_{\sigma (i)}$ are
associate in $R$ for $i = 1,..., n$.
My Attempt:
We divide the problem in three cases: $m>n, m=n, m<n$. If we show that $n\ngtr m$ and $n\nless m$. Then, $m=n$.
Case 1:$m<n$:
Since, $p_{i}$ is a non-zero, non-unit prime element. Therefore, $p_{i}\nmid u$ $\forall i$ ,$i=1,2,...,n$.
Now, $p_{1}$ is a prime element. Therefore, $p_{1}|q_{i_{1}}$
$\Rightarrow q_{i_{1}}= p_{1}u_{1}$ for $u_{1}\in R$. Now $q_{i_{1}}$ is irreducible and $p_{1}$ is not a unit. Therefore $u_{1}$ is a unit in R.
$\Rightarrow p_{2}p_{3}...p_{n}=uu_{1}\Pi _{j\neq i_{1}}q_{j}$. Repaeating the above argument for $m$ steps, we get
$$p_{m+1}...p_{n}=uu_{1}...u_{m}$$$\Rightarrow p_{m+1},...,p_{n}$ are units. Therefore, a contradiction.
Hence, $m\nless n$.
Case 2:$m>n$:
Since, $p_{i}$ is a non-zero, non-unit prime element. Therefore, $p_{i}\nmid u$ $\forall i$ ,$i=1,2,...,n$.
Now, $p_{1}$ is a prime element. Therefore, $p_{1}|q_{i_{1}}$
$\Rightarrow q_{i_{1}}= p_{1}u_{1}$ for $u_{1}\in R$. Now $q_{i_{1}}$ is irreducible and $p_{1}$ is not a unit. Therefore $u_{1}$ is a unit in R.
$\Rightarrow p_{2}p_{3}...p_{n}=uu_{1}\Pi _{j\neq i_{1}}q_{j}$. Repaeating the above argument for $n$ steps, we get $$1=uu_{1}...u_{n}q_{1}..\hat{q_{i_{1}}}\hat{q_{i_{2}}}...\hat{q_{i_{n}}}....q_{m}$$
Now, I am unable to proceed further.
Please help me to get through this proof.
The product of non-invertible elements in an integral domain is non-invertible.
Let $1=uu_1...u_nq_{n+1}...q_m$ with $q_i$ irreducible, so non-unit and thus not-invertible, and $u_i$ units.
Then $(uu_1...u_n)^{-1}=q_{n+1}...q_m$ and the left side exists and is obviously invertible, contradiction.