forked from WebAssembly/spec
-
Notifications
You must be signed in to change notification settings - Fork 18
Lean4 wip #192
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
Draft
nomeata
wants to merge
37
commits into
main
Choose a base branch
from
lean4-wip
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18ee061 to
f182980
Compare
…fted subst generation to own function
2b33ac6 to
9c722c3
Compare
d46354c to
81ad1ec
Compare
a3580fb to
dd769d0
Compare
This refines upon #194, which was quickly getting boring. This refines the setup so that the `dune` file does not need to know the names and order of passes. Unfortunately, `dune` does not support comparing directories (ocaml/dune#3567), so this uses a self-updating dune include to work-around that, as suggested in https://dune.readthedocs.io/en/stable/reference/dune/include.html
a59daf3 to
46f6c10
Compare
…for the wf-sideconditions to disappear
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Playing around with a new Lean4 backend (not based on #2) but rather fresh, adapting the Rocq backend from @DCupello1. Opening this PR to have a place for notes and comments, not meant for merging.
Status
IR-to-IR passes that may be useful
Issues with Lean that we might want to fix or work-around
deriving DecidableEqfor nested inductives (e.g.instr) Support for mutual and nested inductive types asDecidableEqinstance generator leanprover/lean4#2329.Using
BEqso far. (Or maybe we can do away with equality checks on instructions?)Nested inductive predicates with indices in parameters Nested inductives cannot have indices leanprover/lean4#1964
This is a big one, as this is a kernel issue. We have two work-arounds:
Use the lattice-based construction for predicates that is behind
coinduction, and can also do inductives. This can handle that kind of nested recursion.Write
which makes the nested induction go through. Conveniently we already generate
xs == yssie-conditions, so this works easily forForall₂as well.