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
56c307ff
Commit
56c307ff
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Let set_solver handle some list connectives.
parent
6111fa8b
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
prelude/collections.v
+21
-3
21 additions, 3 deletions
prelude/collections.v
with
21 additions
and
3 deletions
prelude/collections.v
+
21
−
3
View file @
56c307ff
...
...
@@ -303,11 +303,29 @@ Section of_option_list.
Global
Instance
set_unfold_of_option
(
mx
:
option
A
)
x
:
SetUnfold
(
x
∈
of_option
mx
)
(
mx
=
Some
x
)
.
Proof
.
constructor
;
apply
elem_of_of_option
.
Qed
.
Global
Instance
set_unfold_of_list
(
l
:
list
A
)
x
:
SetUnfold
(
x
∈
of_list
l
)
(
x
∈
l
)
.
Proof
.
constructor
;
apply
elem_of_of_list
.
Qed
.
Global
Instance
set_unfold_of_list
(
l
:
list
A
)
x
P
:
SetUnfold
(
x
∈
l
)
P
→
SetUnfold
(
x
∈
of_list
l
)
P
.
Proof
.
constructor
.
by
rewrite
elem_of_of_list
,
(
set_unfold
(
x
∈
l
)
P
)
.
Qed
.
End
of_option_list
.
Section
list_unfold
.
Context
{
A
:
Type
}
.
Implicit
Types
x
:
A
.
Implicit
Types
l
:
list
A
.
Global
Instance
set_unfold_nil
x
:
SetUnfold
(
x
∈
[])
False
.
Proof
.
constructor
;
apply
elem_of_nil
.
Qed
.
Global
Instance
set_unfold_cons
x
y
l
P
:
SetUnfold
(
x
∈
l
)
P
→
SetUnfold
(
x
∈
y
::
l
)
(
x
=
y
∨
P
)
.
Proof
.
constructor
.
by
rewrite
elem_of_cons
,
(
set_unfold
(
x
∈
l
)
P
)
.
Qed
.
Global
Instance
set_unfold_app
x
l
k
P
Q
:
SetUnfold
(
x
∈
l
)
P
→
SetUnfold
(
x
∈
k
)
Q
→
SetUnfold
(
x
∈
l
++
k
)
(
P
∨
Q
)
.
Proof
.
intros
??;
constructor
.
by
rewrite
elem_of_app
,
(
set_unfold
(
x
∈
l
)
P
),
(
set_unfold
(
x
∈
k
)
Q
)
.
Qed
.
End
list_unfold
.
(** * Guard *)
Global
Instance
collection_guard
`{
CollectionMonad
M
}
:
MGuard
M
:=
λ
P
dec
A
x
,
match
dec
with
left
H
=>
x
H
|
_
=>
∅
end
.
...
...
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