Documentation

Mathlib.AlgebraicGeometry.Scheme

The category of schemes #

A scheme is a locally ringed space such that every point is contained in some open set where there is an isomorphism of presheaves between the restriction to that open set, and the structure sheaf of Spec R, for some commutative ring R.

A morphism of schemes is just a morphism of the underlying locally ringed spaces.

We define Scheme as an X : LocallyRingedSpace, along with a proof that every point has an open neighbourhood U so that the restriction of X to U is isomorphic, as a locally ringed space, to Spec.toLocallyRingedSpace.obj (op R) for some R : CommRingCat.

Instances For

    Pretty printer for coercing schemes to types.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[reducible, inline]

      The type of open sets of a scheme.

      Equations
      Instances For

        A morphism between schemes is a morphism between the underlying locally ringed spaces.

        Instances For
          @[reducible, inline]

          Cast a morphism of schemes into morphisms of local ringed spaces.

          Equations
          Instances For

            Schemes are a full subcategory of locally ringed spaces.

            Equations
            • One or more equations did not get rendered due to their size.

            f ⁻¹ᵁ U is notation for (Opens.map f.base).obj U, the preimage of an open set U under f. The preferred name in lemmas is preimage and it should be treated as an infix.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Γ(X, U) is notation for X.presheaf.obj (op U).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Pretty printer for coercing morphisms between schemes to functions.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Pretty printer for applying morphisms of schemes to set-theoretic points.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[reducible, inline]

                    The structure sheaf of a scheme.

                    Equations
                    Instances For
                      @[reducible, inline]

                      Given a morphism of schemes f : X ⟶ Y, and open U ⊆ Y, this is the induced map Γ(Y, U) ⟶ Γ(X, f ⁻¹ᵁ U).

                      This is treated as a suffix in lemma names.

                      Equations
                      Instances For
                        @[reducible, inline]

                        Given a morphism of schemes f : X ⟶ Y, this is the induced map Γ(Y, ⊤) ⟶ Γ(X, ⊤). This is treated as a suffix in lemma names.

                        Equations
                        Instances For

                          Given a morphism of schemes f : X ⟶ Y, and open sets U ⊆ Y, V ⊆ f ⁻¹' U, this is the induced map Γ(Y, U) ⟶ Γ(X, V).

                          This is treated as a suffix in lemma names.

                          Equations
                          Instances For
                            @[simp]
                            @[simp]
                            theorem AlgebraicGeometry.Scheme.Hom.appLE_congr {X Y : Scheme} (f : X Y) {U U' : Y.Opens} {V V' : X.Opens} (e : V (TopologicalSpace.Opens.map f.base).obj U) (e₁ : U = U') (e₂ : V = V') (P : {R S : CommRingCat} → (R S) → Prop) :
                            P (appLE f U V e) P (appLE f U' V' )
                            def AlgebraicGeometry.Scheme.Hom.stalkMap {X Y : Scheme} (f : X Y) (x : X) :

                            A morphism of schemes f : X ⟶ Y induces a local ring homomorphism from Y.presheaf.stalk (f x) to X.presheaf.stalk x for any x : X.

                            Equations
                            Instances For
                              theorem AlgebraicGeometry.Scheme.Hom.ext {X Y : Scheme} {f g : X Y} (h_base : f.base = g.base) (h_app : ∀ (U : Y.Opens), CategoryTheory.CategoryStruct.comp (app f U) (X.presheaf.map (CategoryTheory.eqToHom ).op) = app g U) :
                              f = g
                              theorem AlgebraicGeometry.Scheme.Hom.ext' {X Y : Scheme} {f g : X Y} (h : toLRSHom f = toLRSHom g) :
                              f = g

                              An alternative ext lemma for scheme morphisms.

                              theorem AlgebraicGeometry.Scheme.Hom.mem_preimage {X Y : Scheme} (f : X Y) {x : X} {U : Y.Opens} :
                              theorem AlgebraicGeometry.Scheme.Hom.preimage_iSup {X Y : Scheme} (f : X Y) {ι : Sort u_1} (U : ιY.Opens) :
                              theorem AlgebraicGeometry.Scheme.Hom.iSup_preimage_eq_top {X Y : Scheme} (f : X Y) {ι : Sort u_1} {U : ιY.Opens} (hU : iSup U = ) :
                              ⨆ (i : ι), (TopologicalSpace.Opens.map f.base).obj (U i) =
                              @[deprecated AlgebraicGeometry.Scheme.Hom.iSup_preimage_eq_top (since := "2025-10-07")]
                              theorem AlgebraicGeometry.Scheme.Hom.preimage_iSup_eq_top {X Y : Scheme} (f : X Y) {ι : Sort u_1} {U : ιY.Opens} (hU : iSup U = ) :
                              ⨆ (i : ι), (TopologicalSpace.Opens.map f.base).obj (U i) =

                              Alias of AlgebraicGeometry.Scheme.Hom.iSup_preimage_eq_top.

                              @[deprecated AlgebraicGeometry.Scheme.Hom.preimage_mono (since := "2025-10-07")]

                              Alias of AlgebraicGeometry.Scheme.Hom.preimage_mono.

                              @[deprecated AlgebraicGeometry.Scheme.Hom.comp_preimage (since := "2025-10-07")]

                              Alias of AlgebraicGeometry.Scheme.Hom.comp_preimage.

                              The forgetful functor from Scheme to LocallyRingedSpace.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                The forget functor Scheme ⥤ LocallyRingedSpace is fully faithful.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def AlgebraicGeometry.Scheme.homeoOfIso {X Y : Scheme} (e : X Y) :
                                  X ≃ₜ Y

                                  An isomorphism of schemes induces a homeomorphism of the underlying topological spaces.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem AlgebraicGeometry.Scheme.coe_homeoOfIso {X Y : Scheme} (e : X Y) :
                                    (homeoOfIso e) = e.hom
                                    @[simp]
                                    theorem AlgebraicGeometry.Scheme.homeoOfIso_apply {X Y : Scheme} (e : X Y) (x : X) :
                                    (homeoOfIso e) x = e.hom x

                                    Alias of AlgebraicGeometry.Scheme.homeoOfIso.


                                    An isomorphism of schemes induces a homeomorphism of the underlying topological spaces.

                                    Equations
                                    Instances For
                                      noncomputable def AlgebraicGeometry.Scheme.Hom.homeomorph {X Y : Scheme} (f : X Y) [CategoryTheory.IsIso f] :
                                      X ≃ₜ Y

                                      An isomorphism of schemes induces a homeomorphism of the underlying topological spaces.

                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem AlgebraicGeometry.Scheme.Hom.homeomorph_apply {X Y : Scheme} (f : X Y) [CategoryTheory.IsIso f] (x : X) :
                                        (homeomorph f) x = f x

                                        forgetful functor to Scheme is the same as coercion

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem AlgebraicGeometry.Scheme.forget_map {X Y : Scheme} (f : X Y) :
                                          forget.map f = f
                                          theorem AlgebraicGeometry.Scheme.Hom.comp_apply {X Y Z : Scheme} (f : X Y) (g : Y Z) (x : X) :
                                          theorem AlgebraicGeometry.Scheme.Hom.appLE_comp_appLE {X Y Z : Scheme} (f : X Y) (g : Y Z) (U : Z.Opens) (V : Y.Opens) (W : X.Opens) (e₁ : V (TopologicalSpace.Opens.map g.base).obj U) (e₂ : W (TopologicalSpace.Opens.map f.base).obj V) :
                                          def AlgebraicGeometry.Scheme.Hom.copyBase {X Y : Scheme} (f : X.Hom Y) (g : XY) (h : f = g) :
                                          X Y

                                          Copies a morphism with a different underlying map

                                          Equations
                                          Instances For
                                            theorem AlgebraicGeometry.Scheme.Hom.copyBase_eq {X Y : Scheme} (f : X.Hom Y) (g : XY) (h : f = g) :
                                            f.copyBase g h = f
                                            @[deprecated AlgebraicGeometry.Scheme.Hom.id_base (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.id_base.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.id_app (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.id_app.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_toLRSHom (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_toLRSHom.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_base (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_base.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_base_assoc (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_base_assoc.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_base (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_base.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_base_assoc (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_base_assoc.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_apply (since := "2025-10-07")]
                                            theorem AlgebraicGeometry.Scheme.comp_base_apply {X Y Z : Scheme} (f : X Y) (g : Y Z) (x : X) :

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_apply.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_app (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_app.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_appTop (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_appTop.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.appLE_comp_appLE (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.appLE_comp_appLE.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.comp_appLE (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.comp_appLE.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.congr_app (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.congr_app.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.app_eq (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.app_eq.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.eqToHom_app (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.eqToHom_app.

                                            @[deprecated AlgebraicGeometry.Scheme.Hom.inv_appTop (since := "2025-10-07")]

                                            Alias of AlgebraicGeometry.Scheme.Hom.inv_appTop.

                                            @[deprecated CategoryTheory.eqToHom_map (since := "2025-10-07")]

                                            Alias of CategoryTheory.eqToHom_map.

                                            The spectrum of a commutative ring, as a scheme.

                                            The notation Spec(R) for (R : Type*) [CommRing R] to mean Spec (CommRingCat.of R) is enabled in the scope SpecOfNotation. Please do not use it within Mathlib, but it can be used in downstream projects if desired. To use this, do:

                                            import Mathlib.AlgebraicGeometry.Scheme
                                            
                                            variable (R : Type*) [CommRing R]
                                            
                                            open scoped SpecOfNotation
                                            
                                            #check Spec(R)
                                            
                                            Equations
                                            Instances For

                                              The spectrum of an unbundled ring as a scheme. WARNING: This is potentially confusing as Spec (R) and Spec(R) have different meanings. Hence we avoid using it in mathlib but leave it as a scoped instance for downstream projects.

                                              WARNING: If R is already an element of CommRingCat, you should use Spec R instead of Spec(R), which is secretly Spec(↑R).

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

                                                The induced map of a ring homomorphism on the ring spectra, as a morphism of schemes.

                                                Equations
                                                Instances For

                                                  The spectrum, as a contravariant functor from commutative rings to schemes.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    @[simp]
                                                    theorem AlgebraicGeometry.Spec.map_base {R S : CommRingCat} (f : R S) :
                                                    (map f).base = TopCat.ofHom { toFun := PrimeSpectrum.comap (CommRingCat.Hom.hom f), continuous_toFun := }
                                                    @[deprecated AlgebraicGeometry.Spec.map_apply (since := "2025-10-07")]

                                                    Alias of AlgebraicGeometry.Spec.map_apply.

                                                    theorem AlgebraicGeometry.Scheme.isEmpty_of_commSq {W X Y S : Scheme} {f : X S} {g : Y S} {i : W X} {j : W Y} (h : CategoryTheory.CommSq i j f g) (H : Disjoint (Set.range f) (Set.range g)) :
                                                    IsEmpty W

                                                    The empty scheme.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For

                                                      The counit (SpecΓIdentity.inv.op) of the adjunction ΓSpec as a natural isomorphism. This is almost never needed in practical use cases. Use ΓSpecIso instead.

                                                      Equations
                                                      Instances For

                                                        The subset of the underlying space where the given section does not vanish.

                                                        Equations
                                                        Instances For
                                                          @[simp]

                                                          A variant of mem_basicOpen for bundled x : U.

                                                          theorem AlgebraicGeometry.Scheme.mem_basicOpen'' (X : Scheme) {U : X.Opens} (f : (X.presheaf.obj (Opposite.op U))) (x : X) :

                                                          A variant of mem_basicOpen without the x ∈ U assumption.

                                                          @[simp]
                                                          theorem AlgebraicGeometry.Scheme.basicOpen_mul (X : Scheme) {U : X.Opens} (f g : (X.presheaf.obj (Opposite.op U))) :
                                                          X.basicOpen (f * g) = X.basicOpen fX.basicOpen g
                                                          theorem AlgebraicGeometry.Scheme.basicOpen_pow (X : Scheme) {U : X.Opens} (f : (X.presheaf.obj (Opposite.op U))) {n : } (h : 0 < n) :
                                                          X.basicOpen (f ^ n) = X.basicOpen f

                                                          The zero locus of a set of sections s over an open set U is the closed set consisting of the complement of U and of all points of U, where all elements of f vanish.

                                                          Equations
                                                          Instances For
                                                            theorem AlgebraicGeometry.Scheme.zeroLocus_def (X : Scheme) {U : X.Opens} (s : Set (X.presheaf.obj (Opposite.op U))) :
                                                            X.zeroLocus s = fs, (X.basicOpen f).carrier
                                                            @[simp]
                                                            theorem AlgebraicGeometry.Scheme.mem_zeroLocus_iff (X : Scheme) {U : X.Opens} (s : Set (X.presheaf.obj (Opposite.op U))) (x : X) :
                                                            x X.zeroLocus s fs, xX.basicOpen f
                                                            theorem AlgebraicGeometry.Scheme.zeroLocus_mono (X : Scheme) {U : X.Opens} {s t : Set (X.presheaf.obj (Opposite.op U))} (h : s t) :
                                                            theorem AlgebraicGeometry.Scheme.zeroLocus_iUnion (X : Scheme) {U : X.Opens} {ι : Type u_1} (f : ιSet (X.presheaf.obj (Opposite.op U))) :
                                                            X.zeroLocus (⋃ (i : ι), f i) = ⋂ (i : ι), X.zeroLocus (f i)
                                                            @[deprecated AlgebraicGeometry.Scheme.SpecMap_presheaf_map_eqToHom (since := "2025-10-07")]

                                                            Alias of AlgebraicGeometry.Scheme.SpecMap_presheaf_map_eqToHom.

                                                            theorem AlgebraicGeometry.germ_eq_zero_of_pow_mul_eq_zero {X : Scheme} {U : TopologicalSpace.Opens X} (x : U) {f s : (X.presheaf.obj (Opposite.op U))} (hx : x X.basicOpen s) {n : } (hf : s ^ n * f = 0) :
                                                            @[deprecated AlgebraicGeometry.Scheme.hom_base_inv_base (since := "2025-10-07")]

                                                            Alias of AlgebraicGeometry.Scheme.hom_base_inv_base.

                                                            @[simp]
                                                            theorem AlgebraicGeometry.Scheme.hom_inv_apply {X Y : Scheme} (e : X Y) (x : X) :
                                                            e.inv (e.hom x) = x
                                                            @[deprecated AlgebraicGeometry.Scheme.hom_inv_apply (since := "2025-10-07")]
                                                            theorem AlgebraicGeometry.Scheme.iso_hom_base_inv_base_apply {X Y : Scheme} (e : X Y) (x : X) :
                                                            e.inv (e.hom x) = x

                                                            Alias of AlgebraicGeometry.Scheme.hom_inv_apply.

                                                            @[deprecated AlgebraicGeometry.Scheme.inv_base_hom_base (since := "2025-10-07")]

                                                            Alias of AlgebraicGeometry.Scheme.inv_base_hom_base.

                                                            @[simp]
                                                            theorem AlgebraicGeometry.Scheme.inv_hom_apply {X Y : Scheme} (e : X Y) (y : Y) :
                                                            e.hom (e.inv y) = y
                                                            @[deprecated AlgebraicGeometry.Scheme.inv_hom_apply (since := "2025-10-07")]
                                                            theorem AlgebraicGeometry.Scheme.iso_inv_base_hom_base_apply {X Y : Scheme} (e : X Y) (y : Y) :
                                                            e.hom (e.inv y) = y

                                                            Alias of AlgebraicGeometry.Scheme.inv_hom_apply.

                                                            If x = y, the stalk maps are isomorphic.

                                                            Equations
                                                            Instances For
                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_id (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_id.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_comp (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_comp.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkSpecializes_stalkMap (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkSpecializes_stalkMap.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr_hom (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr_hom.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr_hom_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr_hom_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr_point (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr_point.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_congr_point_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_congr_point_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv_apply (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_hom_inv_apply.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom_apply (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.stalkMap_inv_hom_apply.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.germ_stalkMap (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.germ_stalkMap.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.germ_stalkMap_assoc (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.germ_stalkMap_assoc.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.germ_stalkMap_apply (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.germ_stalkMap_apply.

                                                              @[deprecated AlgebraicGeometry.Scheme.Hom.arrowStalkMapIsoOfEq (since := "2025-10-07")]

                                                              Alias of AlgebraicGeometry.Scheme.Hom.arrowStalkMapIsoOfEq.


                                                              If x = y, the stalk maps are isomorphic.

                                                              Equations
                                                              Instances For