Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tej Chajed
iris
Commits
37675f7b
Commit
37675f7b
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Make iPureIntro also work with uPred_valid and uPred_eq.
parent
677c3e3a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
proofmode/coq_tactics.v
+4
-4
4 additions, 4 deletions
proofmode/coq_tactics.v
proofmode/tactics.v
+5
-2
5 additions, 2 deletions
proofmode/tactics.v
tests/proofmode.v
+3
-2
3 additions, 2 deletions
tests/proofmode.v
with
12 additions
and
8 deletions
proofmode/coq_tactics.v
+
4
−
4
View file @
37675f7b
...
...
@@ -292,10 +292,7 @@ Lemma tac_ex_falso Δ Q : Δ ⊢ False → Δ ⊢ Q.
Proof
.
by
rewrite
-
(
False_elim
Q
)
.
Qed
.
(** * Pure *)
Lemma
tac_pure_intro
Δ
(
φ
:
Prop
)
:
φ
→
Δ
⊢
■
φ
.
Proof
.
apply
const_intro
.
Qed
.
Class
ToPure
(
P
:
uPred
M
)
(
φ
:
Prop
)
:=
to_pure
:
P
⊢
■
φ
.
Class
ToPure
(
P
:
uPred
M
)
(
φ
:
Prop
)
:=
to_pure
:
P
⊣⊢
■
φ
.
Arguments
to_pure
:
clear
implicits
.
Global
Instance
to_pure_const
φ
:
ToPure
(
■
φ
)
φ
.
Proof
.
done
.
Qed
.
...
...
@@ -305,6 +302,9 @@ Proof. intros; red. by rewrite timeless_eq. Qed.
Global
Instance
to_pure_valid
`{
CMRADiscrete
A
}
(
a
:
A
)
:
ToPure
(
✓
a
)
(
✓
a
)
.
Proof
.
intros
;
red
.
by
rewrite
discrete_valid
.
Qed
.
Lemma
tac_pure_intro
Δ
Q
(
φ
:
Prop
)
:
ToPure
Q
φ
→
φ
→
Δ
⊢
Q
.
Proof
.
intros
->
.
apply
const_intro
.
Qed
.
Lemma
tac_pure
Δ
Δ'
i
p
P
φ
Q
:
envs_lookup_delete
i
Δ
=
Some
(
p
,
P
,
Δ'
)
→
ToPure
P
φ
→
(
φ
→
Δ'
⊢
Q
)
→
Δ
⊢
Q
.
...
...
This diff is collapsed.
Click to expand it.
proofmode/tactics.v
+
5
−
2
View file @
37675f7b
...
...
@@ -113,7 +113,10 @@ Local Tactic Notation "iPure" constr(H) "as" simple_intropattern(pat) :=
apply
_
||
fail
"iPure:"
H
":"
P
"not pure"
|
intros
pat
]
.
Tactic
Notation
"iPureIntro"
:=
apply
uPred
.
const_intro
.
Tactic
Notation
"iPureIntro"
:=
eapply
tac_pure_intro
;
[
let
P
:=
match
goal
with
|
-
ToPure
?P
_
=>
P
end
in
apply
_
||
fail
"iPureIntro:"
P
"not pure"
|]
.
(** * Specialize *)
Record
iTrm
{
X
As
}
:=
...
...
@@ -751,5 +754,5 @@ Tactic Notation "iRewrite" "-" open_constr(t) "in" constr(H) :=
iRewriteCore
true
t
in
H
.
(* Make sure that by and done solve trivial things in proof mode *)
Hint
Extern
0
(
of_envs
_
⊢
_)
=>
by
apply
tac_p
ure
_i
ntro
.
Hint
Extern
0
(
of_envs
_
⊢
_)
=>
by
iP
ure
I
ntro
.
Hint
Extern
0
(
of_envs
_
⊢
_)
=>
iAssumption
.
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
3
−
2
View file @
37675f7b
...
...
@@ -72,9 +72,10 @@ Proof.
Qed
.
Lemma
demo_6
(
M
:
cmraT
)
(
P
Q
:
uPred
M
)
:
True
⊢
(
∀
x
y
z
,
x
=
0
→
y
=
0
→
z
=
0
→
P
→
□
Q
→
foo
False
)
.
True
⊢
(
∀
x
y
z
:
nat
,
x
=
plus
0
x
→
y
=
0
→
z
=
0
→
P
→
□
Q
→
foo
(
x
≡
x
))
.
Proof
.
iIntros
{
a
}
"*"
.
iIntros
"#Hfoo **"
.
by
iIntros
"
%
"
.
by
iIntros
"
# _
"
.
Qed
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment