-
Notifications
You must be signed in to change notification settings - Fork 2
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
Provide a way to define top-level definitions #173
Comments
A related additional feature: module system |
@HuStmpHrrr One issue with that is |
we should replace |
We cannot still mention |
|
I mean |
So, for example, with a "proper" top-level,
will be possible, but with that "let" approach,
will not be possible (because of the reference to |
that's because the last column lives outside of the lets. problems like this can always be worked around by fitting the last expression to another layer of let:
It's not perfect, but passing the typechecker implies |
I am not saying it's perfect, but I would expect a local |
I agree on that this solution is easy to implement, and a good temporary solution. What I wanted to say is that there is the abovementioned issue I want to note. |
yeah let's do this and figure out a mechanizable solution for genuine top-level definitions at a later time, which can wait. I think even this solution might induce some downstream optimizations that would complicate the proof. |
I think what I have above won't work. We do need to change the context structure to allow binding a variable to a value. Then the question goes to how the substitution calculus should work. c.f. Coq's let rule https://coq.inria.fr/doc/V8.18.0/refman/language/cic.html#id6 and the Delta-local rule: https://coq.inria.fr/doc/V8.18.0/refman/language/core/conversion.html#delta-reduction-sect |
What would be the problem? |
|
What about the independent version? Although that's identical to the "syntactic sugar" approach Antoine is building (based on lambda and application). |
T' Independent of x? Still the same problem applies for t'. It cannot be well-typed in general without knowing t, so substitution calculus can't apply. |
Ah true. Yeah we need a proper top-level definition. |
Without that it is highly cumbersome to give more interesting examples.
The text was updated successfully, but these errors were encountered: