Zulip Chat Archive
Stream: lean4
Topic: How to match on value from Category.Over.OverMorphism?
Joey Eremondi (May 17 2024 at 17:10):
I'm wondering, what is the "right" way to deconstruct an over-category morphism? Say we've got X Y : Over Z
and f : X ⟶ Y
, how can we decompose it into some Category.Over.homMk (f' : X.left ⟶ Y.left) (pf : f' ≫ Y.hom = X.hom )
?
I know I can get those fields with the accessors, but what about when f
occurs in my goal and I want the goal and hypotheses rewritten?
Directly matching on it gives a CommaMorphism
, which means that all of the lemmas about over categories require a ton of rewriting.
Yaël Dillies (May 17 2024 at 18:00):
(Can someone move this to #mathlib4 ?)
Markus Himmel (May 17 2024 at 19:19):
For CostructuredArrow
, there are docs#CategoryTheory.CostructuredArrow.eq_mk and docs#CategoryTheory.CostructuredArrow.eta but it appears that no one has specialized them to Over
yet. Note though that in my experience trying to destruct morphisms in comma categories can easily lead you into DTT hell, so there might be a better way to achieve your goal (see #xy)
Joey Eremondi (May 17 2024 at 19:20):
@Markus Himmel Yes I am absolutely currently in DTT hell, I'm about to start another thread asking about how to resolve that. Thanks.
Joey Eremondi (May 17 2024 at 19:37):
Last updated: May 02 2025 at 03:31 UTC