/
stalks.lean
61 lines (49 loc) · 1.87 KB
/
stalks.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-- Copyright (c) 2019 Scott Morrison. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Authors: Scott Morrison
import algebraic_geometry.presheafed_space
import category_theory.instances.Top.stalks
universes v u v' u'
open category_theory
open category_theory.instances
open category_theory.limits
open algebraic_geometry
open topological_space
variables {C : Type u} [𝒞 : category.{v+1} C] [has_colimits.{v} C]
include 𝒞
local attribute [tidy] tactic.op_induction'
open category_theory.instances.Top.presheaf
namespace algebraic_geometry.PresheafedSpace
def stalk (X : PresheafedSpace.{v} C) (x : X) : C := X.𝒪.stalk x
def stalk_map {X Y : PresheafedSpace.{v} C} (α : X ⟶ Y) (x : X) : Y.stalk (α x) ⟶ X.stalk x :=
(stalk_functor C (α x)).map (α.c) ≫ X.𝒪.stalk_pushforward C α x
namespace stalk_map
@[simp] lemma id (X : PresheafedSpace.{v} C) (x : X) : stalk_map (𝟙 X) x = 𝟙 (X.stalk x) :=
begin
dsimp [stalk_map],
simp only [stalk_pushforward.id],
rw [←category_theory.functor.map_comp],
convert (stalk_functor C x).map_id X.𝒪,
tidy,
end
.
@[simp] lemma comp {X Y Z : PresheafedSpace.{v} C} (α : X ⟶ Y) (β : Y ⟶ Z) (x : X) :
stalk_map (α ≫ β) x =
(stalk_map β (α x) : Z.stalk (β (α x)) ⟶ Y.stalk (α x)) ≫
(stalk_map α x : Y.stalk (α x) ⟶ X.stalk x) :=
begin
dsimp [stalk, stalk_map, stalk_functor, stalk_pushforward, comp_c],
ext U,
op_induction U,
cases U,
cases U_val,
simp only [colim.ι_map_assoc, colimit.ι_pre_assoc, colimit.ι_pre,
whisker_left.app, whisker_right.app,
functor.map_comp, category.assoc, category_theory.functor.map_id, category.id_comp],
dsimp,
simp only [category_theory.functor.map_id],
-- FIXME Why doesn't simp do this:
erw [category.id_comp, category.id_comp],
end
end stalk_map
end algebraic_geometry.PresheafedSpace