forked from stacks/stacks-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schemes.tex
4659 lines (4059 loc) · 159 KB
/
schemes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\input{preamble}
% OK, start here.
%
\begin{document}
\title{Schemes}
\maketitle
\phantomsection
\label{section-phantom}
\tableofcontents
\section{Introduction}
\label{section-introduction}
\noindent
In this document we define schemes.
A basic reference is \cite{EGA}.
\section{Locally ringed spaces}
\label{section-locally-ringed-spaces}
\noindent
Recall that we defined ringed spaces
in Sheaves, Section \ref{sheaves-section-ringed-spaces}.
Briefly, a ringed space is a pair $(X, \mathcal{O}_X)$ consisting
of a topological space $X$ and a sheaf of rings $\mathcal{O}_X$.
A morphism of ringed spaces $f : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
is given by a continuous map $f : X \to Y$ and an $f$-map of sheaves
of rings $f^\sharp : \mathcal{O}_Y \to \mathcal{O}_X$. You can
think of $f^\sharp$ as a map $\mathcal{O}_Y \to f_*\mathcal{O}_X$, see
Sheaves, Definition \ref{sheaves-definition-f-map} and
Lemma \ref{sheaves-lemma-f-map}.
\medskip\noindent
A good geometric example of this to keep in mind is
$\mathcal{C}^\infty$-manifolds and morphisms of
$\mathcal{C}^\infty$-manifolds. Namely, if $M$ is a
$\mathcal{C}^\infty$-manifold, then the sheaf $\mathcal{C}^\infty_M$
of smooth functions is a sheaf of rings on $M$. And any
map $f : M \to N$ of manifolds is smooth if and only if
for every local section $h$ of $\mathcal{C}^\infty_N$
the composition $h \circ f$ is a local section of $\mathcal{C}^\infty_M$.
Thus a smooth map $f$ gives rise in a natural way to a morphism
of ringed spaces
$$
f : (M , \mathcal{C}^\infty_M) \longrightarrow (N, \mathcal{C}^\infty_N)
$$
see Sheaves, Example \ref{sheaves-example-continuous-map-ringed}.
It is instructive to consider what happens to stalks. Namely, let
$m \in M$ with image $f(m) = n \in N$. Recall that the stalk
$\mathcal{C}^\infty_{M, m}$ is the ring of germs of smooth
functions at $m$, see
Sheaves, Example \ref{sheaves-example-germs-functions}.
The algebra of germs of functions on $(M, m)$ is a local ring with maximal
ideal the functions which vanish at $m$.
Similarly for $\mathcal{C}^\infty_{N, n}$. The map on stalks
$f^\sharp : \mathcal{C}^\infty_{N, n} \to \mathcal{C}^\infty_{M, m}$
maps the maximal ideal into the maximal ideal, simply
because $f(m) = n$.
\medskip\noindent
In algebraic geometry we study schemes. On a scheme the sheaf of rings
is not determined by an intrinsic property of the space.
The spectrum of a ring $R$
(see Algebra, Section \ref{algebra-section-spectrum-ring}) endowed
with a sheaf of rings constructed out of $R$ (see below),
will be our basic building block. It will turn out that
the stalks of $\mathcal{O}$ on $\Spec(R)$ are the local
rings of $R$ at its primes. There are two reasons to introduce
locally ringed spaces in this setting: (1) There is in general
no mechanism that assigns to a continuous map of spectra a
map of the corresponding rings. This is why we add as an extra datum
the map $f^\sharp$. (2) If we consider morphisms
of these spectra in the category of ringed spaces, then the
maps on stalks may not be local homomorphisms. Since our
geometric intuition says it should we introduce locally ringed spaces
as follows.
\begin{definition}
\label{definition-locally-ringed-space}
Locally ringed spaces.
\begin{enumerate}
\item A {\it locally ringed space $(X, \mathcal{O}_X)$}
is a pair consisting of a
topological space $X$ and a sheaf of rings $\mathcal{O}_X$ all of whose stalks
are local rings.
\item Given a locally ringed space $(X, \mathcal{O}_X)$ we say that
$\mathcal{O}_{X, x}$ is the {\it local ring of $X$ at $x$}.
We denote $\mathfrak{m}_{X, x}$ or simply $\mathfrak{m}_x$
the maximal ideal of $\mathcal{O}_{X, x}$. Moreover, the
{\it residue field of $X$ at $x$} is the residue field
$\kappa(x) = \mathcal{O}_{X, x}/\mathfrak{m}_x$.
\item A {\it morphism of locally ringed spaces}
$(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
is a morphism of ringed spaces such that for all $x \in X$
the induced ring map $\mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$ is a
local ring map.
\end{enumerate}
\end{definition}
\noindent
We will usually suppress the sheaf of rings $\mathcal{O}_X$
in the notation when discussing locally ringed spaces. We will
simply refer to ``the locally ringed space $X$''.
We will by abuse of notation think of $X$ also as
the underlying topological space. Finally we will denote
the corresponding sheaf of rings
$\mathcal{O}_X$ as the {\it structure sheaf of $X$}.
In addition, it is customary to denote the maximal ideal
of the local ring $\mathcal{O}_{X, x}$ by
$\mathfrak{m}_{X, x}$ or simply $\mathfrak{m}_x$.
We will say ``let $f : X \to Y$ be a morphism of locally ringed
spaces'' thereby suppressing the structure sheaves even further.
In this case, we will by abuse of notation think of $f : X\to Y$
also as the underlying continuous map of topological spaces.
The $f$-map corresponding to $f$ will customarily
be denoted $f^\sharp$. The condition that $f$ is a morphism
of locally ringed spaces can then be expressed by saying that
for every $x\in X$ the map on stalks
$$
f^\sharp_x : \mathcal{O}_{Y, f(x)} \longrightarrow \mathcal{O}_{X, x}
$$
maps the maximal ideal $\mathfrak m_{Y, f(x)}$ into
$\mathfrak m_{X, x}$.
\medskip\noindent
Let us use these notational conventions to show that the
collection of locally ringed spaces and morphisms of locally
ringed spaces forms a category. In order to see this we have
to show that the composition of morphisms of locally ringed
spaces is a morphism of locally ringed spaces. OK, so let
$f : X \to Y$ and $g : Y \to Z$ be morphism of locally
ringed spaces. The composition of $f$ and $g$ is defined in
Sheaves, Definition \ref{sheaves-definition-composition-maps-ringed-spaces}.
Let $x \in X$. By
Sheaves, Lemma \ref{sheaves-lemma-compose-f-maps-stalks}
the composition
$$
\mathcal{O}_{Z, g(f(x))}
\xrightarrow{g^\sharp}
\mathcal{O}_{Y, f(x)}
\xrightarrow{f^\sharp}
\mathcal{O}_{X, x}
$$
is the associated map on stalks for the morphism $g \circ f$.
The result follows since a composition of local ring
homomorphisms is a local ring homomorphism.
\medskip\noindent
A pleasing feature of the definition is the fact that the functor
$$
\textit{Locally ringed spaces}
\longrightarrow
\textit{Ringed spaces}
$$
reflects isomorphisms (plus more).
Here is a less abstract statement.
\begin{lemma}
\label{lemma-isomorphism-locally-ringed}
\begin{slogan}
An isomorphism of ringed spaces between locally ringed spaces is an
isomorphism of locally ringed spaces.
\end{slogan}
Let $X$, $Y$ be locally ringed spaces.
If $f : X \to Y$ is an isomorphism of
ringed spaces, then $f$ is an isomorphism
of locally ringed spaces.
\end{lemma}
\begin{proof}
This follows trivially from the corresponding fact in algebra:
Suppose $A$, $B$ are local rings. Any isomorphism of rings
$A \to B$ is a local ring homomorphism.
\end{proof}
\section{Open immersions of locally ringed spaces}
\label{section-open-immersion}
\begin{definition}
\label{definition-immersion-locally-ringed-spaces}
Let $f : X \to Y$ be a morphism of locally ringed spaces.
We say that $f$ is an {\it open immersion} if
$f$ is a homeomorphism of $X$ onto an open subset
of $Y$, and the map $f^{-1}\mathcal{O}_Y \to \mathcal{O}_X$
is an isomorphism.
\end{definition}
\noindent
The following construction is parallel to
Sheaves, Definition \ref{sheaves-definition-restriction} (3).
\begin{example}
\label{example-open-subspace}
Let $X$ be a locally ringed space.
Let $U \subset X$ be an open subset.
Let $\mathcal{O}_U = \mathcal{O}_X|_U$
be the restriction of $\mathcal{O}_X$ to $U$.
For $u \in U$ the stalk $\mathcal{O}_{U, u}$
is equal to the stalk $\mathcal{O}_{X, u}$, and hence is a
local ring. Thus $(U, \mathcal{O}_U)$ is a locally ringed
space and the morphism $j : (U, \mathcal{O}_U) \to (X, \mathcal{O}_X)$
is an open immersion.
\end{example}
\begin{definition}
\label{definition-open-subspace}
Let $X$ be a locally ringed space.
Let $U \subset X$ be an open subset.
The locally ringed space $(U, \mathcal{O}_U)$
of Example \ref{example-open-subspace} above
is the {\it open subspace of $X$ associated to $U$}.
\end{definition}
\begin{lemma}
\label{lemma-open-immersion}
Let $f : X \to Y$ be an open immersion of
locally ringed spaces. Let $j : V = f(X) \to Y$
be the open subspace of $Y$ associated to the image of $f$.
There is a unique isomorphism $f' : X \cong V$ of
locally ringed spaces such that $f = j \circ f'$.
\end{lemma}
\begin{proof}
Let $f'$ be the homeomorphism between $X$ and $V$ induced by $f$. Then
$f = j \circ f'$ as maps of topological spaces. Since there
is an isomorphism of sheaves
$f^\sharp : f^{-1}(\mathcal{O}_Y) \to \mathcal{O}_X$, there is an isomorphism
of rings
$f^\sharp : \Gamma(U, f^{-1}(\mathcal{O}_Y)) \to \Gamma(U, \mathcal{O}_X)$
for each open subset $U \subset X$. Since
$\mathcal{O}_V = j^{-1}\mathcal{O}_Y$ and $f^{-1} = f'^{-1} j^{-1}$
(Sheaves, Lemma \ref{sheaves-lemma-pullback-composition}) we
see that $f^{-1}\mathcal{O}_Y = f'^{-1}\mathcal{O}_V$, hence
$\Gamma(U, f'^{-1}(\mathcal{O}_V)) \to \Gamma(U, f^{-1}(\mathcal{O}_Y))$
for every $U \subset X$ open. By composing these we get an isomorphism of rings
$$
\Gamma(U, f'^{-1}(\mathcal{O}_V)) \to \Gamma(U, \mathcal{O}_X)
$$
for each open subset $U \subset X$, and therefore an isomorphism of sheaves
$f^{-1}(\mathcal{O}_V) \to \mathcal{O}_X$. In other words, we have an
isomorphism $f'^{\sharp} : f'^{-1}(\mathcal{O}_V) \to \mathcal{O}_X$ and
therefore an isomorphism of locally ringed spaces
$(f', f'^{\sharp}) : (X, \mathcal{O}_X) \to (V, \mathcal{O}_V)$
(use Lemma \ref{lemma-isomorphism-locally-ringed}).
Note that $f = j \circ f'$ as morphisms of locally ringed spaces
by construction.
\medskip\noindent
Suppose we have another morphism
$f'' : (X, \mathcal{O}_X) \to (V, \mathcal{O}_Y)$ such that $f = j \circ f''$.
At any point $x \in X$, we have $j(f'(x)) = j(f''(x))$ from which it follows
that $f'(x) = f''(x)$ since $j$ is the inclusion map; therefore $f'$ and $f''$
are the same as morphisms of topological spaces. On structure sheaves,
for each open subset $U \subset X$ we have a commutative diagram
$$
\xymatrix @R=5em{
\Gamma(U, f^{-1}(\mathcal{O}_Y)) \ar[d]_\cong\ar[r]^\cong &
\Gamma(U, \mathcal{O}_X) \\
\Gamma(U, f'^{-1}(\mathcal{O}_V)) \ar@/^/[ru]^{f'^\sharp}
\ar@/_/[ru]_{f''^\sharp} &
}
$$
from which we see that $f'^\sharp$ and $f''^\sharp$ define
the same morphism of sheaves.
\end{proof}
\noindent
From now on we do not distinguish between open subsets
and their associated subspaces.
\begin{lemma}
\label{lemma-restrict-map-to-opens}
Let $f : X \to Y$ be a morphism of locally ringed spaces.
Let $U \subset X$, and $V \subset Y$ be open subsets.
Suppose that $f(U) \subset V$. There exists a unique
morphism of locally ringed spaces $f|_U : U \to V$ such
that the following diagram is a commutative square of
locally ringed spaces
$$
\xymatrix{
U \ar[d]_{f|_U} \ar[r] & X \ar[d]^f \\
V \ar[r] & Y
}
$$
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
In the following we will use without further mention the following
fact which follows from the lemma above. Given any morphism
$f : Y \to X$ of locally ringed spaces, and any open subset
$U \subset X$ such that $f(Y) \subset U$, then there exists
a unique morphism of locally ringed spaces $Y \to U$ such that
the composition $Y \to U \to X$ is equal to $f$. In fact, we will
even by abuse of notation write $f : Y \to U$ since this rarely
gives rise to confusion.
\section{Closed immersions of locally ringed spaces}
\label{section-closed-immersion}
\noindent
We follow our conventions introduced in
Modules, Definition \ref{modules-definition-closed-immersion}.
\begin{definition}
\label{definition-closed-immersion-locally-ringed-spaces}
Let $i : Z \to X$ be a morphism of locally ringed spaces.
We say that $i$ is an {\it closed immersion} if:
\begin{enumerate}
\item The map $i$ is a homeomorphism of $Z$ onto a closed subset of $X$.
\item The map $\mathcal{O}_X \to i_*\mathcal{O}_Z$ is surjective;
let $\mathcal{I}$ denote the kernel.
\item The $\mathcal{O}_X$-module $\mathcal{I}$
is locally generated by sections.
\end{enumerate}
\end{definition}
\begin{lemma}
\label{lemma-closed-local-target}
Let $f : Z \to X$ be a morphism of locally ringed spaces.
In order for $f$ to be a closed immersion it suffices
if there exists an open covering $X = \bigcup U_i$ such
that each $f : f^{-1}U_i \to U_i$ is a closed immersion.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{example}
\label{example-closed-subspace}
Let $X$ be a locally ringed space.
Let $\mathcal{I} \subset \mathcal{O}_X$ be a sheaf
of ideals which is locally generated by sections as a sheaf
of $\mathcal{O}_X$-modules. Let $Z$ be the support of
the sheaf of rings $\mathcal{O}_X/\mathcal{I}$.
This is a closed subset of $X$, by
Modules, Lemma \ref{modules-lemma-support-sheaf-rings-closed}.
Denote $i : Z \to X$ the inclusion map.
By Modules, Lemma \ref{modules-lemma-i-star-exact}
there is a unique sheaf of rings $\mathcal{O}_Z$ on $Z$
with $i_*\mathcal{O}_Z = \mathcal{O}_X/\mathcal{I}$.
For any $z \in Z$ the local ring $\mathcal{O}_{Z, z}$
is equal to the quotient ring $\mathcal{O}_{X, i(z)}/\mathcal{I}_{i(z)}$
and nonzero, hence a local ring.
Thus $i : (Z, \mathcal{O}_Z) \to (X, \mathcal{O}_X)$ is
a closed immersion of locally ringed spaces.
\end{example}
\begin{definition}
\label{definition-closed-subspace}
Let $X$ be a locally ringed space.
Let $\mathcal{I}$ be a sheaf of ideals on $X$
which is locally generated by sections.
The locally ringed space $(Z, \mathcal{O}_Z)$
of Example \ref{example-closed-subspace} above
is the {\it closed subspace of $X$ associated to
the sheaf of ideals $\mathcal{I}$}.
\end{definition}
\begin{lemma}
\label{lemma-closed-immersion}
Let $f : X \to Y$ be a closed immersion of
locally ringed spaces. Let $\mathcal{I}$ be the
kernel of the map $\mathcal{O}_Y \to f_*\mathcal{O}_X$.
Let $i : Z \to Y$ be the closed subspace of $Y$
associated to $\mathcal{I}$.
There is a unique isomorphism $f' : X \cong Z$ of
locally ringed spaces such that $f = i \circ f'$.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-characterize-closed-subspace}
Let $X$, $Y$ be a locally ringed spaces. Let
$\mathcal{I} \subset \mathcal{O}_X$ be a sheaf of ideals locally generated
by sections. Let $i : Z \to X$ be the associated closed subspace.
A morphism $f : Y \to X$ factors through $Z$ if and only if the map
$f^*\mathcal{I} \to f^*\mathcal{O}_X = \mathcal{O}_Y$
is zero. If this is the case the morphism $g : Y \to Z$
such that $f = i \circ g$ is unique.
\end{lemma}
\begin{proof}
Clearly if $f$ factors as $Y \to Z \to X$ then the map
$f^*\mathcal{I} \to \mathcal{O}_Y$ is zero. Conversely
suppose that $f^*\mathcal{I} \to \mathcal{O}_Y$ is zero.
Pick any $y \in Y$, and consider the ring map
$f^\sharp_y : \mathcal{O}_{X, f(y)} \to \mathcal{O}_{Y, y}$.
Since the composition
$\mathcal{I}_{f(y)} \to \mathcal{O}_{X, f(y)} \to \mathcal{O}_{Y, y}$
is zero by assumption and since $f^\sharp_y(1) = 1$
we see that $1 \not \in \mathcal{I}_{f(y)}$, i.e.,
$\mathcal{I}_{f(y)} \not = \mathcal{O}_{X, f(y)}$. We conclude that
$f(Y) \subset Z = \text{Supp}(\mathcal{O}_X/\mathcal{I})$.
Hence $f = i \circ g$ where $g : Y \to Z$ is continuous.
Consider the map $f^\sharp : \mathcal{O}_X \to f_*\mathcal{O}_Y$.
The assumption $f^*\mathcal{I} \to \mathcal{O}_Y$ is zero implies that
the composition $\mathcal{I} \to \mathcal{O}_X \to f_*\mathcal{O}_Y$ is
zero by adjointness of $f_*$ and $f^*$.
In other words, we obtain a morphism of sheaves of rings
$\overline{f^\sharp} : \mathcal{O}_X/\mathcal{I} \to f_*\mathcal{O}_Y$.
Note that $f_*\mathcal{O}_Y = i_*g_*\mathcal{O}_Y$ and
that $\mathcal{O}_X/\mathcal{I} = i_*\mathcal{O}_Z$.
By Sheaves, Lemma \ref{sheaves-lemma-equivalence-categories-closed-structures}
we obtain a unique morphism of sheaves of rings
$g^\sharp : \mathcal{O}_Z \to g_*\mathcal{O}_Y$ whose pushforward
under $i$ is $\overline{f^\sharp}$. We omit the verification that
$(g, g^\sharp)$ defines a morphism of locally ringed spaces
and that $f = i \circ g$ as a morphism of locally ringed spaces.
The uniqueness of $(g, g^\sharp)$ was pointed out above.
\end{proof}
\begin{lemma}
\label{lemma-restrict-map-to-closed}
Let $f : X \to Y$ be a morphism of locally ringed spaces.
Let $\mathcal{I} \subset \mathcal{O}_Y$ be a sheaf of
ideals which is locally generated by sections.
Let $i : Z \to Y$ be the closed subspace associated to the
sheaf of ideals $\mathcal{I}$.
Let $\mathcal{J}$ be the image of the map
$f^*\mathcal{I} \to f^*\mathcal{O}_Y = \mathcal{O}_X$.
Then this ideal is locally generated by sections.
Moreover, let $i' : Z' \to X$ be the associated closed
subspace of $X$. There exists a unique
morphism of locally ringed spaces $f' : Z' \to Z$ such
that the following diagram is a commutative square of
locally ringed spaces
$$
\xymatrix{
Z' \ar[d]_{f'} \ar[r]_{i'} & X \ar[d]^f \\
Z \ar[r]^{i} & Y
}
$$
Moreover, this diagram is a fibre square in the category of
locally ringed spaces.
\end{lemma}
\begin{proof}
The ideal $\mathcal{J}$ is locally generated by sections
by Modules, Lemma \ref{modules-lemma-pullback-locally-generated}.
The rest of the lemma follows from the characterization,
in Lemma \ref{lemma-characterize-closed-subspace} above,
of what it means for a morphism to factor through a closed
subspace.
\end{proof}
\section{Affine schemes}
\label{section-affine-schemes}
\noindent
Let $R$ be a ring. Consider the topological space $\Spec(R)$
associated to $R$, see Algebra, Section \ref{algebra-section-spectrum-ring}.
We will endow this space with a sheaf of rings $\mathcal{O}_{\Spec(R)}$
and the resulting pair $(\Spec(R), \mathcal{O}_{\Spec(R)})$
will be an affine scheme.
\medskip\noindent
Recall that $\Spec(R)$ has a basis of open sets $D(f)$,
$f \in R$ which we call standard opens, see Algebra,
Definition \ref{algebra-definition-Zariski-topology}.
In addition, the intersection of two standard opens is another:
$D(f) \cap D(g) = D(fg)$, $f, g\in R$.
\begin{lemma}
\label{lemma-standard-open}
Let $R$ be a ring. Let $f \in R$.
\begin{enumerate}
\item If $g\in R$ and $D(g) \subset D(f)$, then
\begin{enumerate}
\item $f$ is invertible in $R_g$,
\item $g^e = af$ for some $e \geq 1$ and $a \in R$,
\item there is a canonical ring map $R_f \to R_g$, and
\item there is a canonical $R_f$-module map
$M_f \to M_g$ for any $R$-module $M$.
\end{enumerate}
\item Any open covering of $D(f)$ can be refined to a finite
open covering of the form $D(f) = \bigcup_{i = 1}^n D(g_i)$.
\item If $g_1, \ldots, g_n \in R$, then $D(f) \subset \bigcup D(g_i)$
if and only if $g_1, \ldots, g_n$ generate the unit ideal in $R_f$.
\end{enumerate}
\end{lemma}
\begin{proof}
Recall that $D(g) = \Spec(R_g)$ (see
Algebra, Lemma \ref{algebra-lemma-standard-open}).
Thus (a) holds because $f$
maps to an element of $R_g$ which is not
contained in any prime ideal, and hence invertible,
see Algebra, Lemma \ref{algebra-lemma-Zariski-topology}.
Write the inverse of $f$ in $R_g$ as $a/g^d$.
This means $g^d - af$ is annihilated by a power of $g$, whence (b).
For (c), the map $R_f \to R_g$ exists by (a) from the universal property
of localization, or we can define it by mapping $b/f^n$
to $a^nb/g^{ne}$. The equality $M_f = M \otimes_R R_f$
can be used to obtain the map on modules, or
we can define $M_f \to M_g$ by mapping
$x/f^n$ to $a^nx/g^{ne}$.
\medskip\noindent
Recall that $D(f)$ is quasi-compact, see
Algebra, Lemma \ref{algebra-lemma-qc-open}.
Hence the second statement follows directly
from the fact that the standard opens form
a basis for the topology.
\medskip\noindent
The third statement follows directly from
Algebra, Lemma \ref{algebra-lemma-Zariski-topology}.
\end{proof}
\noindent
In Sheaves, Section \ref{sheaves-section-bases} we defined
the notion of a sheaf on a basis, and we showed that it is
essentially equivalent to the notion of a sheaf on the space,
see Sheaves, Lemmas \ref{sheaves-lemma-extend-off-basis} and
\ref{sheaves-lemma-extend-off-basis-structures}. Moreover,
we showed in
Sheaves, Lemma \ref{sheaves-lemma-cofinal-systems-coverings-standard-case}
that it is sufficient to check the sheaf
condition on a cofinal system of open coverings for each
standard open. By the lemma above it suffices to check
on the finite coverings by standard opens.
\begin{definition}
\label{definition-standard-covering}
Let $R$ be a ring.
\begin{enumerate}
\item A {\it standard open covering} of $\Spec(R)$
is a covering $\Spec(R) = \bigcup_{i = 1}^n D(f_i)$,
where $f_1, \ldots, f_n \in R$.
\item Suppose that $D(f) \subset \Spec(R)$ is a standard
open. A {\it standard open covering} of $D(f)$
is a covering $D(f) = \bigcup_{i = 1}^n D(g_i)$,
where $g_1, \ldots, g_n \in R$.
\end{enumerate}
\end{definition}
\noindent
Let $R$ be a ring. Let $M$ be an $R$-module. We will define
a presheaf $\widetilde M$ on the basis of standard opens.
Suppose that $U \subset \Spec(R)$ is a standard open.
If $f, g \in R$ are such that $D(f) = D(g)$, then
by Lemma \ref{lemma-standard-open} above there are canonical
maps $M_f \to M_g$ and $M_g \to M_f$ which are mutually inverse.
Hence we may choose any $f$ such that $U = D(f)$
and define
$$
\widetilde M(U) = M_f.
$$
Note that if $D(g) \subset D(f)$, then by
Lemma \ref{lemma-standard-open} above we have
a canonical map
$$
\widetilde M(D(f)) = M_f \longrightarrow M_g = \widetilde M(D(g)).
$$
Clearly, this defines a presheaf of abelian groups on the basis
of standard opens. If $M = R$, then $\widetilde R$ is a presheaf
of rings on the basis of standard opens.
\medskip\noindent
Let us compute the stalk of $\widetilde M$ at a point $x \in \Spec(R)$.
Suppose that $x$ corresponds to the prime $\mathfrak p \subset R$.
By definition of the stalk we see that
$$
\widetilde M_x = \colim_{f\in R, f\not\in \mathfrak p} M_f
$$
Here the set $\{f\in R, f\not\in \mathfrak p\}$ is partially
ordered by the rule $f \geq f' \Leftrightarrow D(f) \subset D(f')$.
If $f_1, f_2 \in R \setminus \mathfrak p$, then we have
$f_1f_2 \geq f_1$ in this ordering. Hence by
Algebra, Lemma \ref{algebra-lemma-localization-colimit}
we conclude that
$$
\widetilde M_x = M_{\mathfrak p}.
$$
\medskip\noindent
Next, we check the sheaf condition for the standard open coverings.
If $D(f) = \bigcup_{i = 1}^n D(g_i)$, then the sheaf condition
for this covering is equivalent with the exactness of the
sequence
$$
0 \to M_f \to \bigoplus M_{g_i} \to \bigoplus M_{g_ig_j}.
$$
Note that $D(g_i) = D(fg_i)$, and hence we can rewrite this
sequence as the sequence
$$
0 \to M_f \to \bigoplus M_{fg_i} \to \bigoplus M_{fg_ig_j}.
$$
In addition, by Lemma \ref{lemma-standard-open} above
we see that $g_1, \ldots, g_n$ generate the unit ideal
in $R_f$. Thus we may apply
Algebra, Lemma \ref{algebra-lemma-cover-module}
to the module $M_f$ over $R_f$ and the elements $g_1, \ldots, g_n$.
We conclude that the sequence is exact. By the remarks
made above, we see that $\widetilde M$ is a sheaf
on the basis of standard opens.
\medskip\noindent
Thus we conclude from the material in
Sheaves, Section \ref{sheaves-section-bases}
that there exists a
unique sheaf of rings $\mathcal{O}_{\Spec(R)}$
which agrees with $\widetilde R$ on the standard opens.
Note that by our computation of stalks above, the
stalks of this sheaf of rings are all local rings.
\medskip\noindent
Similarly, for any $R$-module $M$ there exists
a unique sheaf of $\mathcal{O}_{\Spec(R)}$-modules
$\mathcal{F}$ which agrees with $\widetilde M$ on the
standard opens, see
Sheaves, Lemma \ref{sheaves-lemma-extend-off-basis-module}.
\begin{definition}
\label{definition-structure-sheaf}
Let $R$ be a ring.
\begin{enumerate}
\item The {\it structure sheaf $\mathcal{O}_{\Spec(R)}$ of the
spectrum of $R$} is the unique sheaf of rings $\mathcal{O}_{\Spec(R)}$
which agrees with $\widetilde R$ on the basis of standard opens.
\item The locally ringed space
$(\Spec(R), \mathcal{O}_{\Spec(R)})$ is called
the {\it spectrum} of $R$ and denoted $\Spec(R)$.
\item The sheaf of $\mathcal{O}_{\Spec(R)}$-modules
extending $\widetilde M$ to all opens of $\Spec(R)$
is called the sheaf of $\mathcal{O}_{\Spec(R)}$-modules
associated to $M$. This sheaf is denoted $\widetilde M$ as
well.
\end{enumerate}
\end{definition}
\noindent
We summarize the results obtained so far.
\begin{lemma}
\label{lemma-spec-sheaves}
Let $R$ be a ring. Let $M$ be an $R$-module. Let $\widetilde M$
be the sheaf of $\mathcal{O}_{\Spec(R)}$-modules
associated to $M$.
\begin{enumerate}
\item We have $\Gamma(\Spec(R), \mathcal{O}_{\Spec(R)}) = R$.
\item We have $\Gamma(\Spec(R), \widetilde M) = M$ as an $R$-module.
\item For every $f \in R$ we have
$\Gamma(D(f), \mathcal{O}_{\Spec(R)}) = R_f$.
\item For every $f\in R$ we have $\Gamma(D(f), \widetilde M) = M_f$
as an $R_f$-module.
\item Whenever $D(g) \subset D(f)$ the restriction mappings
on $\mathcal{O}_{\Spec(R)}$ and $\widetilde M$
are the maps
$R_f \to R_g$ and $M_f \to M_g$ from Lemma
\ref{lemma-standard-open}.
\item Let $\mathfrak p$ be a prime of $R$, and let $x \in \Spec(R)$
be the corresponding point. We have
$\mathcal{O}_{\Spec(R), x} = R_{\mathfrak p}$.
\item Let $\mathfrak p$ be a prime of $R$, and let $x \in \Spec(R)$
be the corresponding point. We have $\mathcal{F}_x = M_{\mathfrak p}$
as an $R_{\mathfrak p}$-module.
\end{enumerate}
Moreover, all these identifications are functorial in the $R$
module $M$. In particular, the functor $M \mapsto \widetilde M$
is an exact functor from the category of $R$-modules
to the category of $\mathcal{O}_{\Spec(R)}$-modules.
\end{lemma}
\begin{proof}
Assertions (1) - (7) are clear from the discussion above.
The exactness of the functor $M \mapsto \widetilde M$
follows from the fact that the functor $M \mapsto M_{\mathfrak p}$
is exact and the fact that exactness of short exact sequences
may be checked on stalks, see
Modules, Lemma \ref{modules-lemma-abelian}.
\end{proof}
\begin{definition}
\label{definition-affine-scheme}
An {\it affine scheme} is a locally ringed space isomorphic
as a locally ringed space to $\Spec(R)$ for some ring $R$.
A {\it morphism of affine schemes} is a morphism in the category
of locally ringed spaces.
\end{definition}
\noindent
It turns out that affine schemes play a special role
among all locally ringed spaces, which is what the next
section is about.
\section{The category of affine schemes}
\label{section-category-affine-schemes}
\noindent
Note that if $Y$ is an affine scheme, then its
points are in canonical $1-1$ bijection with
prime ideals in $\Gamma(Y, \mathcal{O}_Y)$.
\begin{lemma}
\label{lemma-morphism-into-affine-where-point-goes}
Let $X$ be a locally ringed space.
Let $Y$ be an affine scheme.
Let $f \in \Mor(X, Y)$ be a morphism
of locally ringed spaces. Given a point $x \in X$
consider the ring maps
$$
\Gamma(Y, \mathcal{O}_Y) \xrightarrow{f^\sharp}
\Gamma(X, \mathcal{O}_X) \to \mathcal{O}_{X, x}
$$
Let $\mathfrak p \subset \Gamma(Y, \mathcal{O}_Y)$ denote
the inverse image of $\mathfrak m_x$. Let $y \in Y$ be the
corresponding point. Then $f(x) = y$.
\end{lemma}
\begin{proof}
Consider the commutative diagram
$$
\xymatrix{
\Gamma(X, \mathcal{O}_X) \ar[r] &
\mathcal{O}_{X, x} \\
\Gamma(Y, \mathcal{O}_Y) \ar[r] \ar[u] &
\mathcal{O}_{Y, f(x)} \ar[u]
}
$$
(see the discussion of $f$-maps below
Sheaves, Definition \ref{sheaves-definition-f-map}).
Since the right vertical arrow is local
we see that $\mathfrak m_{f(x)}$ is the
inverse image of $\mathfrak m_x$. The result
follows.
\end{proof}
\begin{lemma}
\label{lemma-f-open}
Let $X$ be a locally ringed space.
Let $f \in \Gamma(X, \mathcal{O}_X)$.
The set
$$
D(f) = \{x \in X \mid \text{image }f \not\in \mathfrak m_x\}
$$
is open. Moreover $f|_{D(f)}$ has an inverse.
\end{lemma}
\begin{proof}
This is a special case of Modules, Lemma \ref{modules-lemma-s-open}, but
we also give a direct proof.
Suppose that $U \subset X$ and $V \subset X$ are
two open subsets such that $f|_U$ has an inverse
$g$ and $f|_V$ has an inverse $h$. Then clearly
$g|_{U\cap V} = h|_{U\cap V}$. Thus it suffices
to show that $f$ is invertible in an open neighbourhood
of any $x \in D(f)$. This is clear because
$f \not \in \mathfrak m_x$ implies that $f \in \mathcal{O}_{X, x}$
has an inverse $g \in \mathcal{O}_{X, x}$ which means there
is some open neighbourhood $x \in U \subset X$ so
that $g \in \mathcal{O}_X(U)$ and $g\cdot f|_U = 1$.
\end{proof}
\begin{lemma}
\label{lemma-f-open-affine}
In Lemma \ref{lemma-f-open} above, if $X$ is an affine scheme,
then the open $D(f)$ agrees with the standard open $D(f)$
defined previously (in
Algebra, Definition \ref{algebra-definition-spectrum-ring}).
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-morphism-into-affine}
Let $X$ be a locally ringed space.
Let $Y$ be an affine scheme.
The map
$$
\Mor(X, Y)
\longrightarrow
\Hom(\Gamma(Y, \mathcal{O}_Y), \Gamma(X, \mathcal{O}_X))
$$
which maps $f$ to $f^\sharp$ (on global sections) is bijective.
\end{lemma}
\begin{proof}
Since $Y$ is affine we have
$(Y, \mathcal{O}_Y) \cong (\Spec(R), \mathcal{O}_{\Spec(R)})$
for some ring $R$.
During the proof we will use facts about $Y$ and
its structure sheaf which are direct consequences of things
we know about the spectrum of a ring, see e.g.\ Lemma
\ref{lemma-spec-sheaves}.
\medskip\noindent
Motivated by the lemmas above we construct the inverse map.
Let $\psi_Y : \Gamma(Y, \mathcal{O}_Y) \to \Gamma(X, \mathcal{O}_X)$
be a ring map. First, we define the corresponding map of
spaces
$$
\Psi : X \longrightarrow Y
$$
by the rule of
Lemma \ref{lemma-morphism-into-affine-where-point-goes}.
In other words, given $x \in X$ we define $\Psi(x)$
to be the point of $Y$ corresponding to the prime
in $\Gamma(Y, \mathcal{O}_Y)$ which is the inverse
image of $\mathfrak m_x$ under the composition
$
\Gamma(Y, \mathcal{O}_Y) \xrightarrow{\psi_Y}
\Gamma(X, \mathcal{O}_X) \to
\mathcal{O}_{X, x}
$.
\medskip\noindent
We claim that the map $\Psi : X \to Y$ is continuous.
The standard opens $D(g)$, for $g \in \Gamma(Y, \mathcal{O}_Y)$
are a basis for the topology of $Y$. Thus it suffices to prove
that $\Psi^{-1}(D(g))$ is open. By construction of $\Psi$
the inverse image $\Psi^{-1}(D(g))$ is exactly the set
$D(\psi_Y(g)) \subset X$ which is open by Lemma \ref{lemma-f-open}.
Hence $\Psi$ is continuous.
\medskip\noindent
Next we construct a $\Psi$-map of sheaves from
$\mathcal{O}_Y$ to $\mathcal{O}_X$. By
Sheaves, Lemma \ref{sheaves-lemma-f-map-basis-below-structures}
it suffices to define ring maps
$\psi_{D(g)} : \Gamma(D(g), \mathcal{O}_Y) \to
\Gamma(\Psi^{-1}(D(g)), \mathcal{O}_X)$
compatible with restriction maps.
We have a canonical isomorphism
$\Gamma(D(g), \mathcal{O}_Y) = \Gamma(Y, \mathcal{O}_Y)_g$,
because $Y$ is an affine scheme.
Because $\psi_Y(g)$ is invertible on $D(\psi_Y(g))$
we see that there is a canonical map
$$
\Gamma(Y, \mathcal{O}_Y)_g
\longrightarrow
\Gamma(\Psi^{-1}(D(g)), \mathcal{O}_X)
=
\Gamma(D(\psi_Y(g)), \mathcal{O}_X)
$$
extending the map $\psi_Y$
by the universal property of localization.
Note that there is no choice but to take the canonical map here!
And we take this, combined
with the canonical identification
$\Gamma(D(g), \mathcal{O}_Y) = \Gamma(Y, \mathcal{O}_Y)_g$, to
be $\psi_{D(g)}$. This is compatible with localization since the
restriction mapping on the affine schemes are defined in terms
of the universal properties of localization also, see
Lemmas \ref{lemma-spec-sheaves} and \ref{lemma-standard-open}.
\medskip\noindent
Thus we have defined a morphism of ringed spaces
$(\Psi, \psi) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
recovering $\psi_Y$ on global sections. To see that it is
a morphism of locally ringed spaces we have to show that
the induced maps on local rings
$$
\psi_x : \mathcal{O}_{Y, \Psi(x)} \longrightarrow \mathcal{O}_{X, x}
$$
are local. This follows immediately from the commutative diagram
of the proof of Lemma \ref{lemma-morphism-into-affine-where-point-goes}
and the definition of $\Psi$.
\medskip\noindent
Finally, we have to show that the constructions
$(\Psi, \psi) \mapsto \psi_Y$ and the construction
$\psi_Y \mapsto (\Psi, \psi)$ are inverse to each other.
Clearly, $\psi_Y \mapsto (\Psi, \psi) \mapsto \psi_Y$.
Hence the only thing to prove is that given $\psi_Y$
there is at most one pair $(\Psi, \psi)$ giving rise
to it. The uniqueness of $\Psi$ was shown in Lemma
\ref{lemma-morphism-into-affine-where-point-goes} and
given the uniqueness of $\Psi$ the uniqueness of the
map $\psi$ was pointed out during the course of the proof
above.
\end{proof}
\begin{lemma}
\label{lemma-category-affine-schemes}
The category of affine schemes is equivalent to the opposite of the
category of rings. The equivalence is given by the functor that associates
to an affine scheme the global sections of its structure sheaf.
\end{lemma}
\begin{proof}
This is now clear from Definition \ref{definition-affine-scheme}
and Lemma \ref{lemma-morphism-into-affine}.
\end{proof}
\begin{lemma}
\label{lemma-standard-open-affine}
Let $Y$ be an affine scheme.
Let $f \in \Gamma(Y, \mathcal{O}_Y)$.
The open subspace $D(f)$ is an affine scheme.
\end{lemma}
\begin{proof}
We may assume that $Y = \Spec(R)$ and $f \in R$.
Consider the morphism of affine schemes
$\phi : U = \Spec(R_f) \to \Spec(R) = Y$ induced by the ring
map $R \to R_f$. By Algebra, Lemma \ref{algebra-lemma-standard-open}
we know that it is a homeomorphism onto $D(f)$.
On the other hand, the map $\phi^{-1}\mathcal{O}_Y \to \mathcal{O}_U$
is an isomorphism on stalks, hence an isomorphism. Thus we see
that $\phi$ is an open immersion. We conclude that $D(f)$
is isomorphic to $U$ by Lemma \ref{lemma-open-immersion}.
\end{proof}
\begin{lemma}
\label{lemma-fibre-product-affine-schemes}
The category of affine schemes has finite products, and fibre products.
In other words, it has finite limits. Moreover, the products
and fibre products in the category of affine schemes
are the same as in the category of locally ringed spaces.
In a formula, we have (in the category of locally ringed spaces)
$$
\Spec(R) \times \Spec(S) =
\Spec(R \otimes_{\mathbf{Z}} S)
$$
and given ring maps $R \to A$, $R \to B$ we have
$$
\Spec(A) \times_{\Spec(R)} \Spec(B)
=
\Spec(A \otimes_R B).
$$
\end{lemma}
\begin{proof}
This is just an application of Lemma \ref{lemma-morphism-into-affine}.
First of all, by that lemma, the affine scheme