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
d8570afb
Commit
d8570afb
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Timeless uPreds.
parent
677ba3d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/logic.v
+50
-0
50 additions, 0 deletions
iris/logic.v
with
50 additions
and
0 deletions
iris/logic.v
+
50
−
0
View file @
d8570afb
...
@@ -200,6 +200,8 @@ Notation "▷ P" := (uPred_later P) (at level 20) : uPred_scope.
...
@@ -200,6 +200,8 @@ Notation "▷ P" := (uPred_later P) (at level 20) : uPred_scope.
Notation
"□ P"
:=
(
uPred_always
P
)
(
at
level
20
)
:
uPred_scope
.
Notation
"□ P"
:=
(
uPred_always
P
)
(
at
level
20
)
:
uPred_scope
.
Infix
"≡"
:=
uPred_eq
:
uPred_scope
.
Infix
"≡"
:=
uPred_eq
:
uPred_scope
.
Class
TimelessP
{
M
}
(
P
:
uPred
M
)
:=
timelessP
x
n
:
validN
1
x
→
P
1
x
→
P
n
x
.
Section
logic
.
Section
logic
.
Context
{
M
:
cmraT
}
.
Context
{
M
:
cmraT
}
.
Implicit
Types
P
Q
:
uPred
M
.
Implicit
Types
P
Q
:
uPred
M
.
...
@@ -478,4 +480,52 @@ Lemma uPred_own_valid (a : M) : uPred_own a ⊆ uPred_valid a.
...
@@ -478,4 +480,52 @@ Lemma uPred_own_valid (a : M) : uPred_own a ⊆ uPred_valid a.
Proof
.
Proof
.
intros
x
n
Hv
[
a'
Hx
];
simpl
;
rewrite
Hx
in
Hv
;
eauto
using
cmra_valid_op_l
.
intros
x
n
Hv
[
a'
Hx
];
simpl
;
rewrite
Hx
in
Hv
;
eauto
using
cmra_valid_op_l
.
Qed
.
Qed
.
(* Timeless *)
Global
Instance
uPred_const_timeless
(
P
:
Prop
)
:
TimelessP
(
@
uPred_const
M
P
)
.
Proof
.
by
intros
x
[|
n
]
.
Qed
.
Global
Instance
uPred_and_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∧
Q
)
.
Proof
.
intros
??
x
n
?
[??];
split
;
auto
.
Qed
.
Global
Instance
uPred_or_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∨
Q
)
.
Proof
.
intros
??
x
n
?
[?|?];
[
left
|
right
];
auto
.
Qed
.
Global
Instance
uPred_impl_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
→
Q
)
.
Proof
.
intros
?
x
[|
n
]
?
HPQ
x'
[|
n'
]
????;
auto
.
apply
timelessP
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
eauto
using
cmra_valid_le
.
Qed
.
Global
Instance
uPred_sep_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
★
Q
)
.
Proof
.
intros
??
x
[|
n
]
Hvalid
(
x1
&
x2
&
Hx12
&
?
&
?);
[
done
|]
.
destruct
(
cmra_extend_op
x
x1
x2
1
)
as
([
y1
y2
]
&
Hx
&
Hy1
&
Hy2
);
auto
;
simpl
in
*.
rewrite
Hx12
in
Hvalid
;
exists
y1
,
y2
;
split_ands
;
[
by
rewrite
Hx
|
|]
.
*
apply
timelessP
;
rewrite
Hy1
;
eauto
using
cmra_valid_op_l
.
*
apply
timelessP
;
rewrite
Hy2
;
eauto
using
cmra_valid_op_r
.
Qed
.
Global
Instance
uPred_wand_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
-★
Q
)
.
Proof
.
intros
?
x
[|
n
]
?
HPQ
x'
[|
n'
]
???;
auto
.
apply
timelessP
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
eauto
3
using
cmra_valid_le
,
cmra_valid_op_r
.
Qed
.
Global
Instance
uPred_forall_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∀
x
,
P
x
)
.
Proof
.
by
intros
?
x
n
?
HP
a
;
apply
timelessP
.
Qed
.
Global
Instance
uPred_exist_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∃
x
,
P
x
)
.
Proof
.
by
intros
?
x
[|
n
]
?;
[|
intros
[
a
?];
exists
a
;
apply
timelessP
]
.
Qed
.
Global
Instance
uPred_always_timeless
P
:
TimelessP
P
→
TimelessP
(
□
P
)
.
Proof
.
intros
?
x
n
??;
simpl
;
apply
timelessP
;
auto
using
cmra_unit_valid
.
Qed
.
Global
Instance
uPred_eq_timeless
{
A
:
cofeT
}
(
a
b
:
A
)
:
Timeless
a
→
TimelessP
(
a
≡
b
:
uPred
M
)
.
Proof
.
by
intros
?
x
n
??;
apply
equiv_dist
,
timeless
.
Qed
.
Global
Instance
uPred_own_timeless
(
a
:
M
)
:
Timeless
a
→
TimelessP
(
uPred_own
a
)
.
Proof
.
intros
?
x
n
?
[
a'
?]
.
destruct
(
cmra_extend_op
x
a
a'
1
)
as
([
b
b'
]
&
Hx
&
Hb
&
Hb'
);
auto
;
simpl
in
*.
by
exists
b'
;
rewrite
Hx
,
(
timeless
a
b
)
by
done
.
Qed
.
End
logic
.
End
logic
.
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