\documentclass{lecture}
\begin{document}
	
	\section{Regular Schemes over Fields}
	
	\begin{bem}
		Coming from differential geometry, we have three notions of the tangent space of a manifold $M$ at a point $x\in M$:
		\begin{itemize}
			\item $T_xM=\{\alpha:(-\ve,\ve)\to M\mid\ve>0,\;\alpha(0)=x\}/\text{change of charts}$
			\item $T_xM= \operatorname{Der}(\mathcal{O}_{M,x},\R)$
			\item $T_xM=\operatorname{Hom}(\mathfrak{m}_x/\mathfrak{m}_x^2,\R)$
		\end{itemize}
	\end{bem}
	
	\begin{bem}
		As a reminder: for a noetherian local ring $(A,\mathfrak{m})$ of dimension $d$, the following are equivalent:
			\begin{itemize}
				\item $\operatorname{gr}_\mathfrak{m}(A)\cong A/\mathfrak{m}[T_1,\dots,T_d]$,
				\item $\dim_{A/\mathfrak{m}}(\mathfrak{m}/\mathfrak{m}^2)=d$,
				\item $\mathfrak{m}$ has a generator set of $d$ elements.
			\end{itemize}
		In this case, $A$ is called \emph{regular}.
		
		$A$ regular ring will always be an integral domain.
	\end{bem}
	
	\begin{definition}
		A locally noetherian scheme $X$ is called \emph{regular in $x\in X$}, if $\mathcal{O}_{X,x}$ is a regular noetherian local ring. Write 
			\[ X_\text{reg}:=\{x\in X\mid X \text{ is regular in x}\}\,. \]
		We call $X$ regular, if $X_\text{reg}=X$.
		
		The \emph{tangent space} of $X$ in $x$ is defined via 
			\[T_xM:=\operatorname{Hom}_{\kappa(x)}(\mathfrak{m}_x/\mathfrak{m}_x^2,\kappa(x))\,.\]
	\end{definition}

	\begin{bem*}
		If $X$ is integral, then $\mathfrak{m}_\eta=0$ and thus $T_\eta X=0$.
	\end{bem*}

	\begin{bsp}
		Let $k$ be a field and $f_1,\dots,f_r\in k[T_1,\dots,T_n]$ polynomials. Set $X=V(f_1,\dots,f_r)\subseteq \mathbb{A}^n_k$. For $x\in\mathbb{A}^n_k(k)$ we have an isomorphism
			\[k^n\to T_x\mathbb{A}^n_k, \quad (v_1,\dots,v_n)\mapsto(\overline{g}\mapsto \sum_i v_i\frac{\partial g}{\partial T_i}(x)) \,. \]
		The map $k[S_1,\dots,S_r]\to k[T-1,\dots,T_n],\,S_i\mapsto T_i$ induces morphisms $f:\mathbb{A}^n_k\to\mathbb{A}^r_k$ and $df_x:T_x\mathbb{A}^n_k\to T_{f(x)}\mathbb{A}^r_k$ which fits into the following diagram
			\[\begin{tikzcd}
				T_x\mathbb{A}^n_k \ar[d,"\cong"]\ar[r, "df_x"] & T_{f(x)}\mathbb{A}^r_k \ar[d,"\cong"]\\
				k^n \ar[r, "\cdot J(f)"] & k^r.
			\end{tikzcd}\]
		Here $J(f)$ denotes the Jacobian. Claim: $T_xX=\ker(df_x)$.
	\end{bsp}
	
	\begin{definition}
		Set $k[\ve]=k[X]/(X^2)$. For $X/k$ and $x\in X(k)$ define $X(k[\ve])_x$ as the pullback
			\[\begin{tikzcd}
				X(k[\ve])_x \ar[r,hook] \ar[d] & X(k[\ve]) \ar[d] \\
				\{x\} \ar[r, hook]&  X(k).
			\end{tikzcd}\]
	\end{definition}
	
	\begin{satz}[]
		We have a bijection $X(k[\ve])_x\xrightarrow{\cong}T_xX$ which is functorial in $(X,x)$.
		\label{prop:tangspace-as-pullback}
	\end{satz}
	
	\begin{proof}
		Left as an exercise.			
	\end{proof}
	
	Grothendieck preaches relativity in all things, hence the following definition.
	\begin{definition}
		Let $f:X\to Y$ be a morphism of schemes and $d\geq0$. We call $f$ \emph{smooth of relative degree $d$ in $x\in X$}, if there exist neighbourhoods $x\in U\subseteq X$ open, $f(x)\in\Spec(R)=V\subseteq Y$ open affine as well as an $n\geq0$ and polynomials $f_1,\dots,f_{n-d}\in R[T_1,\dots,T_n]$ such that
			\[\begin{tikzcd}
				U \ar[rd, "f"'] \ar[r,hook,"\text{open}"] & \Spec(R[T_1,\dots,T_n]/(f_1,\dots,f_{n-d})) \ar[d]\\
				& V
			\end{tikzcd}\]
		commutes and $J_{f_1,\dots,f_{n-d}}(f)\in M_{n-d,n}(\kappa(x))$ is of full rank.
		
		Call $f$ \emph{smooth of relative degree $d$}, if this is the case everywhere.
	\end{definition}
	
	\begin{satz}[\cite{gw},6.15]
		\begin{enumerate}
			\item If $f:X\to Y$ is smooth in $x\in X$, then $f$ is smooth in an open neighbourhood of $x$.
			\item Smoothness of relative dimension $d$ is local on source and target. It is closed under base change and composition (where in the latter degree is additive).
			\item Open immersions are smooth of rel. dimension 0.
			\item If $f\circ g$ is smooth and $g$ is unramified, then $f$ is smooth.
		\end{enumerate}
		\label{prop:smooth-properties}
	\end{satz}

	\begin{bem}[Relation to étale morphisms] \phantom{text}
		\begin{itemize}
			\item étale $\Leftrightarrow$ flat, unramified and locally of finite presentation $\Leftrightarrow$ smooth of rel. dim. 0.
			\item Let $f:X\to Y$ be of locally finite presentation. Then $f$ is smooth of rel dim. $d$ in $x\in X$ if there exists a commutative diagram
				\[\begin{tikzcd}[column sep=small]
					x\in U \ar[rr, "\text{étale}"] \ar[rd,"f"'] &&\mathbb{A}^d_V \ar[ld] \\
					& f(x)\in V. &
				\end{tikzcd}\]
		\end{itemize}
	\end{bem}

	\begin{bsp}
		Let $S$ be a schmeme.
		\begin{itemize}
			\item The canonical morphisms $\mathbb{A}^n_S\to S$ and $\mathbb{P}^n_S\to S$ are smooth of rel. dim. $n$.
			\item $S=\Spec(k),\,k\subseteq\overline{k},\,\operatorname{char}(k)\neq2,\,f\in k[T],\,X=V(U^2-f(T))\subseteq\mathbb{A}^2_k=\Spec(K[T,U])$. Then $X$ is smooth iff $f$ is separable.
			\item $X=\Spec(\Z_p[U,V]/(U^2-V^3-p))$ is regular, but $X\to\Spec(\Z_p)$ is not smooth.
		\end{itemize}
	\end{bsp}
	
	\begin{lemma}
		Let $X,Y$ be $k$-schemes and locally of finite type. Let $x\in X,y\in Y$ be points and $\phi:\mathcal{O}_{X,x}\xrightarrow{\cong}\mathcal{O}_{Y,y}$ an isomorphism of $k$-algebras.
		
		Then there exist open neighbourhoods $x\in U \subseteq X,\,y\in V\subseteq Y$ and an isomorphism $f:U\xrightarrow{\cong}V$ such that $f(x)=y$ and $f^\#_x=\phi^{-1}$.
		\label{lem:extnd-iso-of-stlks}
	\end{lemma}
	
	\begin{satz}
		Let $X/k$ be an integral scheme of finite type and dimension d, and let $K(X)/k$ be separable (to see what this is supposed to mean, have a look at the proof).
		
		Then there exists an open and dense subset $U\subseteq X$ and an isomorphism
			\[ U\cong \Spec(k[T_1,\dots,T_d,T]/(g)) \]
		where $g\in k(T_1,\dots,T_d)[T]$ is a separable irreducible monic polynomial with coefficients in $k[T_1,\dots,T_d]$.
		\label{prop:affine-dense-subset-of-integral}
	\end{satz}

	\begin{proof}
		Find $T_1,\dots,T_d\in K(X)$ algebraically independent and such that
			\[ k \hookrightarrow L:=k(T_1,\dots,T_d) \xhookrightarrow[]{\text{alg.\& sep.}}K(X) \]
		Write $K(X)=L(\alpha)$ and let $g$ be the minimal polynomial of $\alpha$ over $L$. After suitable multliplications, we can assume $g\in k[T_1,\dots,T_d][T]$. Then 
			\[ \mathcal{O}_{X,\eta} =K(X) \cong K(k[T-1,\dots,T_d][T]/(g)) =\mathcal{O}_{Y,(0)} \]
		and the proposition follows from Lemma \ref{lem:extnd-iso-of-stlks}.
	\end{proof}

	\begin{satz}
		Let $\emptyset\neq X$ be geometrically reducible and locally of finite type over $k$.
		
		Then $X_{\text{sm}}:=\{x\in X\mid X\to k\text{ is smooth in $x$}\}\subseteq X$ is open and dense.
		\label{prop:smooth-locus-dense}
	\end{satz}

	\begin{proof}
		The openness was stated in Proposition \ref{prop:smooth-properties}. It suffices to show: for any irreducible component $Z$ of $X$ there exists an $\emptyset\neq U=\Spec(A)\subseteq X$ affine and open such that $U\subseteq Z$ and $U_\text{sm}=X_\text{sm}\cap U$ is dense in $U$.
		
		$X$ is locally noetherian, therefore $X$ locally has only finitely many irreducible components. Therefore, for $U\subset Z$ open the set $U\setminus\bigcup_{Z'\neq Z \text{irred. comp.}}(U\cap Z')$ is open in $X$ and wlog we can assume $X$ to be integral.
		
		Using \ref{prop:affine-dense-subset-of-integral} and \ref{prop:char-geom-red}, we can assume $X=\Spec(k[T_1,\dots,T_d,T]/(g))$ with $g$ separable and irreducible. Because $g$ is separable, we have $\frac{\partial g}{\partial T}\neq0$. Since $X$ is reduced, this implies that $X_\text{sm}=\{x\in X\mid \exists i\in\{1,\dots,d,\emptyset\}\frac{\partial g}{\partial T_i}(x)\neq0\}\neq\emptyset$ is non-empty and therefore dense.
	\end{proof}
\end{document}
