For the base instance, it is necessary to write OfNat Even Nat.zero instead of OfNat Even 0.
After https://github.com/leanprover/lean4/issues/1389 was closed, OfNat instances defined with Nat literals could be resolved directly, so this hint is outdated. I did this exercise using OfNat Even 0, and it works fine.
After https://github.com/leanprover/lean4/issues/1389 was closed,
OfNat
instances defined withNat
literals could be resolved directly, so this hint is outdated. I did this exercise usingOfNat Even 0
, and it works fine.