Unify handling of proof mode terms #107
Merged
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.
This PR unifies the handling of proof mode terms following the Rocq implementation: It first introduces a tactic
ispecializeto specialize a given Iris hypothesis with a proof mode term. Then it introduces anihavetactic that allows to introduce a pure entailment into the proof mode. Tactics that use a proof mode term can then simply call theiHavefunction provided byihaveto parse a given proof mode term. This is then used to refactoriapplyto a sequence ofihaveandispecializefollowing the Rocq implementation.There are open TODOs about changing
iapplyto be able to introduce and instantiate mvars (see the tests). This is currently blocked on the use of type class search, see #iris-lean > Issues with typeclasses in the proof mode.Additionally, this PR does some small refactorings:
EmpValidlike in Rocq instead of just a notation. This prevents typeclass problems forIntoEmpValid.⊢@{PROP}like in Rocq to specify the bi of an entailment.Goalstype for collecting the goals generated by a tactic and automatically putting dependent goals last.