Proposition 5
Tag 0742, permanent. Cite it as [Bourbaki, Tag 0742].
Algebra, VII, p. 21, § 4. Finitely generated modules over a principal ideal domain
Let be a principal ideal domain, and a linear map of rank from a free -module of rank into a free -module of rank . Then there exist bases () of and () of such that for and for , where the are nonzero elements of , each of which divides the next; the ideals are the invariant factors of in , and are thus uniquely determined.
Let be the kernel of ; the quotient is isomorphic to the module , which is a submodule of and so free (VII, p. 15, Cor. 2); thus has a complement in (II, p. 218, Prop. 21), and the restriction of to is an isomorphism from onto . If the ideals () are the invariant factors of in , then Th. 1 of VII, p. 18 shows that there exists a basis () of such that () is a basis of . Since the restriction of to is an isomorphism from onto , there exists a basis () of such that . This basis extends to a basis () of by taking () to be a basis of the kernel .
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.