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
Rodolphe Lepigre
Iris
Commits
068dd357
Commit
068dd357
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Define Timeless in the logic.
Sadly, timelessness of many connectives is still proved in the model.
parent
542fe0c1
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
modures/logic.v
+39
-27
39 additions, 27 deletions
modures/logic.v
with
39 additions
and
27 deletions
modures/logic.v
+
39
−
27
View file @
068dd357
...
@@ -220,7 +220,8 @@ Fixpoint uPred_big_sep {M} (Ps : list (uPred M)) :=
...
@@ -220,7 +220,8 @@ Fixpoint uPred_big_sep {M} (Ps : list (uPred M)) :=
Instance
:
Params
(
@
uPred_big_sep
)
1
.
Instance
:
Params
(
@
uPred_big_sep
)
1
.
Notation
"'Π★' Ps"
:=
(
uPred_big_sep
Ps
)
(
at
level
20
)
:
uPred_scope
.
Notation
"'Π★' Ps"
:=
(
uPred_big_sep
Ps
)
(
at
level
20
)
:
uPred_scope
.
Class
TimelessP
{
M
}
(
P
:
uPred
M
)
:=
timelessP
x
n
:
✓
{
1
}
x
→
P
1
x
→
P
n
x
.
Class
TimelessP
{
M
}
(
P
:
uPred
M
)
:=
timelessP
:
▷
P
⊑
(
P
∨
▷
False
)
.
Arguments
timelessP
{_}
_
{_}
_
_
_
_
.
Module
uPred
.
Section
uPred_logic
.
Module
uPred
.
Section
uPred_logic
.
Context
{
M
:
cmraT
}
.
Context
{
M
:
cmraT
}
.
...
@@ -798,49 +799,60 @@ Lemma uPred_big_sep_elem_of Ps P : P ∈ Ps → (Π★ Ps) ⊑ P.
...
@@ -798,49 +799,60 @@ Lemma uPred_big_sep_elem_of Ps P : P ∈ Ps → (Π★ Ps) ⊑ P.
Proof
.
induction
1
;
simpl
;
auto
.
Qed
.
Proof
.
induction
1
;
simpl
;
auto
.
Qed
.
(* Timeless *)
(* Timeless *)
Lemma
timelessP_spec
P
:
TimelessP
P
↔
∀
x
n
,
✓
{
n
}
x
→
P
1
x
→
P
n
x
.
Proof
.
split
.
*
intros
HP
x
n
??;
induction
n
as
[|[|
n
]];
auto
.
by
destruct
(
HP
x
(
S
(
S
n
)));
auto
using
cmra_valid_S
.
*
move
=>
HP
x
[|[|
n
]]
/=
;
auto
;
left
.
apply
HP
,
uPred_weaken
with
x
(
S
n
);
eauto
using
cmra_valid_le
.
Qed
.
Global
Instance
const_timeless
(
P
:
Prop
)
:
TimelessP
(
■
P
:
uPred
M
)
%
I
.
Global
Instance
const_timeless
(
P
:
Prop
)
:
TimelessP
(
■
P
:
uPred
M
)
%
I
.
Proof
.
by
intros
x
[|
n
]
.
Qed
.
Proof
.
by
apply
timelessP_spec
=>
x
[|
n
]
.
Qed
.
Global
Instance
and_timeless
P
Q
:
Global
Instance
and_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∧
Q
)
.
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∧
Q
)
.
Proof
.
by
intros
??;
rewrite
/
TimelessP
later_and
or_and_r
;
apply
and_mono
.
Qed
.
Proof
.
intros
??
x
n
?
[??];
split
;
auto
.
Qed
.
Global
Instance
or_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∨
Q
)
.
Global
Instance
or_timeless
P
Q
:
Proof
.
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
∨
Q
)
.
intros
;
rewrite
/
TimelessP
later_or
.
Proof
.
intros
??
x
n
?
[?|?];
[
left
|
right
];
auto
.
Qed
.
rewrite
->
(
timelessP
P
),
(
timelessP
Q
);
eauto
10
.
Qed
.
Global
Instance
impl_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
→
Q
)
.
Global
Instance
impl_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
→
Q
)
.
Proof
.
Proof
.
intros
?
x
[|
n
]
?
HPQ
x'
[|
n'
]
????;
auto
.
rewrite
!
timelessP_spec
=>
HP
x
[|
n
]
?
HPQ
x'
[|
n'
]
????;
auto
.
apply
timeless
P
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
eauto
using
cmra_valid_le
.
apply
H
P
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
eauto
using
cmra_valid_le
.
Qed
.
Qed
.
Global
Instance
sep_timeless
P
Q
:
Global
Instance
sep_timeless
P
Q
:
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
★
Q
)
.
TimelessP
P
→
TimelessP
Q
→
TimelessP
(
P
★
Q
)
.
Proof
.
Proof
.
intros
??
x
[|
n
]
Hvalid
(
x1
&
x2
&
Hx12
&
?
&
?);
[
done
|]
.
intros
;
rewrite
/
TimelessP
later_sep
;
rewrite
->
(
timelessP
P
),
(
timelessP
Q
)
.
destruct
(
cmra_extend_op
1
x
x1
x2
)
as
([
y1
y2
]
&
Hx
&
Hy1
&
Hy2
);
auto
;
simpl
in
*.
apply
wand_elim_l'
,
or_elim
;
apply
wand_intro
;
auto
.
exists
y1
,
y2
;
split_ands
;
[
by
apply
equiv_dist
|
|]
.
apply
wand_elim_r'
,
or_elim
;
apply
wand_intro
;
rewrite
?(
commutative
_
Q
);
auto
.
*
cofe_subst
x
;
apply
timelessP
;
rewrite
Hy1
;
eauto
using
cmra_valid_op_l
.
*
cofe_subst
x
;
apply
timelessP
;
rewrite
Hy2
;
eauto
using
cmra_valid_op_r
.
Qed
.
Qed
.
Global
Instance
wand_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
-★
Q
)
.
Global
Instance
wand_timeless
P
Q
:
TimelessP
Q
→
TimelessP
(
P
-★
Q
)
.
Proof
.
Proof
.
intros
?
x
[|
n
]
?
HPQ
x'
[|
n'
]
???;
auto
.
rewrite
!
timelessP_spec
=>
HP
x
[|
n
]
?
HPQ
x'
[|
n'
]
???;
auto
.
apply
timeless
P
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
apply
H
P
,
HPQ
,
uPred_weaken
with
x'
(
S
n'
);
eauto
3
using
cmra_valid_le
,
cmra_valid_op_r
.
eauto
3
using
cmra_valid_le
,
cmra_valid_op_r
.
Qed
.
Qed
.
Global
Instance
forall_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
Global
Instance
forall_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∀
x
,
P
x
)
.
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∀
x
,
P
x
)
.
Proof
.
by
intros
?
x
n
?
HP
a
;
apply
timeless
P
.
Qed
.
Proof
.
by
setoid_rewrite
timelessP_spec
=>
HP
x
n
?
?
a
;
apply
H
P
.
Qed
.
Global
Instance
exist_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
Global
Instance
exist_timeless
{
A
}
(
P
:
A
→
uPred
M
)
:
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∃
x
,
P
x
)
.
(
∀
x
,
TimelessP
(
P
x
))
→
TimelessP
(
∃
x
,
P
x
)
.
Proof
.
by
intros
?
x
[|
n
]
?;
[|
intros
[
a
?];
exists
a
;
apply
timelessP
]
.
Qed
.
Proof
.
by
setoid_rewrite
timelessP_spec
=>
HP
x
[|
n
]
?;
[|
intros
[
a
?];
exists
a
;
apply
HP
]
.
Qed
.
Global
Instance
always_timeless
P
:
TimelessP
P
→
TimelessP
(
□
P
)
.
Global
Instance
always_timeless
P
:
TimelessP
P
→
TimelessP
(
□
P
)
.
Proof
.
intros
?
x
n
??;
simpl
;
apply
timelessP
;
auto
using
cmra_unit_valid
.
Qed
.
Proof
.
intros
?;
rewrite
/
TimelessP
.
by
rewrite
-
always_const
-!
always_later
-
always_or
;
apply
always_mono
.
Qed
.
Global
Instance
eq_timeless
{
A
:
cofeT
}
(
a
b
:
A
)
:
Global
Instance
eq_timeless
{
A
:
cofeT
}
(
a
b
:
A
)
:
Timeless
a
→
TimelessP
(
a
≡
b
:
uPred
M
)
%
I
.
Timeless
a
→
TimelessP
(
a
≡
b
:
uPred
M
)
%
I
.
Proof
.
by
intros
?
x
n
??;
apply
equiv_dist
,
timeless
.
Qed
.
Proof
.
by
intro
;
apply
timelessP_spec
=>
x
n
??;
apply
equiv_dist
,
timeless
.
Qed
.
Global
Instance
own_timeless
(
a
:
M
):
Timeless
a
→
TimelessP
(
uPred_own
a
)
.
(** Timeless elements *)
Global
Instance
own_timeless
(
a
:
M
):
Timeless
a
→
TimelessP
(
uPred_own
a
)
.
Proof
.
Proof
.
by
intros
?
x
n
??;
apply
cmra_included_includedN
,
cmra_timeless_included_l
.
intro
;
apply
timelessP_spec
=>
x
[|
n
]
??
//
;
apply
cmra_included_includedN
,
cmra_timeless_included_l
;
eauto
using
cmra_valid_le
.
Qed
.
Qed
.
End
uPred_logic
.
End
uPred
.
End
uPred_logic
.
End
uPred
.
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