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

Export to DK does not handle opaque symbols #1030

Open
thomastraversie opened this issue Jan 24, 2024 · 4 comments
Open

Export to DK does not handle opaque symbols #1030

thomastraversie opened this issue Jan 24, 2024 · 4 comments

Comments

@thomastraversie
Copy link

When trying to export the Lambdapi code

symbol Prop : TYPE;
symbol Prf : Prop → TYPE;

opaque symbol theorem1 : Π P : Prop, Prf P → Prf P ≔
λ P : Prop, λ pP : Prf P, pP;

opaque symbol theorem2 : Π P : Prop, Prf P → Prf P ≔
begin 
    assume P pP;
    refine pP 
end;

to Dedukti, the theorems are just translated as definitions:

def Prop : Type.
def Prf : (Prop -> Type).
def theorem1 : (P : Prop -> ((Prf P) -> (Prf P))).
def theorem2 : (P : Prop -> ((Prf P) -> (Prf P))).
@fblanqui
Copy link
Member

fblanqui commented Jan 24, 2024

I see. Currently, the export to dk is done after compilation but compilation does not record the definition of opaque symbols to save memory. To avoid this problem, we should modify the export to dk so that it is done just after parsing, like we do for the coq export. This would be much more efficient.

@fblanqui
Copy link
Member

Hi Thomas. One solution is make a copy of your files, remove the opaque modifiers with sed, and export files.

I'm working on having a dk output which does not require elaboration. But it won't be able to handle proofs. Proofs can only be translated after compilation.

@thomastraversie
Copy link
Author

I see, thanks for the solution.

@fblanqui
Copy link
Member

fblanqui commented Mar 1, 2024

See #1060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants