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

WIP: new datatype compiler #3748

Closed
wants to merge 3 commits into from
Closed

WIP: new datatype compiler #3748

wants to merge 3 commits into from

Conversation

cipher1024
Copy link
Collaborator


The goal of this PR is to enable the specification of inductive and coinductive data types using syntax such as

data tree (a : Type) 
| tip : tree
| node : a -> tree -> tree -> tree

codata inf_tree (a b : Type)
| node : a -> (b -> inf_tree) -> inf_tree

and have the relevant recursors and corecursors generated appropriately. The current infrastructure does not support nesting but it is a planned extension.

@cipher1024 cipher1024 added the WIP Work in progress label Aug 12, 2020
@@ -0,0 +1,1655 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the tactic or meta namespace.

@digama0
Copy link
Member

digama0 commented Aug 29, 2020

@cipher1024 Could you get this PR compiling? I can try applying some fixes directly but I can't even begin to understand the code until everything is working as intended.

@cipher1024
Copy link
Collaborator Author

That's a fair point. This version attempts to generate a specialized liftp and that's what's broken. I'm going to take that out and that should work. When #3915 finally gets merged, I'll add some properties to test the parts better and of course more documentation.

@digama0
Copy link
Member

digama0 commented Aug 30, 2020

@cipher1024 Have you looked at the error message? I think it's much more basic than that - data.qpf.compiler.fn_var references tactic.mk_has_to_format which doesn't exist.

@cipher1024
Copy link
Collaborator Author

Oh, I must have forgotten to commit that file. Thanks! I didn't look closely at the failure because I knew there were more errors.

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Oct 28, 2020
@YaelDillies
Copy link
Collaborator

It is highly unlikely that this will happen in Lean 3. Let's revisit after the port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maybe-later merge-conflict Please `git merge origin/master` then a bot will remove this label. WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants