I'm working through Fulton's intersection theory book and I've been stuck on the end of Prop 1.7, i.e. that flat pullbacks commute with proper pushforwards for fibre squares. Specifically I understand why it's enough to show that $f'_{*}[X']=d[Y']$, where X,Y are varieties of the same dimension, $f:X\rightarrow Y$ is surjective proper map and $f_{*}[X]=d[Y]$. But this amounts to showing that $d \mathcal l(\mathcal O_{Y_{j}',Y'})=\sum_{X_{i}'\rightarrow Y_j'} \mathcal l(\mathcal O_{X'_i,X'})\deg(X'_i/Y'_j)$, where that sum is over the irreducible components $X_i'$ of $X'$ that map onto the irreducible component $Y_j'$ of $Y'$, and $\mathcal l$ stands for the lengths of those rings over themselves. I don't know how to reduce this to the local calculation Fulton describes, nor how he uses that alegbraic lemma from the appendix to show it once we're in the described local ring case. Can someone please explain this for me? Thanks
My answer will be based on the script of an intersection theory class by Professor Barbara Fantechi found here: http://www.cmi.ac.in/~asengupta/int.pdf (see page 4). The proof of the central Lemma will be very technical and if I have overlooked something please point it out in the comment section. The crucial point in the argument is the reduction to a local ring computation. For this reduction, the following Lemma is the key: Lemma: Let $X,Y$ be separated, finite type schemes over a field $k$ equidimensional of the same dimension and let $f: X \to Y$ be a dominant morphism. Let $Y' \subset Y$ be an irreducible component and $A=\mathcal{O}_{Y',Y}$ be the local ring at its generic point. Note that we have a canonical map $\text{Spec}(A) \to Y$. Then when we do the cartesian product of $f$ with this map, we have $$\text{Spec}(A) \times_Y X = \text{Spec}( \prod_i \mathcal O_{X_i,X}),$$ where the $X_i$ are the irreducible components of $X$ mapping dominantly to $Y'$. Note that for $f$ proper $B=\prod_i \mathcal O_{X_i,X}$ contains all the information we need to compute the coefficient of $(Y')^{red}$ in $f_* [X]$, namely the multiplicity $l(\mathcal O_{X_i,X})$ of $X_i^{red}$ in $[X]$ and the degree of the field extension $[R(X_i^{red}):R((Y')^{red})]=[R(\mathcal O_{X_i,X}):R(A)]$, where $R$ denotes the function field and the total quotient ring respectively. Let me do the desired reduction using this Lemma: to compare the coefficients of $Y_j'$ as described in your question, we may thus base change the map $f':X' \to Y'$ by the inclusion of the spectrum of $A=\mathcal O_{Y'_j,Y}$ in $Y'$. $$ \begin{array}{ccccc} \text{Spec}(B)& \to & X' & \to & X \cr \downarrow& & \downarrow & & \downarrow \cr \text{Spec}(A)& \to & Y' & \to & Y \end{array}. $$ However $X'$ was already a cartesian product, so we may as well base change the map $f:X \to Y$ by $\text{Spec}(A) \to Y$. But using the Fact from the script (sometimes called the Goingdown theorem for flat morphisms) we know that $Y'_j$ dominates $Y$. From this one sees that the inclusion $\text{Spec}(A) \to Y$ factors through $\text{Spec}(R(Y))$. But now we can apply the Lemma above again to see that the following are commuting squares: $$ \begin{array}{ccccc} \text{Spec}(B)& \to & R(X) & \to & X \cr \downarrow& & \downarrow & & \downarrow \cr \text{Spec}(A)& \to & R(Y) & \to & Y \end{array}. $$ Indeed, the outer rectangle is a cartesian square by definition and the right square is cartesian by applying the Lemma to $f:X \to Y$ noting that $X,Y$ were assumed to be irreducible varieties of the same dimension. From here on the proof from the script above should go through straightforward. Proof of the Lemma: Because the inclusion of $\text{Spec}(A)$ in $Y$ factors through the complement of the irreducible components of $Y$ different from $Y'$ we may assume $Y=Y'$ is irreducible. Now in $X$ note that the intersections of the irreducible components of $X$ are all of lower dimension than $Y$ and thus their images in $Y$ are also of positive codimension. By removing their closures in $Y$ and thus shrinking $Y$ further we may assume that $X$ is a disjoint union of irreducible finite typeschemes $X_i$. If some of them do not map dominantly to $Y$ we can shrink $Y$ even further to exclude their images and hence we may assume that they all map dominantly to $Y$. Now we want to reduce to an affine computation. Shrink $Y$ to an affine open subset $\text{Spec}(C)$ and cover one such $X_i$ by open affines $\text{Spec}(D)$. We will see that all the corresponding cartesian products $\text{Spec}(A) \times_{\text{Spec}(C)} \text{Spec}(D)$ are canonically identified with $\text{Spec}(\mathcal O_{X_i,X})$, thus gluing them is trivial and the proof is finished. As $X_i, Y$ are irreducible, there are unique minimal primes $p_D, p_C$ in $D,C$ corresponding to the generic points $\eta_{X_i},\eta_Y$ of $X_i,Y$. Note that hence the local ring $A$ at $\eta_Y$ is $A=C_{p_C}$. Because $X_i$ dominates $Y$ we have that $\eta_{X_i}$ maps to $\eta_Y$, so for the corresponding map $\phi:C \to D$ we have $\phi^{1}(p_D) = p_C$. We now have to show $$C_{p_C} \otimes_{C} D = D_{p_D}.$$ The left hand side is exactly $(C \setminus p_C)^{1} D$, hence for $d \in D \setminus p_D$ we have to find an inverse using only $C \setminus p_C$ in the denominator. But now finally we can use that $X,Y$ have the same dimension. This implies that the corresponding extension $R(C) \subset R(D)$ of the total quotient fields is algebraic, because both have the same transcendence degree over $k$. Hence there are $c_n, \ldots, c_0 \in R(C)$ with $c_0 \neq 0 \in R(C)$ and $$c_n d^n + \ldots + c_1 d + c_0 = 0 \in R(D).$$ Multiplying by the denominators we may assume that all $c_i$ are in $C$ and that $c_0 \in C \setminus p_C$. Then one checks that this implies that $$d \cdot \frac{c_n d^{n1} + \ldots + c_1}{c_0} = 1 \in D_{p_D}. $$ Thus the proof is finished. 

