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

Support primitive array terms #998

Merged
merged 17 commits into from
Nov 30, 2023
Merged

Support primitive array terms #998

merged 17 commits into from
Nov 30, 2023

Conversation

mattam82
Copy link
Member

@mattam82 mattam82 commented Oct 30, 2023

This carries around primitive arrays down the MetaCoq pipeline.
I tried to impact as little as possible the derivations, by using nested inductive types for auxiliary judgements.
We now have a typing judgement for primitive arrays (modelled as lists, as array not nestable), and they get erased
to just a default value and list of elements. In pcuic and erasure we use a bunch of generic lemmas for automating the proofs on the prim_val container, which works pretty well. We have reduction on arrays but they are not considered in evaluation yet, this will be the subject of a later PR.
Interesting points:

  • We prove no-confusion lemmas for conversion between applied axioms (i.e. primitive types) and products/inductives etc, to show correctness of erasure.
  • We have generalized primitives so that they can carry terms, so we have to make substitution/lifting/reduction etc go through these which takes up a good part of the development (three more reduction rules to consider in confluence).
  • Typechecking and erasure are rather straightforward otherwise.

@yforster
Copy link
Member

yforster commented Nov 6, 2023

ping @ed-hermoreyes (is Mireia also on github?), maybe file your changes introducing explicit admits as a PR against the primitive-arrays branch?

@mattam82 mattam82 merged commit 41123c4 into coq-8.17 Nov 30, 2023
6 checks passed
@JasonGross
Copy link
Contributor

@mattam82 is there some issue with quotation here that required disabling it?

JasonGross added a commit to JasonGross/metacoq that referenced this pull request Nov 30, 2023
JasonGross added a commit that referenced this pull request Jan 24, 2024
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.

3 participants