Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Gaëtan Gilbert
Iris
Commits
b2bb853f
Verified
Commit
b2bb853f
authored
3 years ago
by
Paolo G. Giarrusso
Browse files
Options
Downloads
Patches
Plain Diff
Add (non-persistent) IntoAnd & IntoForall for bupd/fupd
parent
9f5a71a9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iris/proofmode/class_instances_updates.v
+14
-0
14 additions, 0 deletions
iris/proofmode/class_instances_updates.v
tests/proofmode.v
+25
-0
25 additions, 0 deletions
tests/proofmode.v
with
39 additions
and
0 deletions
iris/proofmode/class_instances_updates.v
+
14
−
0
View file @
b2bb853f
...
@@ -78,6 +78,13 @@ Global Instance from_or_fupd `{!BiFUpd PROP} E1 E2 P Q1 Q2 :
...
@@ -78,6 +78,13 @@ Global Instance from_or_fupd `{!BiFUpd PROP} E1 E2 P Q1 Q2 :
FromOr
P
Q1
Q2
→
FromOr
(|
=
{
E1
,
E2
}=>
P
)
(|
=
{
E1
,
E2
}=>
Q1
)
(|
=
{
E1
,
E2
}=>
Q2
)
.
FromOr
P
Q1
Q2
→
FromOr
(|
=
{
E1
,
E2
}=>
P
)
(|
=
{
E1
,
E2
}=>
Q1
)
(|
=
{
E1
,
E2
}=>
Q2
)
.
Proof
.
rewrite
/
FromOr
=>
<-.
apply
fupd_or
.
Qed
.
Proof
.
rewrite
/
FromOr
=>
<-.
apply
fupd_or
.
Qed
.
Global
Instance
into_and_bupd
`{
!
BiBUpd
PROP
}
P
Q1
Q2
:
IntoAnd
false
P
Q1
Q2
→
IntoAnd
false
(|
==>
P
)
(|
==>
Q1
)
(|
==>
Q2
)
.
Proof
.
rewrite
/
IntoAnd
/==>->.
apply
bupd_and
.
Qed
.
Global
Instance
into_and_fupd
`{
!
BiFUpd
PROP
}
E1
E2
P
Q1
Q2
:
IntoAnd
false
P
Q1
Q2
→
IntoAnd
false
(|
=
{
E1
,
E2
}=>
P
)
(|
=
{
E1
,
E2
}=>
Q1
)
(|
=
{
E1
,
E2
}=>
Q2
)
.
Proof
.
rewrite
/
IntoAnd
/==>->.
apply
fupd_and
.
Qed
.
Global
Instance
from_exist_bupd
`{
!
BiBUpd
PROP
}
{
A
}
P
(
Φ
:
A
→
PROP
)
:
Global
Instance
from_exist_bupd
`{
!
BiBUpd
PROP
}
{
A
}
P
(
Φ
:
A
→
PROP
)
:
FromExist
P
Φ
→
FromExist
(|
==>
P
)
(
λ
a
,
|
==>
Φ
a
)
%
I
.
FromExist
P
Φ
→
FromExist
(|
==>
P
)
(
λ
a
,
|
==>
Φ
a
)
%
I
.
Proof
.
rewrite
/
FromExist
=>
<-.
apply
bupd_exist
.
Qed
.
Proof
.
rewrite
/
FromExist
=>
<-.
apply
bupd_exist
.
Qed
.
...
@@ -85,6 +92,13 @@ Global Instance from_exist_fupd `{!BiFUpd PROP} {A} E1 E2 P (Φ : A → PROP) :
...
@@ -85,6 +92,13 @@ Global Instance from_exist_fupd `{!BiFUpd PROP} {A} E1 E2 P (Φ : A → PROP) :
FromExist
P
Φ
→
FromExist
(|
=
{
E1
,
E2
}=>
P
)
(
λ
a
,
|
=
{
E1
,
E2
}=>
Φ
a
)
%
I
.
FromExist
P
Φ
→
FromExist
(|
=
{
E1
,
E2
}=>
P
)
(
λ
a
,
|
=
{
E1
,
E2
}=>
Φ
a
)
%
I
.
Proof
.
rewrite
/
FromExist
=>
<-.
apply
fupd_exist
.
Qed
.
Proof
.
rewrite
/
FromExist
=>
<-.
apply
fupd_exist
.
Qed
.
Global
Instance
into_forall_bupd
`{
!
BiBUpd
PROP
}
{
A
}
P
(
Φ
:
A
→
PROP
)
:
IntoForall
P
Φ
→
IntoForall
(|
==>
P
)
(
λ
a
,
|
==>
Φ
a
)
%
I
.
Proof
.
rewrite
/
IntoForall
=>
->
.
apply
bupd_forall
.
Qed
.
Global
Instance
into_forall_fupd
`{
!
BiFUpd
PROP
}
{
A
}
E1
E2
P
(
Φ
:
A
→
PROP
)
:
IntoForall
P
Φ
→
IntoForall
(|
=
{
E1
,
E2
}=>
P
)
(
λ
a
,
|
=
{
E1
,
E2
}=>
Φ
a
)
%
I
.
Proof
.
rewrite
/
IntoForall
=>
->
.
apply
fupd_forall
.
Qed
.
Global
Instance
from_forall_fupd
Global
Instance
from_forall_fupd
`{
!
BiFUpd
PROP
,
!
BiPlainly
PROP
,
!
BiFUpdPlainly
PROP
}
E1
E2
{
A
}
P
(
Φ
:
A
→
PROP
)
name
:
`{
!
BiFUpd
PROP
,
!
BiPlainly
PROP
,
!
BiFUpdPlainly
PROP
}
E1
E2
{
A
}
P
(
Φ
:
A
→
PROP
)
name
:
(* Some cases in which [E2 ⊆ E1] holds *)
(* Some cases in which [E2 ⊆ E1] holds *)
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
25
−
0
View file @
b2bb853f
...
@@ -1054,6 +1054,31 @@ Lemma test_iDestruct_clear P Q R :
...
@@ -1054,6 +1054,31 @@ Lemma test_iDestruct_clear P Q R :
Proof
.
Proof
.
iIntros
"HP HQR"
.
iDestruct
"HQR"
as
"{HP} [HQ HR]"
.
done
.
iIntros
"HP HQR"
.
iDestruct
"HQR"
as
"{HP} [HQ HR]"
.
done
.
Qed
.
Qed
.
Lemma
test_iSpecialize_bupd
`{
BiBUpd
PROP
}
A
(
a
:
A
)
(
P
:
A
->
PROP
)
:
(|
==>
∀
x
,
P
x
)
⊢
|
==>
P
a
.
Proof
.
iIntros
"H"
.
iSpecialize
(
"H"
$!
a
)
.
done
.
Qed
.
Lemma
test_iSpecialize_fupd
`{
BiFUpd
PROP
}
A
(
a
:
A
)
(
P
:
A
->
PROP
)
E1
E2
:
(|
=
{
E1
,
E2
}=>
∀
x
,
P
x
)
⊢
|
=
{
E1
,
E2
}=>
P
a
.
Proof
.
iIntros
"H"
.
iSpecialize
(
"H"
$!
a
)
.
done
.
Qed
.
Lemma
test_iDestruct_and_bupd
`{
BiBUpd
PROP
}
(
P
Q
:
PROP
)
:
(|
==>
P
∧
Q
)
⊢
|
==>
P
.
Proof
.
iIntros
"[P _]"
.
done
.
Qed
.
Lemma
test_iDestruct_and_fupd
`{
BiFUpd
PROP
}
(
P
Q
:
PROP
)
E1
E2
:
(|
=
{
E1
,
E2
}=>
P
∧
Q
)
⊢
|
=
{
E1
,
E2
}=>
P
.
Proof
.
iIntros
"[P _]"
.
done
.
Qed
.
End
tests
.
End
tests
.
Section
parsing_tests
.
Section
parsing_tests
.
...
...
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