Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Adam
stdpp
Commits
221197c4
Verified
Commit
221197c4
authored
3 years ago
by
Paolo G. Giarrusso
Browse files
Options
Downloads
Patches
Plain Diff
Add set_unfold_list_bind (+ test)
`set_unfold_bind` for sets already exists; this brings the list variant on par.
parent
ebfb79dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/sets.v
+5
-0
5 additions, 0 deletions
tests/sets.v
theories/sets.v
+4
-0
4 additions, 0 deletions
theories/sets.v
with
9 additions
and
0 deletions
tests/sets.v
+
5
−
0
View file @
221197c4
...
...
@@ -2,3 +2,8 @@ From stdpp Require Import sets.
Lemma
foo
`{
Set_
A
C
}
(
x
:
A
)
(
X
Y
:
C
)
:
x
∈
X
∩
Y
→
x
∈
X
.
Proof
.
intros
Hx
.
set_unfold
in
Hx
.
tauto
.
Qed
.
(** Test [set_unfold_list_bind]. *)
Lemma
elem_of_list_bind_again
{
A
B
}
(
x
:
B
)
(
l
:
list
A
)
f
:
x
∈
l
≫=
f
↔
∃
y
,
x
∈
f
y
∧
y
∈
l
.
Proof
.
set_solver
.
Qed
.
This diff is collapsed.
Click to expand it.
theories/sets.v
+
4
−
0
View file @
221197c4
...
...
@@ -308,6 +308,10 @@ Section set_unfold_list.
SetUnfoldElemOf
x
l
P
→
SetUnfoldElemOf
x
(
rotate
n
l
)
P
.
Proof
.
constructor
.
by
rewrite
elem_of_rotate
,
(
set_unfold_elem_of
x
l
P
)
.
Qed
.
Global
Instance
set_unfold_list_bind
{
B
}
(
f
:
A
→
list
B
)
l
P
Q
y
:
(
∀
x
,
SetUnfoldElemOf
x
l
(
P
x
))
→
(
∀
x
,
SetUnfoldElemOf
y
(
f
x
)
(
Q
x
))
→
SetUnfoldElemOf
y
(
l
≫=
f
)
(
∃
x
,
Q
x
∧
P
x
)
.
Proof
.
constructor
.
rewrite
elem_of_list_bind
.
naive_solver
.
Qed
.
End
set_unfold_list
.
Tactic
Notation
"set_unfold"
:=
...
...
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