Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ext for Lambdas in python API #5704

Closed
philzook58 opened this issue Dec 10, 2021 · 1 comment
Closed

Ext for Lambdas in python API #5704

philzook58 opened this issue Dec 10, 2021 · 1 comment

Comments

@philzook58
Copy link
Contributor

Is there a reason why the second argument of the Ext function cannot be a lambda term?

x = Real("x")
Ext(Lambda([x],x),Lambda([x],2*x))

Throws an error because the second argument is not an ArrayRef

_z3_assert(is_array_sort(a) and is_array(b), "arguments must be arrays")

NikolajBjorner added a commit that referenced this issue Dec 13, 2021
@NikolajBjorner
Copy link
Contributor

not sure why the check is so strong. The extensionality expression is for some reason exposed but tends to be of internal use.
Here is some background:
Ext makes sense only for one-dimensional arrays. Internally we create indexed versions for multi-dimensional arrays but opted to only first expose one dimensional array sorts over API to keep it manageable. Thus, the version of Ext for multi-dimensional arrays is not exposed and not supported.
Ext is the Skolem function for the axiom:

forall a, b. a != b => exists ext . a[ext] != b[ext]

When you Skolemize this axiom, ext becomes a function that takes to arrays as arguments and produces an index where they are different (if they are not different the index is arbitrary). You can also think of it as a choice function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants