Zulip Chat Archive
Stream: Is there code for X?
Topic: has_coe or id
Yaël Dillies (May 04 2021 at 20:23):
Is there any way to tell Lean that we have either α = β
or has_coe_t β α
and that we should either use no coercion (or the identity coercion?) or the coercion given by has_coe_t β α
?
Yaël Dillies (May 04 2021 at 20:25):
Another way to see my problem is that we don't have has_coe_t α α
. Maybe to avoid Lean trying to always coerce everything?
Anne Baanen (May 05 2021 at 09:30):
Can you give an example of how you would apply this? If you're defining a declaration for example, is there a reason that it wouldn't work to take a parameter of type α
and letting the elaborator do the coercion at the point of use?
Last updated: Dec 20 2023 at 11:08 UTC