feat: iinv#470
Open
alvinylt wants to merge 94 commits into
Open
Conversation
…`emp` as default
…elim_inv_acc_with_close`
…if `trivial` fails
… to any invariant hypothesis in the context
…o that IPM tactics can be used for proving the type class instances
…lose` Also avoid using `Option.getD` in definitions as they require in tedious unfolding
… `ProofMode.Instances` Avoids importing `ProofMode.Instances` in `ProofMode.Tactics`
`addBIGoalSimpWandM` Call `simp` directly is too strong. Instead `pmReduce` simplifies wandM, Option.getD, etc. in specific propositions before `iCasesCore` call
Open
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
Implements the
iinvtactic.Addresses #363.
This includes porting the following type classes instances of
IntoAcc,ElimAcc,IntoInvandElimInv.elim_inv_acc_without_closeclass_instances.vInstancesIris.leanelim_inv_acc_with_closeclass_instances.vInstancesIris.leanelim_acc_bupdclass_instances_updates.vInstancesUpdates.leanelim_acc_fupdclass_instances_updates.vInstancesUpdates.leaninto_inv_invinvariants.vInvariants.leaninto_acc_invinvariants.vInvariants.leaninto_inv_cinvcancelable_invariants.vCInvariants.leaninto_acc_cinvcancelable_invariants.vCInvariants.leaninto_inv_nana_invariants.vNaInvariants.leaninto_acc_nana_invariants.vNaInvariants.leanelim_acc_wp_atomicweakestpre.vWeakestPre.leanelim_acc_wp_nonatomicweakestpre.vWeakestPre.leanThe following code is yet to be ported but also includes relevant type class instances.
proofmode/monpred.v:elim_inv_embed_with_close,elim_inv_embed_without_close,elim_acc_at_None,elim_acc_at_Someprogram_logic/total_weakestpre.v:elim_acc_wp_atomic,elim_acc_wp_nonatomicbi/lib/atomic.v:elim_acc_aaccproofmode/class_instances_embedding.v:into_inv_embedOther Changes
wandM(-∗?) inBIBase.lean, the theoremwandM_soundinDerivedLaws.lean. The related type class instances are also ported inInstances.lean, which allows us to, for example, applyiintro HgivenH : P -∗? Q. TheoutParamvalues obtained from type class synthesis withElimInvmay contain occurrences ofwandM. The functionpmReduce(similar topm_reducein the Rocq version) simplifies them and occurrences ofOption.getDin specific propositions before using them in the new proof goals.iSolveSideconditioninBasic.leanso that it does not fail whenfailOnUnsolvedis set asfalse. Furthermore, instead of using onlytrivial, it now usesand_intros <;> first | trivial | simp_allso that a conjunction is broken down into smaller subgoals before trying various tactics to solve them.FrameResult.finishCloseis made less restrictive to be consistent with the Rocq version: removeemp/Trueeven when no progress is made with framing.Pure.lean(pure_elim_spatialandpure_elim_intuitionistic) andCases.lean(intuitionistic_elim_spatialandintuitionistic_elim_intuitionistic) are slightly modified to avoid dependency ofProofMode.TacticsonProofMode.Instances. This enables us to use IPM tactics to complete proofs for type class instances inProofMode.Instanceswithout causing circular dependencies.ltac_tactics.vdepends onclasses.vbut notclass_instances.v, whileclass_instances.vimportsltac_tactics.v.AsEmpValidare used directly byProofModeM.lean. They are moved to a separate fileInstancesInit.lean, which is imported byProofModeM.lean. Otherwise,istartfails with the erroristart: <insert entailment here> is not an emp valid.Checklist
authorssection of any appropriate files