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
cd41721d
Commit
cd41721d
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More AlwaysStable stuff.
parent
f01228f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algebra/upred.v
+32
-10
32 additions, 10 deletions
algebra/upred.v
with
32 additions
and
10 deletions
algebra/upred.v
+
32
−
10
View file @
cd41721d
...
...
@@ -230,6 +230,10 @@ Arguments timelessP {_} _ {_} _ _ _ _.
Class
AlwaysStable
{
M
}
(
P
:
uPred
M
)
:=
always_stable
:
P
⊑
□
P
.
Arguments
always_stable
{_}
_
{_}
_
_
_
_
.
Class
AlwaysStableL
{
M
}
(
Ps
:
list
(
uPred
M
))
:=
always_stableL
:
Forall
AlwaysStable
Ps
.
Arguments
always_stableL
{_}
_
{_}
.
Module
uPred
.
Section
uPred_logic
.
Context
{
M
:
cmraT
}
.
Implicit
Types
φ
:
Prop
.
...
...
@@ -823,33 +827,33 @@ Lemma ownM_invalid (a : M) : ¬ ✓{0} a → uPred_ownM a ⊑ False.
Proof
.
by
intros
;
rewrite
ownM_valid
valid_elim
.
Qed
.
(* Big ops *)
Global
Instance
uPred_
big_and_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
uPred_big_and
M
)
.
Global
Instance
big_and_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
uPred_big_and
M
)
.
Proof
.
by
induction
1
as
[|
P
Q
Ps
Qs
HPQ
?
IH
];
rewrite
/=
?HPQ
?IH
.
Qed
.
Global
Instance
uPred_
big_sep_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
uPred_big_sep
M
)
.
Global
Instance
big_sep_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
uPred_big_sep
M
)
.
Proof
.
by
induction
1
as
[|
P
Q
Ps
Qs
HPQ
?
IH
];
rewrite
/=
?HPQ
?IH
.
Qed
.
Global
Instance
uPred_
big_and_perm
:
Proper
((
≡
ₚ
)
==>
(
≡
))
(
@
uPred_big_and
M
)
.
Global
Instance
big_and_perm
:
Proper
((
≡
ₚ
)
==>
(
≡
))
(
@
uPred_big_and
M
)
.
Proof
.
induction
1
as
[|
P
Ps
Qs
?
IH
|
P
Q
Ps
|];
simpl
;
auto
.
*
by
rewrite
IH
.
*
by
rewrite
!
associative
(
commutative
_
P
)
.
*
etransitivity
;
eauto
.
Qed
.
Global
Instance
uPred_
big_sep_perm
:
Proper
((
≡
ₚ
)
==>
(
≡
))
(
@
uPred_big_sep
M
)
.
Global
Instance
big_sep_perm
:
Proper
((
≡
ₚ
)
==>
(
≡
))
(
@
uPred_big_sep
M
)
.
Proof
.
induction
1
as
[|
P
Ps
Qs
?
IH
|
P
Q
Ps
|];
simpl
;
auto
.
*
by
rewrite
IH
.
*
by
rewrite
!
associative
(
commutative
_
P
)
.
*
etransitivity
;
eauto
.
Qed
.
Lemma
uPred_
big_and_app
Ps
Qs
:
(
Π
∧
(
Ps
++
Qs
))
%
I
≡
(
Π
∧
Ps
∧
Π
∧
Qs
)
%
I
.
Lemma
big_and_app
Ps
Qs
:
(
Π
∧
(
Ps
++
Qs
))
%
I
≡
(
Π
∧
Ps
∧
Π
∧
Qs
)
%
I
.
Proof
.
by
induction
Ps
as
[|??
IH
];
rewrite
/=
?left_id
-
?associative
?IH
.
Qed
.
Lemma
uPred_
big_sep_app
Ps
Qs
:
(
Π
★
(
Ps
++
Qs
))
%
I
≡
(
Π
★
Ps
★
Π
★
Qs
)
%
I
.
Lemma
big_sep_app
Ps
Qs
:
(
Π
★
(
Ps
++
Qs
))
%
I
≡
(
Π
★
Ps
★
Π
★
Qs
)
%
I
.
Proof
.
by
induction
Ps
as
[|??
IH
];
rewrite
/=
?left_id
-
?associative
?IH
.
Qed
.
Lemma
uPred_
big_sep_and
Ps
:
(
Π
★
Ps
)
⊑
(
Π
∧
Ps
)
.
Lemma
big_sep_and
Ps
:
(
Π
★
Ps
)
⊑
(
Π
∧
Ps
)
.
Proof
.
by
induction
Ps
as
[|
P
Ps
IH
];
simpl
;
auto
.
Qed
.
Lemma
uPred_
big_and_elem_of
Ps
P
:
P
∈
Ps
→
(
Π
∧
Ps
)
⊑
P
.
Lemma
big_and_elem_of
Ps
P
:
P
∈
Ps
→
(
Π
∧
Ps
)
⊑
P
.
Proof
.
induction
1
;
simpl
;
auto
.
Qed
.
Lemma
uPred_
big_sep_elem_of
Ps
P
:
P
∈
Ps
→
(
Π
★
Ps
)
⊑
P
.
Lemma
big_sep_elem_of
Ps
P
:
P
∈
Ps
→
(
Π
★
Ps
)
⊑
P
.
Proof
.
induction
1
;
simpl
;
auto
.
Qed
.
(* Timeless *)
...
...
@@ -911,7 +915,7 @@ Proof.
Qed
.
(* Always stable *)
Notation
AS
:=
AlwaysStable
.
Local
Notation
AS
:=
AlwaysStable
.
Global
Instance
const_always_stable
φ
:
AS
(
■
φ
:
uPred
M
)
%
I
.
Proof
.
by
rewrite
/
AlwaysStable
always_const
.
Qed
.
Global
Instance
always_always_stable
P
:
AS
(
□
P
)
.
...
...
@@ -940,6 +944,24 @@ Global Instance default_always_stable {A} P (Q : A → uPred M) (mx : option A)
AS
P
→
(
∀
x
,
AS
(
Q
x
))
→
AS
(
default
P
mx
Q
)
.
Proof
.
destruct
mx
;
apply
_
.
Qed
.
(* Always stable for lists *)
Local
Notation
ASL
:=
AlwaysStableL
.
Global
Instance
big_and_always_stable
Ps
:
ASL
Ps
→
AS
(
Π
∧
Ps
)
.
Proof
.
induction
1
;
apply
_
.
Qed
.
Global
Instance
big_sep_always_stable
Ps
:
ASL
Ps
→
AS
(
Π
★
Ps
)
.
Proof
.
induction
1
;
apply
_
.
Qed
.
Global
Instance
nil_always_stable
:
ASL
(
@
nil
(
uPred
M
))
.
Proof
.
constructor
.
Qed
.
Global
Instance
cons_always_stable
P
Ps
:
AS
P
→
ASL
Ps
→
ASL
(
P
::
Ps
)
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
app_always_stable
Ps
Ps'
:
ASL
Ps
→
ASL
Ps'
→
ASL
(
Ps
++
Ps'
)
.
Proof
.
apply
Forall_app_2
.
Qed
.
Global
Instance
zip_with_always_stable
{
A
B
}
(
f
:
A
→
B
→
uPred
M
)
xs
ys
:
(
∀
x
y
,
AS
(
f
x
y
))
→
ASL
(
zip_with
f
xs
ys
)
.
Proof
.
unfold
ASL
=>
?;
revert
ys
;
induction
xs
=>
-
[|??];
constructor
;
auto
.
Qed
.
(* Derived lemmas for always stable *)
Lemma
always_always
P
`{
!
AlwaysStable
P
}
:
(
□
P
)
%
I
≡
P
.
Proof
.
apply
(
anti_symmetric
(
⊑
));
auto
using
always_elim
.
Qed
.
Lemma
always_intro'
P
Q
`{
!
AlwaysStable
P
}
:
P
⊑
Q
→
P
⊑
□
Q
.
...
...
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