Definition 1
Tag 04BM, permanent. Cite it as [Bourbaki, Tag 04BM].
Commutative Algebra, chapter II, § 5. Finitely generated projective modules. Invertible fractional ideals
Let P be a finitely generated projective A-module. For every prime ideal of A, the rank of the free -module is called the rank of P at and is denoted by .
By Theorem 1 the integer-valued function is locally constant on ; it is therefore constant if is connected and in particular if the ring is an integral domain (§ 4, no. 3, Corollary 2 to Proposition 15).
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.