**Definition 1**
Let $A$ be a (not necessarily commutative) ring.
Let $M$ be a left $A$-module.
Suppose $M \neq 0$ and $M$ has no proper $A$-submodule other than $0$.
Then we say $M$ is simple.

**Definition 2**
Let $A$ be a (not necessarily commutative) ring.
Let $M$ be a left $A$-module.
Let $M = M_0 \supset M_1 \supset ... \supset M_n = 0$ be a finite descending sequence of $A$-submodules.
If each $M_i/M_{i+1}, i = 0, 1, ..., n - 1$, is simple, this sequence is called a composition series of $M$.
The $n$ is called the length of the composition series.
We define the length of the $0$-module as $0$.

**Definition 3**
Let $A$ be a (not necessarily commutative) ring.
Let $M$ be a left $A$-module.
Suppose $M$ has a composition series, the lengths of each series are the same by Jordan-Holder theorem. We denote it by $leng_A M$ or $leng$ $M$.
If $M$ does not have a composition series, we define $leng_A M = \infty$.

**Lemma 1**
Let $A$ be a ring.
Let $M$ be a left $A$-module.
Let $M_1 \supset M_2$ be $A$-submodules of $M$.
Suppose $M_1/M_2$ is simple.
Let $N$ be an $A$-submodule of M.
Then $(M_1 + N)/(M_2 + N)$ is simple or $0$.

Proof:
Let $f:M_1 \rightarrow (M_1 + N)/(M_2 + N)$ be the restriction of the canonical morphism
$M_1 + N \rightarrow (M_1 + N)/(M_2 + N)$.
Since $f(M_2) = 0$, $f$ induces a morphism $g:M_1/M_2 \rightarrow (M_1 + N)/(M_2 + N)$.
Since $f$ is surjective, $g$ is also surjective.
Since $M_1/M_2$ is simple, the assertion follows.
**QED**

**Lemma 2**
Let $A$ be a ring.
Let $M$ be a left $A$-module.
Suppose $n = leng$ $M$ is finite.
Let $N$ be an $A$-submodule of $M$.
Then $leng$ $M/N \leq n$.

Proof:
This follows immediately from Lemma 1.

**Lemma 3**
Let $A$ be a ring.
Let $M$ be a left $A$-module.
Suppose $n = leng$ $M$ is finite.
Let $N$ be a proper $A$-sumodule of $M$.
Then $leng$ $N \leq n - 1$.

Proof:
We use induction on $n$.
If $n = 0$, the assertion is trivial.
Hence we assume $n \geq 1$.
Let $M = M_0 \supset M_1 \supset ... \supset M_n = 0$ be a composition series.
Since $leng$ $M_1 = n - 1$, if $N \subset M_1$, $leng$ $N \leq leng$ $M_1$ by the induction assumption.
Hence we can assume that $M_1 \neq N + M_1$.
Since $M_1 \subset N + M_1 \subset M$, $M = N + M_1$.
Since $N/(N \cap M_1)$ is isomorphic to $M/M_1$, it is simple.
Hence it suffices to prove that $leng$ $N \cap M_1 \leq n - 2$.
Suppose $N \cap M_1 = M_1$.
Then $N = M_1$ or $N = M$.
Since $N$ is a proper submodule, $N = M_1$.
But this contradicts our assumption.
Hence $N \cap M_1 \neq M_1$.
By the induction assumption, $leng$ $N \cap M_1 \leq n - 2$.
**QED**

**Lemma 4**
Let $A$ be a ring.
Let $M$ be a left $A$-module.
Suppose $leng$ $M$ is finite.
Let $N_1 \subset N_2$ be $A$-submodules of $M$.
Suppose $leng$ $N_1 = leng$ $N_2$.
Then $N_1 = N_2$.

Proof:
$leng$ $N_2 = leng$ $N_1 + leng$ $N_2/N_1$.
Hence $leng$ $N_2/N_1 = 0$.
Hence $N_1 = N_2$.
**QED**

**Lemma 5**
Let $A$ be a commutative ring.
Suppose $leng$ $A$ is finite.
Let $\Lambda$ be nonempty set of ideals of $A$.
Then there exists a maximal element in $\Lambda$.

Proof:
Let $r = sup$ {$leng$ $I$; $I \in \Lambda$}.
Since $r$ is finite, there exists $I \in \Lambda$ such that $r = leng$ $I$.
By Lemma 4, $I$ is a maximal element of $\Lambda$.
**QED**

**Lemma 6**
Let $A$ be a commutative ring.
Suppose $leng$ $A$ is finite.
Let $\Lambda$ be nonempty set of ideals of $A$.
Then there exist a minimal element in $\Lambda$.

Proof:
Let $r = inf$ {$leng$ $I$; $I \in \Lambda$}.
Since $r$ is finite, there exists $I \in \Lambda$ such that $r = leng$ $I$.
By Lemma 4, $I$ is a minimal element of $\Lambda$.
**QED**

**Lemma 7**
Let $A$ be a commutative ring.
Suppose $leng$ $A$ is finite.
Then every ideal of $A$ is finitely generated.

Proof:
Let $I$ be an ideal of $A$.
Let $\Lambda$ be the set of finitely generated ideals contained $I$.
Since $0 \in \Lambda$, $\Lambda$ is not empty.
By Lemma 5, there exitst a maximal element $I_0$ in $\Lambda$.
Suppose $I \neq I_0$.
There exists $x \in I - I_0$.
Let $I_1$ be the ideal generated by $I_0 \cup$ {$x$}.
Since $I_1 \in \Lambda$ and $I_1 \neq I_0$, this is a contradiction.
Hence $I = I_0$.
**QED**

**Lemma 8**
Let $A$ be a commutative ring.
Suppose $leng$ $A$ is finite.
Let $J$ be the intersection of all the maximal ideals of $A$.
Then there exists an integer $k \geq 1$ such that $J^k = J^{2k}$.

Proof:
Let $\Lambda$ = {$J^k; k = 1, 2, ...$}.
By Lemma 6, there exists a minimal $J^k$ in $\Lambda$.
Since $J^k = J^{k+1} = ...$, $J^k = J^{2k}$.
**QED**

**Proposition**
Let $A$ be a commutative ring.
Suppose $leng$ $A$ is finite.
Let $J$ be the intersection of all the maximal ideals of $A$.
Then $J$ is nilpotent.

Proof:
By Lemma 8, there exists an integer $k \geq 1$ such that $J^k = J^{2k}$.
Let $I = J^k$.
Then $I = I^2$.
By Lemma 7, I is finitely generated.
By Nakayama's lemma, there exists $r \in A$, such that $r \equiv 1$ (mod $I$) and $rI = 0$.
We claim that r is invertible.
If otherwise, $rA$ is a proper ideal.
By Lemma 5, there exists a maximal ideal $P$ such that $rA \subset P$.
Since $I \subset P$, $0 \equiv 1$ (mod $P$).
This is a contradiction.
Hence $r$ is invertible.
Since $rI = 0$, $I = 0$ as desired.
**QED**