diff --git a/proofmode/tactics.v b/proofmode/tactics.v index 21bd9cbab9efe9414f9b1b3df7c98aee068bd26c..eff7af382973b12fadaead33c687445a1ba6a5d9 100644 --- a/proofmode/tactics.v +++ b/proofmode/tactics.v @@ -34,6 +34,11 @@ Tactic Notation "iTypeOf" constr(H) tactic(tac):= | Some (?p,?P) => tac p P end. +Ltac iMatchGoal tac := + match goal with + | |- context[ environments.Esnoc _ ?x ?P ] => tac x P + end. + (** * Start a proof *) Tactic Notation "iProof" := lazymatch goal with @@ -789,6 +794,10 @@ Tactic Notation "iRewrite" open_constr(t) "in" constr(H) := Tactic Notation "iRewrite" "-" open_constr(t) "in" constr(H) := iRewriteCore true t in H. +Ltac iSimplifyEq := repeat ( + iMatchGoal ltac:(fun H P => match P with (_ = _)%I => iDestruct H as %? end) + || simplify_eq/=). + (* Make sure that by and done solve trivial things in proof mode *) Hint Extern 0 (of_envs _ ⊢ _) => by iPureIntro. Hint Extern 0 (of_envs _ ⊢ _) => iAssumption.