Zulip Chat Archive
Stream: mathlib4
Topic: Question about Filter.Germ
finegeometer (Aug 16 2024 at 20:38):
If l : Filter α
, Mathlib defines l.Germ
as a quotient of α → β
. An alternative would be to define it as a quotient of {f : PFun α β // f.Dom ∈ l}
. These are equivalent unless IsEmpty (α → β) ∧ l = ⊥
, in which case the existing definition says l.Germ
is empty, while the alternative says it's a singleton.
Which version is standard? Which version is better? And if the answers to these questions disagree, which should Mathlib use?
Yury G. Kudryashov (Aug 16 2024 at 21:00):
I never needed germs along the bottom filter (and AFAIK lots of texts don't consider it to be a filter).
Patrick Massot (Aug 17 2024 at 15:33):
I think changing this would be a bad move. We want to keep the coercion from functions to Filter.Germ
. You should probably un-#xy and tell us why you think you need PFun
. The mostly likely situation is that you should stick to functions.
David Wärn (Aug 17 2024 at 17:10):
You would still have a coercion from functions to Filter.Germ
even with the change. I don't think there can be any question that the 'alternative' definition is in fact the correct one. For example, the type of germs should be the colimit of over in the filter. Also, the type of germs for the principal filter under should be the type of functions (even if is empty). Perhaps the situation is clearer if you think algebro-geometrically, where you can have lots of locally defined functions that don't extend to global functions but still define germs. I think this was discussed already many years ago, but I won't try to argue that this is an important issue or something that needs changing :-)
Kyle Miller (Aug 17 2024 at 20:38):
I was thinking along the same lines, but it's nice being able to take advantage of the existence of global functions (and to avoid some dependent types!)
If Filter.Germ could let you restrict the class of functions then the correct definition would definitely be correct :-)
finegeometer (Aug 20 2024 at 02:48):
Patrick Massot said:
You should probably un-#xy and tell us why you think you need
PFun
.
This wasn't, in fact, an XY problem. I don't need this for anything. I was just looking at the definition, and something seemed a bit off, so I thought I'd ask.
David Wärn said:
For example, the type of germs should be the colimit of over in the filter. Also, the type of germs for the principal filter under should be the type of functions (even if is empty).
And this seems to formalize my intuition that something was slightly wrong. Thanks!
Yury G. Kudryashov (Aug 20 2024 at 02:53):
Generally, we try to be practical with definitions. E.g., \bot
is allowed as a Filter _
, because this way we have CompleteLattice (Filter _)
, even though many authors only work with NeBot
filters. Similarly, we use globally defined functions, because this way we can avoid dependent types and proofs x ∈ f.Dom
all over the place. If someone will need to deal with germs at the \bot
filter and it will be important to make this type nonempty even if the codomain is empty, then we can refactor (with the one who needs it leading the effort).
finegeometer (Aug 20 2024 at 03:01):
That makes sense. It bugs me to have a slightly wrong definition, but you're right that it might not be worth the effort to fix.
Yury G. Kudryashov (Aug 20 2024 at 03:59):
If we change the definition as you suggest, then docs#Germ.ofFun will no longer be surjective, unless we assume [NeBot l]
or Nonempty β
. Then we'll have to either deal with these special cases in proofs, or add these assumptions in all lemmas.
Yury G. Kudryashov (Aug 20 2024 at 04:00):
I would prefer to avoid it unless we need to.
Last updated: May 02 2025 at 03:31 UTC