-
Notifications
You must be signed in to change notification settings - Fork 259
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: LocallyConstant.piecewise' #6589
Conversation
What do you think of the following implementation? noncomputable def piecewise' {C₀ C₁ C₂ : Set X} (h₀ : C₀ ⊆ C₁ ∪ C₂) (h₁ : IsClosed C₁)
(h₂ : IsClosed C₂) (f₁ : LocallyConstant C₁ Z) (f₂ : LocallyConstant C₂ Z)
[DecidablePred (· ∈ C₁)] (hf : ∀ x (hx : x ∈ C₁ ∩ C₂), f₁ ⟨x, hx.1⟩ = f₂ ⟨x, hx.2⟩) :
LocallyConstant C₀ Z :=
letI : ∀ j : C₀, Decidable (j ∈ Subtype.val ⁻¹' C₁) := fun j ↦ decidable_of_iff (↑j ∈ C₁) Iff.rfl
piecewise (h₁.preimage continuous_subtype_val) (h₂.preimage continuous_subtype_val)
(by simpa [eq_univ_iff_forall] using h₀)
(f₁.comap (restrictPreimage C₁ ((↑) : C₀ → X)))
(f₂.comap (restrictPreimage C₂ ((↑) : C₀ → X))) <| by
rintro ⟨x, hx₀⟩ ⟨hx₁ : x ∈ C₁, hx₂ : x ∈ C₂⟩
simp_rw [coe_comap_apply _ _ continuous_subtype_val.restrictPreimage]
exact hf x ⟨hx₁, hx₂⟩ It requires changing theorem Continuous.restrict {f : α → β} {s : Set α} {t : Set β} (h1 : MapsTo f s t)
(h2 : Continuous f) : Continuous (h1.restrict f s t) :=
(h2.comp continuous_subtype_val).codRestrict _
theorem Continuous.restrictPreimage {f : α → β} {s : Set β} (h : Continuous f) :
Continuous (s.restrictPreimage f) :=
h.restrict _ I can see a few disadvantages:
|
I like it! I tried it on my Nöbeling branch and it works well by adding a simple lemma about applying |
Nice! By the way I opened #6616 with the two continuity lemmas on restrictions. |
Also could you add a comment saying that the two |
Regarding the noncomputability: |
There is a comment about this next to the definition of |
Finally let me just mention that I think these two constructions could be made way nicer if we developed some gluing API. I'll try to find some time to post my thoughts in greater detail about this on Zulip, but what I imagine would be a proposition expressing that a given topological space is the gluing of a family of topological space (as a property on, not as a construction) that would allow to do this kind of constructions more systematically. |
Indeed I think that would be a good idea, but maybe it's better to keep that aside for anther PR? Especially since I think we definitely want Johan's opinion on this kind of chance to see if it would mess with LTE. |
This PR/issue depends on: |
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.
Sorry for the delay. I made a few comments, but I think I shouldn't be the one merging that since I've made rather big suggestions (besides, I won't have time to take care of it in the near future). I'll un-assign myself, and you can ask for another review on Zulip after taking my review into account.
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
…nity/mathlib4 into dagur_piecewise
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.
Thanks!
bors d+
✌️ dagurtomas can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
We define a variant of `LocallyConstant.piecewise` which defines a locally constant map on a subset given locally constant maps on two closed subsets covering it, that agree on the intersection. - [x] depends on: #6616 Co-authored-by: Anatole Dedecker @ADedecker
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Nobeling's theorem: the Z-module of locally constant maps from a profinite set to the integers is free. - [x] depends on: #6360 - [x] depends on: #6373 - [x] depends on: #6395 - [x] depends on: #6396 - [x] depends on: #6432 - [x] depends on: #6520 - [x] depends on: #6578 - [x] depends on: #6589 - [x] depends on: #6722 - [x] depends on: #7829 - [x] depends on: #7895 - [x] depends on: #7896 - [x] depends on: #7897 - [x] depends on: #7899
Nobeling's theorem: the Z-module of locally constant maps from a profinite set to the integers is free. - [x] depends on: #6360 - [x] depends on: #6373 - [x] depends on: #6395 - [x] depends on: #6396 - [x] depends on: #6432 - [x] depends on: #6520 - [x] depends on: #6578 - [x] depends on: #6589 - [x] depends on: #6722 - [x] depends on: #7829 - [x] depends on: #7895 - [x] depends on: #7896 - [x] depends on: #7897 - [x] depends on: #7899
We define a variant of
LocallyConstant.piecewise
which defines a locally constant map on a subset given locally constant maps on two closed subsets covering it, that agree on the intersection.Co-authored-by: Anatole Dedecker @ADedecker