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

Cache reified lemmas with LetIn #77

Merged
merged 1 commit into from Oct 7, 2022

Conversation

JasonGross
Copy link
Collaborator

Implementing a strategy devised in discussion with Andres:

Like, maybe we want to reify the cache using LetIn instead of let in,
have a variant of interp that takes a list of definitions (either
untyped or with types lifted from the syntax or maybe just with reified
types so that we can transport easily enough) that are supposed to be
equal to the cache, and proving equality with interp leaves over
subgoals for cache equality?

Have a version of interp that takes in a nat and asks for arguments
for the first n LetIns, and then does normal interp, and a lemma that
takes in n and the interps for the first n LetIns and proofs that the
values are correct, and proves that special interp equal to the normal
interp. Then we prove equality overall by App special_interp_eq [t; e;
constant1; eq_refl; constant1; eq_refl; ... ; constantn; eq_refl;
eq_refl]

We use a slight variant of this, making use of the UnderLets monad to
avoid the use of nat.

@JasonGross JasonGross force-pushed the cache-reify-let-in branch 4 times, most recently from 52443e6 to 91bf2db Compare October 6, 2022 17:17
Implementing a strategy devised in discussion with Andres:
> Like, maybe we want to reify the cache using LetIn instead of let in,
> have a variant of interp that takes a list of definitions (either
> untyped or with types lifted from the syntax or maybe just with reified
> types so that we can transport easily enough) that are supposed to be
> equal to the cache, and proving equality with interp leaves over
> subgoals for cache equality?

> Have a version of interp that takes in a nat and asks for arguments
> for the first n LetIns, and then does normal interp, and a lemma that
> takes in n and the interps for the first n LetIns and proofs that the
> values are correct, and proves that special interp equal to the normal
> interp.  Then we prove equality overall by App special_interp_eq [t; e;
> constant1; eq_refl; constant1; eq_refl; ... ; constantn; eq_refl;
> eq_refl]

We use a slight variant of this, making use of the UnderLets monad to
avoid the use of `nat`.
@JasonGross
Copy link
Collaborator Author

The CI needs to be re-run once the new docker dev image is pushed in light of the merge of coq/coq#16619

@JasonGross JasonGross marked this pull request as ready for review October 6, 2022 17:30
@JasonGross JasonGross merged commit e6e5e83 into mit-plv:master Oct 7, 2022
@JasonGross JasonGross deleted the cache-reify-let-in branch October 7, 2022 11:13
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

Successfully merging this pull request may close these issues.

None yet

1 participant