Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
coq-stdpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Swasey
coq-stdpp
Commits
c81c8218
Commit
c81c8218
authored
Mar 04, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let set_solver handle some list connectives.
parent
803876ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
theories/collections.v
theories/collections.v
+21
-3
No files found.
theories/collections.v
View file @
c81c8218
...
...
@@ -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
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment