where p ranges over the set of prime ideals (resp. maximal ideals) of A.
b) The mapping p↦dpAp(Mp) of Spec(A) into Z is upper semi-continuous.
Let us prove a). Let n be an integer ⩾0. Suppose that one has dpA(M)<n. For every prime ideal p of A and every Ap-module Q, the Ap-module ExtAn(Mp,Q) is isomorphic to (ExtAn(M,Q))p (Prop. 2), hence is zero; one deduces the inequality
Let us prove b). Let p be a prime ideal of A and n = dp_{A_p}(M_p). Let us show that there exists a neighbourhood U of p in Spec(A) such that one has dp_{A_q}(M_q) \leq n for every q \in U. This is clear if n = +\infty ; if n = -\infty , this follows from the fact that the support of M is closed. Suppose now that n is finite and choose an exact sequence of A-modules
Pn−1dn−1Pn−2⟶…⟶P0d0M→0,
where the P_i are free of finite type (A, X, p. 53, Prop. 6). Put P = Ker d_{n-1} ; this is a module of finite presentation. The A_p-module P_p is projective (A, X, p. 134, Prop. 1), hence free (II, § 3, No. 2, Cor. 2 of Prop. 5). By II, § 5, No. 1, Cor. of Prop. 2, there exists an element f of A - p such that the A_f-module P_f is free; the A_q-module P_q is then free for every element q of the open set U of Spec(A) formed by the prime ideals not containing f . This proves b).
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.