Artificial intelligent assistant

Commutative Hereditary Rings > Is it true that the ring $\mathbb Z/n\mathbb Z$ ($n≠0$) is hereditary if and only if $n$ is square-free? The "if" part is OK to me because any field $\mathbb Z/p \mathbb Z$ ($p$ prime) is a PID, so a hereditary ring, and direct product of a finite number of hereditary rings is hereditary. For the converse I want some help, please! Thanks!

In general $R=\mathbb{Z}/n\mathbb{Z} \simeq \oplus_{i=1}^r \mathbb{Z}/p^{k_i}\mathbb{Z}$, where $n=p_1^{k_1} \dots p_r^{k_r}$ is the prime decomposition. Let $p^k$ be one of the prime factors. Then $\mathbb{Z}/p^k\mathbb{Z}$ has $\mathbb{Z}/p\mathbb{Z}$ as a sub-module, hence so does $R$. Now $R$ is itself a free, hence projective $R$-module, so if $R$ is hereditary, $\mathbb{Z}/p\mathbb{Z}$ is a direct summand of some $R^n$, which implies k=1.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c27b1eee8796ffbe7e111bdb110e266d