Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Rice Wine
Iris
Commits
25ab3a07
Commit
25ab3a07
authored
Feb 27, 2018
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments about the type classes used for `tac_modal_intro`.
parent
6b1af5f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
2 deletions
+56
-2
theories/proofmode/coq_tactics.v
theories/proofmode/coq_tactics.v
+56
-2
No files found.
theories/proofmode/coq_tactics.v
View file @
25ab3a07
...
...
@@ -1064,6 +1064,21 @@ Proof.
Qed
.
End
bi_tactics
.
(** The following _private_ classes are used internally by [tac_modal_intro] /
[iModIntro] to transform the proofmode environments when introducing a modality.
The class [TransformPersistentEnv M C Γin Γout] is used to transform the
persistent environment using a type class [C].
Inputs:
- [Γin] : the original environment.
- [M] : the modality that the environment should be transformed into.
- [C : PROP → PROP → Prop] : a type class that is used to transform the
individual hypotheses. The first parameter is the input and the second
parameter is the output.
Outputs:
- [Γout] : the resulting environment. *)
Class
TransformPersistentEnv
{
PROP1
PROP2
}
(
M
:
modality
PROP1
PROP2
)
(
C
:
PROP2
→
PROP1
→
Prop
)
(
Γ
in
:
env
PROP2
)
(
Γ
out
:
env
PROP1
)
:
=
{
transform_persistent_env
:
...
...
@@ -1074,6 +1089,19 @@ Class TransformPersistentEnv {PROP1 PROP2} (M : modality PROP1 PROP2)
transform_persistent_env_dom
i
:
Γ
in
!!
i
=
None
→
Γ
out
!!
i
=
None
;
}.
(* The class [TransformPersistentEnv M C Γin Γout filtered] is used to transform
the persistent environment using a type class [C].
Inputs:
- [Γin] : the original environment.
- [M] : the modality that the environment should be transformed into.
- [C : PROP → PROP → Prop] : a type class that is used to transform the
individual hypotheses. The first parameter is the input and the second
parameter is the output.
Outputs:
- [Γout] : the resulting environment.
- [filtered] : a Boolean indicating if non-affine hypotheses have been cleared. *)
Class
TransformSpatialEnv
{
PROP1
PROP2
}
(
M
:
modality
PROP1
PROP2
)
(
C
:
PROP2
→
PROP1
→
Prop
)
(
Γ
in
:
env
PROP2
)
(
Γ
out
:
env
PROP1
)
(
filtered
:
bool
)
:
=
{
...
...
@@ -1084,6 +1112,18 @@ Class TransformSpatialEnv {PROP1 PROP2} (M : modality PROP1 PROP2)
transform_spatial_env_dom
i
:
Γ
in
!!
i
=
None
→
Γ
out
!!
i
=
None
;
}.
(* The class [IntoModalPersistentEnv M Γin Γout s] is used to transform the
persistent environment with respect to the behavior needed to introduce [M] as
given by [s : modality_intro_spec PROP1 PROP2].
Inputs:
- [Γin] : the original environment.
- [M] : the modality that the environment should be transformed into.
- [s] : the [modality_intro_spec] a specification of the way the hypotheses
should be transformed.
Outputs:
- [Γout] : the resulting environment. *)
Inductive
IntoModalPersistentEnv
{
PROP2
}
:
∀
{
PROP1
}
(
M
:
modality
PROP1
PROP2
)
(
Γ
in
:
env
PROP2
)
(
Γ
out
:
env
PROP1
),
modality_intro_spec
PROP1
PROP2
→
Prop
:
=
|
MIEnvIsEmpty_persistent
{
PROP1
}
(
M
:
modality
PROP1
PROP2
)
:
...
...
@@ -1103,6 +1143,19 @@ Existing Class IntoModalPersistentEnv.
Existing
Instances
MIEnvIsEmpty_persistent
MIEnvForall_persistent
MIEnvTransform_persistent
MIEnvClear_persistent
MIEnvId_persistent
.
(* The class [IntoModalSpatialEnv M Γin Γout s] is used to transform the spatial
environment with respect to the behavior needed to introduce [M] as given by
[s : modality_intro_spec PROP1 PROP2].
Inputs:
- [Γin] : the original environment.
- [M] : the modality that the environment should be transformed into.
- [s] : the [modality_intro_spec] a specification of the way the hypotheses
should be transformed.
Outputs:
- [Γout] : the resulting environment.
- [filtered] : a Boolean indicating if non-affine hypotheses have been cleared. *)
Inductive
IntoModalSpatialEnv
{
PROP2
}
:
∀
{
PROP1
}
(
M
:
modality
PROP1
PROP2
)
(
Γ
in
:
env
PROP2
)
(
Γ
out
:
env
PROP1
),
modality_intro_spec
PROP1
PROP2
→
bool
→
Prop
:
=
|
MIEnvIsEmpty_spatial
{
PROP1
}
(
M
:
modality
PROP1
PROP2
)
:
...
...
@@ -1278,8 +1331,9 @@ Proof.
Qed
.
(** * Later *)
(** Although the `iNext` tactic no longer exists, much of its infrastructure is
still used by other tactics, e.g. the symbolic execution tactics. *)
(** 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
.
Class
MaybeIntoLaterNEnvs
(
n
:
nat
)
(
Δ
1
Δ
2
:
envs
PROP
)
:
=
{
...
...
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