Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
George Pirlea
Iris
Commits
8db4eba0
Commit
8db4eba0
authored
Feb 22, 2018
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify `iAlways` and `iModIntro`.
parent
69cf8016
Changes
5
Expand all
Hide whitespace changes
Inline
Sidebyside
Showing
5 changed files
with
405 additions
and
369 deletions
+405
369
theories/proofmode/class_instances.v
theories/proofmode/class_instances.v
+133
81
theories/proofmode/classes.v
theories/proofmode/classes.v
+96
103
theories/proofmode/coq_tactics.v
theories/proofmode/coq_tactics.v
+142
146
theories/proofmode/monpred.v
theories/proofmode/monpred.v
+24
23
theories/proofmode/tactics.v
theories/proofmode/tactics.v
+10
16
No files found.
theories/proofmode/class_instances.v
View file @
8db4eba0
This diff is collapsed.
Click to expand it.
theories/proofmode/classes.v
View file @
8db4eba0
This diff is collapsed.
Click to expand it.
theories/proofmode/coq_tactics.v
View file @
8db4eba0
This diff is collapsed.
Click to expand it.
theories/proofmode/monpred.v
View file @
8db4eba0
...
...
@@ 14,21 +14,21 @@ Proof. by rewrite /IsBiIndexRel. Qed.
Hint
Extern
1
(
IsBiIndexRel
_
_
)
=>
unfold
IsBiIndexRel
;
assumption
:
typeclass_instances
.
Section
always_
modalities
.
Section
modalities
.
Context
{
I
:
biIndex
}
{
PROP
:
bi
}.
Lemma
always_
modality_absolutely_mixin
:
always_
modality_mixin
(@
monPred_absolutely
I
PROP
)
(
AIEnvFilter
Absolute
)
(
A
IEnvFilter
Absolute
).
Lemma
modality_absolutely_mixin
:
modality_mixin
(@
monPred_absolutely
I
PROP
)
(
MIEnvFilter
Absolute
)
(
M
IEnvFilter
Absolute
).
Proof
.
split
;
split_and
?
;
intros
;
try
match
goal
with
H
:
TCDiag
_
_
_

_
=>
destruct
H
end
;
eauto
using
bi
.
equiv_entails_sym
,
absolute_absolutely
,
monPred_absolutely_mono
,
monPred_absolutely_and
,
monPred_absolutely_sep_2
with
typeclass_instances
.
Qed
.
Definition
always_
modality_absolutely
:
=
AlwaysModality
_
always_
modality_absolutely_mixin
.
End
always_
modalities
.
Definition
modality_absolutely
:
=
Modality
_
modality_absolutely_mixin
.
End
modalities
.
Section
bi
.
Context
{
I
:
biIndex
}
{
PROP
:
bi
}.
...
...
@@ 39,9 +39,9 @@ Implicit Types 𝓟 𝓠 𝓡 : PROP.
Implicit
Types
φ
:
Prop
.
Implicit
Types
i
j
:
I
.
Global
Instance
from_
always
_absolutely
P
:
From
Always
always_
modality_absolutely
(
∀
ᵢ
P
)
P

1
.
Proof
.
by
rewrite
/
From
Always
.
Qed
.
Global
Instance
from_
modal
_absolutely
P
:
From
Modal
modality_absolutely
(
∀
ᵢ
P
)
P

1
.
Proof
.
by
rewrite
/
From
Modal
.
Qed
.
Global
Instance
make_monPred_at_pure
φ
i
:
MakeMonPredAt
i
⌜φ⌝
⌜φ⌝
.
Proof
.
by
rewrite
/
MakeMonPredAt
monPred_at_pure
.
Qed
.
...
...
@@ 154,23 +154,23 @@ Proof.
by
rewrite

monPred_at_persistently

monPred_at_persistently_if
.
Qed
.
Global
Instance
from_
always
_affinely_monPred_at
P
Q
𝓠
i
:
From
Always
always_
modality_affinely
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Always
always_
modality_affinely
(
P
i
)
𝓠

0
.
Global
Instance
from_
modal
_affinely_monPred_at
P
Q
𝓠
i
:
From
Modal
modality_affinely
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Modal
modality_affinely
(
P
i
)
𝓠

0
.
Proof
.
rewrite
/
From
Always
/
MakeMonPredAt
/==>
<
<.
by
rewrite
monPred_at_affinely
.
rewrite
/
From
Modal
/
MakeMonPredAt
/==>
<
<.
by
rewrite
monPred_at_affinely
.
Qed
.
Global
Instance
from_
always
_persistently_monPred_at
P
Q
𝓠
i
:
From
Always
always_
modality_persistently
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Always
always_
modality_persistently
(
P
i
)
𝓠

