Zulip Chat Archive
Stream: mathlib4
Topic: Bundled functions: separate hierarchies?
Yury G. Kudryashov (Feb 14 2024 at 06:42):
@Anne Baanen What do you think about deleting all the *HomClass
es that mix hierarchies? I mean, since we have separate FunLike
instances anyway, we can use [FunLike F A B] [MonoidHomClass A B] [OrderHomClass A B]
whenever we need instead of creating all the cross-insances.
Yury G. Kudryashov (Feb 14 2024 at 06:44):
This way we can have:
- order-related hierarchy;
- algebraic hierarchy;
- topological/metrical/smooth hierarchy;
Yury G. Kudryashov (Feb 14 2024 at 06:44):
#xy: some class searches in #10472 fail, probably because I make more *HomClass
es available.
Yaël Dillies (Feb 14 2024 at 08:32):
It was not possible until the FunLike
unbundling, but now that that's done it sounds reasonable to at least try
Anne Baanen (Feb 14 2024 at 09:50):
I agree we should try this. From my experience during the refactor I'd probably start with definitions that mix sets of variables, like splitting docs#StarAlgHomClass into the Star
part and the Alg
part that has an extra algebra parameter.
Yury G. Kudryashov (Feb 14 2024 at 13:57):
I'm going to start with algebraic and ordered hierarchies.
Yury G. Kudryashov (Feb 14 2024 at 15:01):
Mathlib.Algebra.Order.Hom.Monoid
is used by surprisingly few files now.
Yaël Dillies (Feb 14 2024 at 15:06):
Is that surprising? I defined it pretty late in the history of mathlib, and by that point we already had docs#AbsoluteValue
Jireh Loreaux (Feb 14 2024 at 15:09):
How few is "surprisingly few"?
Yury G. Kudryashov (Feb 14 2024 at 15:10):
Less than 10
Jireh Loreaux (Feb 14 2024 at 15:10):
transitively or directly?
Yury G. Kudryashov (Feb 14 2024 at 15:11):
Transitively, see #10544
Yury G. Kudryashov (Feb 14 2024 at 15:12):
Yury G. Kudryashov (Feb 14 2024 at 15:13):
I also merged it into #10472 to see if it helps there.
Yury G. Kudryashov (Feb 14 2024 at 23:23):
How should I name what's now called OrderMonoidHomClass.toOrderMonoidHom
etc?
Yaël Dillies (Feb 14 2024 at 23:24):
Half-awake guess: OrderMonoidHom.ofClass
Yury G. Kudryashov (Feb 14 2024 at 23:30):
I suggest that I don't change names for now, then I change them for all bundled homs at once.
Last updated: May 02 2025 at 03:31 UTC