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
ff244cf1
There was a problem fetching the pipeline summary.
Commit
ff244cf1
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
also show Box conversions
parent
505d86a5
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/typing/lib/cell.v
+29
-7
29 additions, 7 deletions
theories/typing/lib/cell.v
with
29 additions
and
7 deletions
theories/typing/lib/cell.v
+
29
−
7
View file @
ff244cf1
...
@@ -115,22 +115,44 @@ Section typing.
...
@@ -115,22 +115,44 @@ Section typing.
Proof
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iApply
type_jump
;
[
solve_typing
..|]
.
rewrite
/
tctx_incl
/=.
iApply
type_jump
;
[
solve_typing
..|]
.
iIntros
(??)
"_ _ $"
.
rewrite
!
tctx_interp_singleton
/
tctx_elt_interp
/=.
iIntros
(??)
"#LFT _ $ Hty"
.
rewrite
!
tctx_interp_singleton
/=.
done
.
by
iIntros
"$"
.
Qed
.
Qed
.
Definition
cell_from_mut
:
val
:=
Definition
cell_from_mut
:
val
:=
funrec
:
<>
[
"x"
]
:=
return
:
[
"x"
]
.
funrec
:
<>
[
"x"
]
:=
return
:
[
"x"
]
.
Lemma
cell_from_mut_type
ty
`{
!
TyWf
ty
}
:
Lemma
cell_from_mut_type
ty
`{
!
TyWf
ty
}
:
typed_val
cell_get_mut
(
fn
(
∀
α
,
∅
;
&
uniq
{
α
}
ty
)
→
&
uniq
{
α
}
(
cell
ty
))
.
typed_val
cell_from_mut
(
fn
(
∀
α
,
∅
;
&
uniq
{
α
}
ty
)
→
&
uniq
{
α
}
(
cell
ty
))
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iApply
type_jump
;
[
solve_typing
..|]
.
iIntros
(??)
"#LFT _ $ Hty"
.
rewrite
!
tctx_interp_singleton
/=.
done
.
Qed
.
Definition
cell_into_box
:
val
:=
funrec
:
<>
[
"x"
]
:=
return
:
[
"x"
]
.
Lemma
cell_into_box_type
ty
`{
!
TyWf
ty
}
:
typed_val
cell_into_box
(
fn
(
∅
;
box
(
cell
ty
))
→
box
ty
)
.
Proof
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iApply
type_jump
;
[
solve_typing
..|]
.
rewrite
/
tctx_incl
/=.
iApply
type_jump
;
[
solve_typing
..|]
.
iIntros
(??)
"_ _ $"
.
rewrite
!
tctx_interp_singleton
/
tctx_elt_interp
/=.
iIntros
(??)
"#LFT _ $ Hty"
.
rewrite
!
tctx_interp_singleton
/=.
done
.
by
iIntros
"$"
.
Qed
.
Definition
cell_from_box
:
val
:=
funrec
:
<>
[
"x"
]
:=
return
:
[
"x"
]
.
Lemma
cell_from_box_type
ty
`{
!
TyWf
ty
}
:
typed_val
cell_from_box
(
fn
(
∅
;
box
ty
)
→
box
(
cell
ty
))
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iApply
type_jump
;
[
solve_typing
..|]
.
iIntros
(??)
"#LFT _ $ Hty"
.
rewrite
!
tctx_interp_singleton
/=.
done
.
Qed
.
Qed
.
(** Reading from a cell *)
(** Reading from a cell *)
...
...
This diff is collapsed.
Click to expand it.
Ralf Jung
@jung
mentioned in issue
#2 (closed)
·
6 years ago
mentioned in issue
#2 (closed)
mentioned in issue #2
Toggle commit list
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