Hashconsed arrows/abstractions in the SMT encoding must be abstracted over their free variables #3028
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A bug and a fix in this PR, this was previously accepted:
which is clearly pretty bad. The problem was that we were encoding the abstraction
univ -> Dv t
as a single fresh top-level SMT term, with a has computed from its definition. But, this fails to consider that at
is free in it, and therefore allmk _
calls are provably equal by the SMT. Abstractions had a similar issue.The fix is to make these hashconsed terms dependent on their free variables, so the encoding of
unit -> Dv t
is now aTerm
toTerm
function. This is pretty simple and fixes the problem. Surprisingly there was only a single regressions in the examples.This PR also removes the pre-typing axiom for impure functions, as we think it's probably not very useful.