proof of Nakayama’s lemma
Let be a minimal set of generators for , in the sense that is not generated by any proper subset of .
Elements of can be written as linear combinations , where .
Suppose that . Since , we can express as a such a linear combination:
Moving the term involving to the left, we have
But , so is invertible, say with inverse
.Therefore,
But this means that is redundant as a generator of , and so is generated by the subset . This contradicts the minimality of .
We conclude that and therefore .