Zulip Chat Archive
Stream: mathlib4
Topic: ENat natCast as functor
Robert Maxton (Sep 08 2025 at 02:08):
Where's the best place for this def to live:
@[simps!]
def ENat.ofNatFunctor : ℕ ⥤ ℕ∞ :=
Monotone.functor fun {_ _} ↦ WithTop.coe_le_coe.mpr
Alternatively, is there any sort of 'monotoneNatCast' typeclass I don't know about that would allow this to be generalized so that it has an obvious place to live?
Robert Maxton (Sep 08 2025 at 02:09):
The current bid is "awkwardly inserted at the top of Mathlib.Topology.CWComplex.ClassicalToAbstract" (which doesn't exist yet), which shouldn't be hard to beat!
Robert Maxton (Sep 08 2025 at 02:13):
Hmmm... I could generalize it to WithTop, and then argue it fits in Mathlib.CategoryTheory.Category.Preorder, perhaps?
Last updated: Dec 20 2025 at 21:32 UTC