Zulip Chat Archive

Stream: lean4

Topic: Hashable Subtype


Marcus Rossel (Aug 31 2022 at 10:49):

Is this a bad idea?:

instance [Hashable α] {p : α  Prop} : Hashable { a : α // p a } where
  hash a := hash a.val

If not, how/where would this make its way into Lean?

Mario Carneiro (Aug 31 2022 at 10:49):

Seems fine to me

Mario Carneiro (Aug 31 2022 at 10:51):

It would presumably go next to the other basic instances defined after docs4#Hashable

Marcus Rossel (Aug 31 2022 at 11:03):

Mario Carneiro said:

It would presumably go next to the other basic instances defined after docs4#Hashable

Is this page (https://leanprover-community.github.io/mathlib4_docs/find/?pattern=Hashable#doc) completely blank for anyone else on Safari (mobile and desktop)?
Weirdly https://leanprover-community.github.io/mathlib4_docs/ works for me.

Marcus Rossel (Aug 31 2022 at 11:40):

Update: #1153


Last updated: Dec 20 2023 at 11:08 UTC