-
Notifications
You must be signed in to change notification settings - Fork 153
fix for DataSize error for finite_map #1402
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
Conversation
It could be in the selftest for finite maps though right? |
Hmm, adding a datatype test to the finite_map tests feels strange to me. Here is a potential compromise. The error can be replicated like this, using fresh types:
TODO: the selftest.sml files don't seem to use new-style |
Hmm, apparently I'm just blogging, I think I've figured it out and added it to the PR. |
Thanks for working on this! Note that the list type you are using in your tests is constructed for the purpose in the same Given that finite maps are not algebraic and involve an operator with arity=2, using lists is superficially rather different in feel. (You will know if the list example ultimately hits the same problem/bug of course.) If you really wanted a finite map case, you could start to fake this with something along the lines of
but to truly reflect the context, you'd have to also do the equivalent of (from the bottom of
which starts to feel like a lot of work for a test-case. |
Yeah, I noted that it's a bit of an accident that |
|
Oh yeah: "modern syntax" is only allowed in |
Hmm. I figured out how to run it locally, to test it a bit faster, and I've fixed a few more ML naming issues, but I'm stuck on an error reading this line:
It results in I don't get it. The syntax |
[github issue HOL-Theorem-Prover#1400] A proof of type-size equivalence fails when the finite_map type is present, because the size installed for finite_map contains a lambda and causes a BETA_TAC to apply to the wrong thing. This simple fix seems to solve the problem. The breaking example depends on the finite_map type, and probably can't be easily added to the self-test.
Replicate the non-standard aspect of the finite_map size definition in a separate standalone test setup.
Use (more likely) correct scoping for a selftest file and respect the OK() convention, etc. Then debug weird issues with running in the selftest context. Seems to be working now.
0b3f2fa
to
7ac6122
Compare
Never mind, I think I've figured it all out now. Reminder to self, don't get sucked into fiddling with |
Thanks again! |
[github issue #1400]
A proof of type-size equivalence fails when the finite_map type is present, because the size installed for finite_map contains a lambda and causes a BETA_TAC to apply to the wrong thing. This simple fix seems to solve the problem.
The breaking example depends on the finite_map type, and probably can't be easily added to the self-test.