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
7f7617c7
Commit
7f7617c7
authored
4 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring
parent
c1ed805c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/logrel/examples/mapper_list.v
+23
-23
23 additions, 23 deletions
theories/logrel/examples/mapper_list.v
theories/logrel/napp.v
+1
-1
1 addition, 1 deletion
theories/logrel/napp.v
with
24 additions
and
24 deletions
theories/logrel/examples/mapper_list.v
+
23
−
23
View file @
7f7617c7
...
...
@@ -187,7 +187,23 @@ Section mapper_example.
Definition
recv_type
(
B
:
ltty
Σ
)
:
lsty
Σ
:=
(
<
??
>
TY
B
;
END
)
%
lty
.
Lemma
mapper_rec_client_unfold_app
A
B
:
Lemma
recv_type_send_type_swap
A
B
:
⊢
(
recv_type
B
<++>
send_type
A
<:
send_type
A
<++>
recv_type
B
)
%
lty
.
Proof
.
iApply
lty_le_trans
.
rewrite
lty_app_recv
lty_app_end_l
.
iApply
lty_le_swap_recv_select
.
rewrite
fmap_insert
fmap_empty
.
iPoseProof
(
lty_le_app_select
)
as
"[_ Hle]"
.
iApply
(
lty_le_trans
);
last
by
iApply
"Hle"
.
rewrite
fmap_insert
fmap_empty
.
iApply
lty_le_select
.
iApply
big_sepM2_insert
=>
//.
iSplit
=>
//.
rewrite
lty_app_send
lty_app_end_l
.
iApply
lty_le_swap_recv_send
.
Qed
.
Lemma
mapper_type_rec_client_unfold_app
A
B
:
⊢
mapper_type_rec_client
A
B
<:
(
send_type
A
<++>
(
recv_type
B
<++>
mapper_type_rec_client
A
B
))
%
lty
.
Proof
.
...
...
@@ -207,22 +223,6 @@ Section mapper_example.
iApply
lty_le_refl
.
Qed
.
Lemma
recv_send_swap
A
B
:
⊢
(
recv_type
B
<++>
send_type
A
<:
send_type
A
<++>
recv_type
B
)
%
lty
.
Proof
.
iApply
lty_le_trans
.
rewrite
lty_app_recv
lty_app_end_l
.
iApply
lty_le_swap_recv_select
.
rewrite
fmap_insert
fmap_empty
.
iPoseProof
(
lty_le_app_select
)
as
"[_ Hle]"
.
iApply
(
lty_le_trans
);
last
by
iApply
"Hle"
.
rewrite
fmap_insert
fmap_empty
.
iApply
lty_le_select
.
iApply
big_sepM2_insert
=>
//.
iSplit
=>
//.
rewrite
lty_app_send
lty_app_end_l
.
iApply
lty_le_swap_recv_send
.
Qed
.
Lemma
mapper_type_rec_client_unfold_app_n
A
B
n
:
⊢
mapper_type_rec_client
A
B
<:
lty_napp
(
send_type
A
)
n
<++>
(
lty_napp
(
recv_type
B
)
n
<++>
...
...
@@ -237,26 +237,26 @@ Section mapper_example.
{
iApply
lty_le_app
;
[
iApply
lty_le_refl
|
]
.
iEval
(
rewrite
-
assoc
assoc
)
.
iApply
lty_le_app
;
[
|
iApply
lty_le_refl
]
.
iApply
napp_swap
.
iApply
recv_
send
_swap
.
}
iApply
lty_
napp_swap
.
iApply
recv_
type_send_type
_swap
.
}
iEval
(
rewrite
-
assoc
)
.
iApply
(
lty_le_trans
with
"IH"
)
.
iApply
lty_le_app
;
[
iApply
lty_le_refl
|
]
.
iApply
lty_le_app
;
[
iApply
lty_le_refl
|
]
.
iApply
mapper_rec_client_unfold_app
.
iApply
mapper_
type_
rec_client_unfold_app
.
Qed
.
Lemma
recv_
send_swap_n
A
B
n
:
Lemma
recv_
mapper_type_rec_client_unfold_app
A
B
n
:
⊢
(
lty_napp
(
recv_type
B
)
n
<++>
mapper_type_rec_client
A
B
)
<:
(
send_type
A
<++>
(
lty_napp
(
recv_type
B
)
(
S
n
)
<++>
mapper_type_rec_client
A
B
))
.
Proof
.
iApply
lty_le_trans
.
{
iApply
lty_le_app
;
[
iApply
lty_le_refl
|
iApply
mapper_rec_client_unfold_app
]
.
}
[
iApply
lty_le_refl
|
iApply
mapper_
type_
rec_client_unfold_app
]
.
}
iEval
(
rewrite
assoc
)
.
iApply
lty_le_trans
.
{
iApply
lty_le_app
;
[
|
iApply
lty_le_refl
]
.
iApply
napp_swap
.
iApply
recv_
send
_swap
.
}
iApply
lty_
napp_swap
.
iApply
recv_
type_send_type
_swap
.
}
iEval
(
rewrite
-
assoc
(
assoc
_
(
lty_napp
_
_)))
.
rewrite
-
lty_napp_S_r
.
iApply
lty_le_refl
.
...
...
@@ -297,7 +297,7 @@ Section mapper_example.
wp_lam
.
wp_apply
(
lisnil_spec
with
"Hl"
);
iIntros
"Hl"
.
simpl
.
iDestruct
(
iProto_mapsto_le
c
with
"Hc []"
)
as
"Hc"
.
{
iApply
recv_
send_swap_n
.
}
{
iApply
recv_
mapper_type_rec_client_unfold_app
.
}
wp_send
with
"[]"
;
first
by
eauto
.
rewrite
lookup_total_insert
.
wp_apply
(
lpop_spec
with
"Hl"
);
iIntros
(
v
)
"[HIx Hl]"
.
...
...
This diff is collapsed.
Click to expand it.
theories/logrel/napp.v
+
1
−
1
View file @
7f7617c7
...
...
@@ -25,7 +25,7 @@ Section with_Σ.
(
lty_napp
R
n
<++>
R
)
%
lty
≡
(
R
<++>
lty_napp
R
n
)
%
lty
.
Proof
.
by
rewrite
-
lty_napp_S_l
lty_napp_S_r
.
Qed
.
Lemma
napp_swap
T
R
n
:
Lemma
lty_
napp_swap
T
R
n
:
R
<++>
T
<:
T
<++>
R
-∗
lty_napp
R
n
<++>
T
<:
T
<++>
lty_napp
R
n
.
Proof
.
...
...
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