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

Feature request: allowing local theorems #312

Open
fblanqui opened this issue Mar 24, 2023 · 2 comments
Open

Feature request: allowing local theorems #312

fblanqui opened this issue Mar 24, 2023 · 2 comments

Comments

@fblanqui
Copy link
Member

It would be helpful to be able to declare some theorems as local (private in lambdapi syntax) so that there are not visible outside the file and thus not included in the dko file.

@francoisthire
Copy link
Collaborator

I think @EmilieGrienenberger implemented that at some point. But this feature was never merged, no?

@GuillaumeGen
Copy link
Contributor

I must confess that it not documented but the private keyword exists https://github.com/Deducteam/Dedukti/blob/45270ea9b75ad1ae53d7e9d4b7fdd993436d64cd/syntax.bnf#L9C13-L9C20.
However, I do not know what it means to not include them in dko's. Currently, if I understand them correctly, user is not allowed to call them explicitly in other file than the one which defines them, however, since some function can reduce to them, they must be included in dko's with their rewrite rules.
At first, it was thought as a mechanism to declare local functions just like a let ... in in OCaml. This is for instance what is done in https://github.com/GuillaumeGen/AdventOfCode_in_Dedukti/blob/8fe64fd27ccfa8468440c961b6176c5e5170479c/Lib/Ord.dk#L10 where max_aux is not in the user interface but simply used to define max.
It was then strongly used by @Gaspi, @francoisthire and I to get guarantee that some terms are out of the "target of the translation".

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

3 participants