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
8081b69c
Commit
8081b69c
authored
2 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
stronger fixpoint unfolding lemmas
parent
f10f7c6c
No related branches found
No related tags found
No related merge requests found
Pipeline
#69669
passed
2 years ago
Stage: build
Changes
2
Pipelines
8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/examples/fixpoint.v
+7
-0
7 additions, 0 deletions
theories/typing/examples/fixpoint.v
theories/typing/fixpoint.v
+7
-8
7 additions, 8 deletions
theories/typing/fixpoint.v
with
14 additions
and
8 deletions
theories/typing/examples/fixpoint.v
+
7
−
0
View file @
8081b69c
...
@@ -17,4 +17,11 @@ Section fixpoint.
...
@@ -17,4 +17,11 @@ Section fixpoint.
Qed
.
Qed
.
Definition
my_list
:=
type_fixpoint
my_list_pre
.
Definition
my_list
:=
type_fixpoint
my_list_pre
.
Local
Lemma
my_list_unfold
:
my_list
≡
my_list_pre
my_list
.
Proof
.
apply
type_fixpoint_unfold
.
Qed
.
Lemma
my_list_size
:
my_list
.(
ty_size
)
=
2
%
nat
.
Proof
.
rewrite
my_list_unfold
.
done
.
Qed
.
End
fixpoint
.
End
fixpoint
.
This diff is collapsed.
Click to expand it.
theories/typing/fixpoint.v
+
7
−
8
View file @
8081b69c
...
@@ -46,7 +46,7 @@ Section fixpoint.
...
@@ -46,7 +46,7 @@ Section fixpoint.
Context
`{
!
typeGS
Σ
}
.
Context
`{
!
typeGS
Σ
}
.
Context
(
T
:
type
→
type
)
{
HT
:
TypeContractive
T
}
.
Context
(
T
:
type
→
type
)
{
HT
:
TypeContractive
T
}
.
Global
Instance
fixpoint_copy
:
Global
Instance
type_
fixpoint_copy
:
(
∀
`
(
!
Copy
ty
),
Copy
(
T
ty
))
→
Copy
(
type_fixpoint
T
)
.
(
∀
`
(
!
Copy
ty
),
Copy
(
T
ty
))
→
Copy
(
type_fixpoint
T
)
.
Proof
.
Proof
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
...
@@ -65,7 +65,7 @@ Section fixpoint.
...
@@ -65,7 +65,7 @@ Section fixpoint.
solve_proper_core
ltac
:(
fun
_
=>
eapply
ty_size_ne
||
f_equiv
)
.
solve_proper_core
ltac
:(
fun
_
=>
eapply
ty_size_ne
||
f_equiv
)
.
Qed
.
Qed
.
Global
Instance
fixpoint_send
:
Global
Instance
type_
fixpoint_send
:
(
∀
`
(
!
Send
ty
),
Send
(
T
ty
))
→
Send
(
type_fixpoint
T
)
.
(
∀
`
(
!
Send
ty
),
Send
(
T
ty
))
→
Send
(
type_fixpoint
T
)
.
Proof
.
Proof
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
...
@@ -77,7 +77,7 @@ Section fixpoint.
...
@@ -77,7 +77,7 @@ Section fixpoint.
apply
bi
.
limit_preserving_entails
;
solve_proper
.
apply
bi
.
limit_preserving_entails
;
solve_proper
.
Qed
.
Qed
.
Global
Instance
fixpoint_sync
:
Global
Instance
type_
fixpoint_sync
:
(
∀
`
(
!
Sync
ty
),
Sync
(
T
ty
))
→
Sync
(
type_fixpoint
T
)
.
(
∀
`
(
!
Sync
ty
),
Sync
(
T
ty
))
→
Sync
(
type_fixpoint
T
)
.
Proof
.
Proof
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
intros
?
.
unfold
type_fixpoint
.
apply
fixpointK_ind
.
...
@@ -89,12 +89,11 @@ Section fixpoint.
...
@@ -89,12 +89,11 @@ Section fixpoint.
apply
bi
.
limit_preserving_entails
;
solve_proper
.
apply
bi
.
limit_preserving_entails
;
solve_proper
.
Qed
.
Qed
.
Lemma
type_fixpoint_unfold
:
type_fixpoint
T
≡
T
(
type_fixpoint
T
)
.
Proof
.
apply
fixpointK_unfold
.
by
apply
type_contractive_ne
.
Qed
.
Lemma
fixpoint_unfold_eqtype
E
L
:
eqtype
E
L
(
type_fixpoint
T
)
(
T
(
type_fixpoint
T
))
.
Lemma
fixpoint_unfold_eqtype
E
L
:
eqtype
E
L
(
type_fixpoint
T
)
(
T
(
type_fixpoint
T
))
.
Proof
.
Proof
.
apply
type_equal_eqtype
,
type_equal_equiv
,
type_fixpoint_unfold
.
Qed
.
unfold
eqtype
,
subtype
,
type_incl
.
setoid_rewrite
<-
fixpointK_unfold
;
[|
by
apply
type_contractive_ne
,
_..]
.
split
;
iIntros
(
qmax
qL
)
"_ !> _"
;
(
iSplit
;
first
done
);
iSplit
;
iIntros
"!>*$"
.
Qed
.
End
fixpoint
.
End
fixpoint
.
Section
subtyping
.
Section
subtyping
.
...
...
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