Zulip Chat Archive
Stream: maths
Topic: groupoids
Jakob von Raumer (Jul 06 2021 at 07:44):
I noticed that there is a lot of groupoid laws the proofs of which are repeated for each notion of equaity/iso which is introduced. Why are they not derived in a commond groupoid
class? I'm thinking of eq
, equiv
, add_equiv
, mul_equiv
, ...
Eric Wieser (Jul 06 2021 at 07:55):
My memory at trying to do this thing is that:
- It's difficult to state lawfulness of coercion because Lean 3's
has_coe_to_fun
doesn't take the codomain as an argument - It's hard to avoid wanting (and then being unable) to quantify over universes when stating composition
Jakob von Raumer (Jul 06 2021 at 08:05):
Ah, the second point is a really good one, thanks.
Jakob von Raumer (Jul 06 2021 at 08:06):
I don't really get the first one, since most of the groupoid laws (cancellation, trans_refl
, ...) don't use the has_coe_to_fun
at all...
Eric Wieser (Jul 06 2021 at 08:09):
Sure, but you probably want to also have your typeclass prove things like f.comp g x = f (g x)
Eric Wieser (Jul 06 2021 at 08:10):
Although that doesn't have to be the same typeclass I guess
Last updated: Dec 20 2023 at 11:08 UTC