Closed jad-hamza closed 6 years ago
I've retried running that example today but there is an internal error:
[Internal] Error: key not found: x$71. Trace: [...] [Internal] key not found: x$72 [Internal] Please inform the authors of Inox about this message
I can't reproduce your error with the current Stainless.
Stainless fails to verify the assertion assert(x != x)
for me.
Yes for me too, the internal error is gone!
About the original issue, I think I was confused. I wanted to define extract(bb)
to be equal to (b: Boolean) => !extract(b)(b)
by definition, but that is not the case. We just know the result of extract(bb)
is some p
such that isForall(bb,p)
holds.
I'm trying to clarify something about quantifiers, and the fact that we consider them as Boolean's. We are considering an "impredicative" forall quantifier, where when we create a Boolean
x
that is a forall quantifying over all Boolean's b, we are also quantifying overx
itself.I wonder whether this can lead to inconsistencies in our setting, perhaps with something similar to the example below. That example isn't accepted by Stainless (which is good!) but I'm not sure it is for the good reasons (there are various problems due to the use of choose and due to higher-order contracts that make the example fail).
Ideally, assuming we only have total functions, where should Stainless detect that this program is faulty? As @ravimad said, the
extract
function is highly suspicious! (and gets rejected for now which is good)