$\{s\}\hookrightarrow Z$ is a flat morphism, we conclude that $a_s$ is injective.

Suppose now that $\dim X=2$.

\[teo1’\] If ${\mathcal{E}}$ and ${\mathcal{E}}'$ are coherent sheaves on $T$, flat on $S$, and for all closed points $s$ in $S$ the restrictions ${\mathcal{E}}_s$ and ${\mathcal{E}}'_s$ are torsion-free, the sheaf ${\operatorname{\mathcal{H}\!\textit{om}}}\left({\mathcal{E}},{\mathcal{E}}'\right)$ is flat on $S$.

The proof of this Proposition relies on a few intermediate results. Let $A$ be a commutative ring, $B$ and $R$ (not necessarily flat) $A$-algebras, with $R$ noetherian; let $R':=R\otimes_A B$.

\[pro1\] Let $M$, $N$ be $R$-modules, and suppose that $M$ is finitely generated as an $R$-module, and flat as an $A$-module. Then $${\operatorname{Ext}}^i_R(M,N){\otimes_RR'}\simeq{\operatorname{Ext}}^i_{R'}\left(M{\otimes_RR'},N{\otimes_RR'}\right)\quad\text{for $i\geq0$}\,.$$

This is a modification of the proof of [@Mat Prop (3.E)]. The module $M$ admits a resolution by free finitely generated $R$-modules: $$\xymatrix{
\cdots \ar[r] & F_2 \ar[r]^{f_1} & F_1 \ar[r]^{f_0} & F_0 \ar[r] & M \ar[r] & 0
}\,.
\label{eqFR}$$ By applying [@Har Prop. III.9.1A (e)] one can prove by induction that the modules $\ker f_{i}$ are $A$-flat for all $i\geq0$. Hence, by applying the functor $\otimes_{R}R'\simeq\otimes_{A}B$ to eq. one gets a resolution of $M\otimes_{R}R'$ by free finitely generated $R'$-modules: $$\xymatrix{
 & F_{\bullet}\otimes_{R}R' \ar[r] & M\otimes_{R}R' \ar[r] & 0
}\,.
$$ By applying 