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
88638cda
Commit
88638cda
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
simplify sep_split (patch is by Robbert)
parent
324b4863
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algebra/upred_tactics.v
+8
-24
8 additions, 24 deletions
algebra/upred_tactics.v
with
8 additions
and
24 deletions
algebra/upred_tactics.v
+
8
−
24
View file @
88638cda
...
...
@@ -106,30 +106,14 @@ Module uPred_reflection. Section uPred_reflection.
by
rewrite
IH
.
Qed
.
Fixpoint
remove_all
(
l
k
:
list
nat
)
:
option
(
list
nat
)
:=
match
l
with
|
[]
=>
Some
k
|
n
::
l
=>
'
(
i
,_)
←
list_find
(
n
=
)
k
;
remove_all
l
(
delete
i
k
)
end
.
Lemma
remove_all_permutation
l
k
k'
:
remove_all
l
k
=
Some
k'
→
k
≡
ₚ
l
++
k'
.
Proof
.
revert
k
k'
;
induction
l
as
[|
n
l
IH
];
simpl
;
intros
k
k'
Hk
.
{
by
simplify_eq
.
}
destruct
(
list_find
_
_)
as
[[
i
?]|]
eqn
:
?Hk'
;
simplify_eq
/=.
move
:
Hk'
;
intros
[?
<-
]
%
list_find_Some
.
rewrite
-
(
IH
(
delete
i
k
)
k'
)
//
-
delete_Permutation
//.
Qed
.
Lemma
split_l
Σ
e
l
k
:
remove_all
l
(
flatten
e
)
=
Some
k
→
eval
Σ
e
≡
(
eval
Σ
(
to_expr
l
)
★
eval
Σ
(
to_expr
k
))
%
I
.
Lemma
split_l
Σ
e
ns
e'
:
cancel
ns
e
=
Some
e'
→
eval
Σ
e
≡
(
eval
Σ
(
to_expr
ns
)
★
eval
Σ
e'
)
%
I
.
Proof
.
intros
He
%
remove_all_permutation
.
by
rewrite
eval_flatten
He
fmap_app
big_sep_app
!
eval_to_expr
.
intros
He
%
flatten_cancel
.
by
rewrite
eval_flatten
He
fmap_app
big_sep_app
eval_to_expr
eval_flatten
.
Qed
.
Lemma
split_r
Σ
e
l
k
:
remove_all
l
(
flatten
e
)
=
Some
k
→
eval
Σ
e
≡
(
eval
Σ
(
to_expr
k
)
★
eval
Σ
(
to_expr
l
))
%
I
.
Lemma
split_r
Σ
e
ns
e'
:
cancel
ns
e
=
Some
e'
→
eval
Σ
e
≡
(
eval
Σ
e'
★
eval
Σ
(
to_expr
ns
))
%
I
.
Proof
.
intros
.
rewrite
/=
comm
.
by
apply
split_l
.
Qed
.
Class
Quote
(
Σ1
Σ2
:
list
(
uPred
M
))
(
P
:
uPred
M
)
(
e
:
expr
)
:=
{}
.
...
...
@@ -198,7 +182,7 @@ Tactic Notation "to_front" open_constr(Ps) :=
|
uPred_reflection
.
QuoteArgs
_
_
?ns'
=>
ns'
end
in
eapply
entails_equiv_l
;
first
(
apply
uPred_reflection
.
split_l
with
(
l
:=
ns'
);
cbv
;
reflexivity
);
first
(
apply
uPred_reflection
.
split_l
with
(
ns
:=
ns'
);
cbv
;
reflexivity
);
simpl
)
.
Tactic
Notation
"to_back"
open_constr
(
Ps
)
:=
...
...
@@ -209,7 +193,7 @@ Tactic Notation "to_back" open_constr(Ps) :=
|
uPred_reflection
.
QuoteArgs
_
_
?ns'
=>
ns'
end
in
eapply
entails_equiv_l
;
first
(
apply
uPred_reflection
.
split_r
with
(
l
:=
ns'
);
cbv
;
reflexivity
);
first
(
apply
uPred_reflection
.
split_r
with
(
ns
:=
ns'
);
cbv
;
reflexivity
);
simpl
)
.
(** [sep_split] is used to introduce a (★).
...
...
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