Zulip Chat Archive
Stream: general
Topic: Hashable instance of Rat
Asei Inoue (Jul 26 2025 at 08:50):
where is Hashable instance of Rational number?
I cannot find this.
import Batteries
instance : Hashable Rat where
hash r := mixHash (hash r.num) (hash r.den)
Kim Morrison (Jul 26 2025 at 23:13):
PR welcome.
Mario Carneiro (Jul 27 2025 at 00:27):
I think this should be a deriving handler
Asei Inoue (Jul 27 2025 at 07:44):
@Kim Morrison PR opened!
https://github.com/leanprover-community/batteries/pull/1349
Last updated: Dec 20 2025 at 21:32 UTC