0
.
Global
Instance
from_
modal
_persistently_monPred_at
P
Q
𝓠
i
:
From
Modal
modality_persistently
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Modal
modality_persistently
(
P
i
)
𝓠

0
.
Proof
.
rewrite
/
From
Always
/
MakeMonPredAt
/==>
<
<.
by
rewrite
monPred_at_persistently
.
rewrite
/
From
Modal
/
MakeMonPredAt
/==>
<
<.
by
rewrite
monPred_at_persistently
.
Qed
.
Global
Instance
from_
always
_affinely_persistently_monPred_at
P
Q
𝓠
i
:
From
Always
always_
modality_affinely_persistently
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Always
always_
modality_affinely_persistently
(
P
i
)
𝓠

0
.
Global
Instance
from_
modal
_affinely_persistently_monPred_at
P
Q
𝓠
i
:
From
Modal
modality_affinely_persistently
P
Q
→
MakeMonPredAt
i
Q
𝓠
→
From
Modal
modality_affinely_persistently
(
P
i
)
𝓠

0
.
Proof
.
rewrite
/
From
Always
/
MakeMonPredAt
/==>
<
<.
rewrite
/
From
Modal
/
MakeMonPredAt
/==>
<
<.
by
rewrite
monPred_at_affinely
monPred_at_persistently
.
Qed
.
...
...
@@ 348,10 +348,11 @@ Proof.
?monPred_at_persistently
monPred_at_embed
.
Qed
.
(* FIXME
Global Instance from_modal_monPred_at i P Q 𝓠 :
FromModal P Q → MakeMonPredAt i Q 𝓠 → FromModal (P i) 𝓠.
Proof. by rewrite /FromModal /MakeMonPredAt=> < <. Qed.
*)
End
bi
.
(* When P and/or Q are evars when doing typeclass search on [IntoWand
...
...
theories/proofmode/tactics.v
View file @
8db4eba0
...
...
@@ 961,31 +961,32 @@ Local Tactic Notation "iExistDestruct" constr(H)
[
env_reflexivity

fail
"iExistDestruct:"
Hx
"not fresh"

revert
y
;
intros
x
].
(** *
Always
*)
Tactic
Notation
"i
Always
"
:
=
(** *
Modality introduction
*)
Tactic
Notation
"i
ModIntro
"
:
=
iStartProof
;
eapply
tac_
always
_intro
;
eapply
tac_
modal
_intro
;
[
apply
_

fail
"i
Always: the goal is not an alwaysstyle
modality"
fail
"i
ModIntro: the goal is not a
modality"

hnf
;
env_cbv
;
apply
_

lazymatch
goal
with


TCAnd
(
TCForall
?C
_
)
_
=>
fail
"i
Always
: persistent context does not satisfy"
C


TCAnd
(
TCEq
_
Enil
)
_
=>
fail
"i
Always
: persistent context is nonempty"


TCAnd
(
TCForall
?C
_
)
_
=>
fail
"i
ModIntro
: persistent context does not satisfy"
C


TCAnd
(
TCEq
_
Enil
)
_
=>
fail
"i
ModIntro
: persistent context is nonempty"
end

hnf
;
env_cbv
;
lazymatch
goal
with


∃
_
,
TransformSpatialEnv
_
_
_
_
_
∧
_
=>
eexists
;
split
;
[
apply
_

apply
_

fail
"i
Always
: cannot filter spatial context when goal is not absorbing"
]

apply
_

fail
"i
ModIntro
: cannot filter spatial context when goal is not absorbing"
]


TCAnd
(
TCForall
?C
_
)
_
=>
apply
_

fail
"i
Always
: spatial context does not satisfy"
C
apply
_

fail
"i
ModIntro
: spatial context does not satisfy"
C


TCAnd
(
TCEq
_
Enil
)
_
=>
apply
_

fail
"i
Always
: spatial context is nonempty"
apply
_

fail
"i
ModIntro
: spatial context is nonempty"


_
=>
apply
_
end

env_cbv
].
Tactic
Notation
"iAlways"
:
=
iModIntro
.
(** * Later *)
Tactic
Notation
"iNext"
open_constr
(
n
)
:
=
...
...
@@ 1006,13 +1007,6 @@ Tactic Notation "iNext" open_constr(n) :=
Tactic
Notation
"iNext"
:
=
iNext
_
.
(** * Update modality *)
Tactic
Notation
"iModIntro"
:
=
iStartProof
;
eapply
tac_modal_intro
;
[
apply
_

let
P
:
=
match
goal
with

FromModal
?P
_
=>
P
end
in
fail
"iModIntro:"
P
"not a modality"
].
Tactic
Notation
"iModCore"
constr
(
H
)
:
=
eapply
tac_modal_elim
with
_
H
_
_
_
_
_;
[
env_reflexivity

fail
"iMod:"
H
"not found"
...
...
Write
Preview
Markdown
is supported
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