-
Notifications
You must be signed in to change notification settings - Fork 125
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
Lean: Types with numeric quantifiers produce unknown identifiers #1136
Comments
The good news is that current models don't use existential types like this, and it's not currently supported by the Rocq backend either. However, it's pretty close to the top of my list of things that might end up in the RISC-V model (particularly because of the configuration example), so I've been looking at it a little. In some examples, like the configuration one, it's enough in Rocq to replace the bound type variable with an underscore to get the prover to fill it in. Other tests, such as |
One awkward point I noticed in the
becomes
So a dependent pair isn't needed there. |
The reason this fails is more or less just because Lean currently supports auto-implicits in top-level definitions but not in let-bindings. That seems a bit inconsistent to me, but it should be easy to work around. |
Couldn't we also use an implicit argument? I.e. translate
from
EDIT: Ah, no that really doesn't work int he |
It would probably work in simple cases, like the underscore trick (which I added for Rocq in 2ee7b9b). In general using a dependent pair seems unavoidable; for example, I was playing with
where you really need to say which case you're in. As I said before, though, none of the current models do anything like this, and the case I'm most concerned about is the config example, where simple tricks do work. |
…#1164) Solves the first half of rems-project#1136.
The following Lean tests are currently failing because of unknown identifiers in numerically quantified Sail types:
config_vec_list
type_if_bits
For example, in
config_vec_list
,let xs : {'n, 'n >= 2. vector('n, string)} = config foo.bar;
results inlet xs : (Vector String k_n) := #v["D", "C", "B", "A"]
, with the errorThe text was updated successfully, but these errors were encountered: