Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
tlsomers
Actris
Commits
51ce4688
Commit
51ce4688
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Tweaking.
parent
7ca6ecc9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/channel/proto_channel.v
+29
-9
29 additions, 9 deletions
theories/channel/proto_channel.v
with
29 additions
and
9 deletions
theories/channel/proto_channel.v
+
29
−
9
View file @
51ce4688
...
@@ -199,6 +199,26 @@ Infix "<++>" := iProto_app (at level 60) : proto_scope.
...
@@ -199,6 +199,26 @@ Infix "<++>" := iProto_app (at level 60) : proto_scope.
Definition
proto_eq_next
{
Σ
}
(
p
:
iProto
Σ
)
:
laterO
(
iProto
Σ
)
-
n
>
iPropO
Σ
:=
Definition
proto_eq_next
{
Σ
}
(
p
:
iProto
Σ
)
:
laterO
(
iProto
Σ
)
-
n
>
iPropO
Σ
:=
OfeMor
(
sbi_internal_eq
(
Next
p
))
.
OfeMor
(
sbi_internal_eq
(
Next
p
))
.
(*
The definition [iProto_le] generalizes the following inductive definition
for subtyping on session types:
p1 <: p2 p1 <: p2
---------- ---------------- ----------------
end <: end !A.p1 <: !A.p2 ?A.p1 <: ?A.p2
p1 <: !B.p3 ?A.p3 <: p2
----------------------------
?A.p1 <: !B.p2
Example:
!R <: !R ?Q <: ?Q ?Q <: ?Q
------------------- --------------
?Q.!R <: !R.?Q ?P.?Q <: ?P.?Q
------------------------------------
?P.?Q.!R <: !R.?P.?Q
*)
Definition
iProto_le_pre
{
Σ
}
Definition
iProto_le_pre
{
Σ
}
(
rec
:
iProto
Σ
→
iProto
Σ
→
iProp
Σ
)
(
p1
p2
:
iProto
Σ
)
:
iProp
Σ
:=
(
rec
:
iProto
Σ
→
iProto
Σ
→
iProp
Σ
)
(
p1
p2
:
iProto
Σ
)
:
iProp
Σ
:=
(
p1
≡
proto_end
∗
p2
≡
proto_end
)
∨
(
p1
≡
proto_end
∗
p2
≡
proto_end
)
∨
...
@@ -760,12 +780,12 @@ Section proto.
...
@@ -760,12 +780,12 @@ Section proto.
rewrite
!
proto_interp_unfold
.
iIntros
"[H|[H|H]]"
.
rewrite
!
proto_interp_unfold
.
iIntros
"[H|[H|H]]"
.
-
iClear
"IH"
.
iDestruct
"H"
as
(
p
->
->
)
"[Hp Hp'] /="
.
-
iClear
"IH"
.
iDestruct
"H"
as
(
p
->
->
)
"[Hp Hp'] /="
.
iLeft
.
iExists
(
iProto_dual
p
)
.
rewrite
involutive
.
iFrame
;
auto
.
iLeft
.
iExists
(
iProto_dual
p
)
.
rewrite
involutive
.
iFrame
;
auto
.
-
iDestruct
"H"
as
(
vl
vsl'
pc'
pr'
->
)
"(Hpr & Hpc' & H
interp
)"
.
-
iDestruct
"H"
as
(
vl
vsl'
pc'
pr'
->
)
"(Hpr & Hpc' & H)"
.
iRight
;
iRight
.
iExists
vl
,
vsl'
,
pc'
,
pr'
.
iSplit
;
[
done
|];
iFrame
.
iRight
;
iRight
.
iExists
vl
,
vsl'
,
pc'
,
pr'
.
iSplit
;
[
done
|];
iFrame
.
iApply
(
"IH"
with
"[%] [//] H
interp
"
);
simpl
;
lia
.
iApply
(
"IH"
with
"[%] [//] H"
);
simpl
;
lia
.
-
iDestruct
"H"
as
(
vr
vsr'
pc'
pl'
->
)
"(Hpl & Hpc' & H
interp
)"
.
-
iDestruct
"H"
as
(
vr
vsr'
pc'
pl'
->
)
"(Hpl & Hpc' & H)"
.
iRight
;
iLeft
.
iExists
vr
,
vsr'
,
pc'
,
pl'
.
iSplit
;
[
done
|];
iFrame
.
iRight
;
iLeft
.
iExists
vr
,
vsr'
,
pc'
,
pl'
.
iSplit
;
[
done
|];
iFrame
.
iApply
(
"IH"
with
"[%] [//] H
interp
"
);
simpl
;
lia
.
iApply
(
"IH"
with
"[%] [//] H"
);
simpl
;
lia
.
Qed
.
Qed
.
Lemma
proto_interp_le_l
vsl
vsr
pl
pl'
pr
:
Lemma
proto_interp_le_l
vsl
vsr
pl
pl'
pr
:
...
@@ -777,18 +797,18 @@ Section proto.
...
@@ -777,18 +797,18 @@ Section proto.
-
iClear
"IH"
.
iDestruct
"H"
as
(
p
->
->
)
"[Hp Hp'] /="
.
-
iClear
"IH"
.
iDestruct
"H"
as
(
p
->
->
)
"[Hp Hp'] /="
.
iLeft
.
iExists
p
.
do
2
(
iSplit
;
[
done
|])
.
iFrame
"Hp'"
.
iLeft
.
iExists
p
.
do
2
(
iSplit
;
[
done
|])
.
iFrame
"Hp'"
.
by
iApply
(
iProto_le_trans
with
"Hp"
)
.
by
iApply
(
iProto_le_trans
with
"Hp"
)
.
-
iDestruct
"H"
as
(
vl
vsl'
pc'
pr'
->
)
"(Hpr & Hpc' & H
interp
)"
.
-
iDestruct
"H"
as
(
vl
vsl'
pc'
pr'
->
)
"(Hpr & Hpc' & H)"
.
iRight
;
iLeft
.
iExists
vl
,
vsl'
,
pc'
,
pr'
.
iSplit
;
[
done
|];
iFrame
.
iRight
;
iLeft
.
iExists
vl
,
vsl'
,
pc'
,
pr'
.
iSplit
;
[
done
|];
iFrame
.
iApply
(
"IH"
with
"[%] [//] H
interp
Hle"
);
simpl
;
lia
.
iApply
(
"IH"
with
"[%] [//] H Hle"
);
simpl
;
lia
.
-
iClear
"IH"
.
iDestruct
"H"
as
(
vr
vsr'
pc'
pl''
->
)
"(Hpl & Hpc' & H
interp
)"
.
-
iClear
"IH"
.
iDestruct
"H"
as
(
vr
vsr'
pc'
pl''
->
)
"(Hpl & Hpc' & H)"
.
iRight
;
iRight
.
iExists
vr
,
vsr'
,
pc'
,
pl''
.
iSplit
;
[
done
|];
iFrame
.
iRight
;
iRight
.
iExists
vr
,
vsr'
,
pc'
,
pl''
.
iSplit
;
[
done
|];
iFrame
.
by
iApply
(
iProto_le_trans
with
"Hpl"
)
.
by
iApply
(
iProto_le_trans
with
"Hpl"
)
.
Qed
.
Qed
.
Lemma
proto_interp_le_r
vsl
vsr
pl
pr
pr'
:
Lemma
proto_interp_le_r
vsl
vsr
pl
pr
pr'
:
proto_interp
vsl
vsr
pl
pr
-∗
iProto_le
pr
pr'
-∗
proto_interp
vsl
vsr
pl
pr'
.
proto_interp
vsl
vsr
pl
pr
-∗
iProto_le
pr
pr'
-∗
proto_interp
vsl
vsr
pl
pr'
.
Proof
.
Proof
.
iIntros
"H
interp
Hle"
.
iApply
proto_interp_flip
.
iIntros
"H Hle"
.
iApply
proto_interp_flip
.
iApply
(
proto_interp_le_l
with
"[H
interp
] Hle"
)
.
by
iApply
proto_interp_flip
.
iApply
(
proto_interp_le_l
with
"[H] Hle"
)
.
by
iApply
proto_interp_flip
.
Qed
.
Qed
.
(*
(*
...
...
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