Skip to content

Commit de4c745

Browse files
feat: port Topology.Sheaves.PUnit (#4173)
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
1 parent 3d92471 commit de4c745

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,7 @@ import Mathlib.Topology.Sets.Order
23082308
import Mathlib.Topology.Sheaves.Abelian
23092309
import Mathlib.Topology.Sheaves.Init
23102310
import Mathlib.Topology.Sheaves.Limits
2311+
import Mathlib.Topology.Sheaves.PUnit
23112312
import Mathlib.Topology.Sheaves.Presheaf
23122313
import Mathlib.Topology.Sheaves.PresheafOfFunctions
23132314
import Mathlib.Topology.Sheaves.Sheaf
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/-
2+
Copyright (c) 2022 Jujian Zhang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Jujian Zhang
5+
6+
! This file was ported from Lean 3 source module topology.sheaves.punit
7+
! leanprover-community/mathlib commit d39590fc8728fbf6743249802486f8c91ffe07bc
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.Topology.Sheaves.SheafCondition.Sites
12+
13+
/-!
14+
# Presheaves on `PUnit`
15+
16+
Presheaves on `PUnit` satisfy sheaf condition iff its value at empty set is a terminal object.
17+
-/
18+
19+
20+
namespace TopCat.Presheaf
21+
22+
universe u v w
23+
24+
open CategoryTheory CategoryTheory.Limits TopCat Opposite
25+
26+
variable {C : Type u} [Category.{v} C]
27+
28+
theorem isSheaf_of_isTerminal_of_indiscrete {X : TopCat.{w}} (hind : X.str = ⊤) (F : Presheaf C X)
29+
(it : IsTerminal <| F.obj <| op ⊥) : F.IsSheaf := fun c U s hs => by
30+
obtain rfl | hne := eq_or_ne U ⊥
31+
· intro _ _
32+
rw [@exists_unique_iff_exists _ ⟨fun _ _ => _⟩]
33+
· refine' ⟨it.from _, fun U hU hs => IsTerminal.hom_ext _ _ _⟩
34+
rwa [le_bot_iff.1 hU.le]
35+
· apply it.hom_ext
36+
· convert Presieve.isSheafFor_top_sieve (F ⋙ coyoneda.obj (@op C c))
37+
rw [← Sieve.id_mem_iff_eq_top]
38+
have := (U.eq_bot_or_top hind).resolve_left hne
39+
subst this
40+
obtain he | ⟨⟨x⟩⟩ := isEmpty_or_nonempty X
41+
· exact (hne <| SetLike.ext'_iff.2 <| Set.univ_eq_empty_iff.2 he).elim
42+
obtain ⟨U, f, hf, hm⟩ := hs x _root_.trivial
43+
obtain rfl | rfl := U.eq_bot_or_top hind
44+
· cases hm
45+
· convert hf
46+
set_option linter.uppercaseLean3 false
47+
#align Top.presheaf.is_sheaf_of_is_terminal_of_indiscrete TopCat.Presheaf.isSheaf_of_isTerminal_of_indiscrete
48+
49+
theorem isSheaf_iff_isTerminal_of_indiscrete {X : TopCat.{w}} (hind : X.str = ⊤)
50+
(F : Presheaf C X) : F.IsSheaf ↔ Nonempty (IsTerminal <| F.obj <| op ⊥) :=
51+
fun h => ⟨Sheaf.isTerminalOfEmpty ⟨F, h⟩⟩, fun ⟨it⟩ =>
52+
isSheaf_of_isTerminal_of_indiscrete hind F it⟩
53+
#align Top.presheaf.is_sheaf_iff_is_terminal_of_indiscrete TopCat.Presheaf.isSheaf_iff_isTerminal_of_indiscrete
54+
55+
theorem isSheaf_on_pUnit_of_isTerminal (F : Presheaf C (TopCat.of PUnit))
56+
(it : IsTerminal <| F.obj <| op ⊥) : F.IsSheaf :=
57+
isSheaf_of_isTerminal_of_indiscrete (@Subsingleton.elim (TopologicalSpace PUnit) _ _ _) F it
58+
#align Top.presheaf.is_sheaf_on_punit_of_is_terminal TopCat.Presheaf.isSheaf_on_pUnit_of_isTerminal
59+
60+
theorem isSheaf_on_pUnit_iff_isTerminal (F : Presheaf C (TopCat.of PUnit)) :
61+
F.IsSheaf ↔ Nonempty (IsTerminal <| F.obj <| op ⊥) :=
62+
fun h => ⟨Sheaf.isTerminalOfEmpty ⟨F, h⟩⟩, fun ⟨it⟩ => isSheaf_on_pUnit_of_isTerminal F it⟩
63+
#align Top.presheaf.is_sheaf_on_punit_iff_is_terminal TopCat.Presheaf.isSheaf_on_pUnit_iff_isTerminal
64+
65+
end TopCat.Presheaf

0 commit comments

Comments
 (0)