Zulip Chat Archive
Stream: mathlib4
Topic: edge cases not covered by `IsCoveringMap`
Junyan Xu (May 15 2025 at 22:50):
The inclusion of one of the points E = {x} into a two-point discrete space B = {x,y} is a covering map by the usual definition. However, it doesn't satisfy mathlib's docs#IsCoveringMap, because y isn't docs#IsEvenlyCovered: there doesn't exist the required docs#Trivialization because the fiber F (= preimage of y) is empty, but E is not, so there is no map from E to B × F. I'm trying to figure out what's the best way to fix this. The current definition seems to originate from , cc @Thomas Browning
Thomas Browning (May 15 2025 at 23:26):
In some sense, is this an issue with docs#Trivialization? docs#Trivialization requires a map defined on all of E, even if the source ends up being empty?
Junyan Xu (May 15 2025 at 23:33):
Yeah you can trace this back to docs#Pretrivialization, docs#PartialHomeomorph and docs#PartialEquiv. These are used extensively in the manifold / differential geometry library though, and I wonder whether they'll find their category of fiber bundles etc. are missing some objects when they start considering such categories. (if the fiber is constant it should be okay though)
I think the easiest fix is probably falling back to the f ⁻¹' {x} × U ≃ₜ f ⁻¹' U definition.
Aaron Liu (May 15 2025 at 23:33):
This is a consequence of the partial equivalence design, where you define it as two functions defined on the whole space which are inverses on this set, and please don't apply it to anywhere outside the set
Thomas Browning (May 15 2025 at 23:34):
Junyan Xu said:
I think the easiest fix is probably falling back to the
f ⁻¹' {x} × U ≃ₜ f ⁻¹' Udefinition.
Yeah, that's definitely the easiest short-term fix. But even for docs#PartialEquiv, if α is nonempty and β is empty, then under the current definition there is no partial equiv between the empty subsets, even through there technically ought to be.
Aaron Liu (May 15 2025 at 23:35):
You can always just use docs#PEquiv
Junyan Xu (May 15 2025 at 23:35):
Going back and forth with Option may not be simpler than doing so with Subtype?
Aaron Liu (May 15 2025 at 23:36):
There are lots of options (pun not intended)
Aaron Liu (May 15 2025 at 23:37):
I'm not sure how I feel about FunLike (α ≃. β) α (Option β) though
Junyan Xu (May 15 2025 at 23:38):
I'd argue using subtype/subspaces is the closest to mathematical practice.
Aaron Liu (May 15 2025 at 23:38):
The issue is you have to provide a proof, though there are ways around this
Thomas Browning (May 15 2025 at 23:39):
So would the ultimate refactor be to change docs#PartialHomeomorph to use a homeomorphism between two subtypes?
Aaron Liu (May 15 2025 at 23:39):
I think that would be a good idea, though I'd like to see some other opinions
Thomas Browning (May 15 2025 at 23:39):
You could maybe still have a coercion to a global function in the case where Y is nonempty.
Aaron Liu (May 15 2025 at 23:40):
There are some notes about this in the module docstring for file#Logic/Equiv/PartialEquiv
Junyan Xu (May 15 2025 at 23:40):
We could still develop APIs for functions defined on sets, like docs#LinearIndepOn.
Junyan Xu (May 15 2025 at 23:41):
I forgot why we chose to use docs#Trivialization to define IsCoveringMap ...
(but maybe we still want to use it after fixing it)
Thomas Browning (May 15 2025 at 23:45):
Probably just because it's cleaner to reuse existing definitions
Junyan Xu (May 17 2025 at 23:01):
I came up with a minimally invasive fix in #24983. The definition is switched to the standard one (f ⁻¹' {x} × U ≃ₜ f ⁻¹' U), but I provide API to convert between the Trivialization formulation, so most proofs don't need to be changed. As a sanity check I proved that any map between two discrete spaces is a covering map.
Last updated: Dec 20 2025 at 21:32 UTC