Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
74990506
Commit
74990506
authored
Sep 01, 2017
by
Robbert Krebbers
Committed by
Jacques-Henri Jourdan
Oct 30, 2017
Browse files
Allow stripping of timeless ▷s below ■ modalities.
parent
386f169a
Changes
3
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/class_instances.v
View file @
74990506
...
...
@@ -831,23 +831,25 @@ Proof. apply later_intro. Qed.
Global
Instance
from_modal_except_0
P
:
FromModal
(
◇
P
)
P
.
Proof
.
apply
except_0_intro
.
Qed
.
(* IntoExcept0 *)
Global
Instance
into_timeless_except_0
P
:
IntoExcept0
(
◇
P
)
P
.
Proof
.
by
rewrite
/
IntoExcept0
.
Qed
.
Global
Instance
into_timeless_later
P
:
Timeless
P
→
IntoExcept0
(
▷
P
)
P
.
Proof
.
by
rewrite
/
IntoExcept0
.
Qed
.
Global
Instance
into_timeless_later_if
p
P
:
Timeless
P
→
IntoExcept0
(
▷
?p
P
)
P
.
Proof
.
rewrite
/
IntoExcept0
.
destruct
p
;
auto
using
except_0_intro
.
Qed
.
Global
Instance
into_timeless_bare
P
Q
:
IntoExcept0
P
Q
→
IntoExcept0
(
■
P
)
(
■
Q
).
Proof
.
rewrite
/
IntoExcept0
=>
->.
by
rewrite
except_0_bare_2
.
Qed
.
Global
Instance
into_timeless_persistently
P
Q
:
IntoExcept0
P
Q
→
IntoExcept0
(
□
P
)
(
□
Q
).
Proof
.
rewrite
/
IntoExcept0
=>
->.
by
rewrite
except_0_persistently
.
Qed
.
(* ElimModal *)
Global
Instance
elim_modal_except_0
P
Q
:
IsExcept0
Q
→
ElimModal
(
◇
P
)
P
Q
Q
.
Global
Instance
elim_modal_timeless
P
Q
:
IntoExcept0
P
P'
→
IsExcept0
Q
→
ElimModal
P
P'
Q
Q
.
Proof
.
intros
.
rewrite
/
ElimModal
(
except_0_intro
(
_
-
∗
_
)%
I
).
by
rewrite
-
except_0_sep
wand_elim_r
.
Qed
.
Global
Instance
elim_modal_timeless_later
P
Q
:
Timeless
P
→
IsExcept0
Q
→
ElimModal
(
▷
P
)
P
Q
Q
.
Proof
.
intros
.
rewrite
/
ElimModal
(
except_0_intro
(
_
-
∗
_
)%
I
)
(
timeless
P
).
by
rewrite
-
except_0_sep
wand_elim_r
.
Qed
.
Global
Instance
elim_modal_timeless_later_if
p
P
Q
:
Timeless
P
→
IsExcept0
Q
→
ElimModal
(
▷
?p
P
)
P
Q
Q
.
Proof
.
destruct
p
;
simpl
;
auto
using
elim_modal_timeless_later
.
intros
_
_
.
by
rewrite
/
ElimModal
wand_elim_r
.
by
rewrite
(
into_except_0
P
)
-
except_0_sep
wand_elim_r
.
Qed
.
(* Frame *)
...
...
theories/proofmode/classes.v
View file @
74990506
...
...
@@ -211,6 +211,12 @@ Instance maybe_frame_default {PROP : bi} (R P : PROP) :
TCOr
(
Affine
R
)
(
Absorbing
P
)
→
MaybeFrame
false
R
P
P
|
100
.
Proof
.
intros
.
rewrite
/
MaybeFrame
/=.
apply
:
sep_elim_r
.
Qed
.
Class
IntoExcept0
{
PROP
:
sbi
}
(
P
Q
:
PROP
)
:
=
into_except_0
:
P
⊢
◇
Q
.
Arguments
IntoExcept0
{
_
}
_
%
I
_
%
I
:
simpl
never
.
Arguments
into_except_0
{
_
}
_
%
I
_
%
I
{
_
}.
Hint
Mode
IntoExcept0
+
!
-
:
typeclass_instances
.
Hint
Mode
IntoExcept0
+
-
!
:
typeclass_instances
.
(* The class [IntoLaterN] has only two instances:
- The default instance [IntoLaterN n P P], i.e. [▷^n P -∗ P]
...
...
@@ -294,5 +300,7 @@ Instance into_forall_tc_opaque {PROP : bi} {A} (P : PROP) (Φ : A → PROP) :
IntoForall
P
Φ
→
IntoForall
(
tc_opaque
P
)
Φ
:
=
id
.
Instance
from_modal_tc_opaque
{
PROP
:
bi
}
(
P
Q
:
PROP
)
:
FromModal
P
Q
→
FromModal
(
tc_opaque
P
)
Q
:
=
id
.
(* Higher precedence than [elim_modal_timeless], so that [iAssert] does not
loop (see test [test_iAssert_modality] in proofmode.v). *)
Instance
elim_modal_tc_opaque
{
PROP
:
bi
}
(
P
P'
Q
Q'
:
PROP
)
:
ElimModal
P
P'
Q
Q'
→
ElimModal
(
tc_opaque
P
)
P'
Q
Q'
:
=
id
.
ElimModal
P
P'
Q
Q'
→
ElimModal
(
tc_opaque
P
)
P'
Q
Q'
|
100
:
=
id
.
theories/tests/proofmode.v
View file @
74990506
...
...
@@ -120,6 +120,9 @@ Proof.
by
iMod
"HF"
.
Qed
.
Lemma
test_iMod_bare_timeless
P
`
{!
Timeless
P
}
:
■
▷
P
-
∗
◇
■
P
.
Proof
.
iIntros
"H"
.
iMod
"H"
.
done
.
Qed
.
Lemma
test_iAssumption_False
P
:
False
-
∗
P
.
Proof
.
iIntros
"H"
.
done
.
Qed
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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