Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Tej Chajed
iris
Commits
bd40a3ac
Commit
bd40a3ac
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Change FindPred to get better folding/unfolding behavior.
parent
47598d44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
heap_lang/tests.v
+9
-9
9 additions, 9 deletions
heap_lang/tests.v
with
9 additions
and
9 deletions
heap_lang/tests.v
+
9
−
9
View file @
bd40a3ac
...
...
@@ -55,9 +55,9 @@ Module LiftingTests.
Qed
.
Definition
FindPred
:
val
:=
λ
:
"x"
,
rec
:
"pred"
"
y
"
:=
rec
:
"pred"
"
x
"
:=
λ
:
"y"
,
let
:
"yp"
:=
"y"
+
'
1
in
if
"yp"
<
"x"
then
"pred"
"yp"
else
"y"
.
if
"yp"
<
"x"
then
"pred"
"x"
"yp"
else
"y"
.
Definition
Pred
:
val
:=
λ
:
"x"
,
if
"x"
≤
'
0
then
-
FindPred
(
-
"x"
+
'
2
)
'
0
else
FindPred
"x"
'
0
.
...
...
@@ -65,22 +65,22 @@ Module LiftingTests.
(
■
(
n1
<
n2
)
∧
Q
(
LitV
(
n2
-
1
)))
⊑
wp
E
(
FindPred
'
n2
'
n1
)
%
L
Q
.
Proof
.
(* FIXME there are some annoying scopes shown here: %Z, %L. *)
rewrite
/
FindPred
.
rewrite
-
(
wp_bindi
(
AppLCtx
_))
-
wp_let
//=.
revert
n1
.
apply
löb_all_1
=>
n1
.
revert
n1
;
apply
löb_all_1
=>
n1
.
rewrite
(
comm
uPred_and
(
■
_)
%
I
)
assoc
;
apply
const_elim_r
=>?
.
rewrite
-
wp_value'
//.
rewrite
-
wp_rec'
//
=>
-/=.
(* first need to do the rec to get a later *)
rewrite
-
(
wp_bindi
(
AppLCtx
_))
.
rewrite
-
wp_rec'
//
=>
-/=
;
rewrite
-
wp_value'
//=.
(* FIXME: ssr rewrite fails with "Error: _pattern_value_ is used in conclusion." *)
rewrite
->
(
later_intro
(
Q
_))
.
rewrite
-!
later_and
;
apply
later_mono
.
(* Go on *)
rewrite
-
wp_let
//=
-
later_intro
.
rewrite
-
(
wp_bindi
(
LetCtx
_
_))
-
wp_bin_op
//=
-
wp_let
//=.
rewrite
-
(
wp_bindi
(
IfCtx
_
_))
/=
-!
later_intro
.
apply
wp_lt
=>
?
.
-
rewrite
-
wp_if_true
.
rewrite
-
later_intro
(
forall_elim
(
n1
+
1
))
const_equiv
;
last
omega
.
rewrite
left_id
impl_elim_l
.
by
rewrite
-
(
wp_bindi
(
AppLCtx
_))
.
rewrite
-
!
later_intro
(
forall_elim
(
n1
+
1
))
const_equiv
;
last
omega
.
by
rewrite
left_id
impl_elim_l
.
-
assert
(
n1
=
n2
-
1
)
as
->
by
omega
.
rewrite
-
wp_if_false
.
by
rewrite
-!
later_intro
-
wp_value'
//
and_elim_r
.
...
...
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