Zulip Chat Archive
Stream: new members
Topic: Deriving for `def`
Josh Cohen (Oct 23 2025 at 14:27):
Suppose I have an inductive type A that has derived DecidableEq. How can I derive or otherwise easily define instance DecidableEq for def B := A?
Joël Riou (Oct 23 2025 at 14:29):
Under your assumptions, inferInstanceAs (DecidableEq A) is a term of type DecidableEq B.
Josh Cohen (Oct 23 2025 at 14:32):
Thanks!
Kyle Miller (Oct 23 2025 at 18:04):
def B := A
deriving DecidableEq
Last updated: Dec 20 2025 at 21:32 UTC