New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(topology/sheaves): Induced map on stalks #7092
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only quickly skimmed it. But at first sight this looks great!
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Eric <37984851+ericrbg@users.noreply.github.com>
There are still some names to fix up here. There are many appearances of Otherwise, this is looking really good! |
Okay, fixed the names. I also reordered things in the file a little. I think it makes more sense that way and now it lines up with the module docstring. |
@[simp] lemma res_π_apply (i : ι) (s : F.obj (op (supr U))) : | ||
limit.π (discrete.functor (λ i : ι, F.obj (op (U i)))) i (res F U s) = | ||
F.map (opens.le_supr U i).op s := | ||
congr_fun (res_π F U i) s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to get this lemma automatically now by just putting @[elementwise]
on res_π
.
@[simp] lemma stalk_functor_map_germ_apply (U : opens X) (x : U) {F G : X.presheaf (Type v)} | ||
(f : F ⟶ G) (s : F.obj (op U)) : | ||
(stalk_functor (Type v) x.1).map f (germ F x s) = germ G x (f.app (op U) s) := | ||
congr_fun (stalk_functor_map_germ U x f) s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly this can also be by @[elementwise]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this, unfortunately the generated simp lemmas don't fire where I would like them to. There seems to be some issue with the coercions coe_fn
, not even erw
worked. The only way I found was through some pretty annoying unfolding of definitions, before I could rewrite, like this:
lemma app_injective_of_stalk_functor_map_injective {F : sheaf (Type v) X} {G : presheaf (Type v) X}
(f : F.presheaf ⟶ G) (h : ∀ x : X, injective ((stalk_functor (Type v) x).map f)) (U : opens X) :
injective (f.app (op U)) := λ s t hst,
begin
apply section_ext,
intro x,
apply h x.1,
have := stalk_functor_map_germ_apply U x f s,
-- here, I need to explicitly unfold the coercions before I can rewrite...
dsimp [coe_fn, concrete_category.has_coe_to_fun, forget, concrete_category.forget] at this,
erw this,
sorry
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can try to solve this in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
Once you've fixed up the bors d+ |
✌️ justus-springer can now approve this pull request. To approve and merge a pull request, simply reply with |
bors merge |
This PR defines stalk maps for morphisms of presheaves. We prove that a morphism of type-valued sheaves is an isomorphism if and only if all the stalk maps are isomorphisms. A few more lemmas about unique gluing are also added, as well as docstrings.
Build failed (retrying...): |
This PR defines stalk maps for morphisms of presheaves. We prove that a morphism of type-valued sheaves is an isomorphism if and only if all the stalk maps are isomorphisms. A few more lemmas about unique gluing are also added, as well as docstrings.
This PR defines stalk maps for morphisms of presheaves. We prove that a morphism of type-valued sheaves is an isomorphism if and only if all the stalk maps are isomorphisms. A few more lemmas about unique gluing are also added, as well as docstrings.
Pull request successfully merged into master. Build succeeded: |
These fixes, while an improvement, still don't fix the problem @justus-springer observed in #7092. Really we should generate a second copy of the `_apply` lemma, with the category specialized to `Type u`, and in that one remove all the coercions. Maybe later. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
This PR defines stalk maps for morphisms of presheaves. We prove that a morphism of type-valued sheaves is an isomorphism if and only if all the stalk maps are isomorphisms.
A few more lemmas about unique gluing are also added, as well as docstrings.
Zulip:
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/induced.20map.20on.20stalks
Some of this can obviously be extended or stated in greater generality. For example, we might want a Lemma saying that a morphism of sheaves is mono/epi if and only if all stalk maps are mono/epi (this should even hold in more general categories than
Type
I think). This wasn't necessary for the goal I had in mind, but I'm happy to continue working on stuff like this and I'm grateful for any feedback.Also, this about doubled the size of the file
stalks.lean
, so I took the liberty to add myself to the authors list. I hope this is okay.