-
Notifications
You must be signed in to change notification settings - Fork 123
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
Constraint fails to be proven #1489
Comments
The quick answer is to add one of the constraints to the type definition --
And now this type checks appropriately. The long answer is that Cryptol's type inference engine doesn't know enough about exponentiation to know that the constraints it is suggesting are the ones you actually want. For instance, see #704 and #1381. I think your example is included in the discussion already in #704. |
This kind of constraint also crops up in algorithms like the MLKEM NTT, which recursively splits a sequence in 2, works on the sub-sequences, then catenates the results. It would be good if the solver could see that |
We will be addressing this issue in our next dev cycle - updates soon! |
Enhance TypeChecker with exponent rules Close #1489
The following function definition is not accepted:
The corresponding error is:
I encountered this in version:
The text was updated successfully, but these errors were encountered: