The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V28. Algebraic geometry

Mathlib.Topology.Sheaves.LocalPredicate

43 declarations. Mathlib docs · Source

Functions satisfying a local predicate form a sheaf.

At this stage, in Mathlib/Topology/Sheaves/SheafOfFunctions.lean we've proved that not-necessarily-continuous functions from a topological space into some type (or type family) form a sheaf.

Why do the continuous functions form a sheaf? The point is just that continuity is a local condition, so one can use the lifting condition for functions to provide a candidate lift, then verify that the lift is actually continuous by using the factorisation condition for the lift (which guarantees that on each open set it agrees with the functions being lifted, which were assumed to be continuous).

This file abstracts this argument to work for any collection of dependent functions on a topological space satisfying a "local predicate".

As an application, we check that continuity is a local predicate in this sense, and provide

  • TopCat.sheafToTop: continuous functions into a topological space form a sheaf

A sheaf constructed in this way has a natural map stalkToFiber from the stalks to the types in the ambient type family.

We give conditions sufficient to show that this map is injective and/or surjective.

theorem TopCat.PrelocalPredicate.mk.injEq E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (pred : {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop)
  (res : ∀ {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V) (f : (x : ↥V) → T ↑x), pred f → pred fun x ↦ f (i x))
  (pred_1 : {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop)
  (res_1 : ∀ {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V) (f : (x : ↥V) → T ↑x), pred_1 f → pred_1 fun x ↦ f (i x)),
  ({ pred := pred, res := res } = { pred := pred_1, res := res_1 }) = (pred = pred_1)

theorem TopCat.LocalPredicate.mk.inj E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} {toPrelocalPredicate : TopCat.PrelocalPredicate T}
  {locality :
    ∀ {U : TopologicalSpace.Opens ↑X} (f : (x : ↥U) → T ↑x),
      (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, toPrelocalPredicate.pred fun x ↦ f (i x)) → toPrelocalPredicate.pred f}
  {toPrelocalPredicate_1 : TopCat.PrelocalPredicate T}
  {locality_1 :
    ∀ {U : TopologicalSpace.Opens ↑X} (f : (x : ↥U) → T ↑x),
      (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, toPrelocalPredicate_1.pred fun x ↦ f (i x)) →
        toPrelocalPredicate_1.pred f},
  { toPrelocalPredicate := toPrelocalPredicate, locality := locality } =
      { toPrelocalPredicate := toPrelocalPredicate_1, locality := locality_1 } →
    toPrelocalPredicate = toPrelocalPredicate_1

def TopCat.LocalPredicate.ctorIdx E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.LocalPredicate T → ℕ

def TopCat.PrelocalPredicate.ctorIdx E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.PrelocalPredicate T → ℕ

theorem TopCat.PrelocalPredicate.mk.inj E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} {pred : {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop}
  {res : ∀ {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V) (f : (x : ↥V) → T ↑x), pred f → pred fun x ↦ f (i x)}
  {pred_1 : {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop}
  {res_1 : ∀ {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V) (f : (x : ↥V) → T ↑x), pred_1 f → pred_1 fun x ↦ f (i x)},
  { pred := pred, res := res } = { pred := pred_1, res := res_1 } → pred = pred_1

theorem TopCat.LocalPredicate.mk.injEq E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (toPrelocalPredicate : TopCat.PrelocalPredicate T)
  (locality :
    ∀ {U : TopologicalSpace.Opens ↑X} (f : (x : ↥U) → T ↑x),
      (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, toPrelocalPredicate.pred fun x ↦ f (i x)) → toPrelocalPredicate.pred f)
  (toPrelocalPredicate_1 : TopCat.PrelocalPredicate T)
  (locality_1 :
    ∀ {U : TopologicalSpace.Opens ↑X} (f : (x : ↥U) → T ↑x),
      (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, toPrelocalPredicate_1.pred fun x ↦ f (i x)) →
        toPrelocalPredicate_1.pred f),
  ({ toPrelocalPredicate := toPrelocalPredicate, locality := locality } =
      { toPrelocalPredicate := toPrelocalPredicate_1, locality := locality_1 }) =
    (toPrelocalPredicate = toPrelocalPredicate_1)

structure TopCat.PrelocalPredicate E1 #

{X : TopCat} → (↑X → Type u_1) → Type (max u_1 u_2)

Given a topological space X : TopCat and a type family T : X → Type, a P : PrelocalPredicate T consists of:

  • a family of predicates P.pred, one for each U : Opens X, of the form (Π x : U, T x) → Prop
  • a proof that if f : Π x : V, T x satisfies the predicate on V : Opens X, then the restriction of f to any open subset U also satisfies the predicate.

ctor TopCat.PrelocalPredicate.mk E0 #

{X : TopCat} →
  {T : ↑X → Type u_1} →
    (pred : {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop) →
      (∀ {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V) (f : (x : ↥V) → T ↑x), pred f → pred fun x ↦ f (i x)) →
        TopCat.PrelocalPredicate T

abbrev TopCat.PrelocalPredicate.pred E1 #

{X : TopCat} →
  {T : ↑X → Type u_1} → TopCat.PrelocalPredicate T → {U : TopologicalSpace.Opens ↑X} → ((x : ↥U) → T ↑x) → Prop

The underlying predicate of a prelocal predicate

theorem TopCat.PrelocalPredicate.res E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (self : TopCat.PrelocalPredicate T) {U V : TopologicalSpace.Opens ↑X} (i : U ⟶ V)
  (f : (x : ↥V) → T ↑x), self.pred f → self.pred fun x ↦ f (i x)

The underlying predicate should be invariant under restriction

def TopCat.continuousPrelocal E1 #

(X : TopCat) → (T : Type u_3) → [TopologicalSpace T] → TopCat.PrelocalPredicate fun x ↦ T

Continuity is a "prelocal" predicate on functions to a fixed topological space T.

theorem TopCat.continuousPrelocal_pred E0 #

∀ (X : TopCat) (T : Type u_3) [inst : TopologicalSpace T] {x : TopologicalSpace.Opens ↑X} (f : ↥x → T),
  (X.continuousPrelocal T).pred f = Continuous f

instance TopCat.inhabitedPrelocalPredicate E0 #

(X : TopCat) → (T : Type u_3) → [TopologicalSpace T] → Inhabited (TopCat.PrelocalPredicate fun x ↦ T)

Satisfying the inhabited linter.

structure TopCat.LocalPredicate E3 #

{X : TopCat} → (↑X → Type u_1) → Type (max u_1 u_2)

Given a topological space X : TopCat and a type family T : X → Type, a P : LocalPredicate T consists of:

  • a family of predicates P.pred, one for each U : Opens X, of the form (Π x : U, T x) → Prop
  • a proof that if f : Π x : V, T x satisfies the predicate on V : Opens X, then the restriction of f to any open subset U also satisfies the predicate, and
  • a proof that given some f : Π x : U, T x, if for every x : U we can find an open set x ∈ V ≤ U so that the restriction of f to V satisfies the predicate, then f itself satisfies the predicate.

ctor TopCat.LocalPredicate.mk E0 #

{X : TopCat} →
  {T : ↑X → Type u_1} →
    (toPrelocalPredicate : TopCat.PrelocalPredicate T) →
      (∀ {U : TopologicalSpace.Opens ↑X} (f : (x : ↥U) → T ↑x),
          (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, toPrelocalPredicate.pred fun x ↦ f (i x)) →
            toPrelocalPredicate.pred f) →
        TopCat.LocalPredicate T

abbrev TopCat.LocalPredicate.toPrelocalPredicate E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.LocalPredicate T → TopCat.PrelocalPredicate T

theorem TopCat.LocalPredicate.locality E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (self : TopCat.LocalPredicate T) {U : TopologicalSpace.Opens ↑X}
  (f : (x : ↥U) → T ↑x), (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, self.pred fun x ↦ f (i x)) → self.pred f

A local predicate must be local --- provided that it is locally satisfied, it is also globally satisfied

def TopCat.continuousLocal E1 #

(X : TopCat) → (T : Type u_3) → [TopologicalSpace T] → TopCat.LocalPredicate fun x ↦ T

Continuity is a "local" predicate on functions to a fixed topological space T.

instance TopCat.inhabitedLocalPredicate E0 #

(X : TopCat) → (T : Type u_3) → [TopologicalSpace T] → Inhabited (TopCat.LocalPredicate fun x ↦ T)

Satisfying the inhabited linter.

def TopCat.PrelocalPredicate.and E1 #

{X : TopCat} →
  {T : ↑X → Type u_1} → TopCat.PrelocalPredicate T → TopCat.PrelocalPredicate T → TopCat.PrelocalPredicate T

The conjunction of two prelocal predicates is prelocal.

def TopCat.LocalPredicate.and E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.LocalPredicate T → TopCat.LocalPredicate T → TopCat.LocalPredicate T

The conjunction of two prelocal predicates is prelocal.

def TopCat.isSection E1 #

{X : TopCat} → {T : Type u_3} → (T → ↑X) → TopCat.LocalPredicate fun x ↦ T

The local predicate of being a partial section of a function.

def TopCat.PrelocalPredicate.sheafify E1 #

{X : TopCat} → {T : ↑X → Type u_2} → TopCat.PrelocalPredicate T → TopCat.LocalPredicate T

Given a P : PrelocalPredicate, we can always construct a LocalPredicate by asking that the condition from P holds locally near every point.

theorem TopCat.PrelocalPredicate.sheafifyOf E1 #

∀ {X : TopCat} {T : ↑X → Type u_2} {P : TopCat.PrelocalPredicate T} {U : TopologicalSpace.Opens ↑X}
  {f : (x : ↥U) → T ↑x}, P.pred f → P.sheafify.pred f

theorem TopCat.PrelocalPredicate.sheafify_inductionOn E1 #

∀ {X : TopCat} {T : ↑X → Type u_2} (P : TopCat.PrelocalPredicate T) (op : {x : ↑X} → T x → T x),
  (∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T ↑x},
      P.pred a → ∀ (p : ↥U), ∃ W i, ↑p ∈ W ∧ P.pred fun x ↦ op (a (i x))) →
    ∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T ↑x}, P.sheafify.pred a → P.sheafify.pred fun x ↦ op (a x)

For a unary operation (e.g. x ↦ -x) defined at each stalk, if a prelocal predicate is closed under the operation on each open set (possibly by refinement), then the sheafified predicate is also closed under the operation. See sheafify_inductionOn' for the version without refinement.

theorem TopCat.PrelocalPredicate.sheafify_inductionOn' E1 #

∀ {X : TopCat} {T : ↑X → Type u_2} (P : TopCat.PrelocalPredicate T) (op : {x : ↑X} → T x → T x),
  (∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T ↑x}, P.pred a → P.pred fun x ↦ op (a x)) →
    ∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T ↑x}, P.sheafify.pred a → P.sheafify.pred fun x ↦ op (a x)

