Closed dranov closed 4 months ago
It appears that the error comes from inferType
here when called on DecidableEq
.
For what it's worth, simply skipping DecidableEq
, as in this commit seems to be a sufficient work-around. Something more principled would be helpful, though.
Bool
, yet. Changing Bool
to Prop
in the theorem works:theorem extracted' {round : Type} [round_dec : DecidableEq round]
(st_one_a : round → Prop) (st'_one_a : round → Prop)
(hnext : ∃ r, (∀ (x : round), st'_one_a x = if x = r then True else st_one_a x))
: True := by
smt [hnext]
But that brings about more issues...
With a context that looks like this:
I get an
incorrect number of universe levels DecidableEq
error.The
DecidableEq
instance is necessary to allow thex = r
in theif
condition. I guess what is happening is thatlean-smt
tries to translateround_dec
into an SMT-LIB sort and fails because it's a higher-order type:Could you suggest how I could fix this or at least work around the issue?
Thanks for the work you're doing on
lean-smt
!