Deducteam / Dedukti

Implementation of the λΠ-calculus modulo rewriting

Home Page:https://deducteam.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: allowing local theorems

fblanqui opened this issue · comments

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.

commented

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

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".