For a unary operation (e.g. x ↦ -x) defined at each stalk, if a prelocal predicate is closed under the operation on each open set, then the sheafified predicate is also closed under the operation. See sheafify_inductionOn for the version with refinement.

theorem TopCat.PrelocalPredicate.sheafify_inductionOn₂ E1 #

∀ {X : TopCat} {T₁ : ↑X → Type u_2} {T₂ : ↑X → Type u_3} {T₃ : ↑X → Type u_4} (P₁ : TopCat.PrelocalPredicate T₁)
  (P₂ : TopCat.PrelocalPredicate T₂) (P₃ : TopCat.PrelocalPredicate T₃) (op : {x : ↑X} → T₁ x → T₂ x → T₃ x),
  (∀ {U V : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T₁ ↑x} {b : (x : ↥V) → T₂ ↑x},
      P₁.pred a → P₂.pred b → ∀ (p : ↥(U ⊓ V)), ∃ W ia ib, ↑p ∈ W ∧ P₃.pred fun x ↦ op (a (ia x)) (b (ib x))) →
    ∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T₁ ↑x} {b : (x : ↥U) → T₂ ↑x},
      P₁.sheafify.pred a → P₂.sheafify.pred b → P₃.sheafify.pred fun x ↦ op (a x) (b x)

For a binary operation (e.g. x ↦ y ↦ x + y) defined at each stalk, if a prelocal predicate is closed under the operation on each open set (possibly by refinement), then the sheafified predicate is also closed under the operation. See sheafify_inductionOn₂' for the version without refinement.

theorem TopCat.PrelocalPredicate.sheafify_inductionOn₂' E1 #

∀ {X : TopCat} {T₁ : ↑X → Type u_2} {T₂ : ↑X → Type u_3} {T₃ : ↑X → Type u_4} (P₁ : TopCat.PrelocalPredicate T₁)
  (P₂ : TopCat.PrelocalPredicate T₂) (P₃ : TopCat.PrelocalPredicate T₃) (op : {x : ↑X} → T₁ x → T₂ x → T₃ x),
  (∀ {U V : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T₁ ↑x} {b : (x : ↥V) → T₂ ↑x},
      P₁.pred a → P₂.pred b → P₃.pred fun x ↦ op (a ⟨↑x, ⋯⟩) (b ⟨↑x, ⋯⟩)) →
    ∀ {U : TopologicalSpace.Opens ↑X} {a : (x : ↥U) → T₁ ↑x} {b : (x : ↥U) → T₂ ↑x},
      P₁.sheafify.pred a → P₂.sheafify.pred b → P₃.sheafify.pred fun x ↦ op (a x) (b x)

For a binary operation (e.g. x ↦ y ↦ x + y) defined at each stalk, if a prelocal predicate is closed under the operation on each open set, then the sheafified predicate is also closed under the operation. See sheafify_inductionOn₂ for the version with refinement.

