Commit 7f3eee0b authored by Michael Sammler's avatar Michael Sammler
Browse files

use tac_find_in_context

parent 998704f2
Pipeline #56198 passed with stage
in 19 minutes and 8 seconds
......@@ -20,6 +20,11 @@ Arguments SHELVED_SIDECOND : simpl never.
Section coq_tactics.
Context {Σ : gFunctors}.
(* For some reason, replacing tac_fast_apply with more specialized
versions gives a 1-2% performance boost, see*
TODO: investigate this more
Lemma tac_fast_apply {Δ} {P1 P2 : iProp Σ} :
(P1 - P2) envs_entails Δ P1 envs_entails Δ P2.
Proof. by rewrite envs_entails_eq => -> HP. Qed.
......@@ -57,6 +62,10 @@ Section coq_tactics.
( (a : A) (x : f a), P (existT a x)) @ex (sigT f) P.
Proof. move => [?[??]]. eauto. Qed.
Lemma tac_find_in_context {Δ} {fic} {T : _ iProp Σ} key (F : FindInContext fic key) :
envs_entails Δ (F T).(i2p_P) envs_entails Δ (find_in_context fic T).
Proof. rewrite envs_entails_eq. etrans; [done|]. apply i2p_proof. Qed.
Lemma tac_find_hyp_equal key (Q P P' R : iProp Σ) Δ `{!FindHypEqual key Q P P'}:
envs_entails Δ (P' R)
envs_entails Δ (P R).
......@@ -546,7 +555,7 @@ Ltac liFindInContext :=
multiple implementations of [FindInContext]. They are tried in the
order of their priorities.
See *)
once (simple notypeclasses refine (tac_fast_apply ((_ : FindInContext fic key) _).(i2p_proof) _);
once (simple notypeclasses refine (tac_find_in_context key _ _);
[ shelve | typeclasses eauto | simpl; repeat liExist false; liFindHypOrTrue key ])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment