Skip to content

Commit

Permalink
chore(Topology/Sheaves/Forget): port an example from a comment (#6796)
Browse files Browse the repository at this point in the history
I left the example in the docs, so that it shows up in doc-gen, and I duplicated it outside of the docs, so that it does not rot.
  • Loading branch information
adomani committed Aug 27, 2023
1 parent 93bcc03 commit d7d4e1f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Mathlib/Topology/Sheaves/Forget.lean
Expand Up @@ -234,14 +234,17 @@ set_option linter.uppercaseLean3 false in
As an example, we now have everything we need to check the sheaf condition
for a presheaf of commutative rings, merely by checking the sheaf condition
for the underlying sheaf of types.
```
import algebra.category.Ring.limits
example (X : Top) (F : presheaf CommRing X) (h : presheaf.is_sheaf (F ⋙ (forget CommRing))) :
F.is_sheaf :=
(is_sheaf_iff_is_sheaf_comp (forget CommRing) F).mpr h
```lean
example (X : TopCat) (F : Presheaf CommRingCat X)
(h : Presheaf.IsSheaf (F ⋙ (forget CommRingCat))) :
F.IsSheaf :=
(isSheaf_iff_isSheaf_comp (forget CommRingCat) F).mpr h
```
-/

example (X : TopCat) (F : Presheaf CommRingCat X)
(h : Presheaf.IsSheaf (F ⋙ (forget CommRingCat))) :
F.IsSheaf :=
(isSheaf_iff_isSheaf_comp (forget CommRingCat) F).mpr h

end Presheaf

Expand Down

0 comments on commit d7d4e1f

Please sign in to comment.