def TopCat.subpresheafToTypes E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.PrelocalPredicate T → TopCat.Presheaf (Type (max u_1 u_2)) X

The subpresheaf of dependent functions on X satisfying the "pre-local" predicate P.

theorem TopCat.subpresheafToTypes_map E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.PrelocalPredicate T) {X_1 Y : (TopologicalSpace.Opens ↑X)ᵒᵖ}
  (i : X_1 ⟶ Y), (TopCat.subpresheafToTypes P).map i = TypeCat.ofHom fun f ↦ ⟨fun x ↦ ↑f (i.unop x), ⋯⟩

theorem TopCat.subpresheafToTypes_obj E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.PrelocalPredicate T) (U : (TopologicalSpace.Opens ↑X)ᵒᵖ),
  (TopCat.subpresheafToTypes P).obj U = { f // P.pred f }

def TopCat.subpresheafToTypes.subtype E1 #

{X : TopCat} →
  {T : ↑X → Type u_1} → (P : TopCat.PrelocalPredicate T) → TopCat.subpresheafToTypes P ⟶ X.presheafToTypes T

The natural transformation including the subpresheaf of functions satisfying a local predicate into the presheaf of all functions.

theorem TopCat.subpresheafToTypes.isSheaf E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T),
  (TopCat.subpresheafToTypes P.toPrelocalPredicate).IsSheaf

The functions satisfying a local predicate satisfy the sheaf condition.

def TopCat.subsheafToTypes E1 #

{X : TopCat} → {T : ↑X → Type u_1} → TopCat.LocalPredicate T → TopCat.Sheaf (Type (max u_2 u_1)) X

The subsheaf of the sheaf of all dependently typed functions satisfying the local predicate P.

