feat: keywords guarded, fix, cofix, and iinductive - #651
Open
oliversoeser wants to merge 100 commits into
Open
Conversation
MackieLoeffel
left a comment
Collaborator
There was a problem hiding this comment.
I've only had a brief look at this. Can you please make this a stacked PR such that it is easier to review?
| elabFixpointDef ``bi_least_fixpoint ``least_fixpoint_unfold mods name binders ty body monoPf nePf | ||
|
|
||
| /-- Recursive definition via the greatest fixpoint. -/ | ||
| elab mods:declModifiers "cofix " name:ident binders:fixpointBinder* |
Collaborator
There was a problem hiding this comment.
Can you create a cofix? command that shows the code that it generates? This would be very useful for debugging and understanding what the command does. The same applies to the other commands that generate Lean code.
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
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.
Description
This adds keywords that allow for straightforward recursive definitions of predicates, automatically producing a pre-definition, proving relevant properties, and constructing a fixpoint. Furthermore,
iinductiveutilises these for definitions of inductive predicates using a syntax familiar from Lean's usualinductive.Fixes #427 and #428
Depends on #558 and #595
Checklist
authorssection of any appropriate files