Documentation

Mathlib.AlgebraicGeometry.StructureSheaf

The structure sheaf on PrimeSpectrum R. #

We define the structure sheaf on TopCat.of (PrimeSpectrum R), for an R-module M and prove basic properties about it. We define this as a subsheaf of the sheaf of dependent functions into the localizations, cut out by the condition that the function must be locally equal to a quotient of an element of M by an element of R.

Because the condition "is equal to a fraction" passes to smaller open subsets, the subset of functions satisfying this condition is automatically a subpresheaf. Because the condition "is locally equal to a fraction" is local, it is also a subsheaf.

(It may be helpful to refer back to Mathlib/Topology/Sheaves/SheafOfFunctions.lean, where we show that dependent functions into any type family form a sheaf, and also Mathlib/Topology/Sheaves/LocalPredicate.lean, where we characterise the predicates which pick out sub-presheaves and sub-sheaves of these sheaves.)

When M = R, the structure sheaf is furthermore a sheaf of commutative rings, which we bundle as structureSheaf : Sheaf CommRingCat (PrimeSpectrum.Top R).

We then obtain two key descriptions of the structure sheaf. We show that the stalks Mₓ is the localization of M at the prime corresponding to x, and we show that the sections Γ(M, D(f)) is the localization of M away from f.

Note that the results of this file are packaged into schemes and sheaf of modules in later files, and one usually should not directly use the results in this file to respect the abstraction boundaries.

References #

The prime spectrum as an object of TopCat.

Equations
Instances For
    @[reducible, inline]

    The type family over PrimeSpectrum R consisting of the localization over each point.

    Equations
    Instances For

      The predicate saying that a dependent function on an open U is realised as a fixed fraction r / s in each of the stalks (which are localizations at various prime ideals).

      Equations
      Instances For

        The predicate IsFraction is "prelocal", in the sense that if it holds on U it holds on any open subset V of U.

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

          We will define the structure sheaf as the subsheaf of all dependent functions in Π x : U, Localizations R x consisting of those functions which can locally be expressed as a ratio of (the images in the localization of) elements of R.

          Quoting Hartshorne:

          For an open set $U ⊆ Spec A$, we define $𝒪(U)$ to be the set of functions $s : U → ⨆_{𝔭 ∈ U} A_𝔭$, such that $s(𝔭) ∈ A_𝔭$ for each $𝔭$, and such that $s$ is locally a quotient of elements of $A$: to be precise, we require that for each $𝔭 ∈ U$, there is a neighborhood $V$ of $𝔭$, contained in $U$, and elements $a, f ∈ A$, such that for each $𝔮 ∈ V, f ∉ 𝔮$, and $s(𝔮) = a/f$ in $A_𝔮$.

          Now Hartshorne had the disadvantage of not knowing about dependent functions, so we replace his circumlocution about functions into a disjoint union with Π x : U, Localizations x.

          Equations
          Instances For

            The functions satisfying isLocallyFraction form a submodule.

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

              The functions satisfying isLocallyFraction form a subalgebra.

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

                The structure sheaf (valued in Type, not yet CommRingCat) is the subsheaf consisting of functions satisfying isLocallyFraction.

                Equations
                Instances For
                  @[simp]
                  theorem AlgebraicGeometry.structureSheafInType.add_apply {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {U : TopologicalSpace.Opens (PrimeSpectrum.Top R)} (s t : (structureSheafInType R M).val.obj (Opposite.op U)) (x : U) :
                  ↑(s + t) x = s x + t x
                  @[simp]
                  theorem AlgebraicGeometry.structureSheafInType.mul_apply {R A : Type u} [CommRing R] [CommRing A] [Algebra R A] {U : TopologicalSpace.Opens (PrimeSpectrum.Top R)} (s t : (structureSheafInType R A).val.obj (Opposite.op U)) (x : U) :
                  ↑(s * t) x = s x * t x
                  @[simp]
                  theorem AlgebraicGeometry.structureSheafInType.smul_apply {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {U : TopologicalSpace.Opens (PrimeSpectrum.Top R)} (r : R) (s : (structureSheafInType R M).val.obj (Opposite.op U)) (x : U) :
                  ↑(r s) x = r s x

                  The structure presheaf, valued in ModuleCat, constructed by dressing up the Type-valued structure presheaf.

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

                    The structure presheaf, valued in CommRingCat, constructed by dressing up the Type-valued structure presheaf.

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

                      The structure sheaf of a module as a presheaf of modules on Spec R. We will later package this into a Scheme.Modules in Tilde.lean.

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

                        Some glue, verifying that the structure presheaf valued in CommRingCat agrees with the Type-valued structure presheaf.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[simp]
                          theorem AlgebraicGeometry.StructureSheaf.res_apply {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (U V : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (i : V U) (s : (structureSheafInType R M).val.obj (Opposite.op U)) (x : V) :
                          ((structureSheafInType R M).val.map i.op s) x = s (i x)

                          The section of structureSheaf R on an open U sending each x ∈ U to the element f/g in the localization of R at x.

                          Equations
                          Instances For
                            @[simp]
                            theorem AlgebraicGeometry.StructureSheaf.const_apply {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (f : M) (g : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu : xU, g x.asIdeal.primeCompl) (x : U) :
                            (const f g U hu) x = LocalizedModule.mk f g,
                            theorem AlgebraicGeometry.StructureSheaf.const_add {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (f₁ f₂ : M) (g₁ g₂ : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu₁ : U PrimeSpectrum.basicOpen g₁) (hu₂ : U PrimeSpectrum.basicOpen g₂) :
                            const f₁ g₁ U hu₁ + const f₂ g₂ U hu₂ = const (g₂ f₁ + g₁ f₂) (g₁ * g₂) U
                            theorem AlgebraicGeometry.StructureSheaf.smul_const {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (f : M) (r g : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu : U PrimeSpectrum.basicOpen g) :
                            r const f g U hu = const (r f) g U hu
                            theorem AlgebraicGeometry.StructureSheaf.const_mul {R A : Type u} [CommRing R] [CommRing A] [Algebra R A] (f₁ f₂ : A) (g₁ g₂ : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu₁ : U PrimeSpectrum.basicOpen g₁) (hu₂ : U PrimeSpectrum.basicOpen g₂) :
                            const f₁ g₁ U hu₁ * const f₂ g₂ U hu₂ = const (f₁ * f₂) (g₁ * g₂) U
                            theorem AlgebraicGeometry.StructureSheaf.const_ext {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {f₁ f₂ : M} {g₁ g₂ : R} {U : TopologicalSpace.Opens (PrimeSpectrum.Top R)} {hu₁ : U PrimeSpectrum.basicOpen g₁} {hu₂ : U PrimeSpectrum.basicOpen g₂} (h : g₂ f₁ = g₁ f₂) :
                            const f₁ g₁ U hu₁ = const f₂ g₂ U hu₂
                            theorem AlgebraicGeometry.StructureSheaf.const_congr {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {f₁ f₂ : M} {g₁ g₂ : R} {U : TopologicalSpace.Opens (PrimeSpectrum.Top R)} {hu : U PrimeSpectrum.basicOpen g₁} (hf : f₁ = f₂) (hg : g₁ = g₂) :
                            const f₁ g₁ U hu = const f₂ g₂ U
                            theorem AlgebraicGeometry.StructureSheaf.const_mul_cancel {R : Type u} [CommRing R] (f g₁ g₂ : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu₁ : U PrimeSpectrum.basicOpen g₁) (hu₂ : U PrimeSpectrum.basicOpen g₂) :
                            const f g₁ U hu₁ * const g₁ g₂ U hu₂ = const f g₂ U hu₂
                            theorem AlgebraicGeometry.StructureSheaf.const_mul_cancel' {R : Type u} [CommRing R] (f g₁ g₂ : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu₁ : U PrimeSpectrum.basicOpen g₁) (hu₂ : U PrimeSpectrum.basicOpen g₂) :
                            const g₁ g₂ U hu₂ * const f g₁ U hu₁ = const f g₂ U hu₂
                            theorem AlgebraicGeometry.StructureSheaf.const_eq_const_of_smul_eq_smul {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (f₁ f₂ : M) (g₁ g₂ : R) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (hu₁ : U PrimeSpectrum.basicOpen g₁) (hu₂ : U PrimeSpectrum.basicOpen g₂) (H : g₁ f₂ = g₂ f₁) :
                            const f₁ g₁ U hu₁ = const f₂ g₂ U hu₂

                            The canonical linear map interpreting an element of M as a section of the structure sheaf.

                            Equations
                            Instances For
                              def AlgebraicGeometry.StructureSheaf.toStalk (R : Type u) [CommRing R] (x : (PrimeSpectrum.Top R)) :
                              { carrier := R, commRing := inst✝ } (structurePresheafInCommRingCat R).stalk x

                              The canonical ring homomorphism interpreting an element of R as an element of the stalk of structureSheaf R at x.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[deprecated AlgebraicGeometry.StructureSheaf.algebraMap_germ (since := "2026-02-10")]

                                Alias of AlgebraicGeometry.StructureSheaf.algebraMap_germ.

                                The canonical ring homomorphism interpreting an element of R as an element of the stalk of structureSheaf R at x.

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

                                  The stalk of Spec R at x is isomorphic to the stalk of R^~ at x.

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

                                    The stalk of Spec R at x is isomorphic to Rₚ, where p is the prime corresponding to x.

                                    Equations
                                    Instances For

                                      The structure sheaf on $Spec R$, valued in CommRingCat.

                                      This is provided as a bundled SheafedSpace as Spec.SheafedSpace R later.

                                      Equations
                                      Instances For
                                        @[deprecated "algebraMap" (since := "2026-02-10")]

                                        The canonical ring homomorphism interpreting an element of R as a section of the structure sheaf.

                                        Equations
                                        Instances For

                                          Stalk of the structure sheaf at a prime p as localization of R

                                          Sections of the structure sheaf of Spec R on a basic open as localization of R

                                          The ring isomorphism between the ring R and the global sections Γ(X, 𝒪ₓ).

                                          Equations
                                          Instances For

                                            The map M_{f y} ⟶ N_{y} used to build maps between structure sheaves.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              @[simp]
                                              theorem AlgebraicGeometry.StructureSheaf.Localizations.comapFun_mk {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {S : Type u} [CommRing S] {N : Type u} [AddCommGroup N] [Module S N] {σ : R →+* S} (f : M →ₛₗ[σ] N) (y : (PrimeSpectrum.Top S)) (a : M) (b : (PrimeSpectrum.comap σ y).asIdeal.primeCompl) :
                                              (comapFun f y) (LocalizedModule.mk a b) = LocalizedModule.mk (f a) σ b,
                                              def AlgebraicGeometry.StructureSheaf.comapFun {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {S : Type u} [CommRing S] {N : Type u} [AddCommGroup N] [Module S N] {σ : R →+* S} (f : M →ₛₗ[σ] N) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (V : TopologicalSpace.Opens (PrimeSpectrum.Top S)) (hUV : V.carrier PrimeSpectrum.comap σ ⁻¹' U.carrier) (s : (x : U) → Localizations M x) (y : V) :

                                              Given a ring homomorphism f : R →+* S, an open set U of the prime spectrum of R and an open set V of the prime spectrum of S, such that V ⊆ (comap f) ⁻¹' U, we can push a section s on U to a section on V, by composing with Localization.localRingHom _ _ f from the left and comap f from the right. Explicitly, if s evaluates on comap f p to a / b, its image on V evaluates on p to f(a) / f(b).

                                              At the moment, we work with arbitrary dependent functions s : Π x : U, Localizations R x. Below, we prove the predicate isLocallyFraction is preserved by this map, hence it can be extended to a morphism between the structure sheaves of R and S.

                                              Equations
                                              Instances For

                                                For a ring homomorphism f : R →+* S and open sets U and V of the prime spectra of R and S such that V ⊆ (comap f) ⁻¹ U, the induced ring homomorphism from the structure sheaf of R at U to the structure sheaf of S at V.

                                                Explicitly, this map is given as follows: For a point p : V, if the section s evaluates on p to the fraction a / b, its image on V evaluates on p to the fraction f(a) / f(b).

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem AlgebraicGeometry.StructureSheaf.comapₗ_const {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] {S : Type u} [CommRing S] {N : Type u} [AddCommGroup N] [Module S N] {σ : R →+* S} (f : M →ₛₗ[σ] N) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (V : TopologicalSpace.Opens (PrimeSpectrum.Top S)) (hUV : V.carrier PrimeSpectrum.comap σ ⁻¹' U.carrier) (a : M) (b : R) (hb : U PrimeSpectrum.basicOpen b) :
                                                  (comapₗ f U V hUV) (const a b U hb) = const (f a) (σ b) V

                                                  For a ring homomorphism f : R →+* S and open sets U and V of the prime spectra of R and S such that V ⊆ (comap f) ⁻¹ U, the induced ring homomorphism from the structure sheaf of R at U to the structure sheaf of S at V.

                                                  Explicitly, this map is given as follows: For a point p : V, if the section s evaluates on p to the fraction a / b, its image on V evaluates on p to the fraction f(a) / f(b).

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    theorem AlgebraicGeometry.StructureSheaf.comap_const {R : Type u} [CommRing R] {S : Type u} [CommRing S] (f : R →+* S) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (V : TopologicalSpace.Opens (PrimeSpectrum.Top S)) (hUV : V.carrier PrimeSpectrum.comap f ⁻¹' U.carrier) (a b : R) (hb : xU, b x.asIdeal.primeCompl) :
                                                    (comap f U V hUV) (const a b U hb) = const (f a) (f b) V

                                                    For an inclusion i : V ⟶ U between open sets of the prime spectrum of R, the comap of the identity from OO_X(U) to OO_X(V) equals as the restriction map of the structure sheaf.

                                                    This is a generalization of the fact that, for fixed U, the comap of the identity from OO_X(U) to OO_X(U) is the identity.

                                                    The comap of the identity is the identity. In this variant of the lemma, two open subsets U and V are given as arguments, together with a proof that U = V. This is useful when U and V are not definitionally equal.

                                                    theorem AlgebraicGeometry.StructureSheaf.comap_comp {R : Type u} [CommRing R] {S : Type u} [CommRing S] {P : Type u} [CommRing P] (f : R →+* S) (g : S →+* P) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (V : TopologicalSpace.Opens (PrimeSpectrum.Top S)) (W : TopologicalSpace.Opens (PrimeSpectrum.Top P)) (hUV : pV, PrimeSpectrum.comap f p U) (hVW : pW, PrimeSpectrum.comap g p V) :
                                                    comap (g.comp f) U W = (comap g V W hVW).comp (comap f U V hUV)
                                                    theorem AlgebraicGeometry.StructureSheaf.toOpen_comp_comap_apply {R : Type u} [CommRing R] {S : Type u} [CommRing S] (f : R →+* S) (U : TopologicalSpace.Opens (PrimeSpectrum.Top R)) (x : R) :
                                                    (comap f U ((TopologicalSpace.Opens.comap { toFun := PrimeSpectrum.comap f, continuous_toFun := }) U) ) ((algebraMap R ((Spec.structureSheaf R).val.obj (Opposite.op U))) x) = (algebraMap S ((Spec.structureSheaf S).val.obj (Opposite.op ((TopologicalSpace.Opens.comap { toFun := PrimeSpectrum.comap f, continuous_toFun := }) U)))) (f x)