Closed h0nzZik closed 4 years ago
The pattern needs to be functional, otherwise we could from the axiom \forall x. \exists y. x = y
prove that exists y. (1 \/ 2) = y, which is not true. So how do we check that it is functional? Currently, the prover has no support for checking functionality, except that the
smt` strategies work with functional symbols.
A straightforward way is to define a function isSurelyFunctional
that returns true
for Ints and application of functional symbols to functional patterns.
A straightforward way is to define a function
isSurelyFunctional
that returnstrue
for Ints and application of functional symbols to functional patterns.
This seems reasonable. In general anything built from constructors (including Int
s) and quantified variables.
@nishantjr This PR is ready to be reviewed.
I propose that we rename this strategy to instantiate-element-variables
and extend it to work also with free elemet variables. Eventually, there would exist some instantiate-set-variables
counterpart, that would instantiate (necessarily free) set variables to any patterns. I would leave both of this as a future work.
Can we instantiate universal variables with any patterns, or the pattern needs be functional? In the latter case, we need to add a parameter
by[Strategies]
containing strategies for proving the functionality of a pattern - and we need to add such strategies.