Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
George Pirlea
Iris
Commits
62e935b6
Commit
62e935b6
authored
Feb 27, 2018
by
Robbert Krebbers
Browse files
Define `MaybeIntoLaterNEnvs` in terms of the new classes.
parent
fbea3aa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/coq_tactics.v
View file @
62e935b6
From
iris
.
bi
Require
Export
bi
.
From
iris
.
bi
Require
Import
tactics
.
From
iris
.
proofmode
Require
Export
base
environments
classes
.
From
iris
.
proofmode
Require
Export
base
environments
classes
modality_instances
.
Set
Default
Proof
Using
"Type"
.
Import
bi
.
Import
env_notations
.
...
...
@@ -1331,39 +1331,33 @@ Proof.
Qed
.
(** * Later *)
(** The classes [MaybeIntoLaterNEnvs] and [MaybeIntoLaterNEnvs] were used by
[iNext] in the past, but are currently _only_ used by other tactics that need
to introduce laters, e.g. the symbolic execution tactics. *)
Class
MaybeIntoLaterNEnv
(
n
:
nat
)
(
Γ
1
Γ
2
:
env
PROP
)
:
=
into_laterN_env
:
env_Forall2
(
MaybeIntoLaterN
false
n
)
Γ
1
Γ
2
.
(** The class [MaybeIntoLaterNEnvs] is used by tactics that need to introduce
laters, e.g. the symbolic execution tactics. *)
Class
MaybeIntoLaterNEnvs
(
n
:
nat
)
(
Δ
1
Δ
2
:
envs
PROP
)
:
=
{
into_later_persistent
:
MaybeIntoLaterNEnv
n
(
env_persistent
Δ
1
)
(
env_persistent
Δ
2
)
;
into_later_spatial
:
MaybeIntoLaterNEnv
n
(
env_spatial
Δ
1
)
(
env_spatial
Δ
2
)
into_later_persistent
:
TransformPersistentEnv
(
modality_laterN
n
)
(
MaybeIntoLaterN
false
n
)
(
env_persistent
Δ
1
)
(
env_persistent
Δ
2
)
;
into_later_spatial
:
TransformSpatialEnv
(
modality_laterN
n
)
(
MaybeIntoLaterN
false
n
)
(
env_spatial
Δ
1
)
(
env_spatial
Δ
2
)
false
}.
Global
Instance
into_laterN_env_nil
n
:
MaybeIntoLaterNEnv
n
Enil
Enil
.
Proof
.
constructor
.
Qed
.
Global
Instance
into_laterN_env_snoc
n
Γ
1
Γ
2
i
P
Q
:
MaybeIntoLaterNEnv
n
Γ
1
Γ
2
→
MaybeIntoLaterN
false
n
P
Q
→
MaybeIntoLaterNEnv
n
(
Esnoc
Γ
1
i
P
)
(
Esnoc
Γ
2
i
Q
).
Proof
.
by
constructor
.
Qed
.
Global
Instance
into_laterN_envs
n
Γ
p1
Γ
p2
Γ
s1
Γ
s2
:
MaybeIntoLaterNEnv
n
Γ
p1
Γ
p2
→
MaybeIntoLaterNEnv
n
Γ
s1
Γ
s2
→
TransformPersistentEnv
(
modality_laterN
n
)
(
MaybeIntoLaterN
false
n
)
Γ
p1
Γ
p2
→
TransformSpatialEnv
(
modality_laterN
n
)
(
MaybeIntoLaterN
false
n
)
Γ
s1
Γ
s2
false
→
MaybeIntoLaterNEnvs
n
(
Envs
Γ
p1
Γ
s1
)
(
Envs
Γ
p2
Γ
s2
).
Proof
.
by
split
.
Qed
.
Lemma
into_laterN_env_sound
n
Δ
1
Δ
2
:
MaybeIntoLaterNEnvs
n
Δ
1
Δ
2
→
of_envs
Δ
1
⊢
▷
^
n
(
of_envs
Δ
2
).
Proof
.
intros
[
Hp
Hs
]
;
rewrite
/
of_envs
/=
!
laterN_and
!
laterN_sep
.
rewrite
-{
1
}
laterN_intro
-
laterN_affinely_persistently_2
.
apply
and_mono
,
sep_mono
.
-
apply
pure_mono
;
destruct
1
;
constructor
;
naive_solver
eauto
using
env_Forall2_wf
,
env_Forall2_fresh
.
-
apply
affinely_mono
,
persistently_mono
.
induction
Hp
;
rewrite
/=
?laterN_and
.
apply
laterN_intro
.
by
apply
and_mono
.
-
induction
Hs
;
rewrite
/=
?laterN_sep
.
apply
laterN_intro
.
by
apply
sep_mono
.
intros
[[
Hp
??]
[
Hs
??]]
;
rewrite
/
of_envs
/=
!
laterN_and
!
laterN_sep
.
rewrite
-{
1
}
laterN_intro
.
apply
and_mono
,
sep_mono
.
-
apply
pure_mono
;
destruct
1
;
constructor
;
naive_solver
.
-
apply
Hp
;
rewrite
/=
/
MaybeIntoLaterN
.
+
intros
P
Q
->.
by
rewrite
laterN_affinely_persistently_2
.
+
intros
P
Q
.
by
rewrite
laterN_and
.
-
by
rewrite
Hs
//=
right_id
.
Qed
.
Lemma
tac_l
ö
b
Δ
Δ
'
i
Q
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment