Zulip Chat Archive

Stream: lean4

Topic: Extensional decidable equality for Std.HashMap?


Siddharth Bhat (Oct 14 2024 at 19:56):

I'd like to check if two Std.HashMaps are extensionally equal, in a Decidable fashion. Is there any API for this?

Markus Himmel (Oct 15 2024 at 06:02):

There are plans to provide a Std.ExtensionalHashMap which supports this, but the FRO is not planning to work on this soon.

Eric Wieser (Oct 15 2024 at 09:02):

Even without that, presumably we could have a BEq instance that evaluates extensional equality?

Markus Himmel (Oct 15 2024 at 09:05):

Yes, see here for example. The story is slightly more complicated for dependent hash maps which is why this wasn't part of the initial release of Std.HashMap, but we'll add it in the future.


Last updated: May 02 2025 at 03:31 UTC