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
0204cf5e
Commit
0204cf5e
authored
10 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
move equivP ro CSetoid as equivR
parent
91bdb949
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
iris_unsafe.v
+2
-7
2 additions, 7 deletions
iris_unsafe.v
iris_vs.v
+5
-5
5 additions, 5 deletions
iris_vs.v
lib/ModuRes/CSetoid.v
+7
-0
7 additions, 0 deletions
lib/ModuRes/CSetoid.v
with
14 additions
and
12 deletions
iris_unsafe.v
+
2
−
7
View file @
0204cf5e
...
...
@@ -61,11 +61,6 @@ Module Unsafety (RL : RA_T) (C : CORE_LANG).
by
exfalso
;
omega
.
Qed
.
(* Leibniz equality arise from SSR's case tactic.
RJ: I could use this ;-) move to CSetoid? *)
(* PDS: Feel free. I'd like to eventually get everything but the robust safety theorem out of this file. *)
Lemma
equivP
{
T
:
Type
}
`{
eqT
:
Setoid
T
}
{
a
b
:
T
}
:
a
=
b
->
a
==
b
.
Proof
.
by
move
=>
->
;
reflexivity
.
Qed
.
(*
Simple monotonicity tactics for props and wsat.
...
...
@@ -213,7 +208,7 @@ Module Unsafety (RL : RA_T) (C : CORE_LANG).
exists
w''
α
;
split
;
[
done
|
split
];
last
first
.
+
by
move
:
HW
;
rewrite
2
!
mask_full_union
=>
HW
;
wsatM
HW
.
apply
:
(
IH
_
HLt
_
_
_
_
HSw₀
);
last
done
.
rewrite
fillE
;
exists
r'
rK
;
split
;
[
exact
:
equiv
P
|
split
;
[
by
propsM
Hei'
|]
]
.
rewrite
fillE
;
exists
r'
rK
;
split
;
[
exact
:
equiv
R
|
split
;
[
by
propsM
Hei'
|]
]
.
have
{
HSw
}
HSw
:
w
⊑
w''
by
transitivity
w'
.
by
propsM
HK
.
...
...
@@ -246,7 +241,7 @@ Module Unsafety (RL : RA_T) (C : CORE_LANG).
rewrite
/=
in
Hei'
;
rewrite
fill_empty
-
Hk'
in
Hei'
*
=>
{
Hk'
}
.
have
{
HSw₀
}
HSw₀
:
w₀
⊑
w'''
by
transitivity
w''
;
first
by
transitivity
w'
.
apply
:
(
IH
_
HLt
_
_
_
_
HSw₀
);
last
done
.
rewrite
fillE
;
exists
rei'
rK
;
split
;
[
exact
:
equiv
P
|
split
;
[
done
|]
]
.
rewrite
fillE
;
exists
rei'
rK
;
split
;
[
exact
:
equiv
R
|
split
;
[
done
|]
]
.
have
{
HSw
HSw'
HSw''
}
HSw
:
w
⊑
w'''
by
transitivity
w''
;
first
by
transitivity
w'
.
by
propsM
HK
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
iris_vs.v
+
5
−
5
View file @
0204cf5e
...
...
@@ -107,7 +107,7 @@ Module IrisVS (RL : RA_T) (C : CORE_LANG).
do
8
red
in
HInv
.
destruct
HE
as
[
rs
[
HE
HM
]
]
.
destruct
(
rs
i
)
as
[
ri
|]
eqn
:
HLr
.
-
rewrite
->
comp_map_remove
with
(
i
:=
i
)
(
r
:=
ri
)
in
HE
by
(
rewrite
HLr
;
reflexivity
)
.
-
rewrite
->
comp_map_remove
with
(
i
:=
i
)
(
r
:=
ri
)
in
HE
by
now
eapply
equivR
.
rewrite
->
assoc
,
<-
(
assoc
(_
r
)),
(
comm
rf
),
assoc
in
HE
.
exists
w'
.
exists
↓
(
ra_proj
r
·
ra_proj
ri
)
.
{
destruct
HE
as
[
HE
_]
.
eapply
ra_op_valid
,
ra_op_valid
;
eauto
with
typeclass_instances
.
}
...
...
@@ -149,15 +149,15 @@ Module IrisVS (RL : RA_T) (C : CORE_LANG).
{
destruct
(
rs
i
)
as
[
rsi
|]
eqn
:
EQrsi
;
subst
;
[|
simpl
;
rewrite
->
ra_op_unit
by
apply
_;
now
apply
ra_pos_valid
]
.
clear
-
HE
EQrsi
.
destruct
HE
as
[
HE
_]
.
rewrite
->
comp_map_remove
with
(
i
:=
i
)
in
HE
by
(
e
rewrite
EQrsi
;
reflexivity
)
.
rewrite
->
comp_map_remove
with
(
i
:=
i
)
in
HE
by
(
e
apply
equivR
;
eassumption
)
.
rewrite
->
(
assoc
(_
r
)),
(
comm
(_
r
)),
comm
,
assoc
,
<-
(
assoc
(_
rsi
)
_),
(
comm
_
(
ra_proj
r
)),
assoc
in
HE
.
eapply
ra_op_valid
,
ra_op_valid
;
now
eauto
with
typeclass_instances
.
}
exists
(
fdUpdate
i
rri
rs
);
split
;
[|
intros
j
Hm
]
.
-
simpl
.
erewrite
ra_op_unit
by
apply
_
.
clear
-
HE
EQri
.
destruct
(
rs
i
)
as
[
rsi
|]
eqn
:
EQrsi
.
+
subst
rsi
.
erewrite
<-
comp_map_insert_old
;
[
eassumption
|
rewrite
EQrsi
;
reflexivity
|
reflexivity
]
.
+
unfold
rri
.
subst
ri
.
simpl
.
erewrite
<-
comp_map_insert_new
;
[|
rewrite
EQrsi
;
reflexivity
]
.
simpl
.
+
subst
rsi
.
erewrite
<-
comp_map_insert_old
;
[
eassumption
|
eapply
equivR
;
eassumption
|
reflexivity
]
.
+
unfold
rri
.
subst
ri
.
simpl
.
erewrite
<-
comp_map_insert_new
;
[|
now
eapply
equivR
]
.
simpl
.
erewrite
ra_op_unit
by
apply
_
.
assumption
.
-
specialize
(
HD
j
);
unfold
mask_sing
,
mask_set
,
mcup
in
*
;
simpl
in
Hm
,
HD
.
destruct
(
Peano_dec
.
eq_nat_dec
i
j
);
...
...
@@ -321,7 +321,7 @@ Module IrisVS (RL : RA_T) (C : CORE_LANG).
}
split
.
{
rewrite
<-
comp_map_insert_new
by
(
rewrite
HRi
;
reflexivity
)
.
rewrite
<-
comp_map_insert_new
by
now
eapply
equivR
.
rewrite
->
assoc
,
(
comm
rf
)
.
assumption
.
}
intros
j
Hm'
.
...
...
This diff is collapsed.
Click to expand it.
lib/ModuRes/CSetoid.v
+
7
−
0
View file @
0204cf5e
...
...
@@ -16,6 +16,13 @@ Generalizable Variables T U V W.
Definition
equiv
`{
Setoid
T
}
:=
SetoidClass
.
equiv
.
Arguments
equiv
{_
_}
_
_
/.
(* Proof by reflexivity *)
Lemma
equivR
{
T
:
Type
}
`{
eqT
:
Setoid
T
}
{
a
b
:
T
}
:
a
=
b
->
a
==
b
.
Proof
.
intros
Heq
.
subst
a
.
reflexivity
.
Qed
.
Notation
"'mkType' R"
:=
(
@
Build_Setoid
_
R
_)
(
at
level
10
)
.
(** A morphism between two types is an actual function together with a
...
...
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