I would like to ask one question (maybe very simple) about the proof of Proposition II 6.8 in Hartshorne's book Algebraic Geometry page 137. The question is about the proof of the finiteness of non-trivial morphisms between two projective non-singular curves. In his proof, let $f:\ X \to Y$ be a non-trivial morphism, i.e. $f(X) =Y$ and let $V = \mathrm{Spec} B$ be any open affine subset of $Y$. Denote by $A$ the integral closure of $B$ in $K(X)$, where $K(X)$ is the function field of $X$. Here we regard $B \subset K(Y) \subset K(X)$, then I understand $\mathrm{Spec} A$ is isomorphic to an open subset $U$ of $X$ by the definitions of abstract non-singular curves and their topology introduced in Chapter I, section 6. But then the proof says clearly $\mathrm{Spec} A \cong f^{-1}(V)$. It is this argument that I do not understand. I can see $\mathrm{Spec} A \subset f^{-1}(V)$.

I would really appreciate if someone could explain this, i.e. why finding the inverse is the same as finding the integral closure in the functional field.

$dim(F)\geq dim(X)-dim(Y)$ for any component of the fiber $f^{-1}(y)$ for any $y\in Y$.

there is a non-empty open subset $U\subset Y$ such that $dim(f^{-1}(y)) = dim(X)-dim(Y)$ for any $y\in U$.

you might think of this in a more differential way. Take a general point $y\in Y$ and let $x\in f^{-1}(y)$ be general on the fiber. Then $x$ is a smooth point of both $X$ and $f^{-1}(y)$. Consider the differential $df_{x}:T_{x}X\rightarrow T_{y}X$. Now $T_{x}f^{-1}(y) = Ker (df_{x})$, and the result follows just by the dimension theorem in linear algebra and by semicontinuity.