theorem TopCat.subsheafToTypes_obj E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T),
  (TopCat.subsheafToTypes P).obj = TopCat.subpresheafToTypes P.toPrelocalPredicate

def TopCat.LocalPredicate.cocone E1 #

{X : TopCat} →
  {T : ↑X → Type u_1} →
    (P : TopCat.LocalPredicate T) →
      (x : ↑X) →
        CategoryTheory.Limits.Cocone
          ((TopologicalSpace.OpenNhds.inclusion x).op.comp (TopCat.subpresheafToTypes P.toPrelocalPredicate))

Auxiliary definition for stalkToFiber.

def TopCat.stalkToFiber E1 #

{X : TopCat} →
  {T : ↑X → Type u_1} → (P : TopCat.LocalPredicate T) → (x : ↑X) → (TopCat.subsheafToTypes P).presheaf.stalk x ⟶ T x

There is a canonical map from the stalk to the original fiber, given by evaluating sections.

theorem TopCat.stalkToFiber_ι E0 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T) (x : ↑X) (U : (TopologicalSpace.OpenNhds x)ᵒᵖ)
  (fU : { f // P.pred f }),
  (CategoryTheory.ConcreteCategory.hom (TopCat.stalkToFiber P x))
      ((CategoryTheory.ConcreteCategory.hom
          (CategoryTheory.Limits.colimit.ι
            ((TopologicalSpace.OpenNhds.inclusion x).op.comp (TopCat.subpresheafToTypes P.toPrelocalPredicate)) U))
        fU) =
    (CategoryTheory.ConcreteCategory.hom ((P.cocone x).ι.app U)) fU

theorem TopCat.stalkToFiber_germ E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T) (U : TopologicalSpace.Opens ↑X) (x : ↑X) (hx : x ∈ U)
  (f : (fun X ↦ X) ((TopCat.subsheafToTypes P).presheaf.obj (Opposite.op U))),
  (CategoryTheory.ConcreteCategory.hom (TopCat.stalkToFiber P x))
      ((CategoryTheory.ConcreteCategory.hom ((TopCat.subsheafToTypes P).presheaf.germ U x hx)) f) =
    ↑f ⟨x, hx⟩

theorem TopCat.stalkToFiber_surjective E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T) (x : ↑X),
  (∀ (t : T x), ∃ U f, ∃ (_ : P.pred f), f ⟨x, ⋯⟩ = t) →
    Function.Surjective ⇑(CategoryTheory.ConcreteCategory.hom (TopCat.stalkToFiber P x))

The stalkToFiber map is surjective at x if every point in the fiber T x has an allowed section passing through it.

theorem TopCat.stalkToFiber_injective E1 #

∀ {X : TopCat} {T : ↑X → Type u_1} (P : TopCat.LocalPredicate T) (x : ↑X),
  (∀ (U V : TopologicalSpace.OpenNhds x) (fU : (y : ↥↑U) → T ↑y),
      P.pred fU →
        ∀ (fV : (y : ↥↑V) → T ↑y), P.pred fV → fU ⟨x, ⋯⟩ = fV ⟨x, ⋯⟩ → ∃ W iU iV, ∀ (w : ↥↑W), fU (iU w) = fV (iV w)) →
    Function.Injective ⇑(CategoryTheory.ConcreteCategory.hom (TopCat.stalkToFiber P x))

The stalkToFiber map is injective at x if any two allowed sections which agree at x agree on some neighborhood of x.

def TopCat.subpresheafContinuousPrelocalIsoPresheafToTop E1 #

{X : TopCat} → (T : TopCat) → TopCat.subpresheafToTypes (X.continuousPrelocal ↑T) ≅ X.presheafToTop T

Some repackaging: the presheaf of functions satisfying continuousPrelocal is just the same thing as the presheaf of continuous functions.

def TopCat.sheafToTop E1 #

{X : TopCat} → TopCat → TopCat.Sheaf (Type u_2) X

The sheaf of continuous functions on X with values in a space T.