Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Service Desk
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
Iris
lambda-rust
Commits
76b67715
Commit
76b67715
authored
3 years ago
by
Yusuke Matsushita
Browse files
Options
Downloads
Patches
Plain Diff
Minor tweaks
parent
e1ad0cb4
No related branches found
No related tags found
No related merge requests found
Pipeline
#63461
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/typing/lib/vec/vec_pushpop.v
+4
-7
4 additions, 7 deletions
theories/typing/lib/vec/vec_pushpop.v
with
4 additions
and
7 deletions
theories/typing/lib/vec/vec_pushpop.v
+
4
−
7
View file @
76b67715
...
@@ -12,8 +12,7 @@ Section vec_pushpop.
...
@@ -12,8 +12,7 @@ Section vec_pushpop.
Definition
vec_push
{
𝔄
}
(
ty
:
type
𝔄
)
:
val
:=
Definition
vec_push
{
𝔄
}
(
ty
:
type
𝔄
)
:
val
:=
fn
:
[
"v"
;
"x"
]
:=
fn
:
[
"v"
;
"x"
]
:=
let
:
"v'"
:=
!
"v"
in
delete
[
#
1
;
"v"
];;
let
:
"v'"
:=
!
"v"
in
delete
[
#
1
;
"v"
];;
vec_push_core
ty
[
"v'"
;
"x"
];;
vec_push_core
ty
[
"v'"
;
"x"
];;
delete
[
#
ty
.(
ty_size
);
"x"
];;
delete
[
#
ty
.(
ty_size
);
"x"
];;
let
:
"r"
:=
new
[
#
0
]
in
return
:
[
"r"
]
.
let
:
"r"
:=
new
[
#
0
]
in
return
:
[
"r"
]
.
Lemma
vec_push_type
{
𝔄
}
(
ty
:
type
𝔄
)
:
Lemma
vec_push_type
{
𝔄
}
(
ty
:
type
𝔄
)
:
...
@@ -40,9 +39,8 @@ Section vec_pushpop.
...
@@ -40,9 +39,8 @@ Section vec_pushpop.
iCombine
"⧖u ⧖x"
as
"#⧖"
.
wp_seq
.
iCombine
"⧖u ⧖x"
as
"#⧖"
.
wp_seq
.
wp_apply
(
wp_vec_push_core
with
"[↦l ↦tys ↦ex † ↦ty]"
)
.
{
iExists
_,
_
.
iFrame
.
}
wp_apply
(
wp_vec_push_core
with
"[↦l ↦tys ↦ex † ↦ty]"
)
.
{
iExists
_,
_
.
iFrame
.
}
iIntros
"(%&%& ↦ & ↦tys & ↦ex & † & (%& %Len & ↦x))"
.
wp_seq
.
iIntros
"(%&%& ↦ & ↦tys & ↦ex & † & (%& %Len & ↦x))"
.
wp_seq
.
rewrite
freeable_sz_full
.
rewrite
freeable_sz_full
.
wp_apply
(
wp_delete
with
"[$↦x †x]"
);
[
lia
|
by
rewrite
Len
|]
.
wp_apply
(
wp_delete
with
"[$↦x †x]"
);
[
lia
|
by
rewrite
Len
|]
.
iIntros
"_"
.
iIntros
"_"
.
wp_seq
.
set
vπ'
:=
λ
π
,
(
lapply
(
vsnoc
aπl
bπ
)
π
,
π
ξ
)
.
wp_seq
.
set
vπ'
:=
λ
π
,
(
lapply
(
vsnoc
aπl
bπ
)
π
,
π
ξ
)
.
iMod
(
uniq_update
with
"UNIQ Vo Pc"
)
as
"[Vo Pc]"
;
[
done
|]
.
iMod
(
uniq_update
with
"UNIQ Vo Pc"
)
as
"[Vo Pc]"
;
[
done
|]
.
iMod
(
"ToBor"
with
"[↦ ↦tys ↦ex † Pc]"
)
as
"[Bor α]"
.
iMod
(
"ToBor"
with
"[↦ ↦tys ↦ex † Pc]"
)
as
"[Bor α]"
.
{
iNext
.
iExists
_,
_
.
rewrite
split_mt_vec
.
iFrame
"⧖ Pc"
.
{
iNext
.
iExists
_,
_
.
rewrite
split_mt_vec
.
iFrame
"⧖ Pc"
.
...
@@ -146,7 +144,6 @@ Section vec_pushpop.
...
@@ -146,7 +144,6 @@ Section vec_pushpop.
have
->
:
last_error
(
lapply
aπl
π
)
=
Some
(
vlast
aπl
π
)
.
have
->
:
last_error
(
lapply
aπl
π
)
=
Some
(
vlast
aπl
π
)
.
{
inv_vec
aπl
=>
+
aπl'
.
by
elim
aπl'
=>
/=
*.
}
{
inv_vec
aπl
=>
+
aπl'
.
by
elim
aπl'
=>
/=
*.
}
have
->
:
removelast
(
lapply
aπl
π
)
=
lapply
(
vinit
aπl
)
π
.
have
->
:
removelast
(
lapply
aπl
π
)
=
lapply
(
vinit
aπl
)
π
.
{
inv_vec
aπl
=>
+
aπl'
.
elim
aπl'
;
[
done
|]=>
/=
*.
by
f_equal
.
}
{
inv_vec
aπl
=>
+
aπl'
.
elim
aπl'
;
[
done
|]=>
/=
*.
by
f_equal
.
}
done
.
done
.
Qed
.
Qed
.
End
vec_pushpop
.
End
vec_pushpop
.
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