feat(CategoryTheory/Topos): Define subobject classifier for sheaf of types#35867
feat(CategoryTheory/Topos): Define subobject classifier for sheaf of types#35867edegeltje wants to merge 4 commits intoleanprover-community:masterfrom
Conversation
PR summary bf3d8ad275Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| /-- A construction of a terminal object in a sheaf category, given by the constant `PUnit` sheaf. -/ | ||
| @[simps] | ||
| def Sheaf.terminal (J : GrothendieckTopology C) : Sheaf J (Type w) where | ||
| val := (CategoryTheory.Functor.const _).obj PUnit | ||
| cond := Presheaf.isSheaf_of_isTerminal J Types.isTerminalPUnit | ||
|
|
||
| /-- The constant `PUnit` sheaf is a terminal object in `Sheaf J (Type w)` -/ | ||
| def Sheaf.terminal.isTerminal {J : GrothendieckTopology C} : IsTerminal (Sheaf.terminal.{w} J) := | ||
| .ofUniqueHom (fun F => { val := { app X := (fun _ => .unit) } }) (by intros; ext; rfl) |
There was a problem hiding this comment.
This should go in some earlier file.
| /-- Sheaf categories have a subobject classifier. -/ | ||
| instance (J : GrothendieckTopology C) : HasClassifier (Sheaf J (Type (max u v))) where | ||
| exists_classifier := ⟨Sheaf.classifier J⟩ |
There was a problem hiding this comment.
Could you please generalize this instance to Sheaf J (Type w) with suitable UnivLE assumptions?
| simp_rw [← FunctorToTypes.naturality, ← hfst,eq_comm] | ||
|
|
||
| /-- | ||
| A construction of subobject classifier for sheaf categories. `Ω` is the sheaf of closed sieves, |
There was a problem hiding this comment.
| A construction of subobject classifier for sheaf categories. `Ω` is the sheaf of closed sieves, | |
| A construction of a subobject classifier for sheaf categories. `Ω` is the sheaf of closed sieves, |
| .mkOfTerminalΩ₀ | ||
| (.terminal J) | ||
| (Sheaf.terminal.isTerminal) | ||
| (Sheaf.Ω) | ||
| (Sheaf.truth) | ||
| (Sheaf.χ) | ||
| (Sheaf.classifier_isPullback) | ||
| (Sheaf.χ_unique) |
There was a problem hiding this comment.
Is this intentionally ungolfed? Could you please also remove the superfluous ( ... )s?
| lemma Sheaf.classifier_isPullback {J : GrothendieckTopology C} {F G : Sheaf J (Type (max u v))} | ||
| (m : F ⟶ G) [Mono m] : | ||
| IsPullback m ((Sheaf.terminal.isTerminal).from F) (Sheaf.χ m) (Sheaf.truth) where | ||
| w := by |
There was a problem hiding this comment.
I am wondering if it is easier to show that this is a pullback square on all sections? Then this is a square in Type for which you could use something like CategoryTheory.Limits.Types.isPullback_iff.
| val.app X := fun _ => ⟨⊤,_⟩ | ||
|
|
||
| /-- | ||
| given a monomorphism of sheaves `η : F ⟶ G`, a point X of the site, map an element `x : G(X)` |
There was a problem hiding this comment.
| given a monomorphism of sheaves `η : F ⟶ G`, a point X of the site, map an element `x : G(X)` | |
| Given a monomorphism of sheaves `η : F ⟶ G`, an object X of the site, map an element `x : G(X)` |
"point" is confusing, given CategoryTheory.GrothendieckTopology.Point exists.
| @[simps] | ||
| def Sheaf.χ {J : GrothendieckTopology C} {F G : Sheaf J (Type (max u v))} (m : F ⟶ G) [Mono m] : | ||
| G ⟶ Sheaf.Ω where | ||
| val.app X := fun x => by |
There was a problem hiding this comment.
Would it make sense to first define this for presheaves (with values in all Sieves) and then show it factors through the closed ones in the case of a sheaf?
| adapted from: | ||
| https://github.com/edegeltje/CwFTT/blob/591d4505390172ae70e1bc97544d293a35cc0b3f/CwFTT/Classifier/Sheaf.lean | ||
|
|
There was a problem hiding this comment.
You could put this in the PR description, but what is the purpose of having this link here?
There was a problem hiding this comment.
I just copied the style of Topos/Classifier.lean... i'm fine with removing it though
This PR defines
Sheaf.classifier J : Classifier (Sheaf J (Type (max u v)), which is the last ingredient missing to sheaf categories being elementary topoi.adapted from:
https://github.com/edegeltje/CwFTT/blob/591d4505390172ae70e1bc97544d293a35cc0b3f/CwFTT/Classifier/Sheaf.lean