Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
17f4c74e
Commit
17f4c74e
authored
Feb 21, 2019
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Operational type class for disjoint union.
parent
3c484ebe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
theories/base.v
theories/base.v
+8
-0
No files found.
theories/base.v
View file @
17f4c74e
...
...
@@ -782,6 +782,14 @@ Definition union_list `{Empty A} `{Union A} : list A → A := fold_right (∪)
Arguments
union_list
_
_
_
!
_
/
:
assert
.
Notation
"⋃ l"
:
=
(
union_list
l
)
(
at
level
20
,
format
"⋃ l"
)
:
stdpp_scope
.
Class
DisjUnion
A
:
=
disj_union
:
A
→
A
→
A
.
Hint
Mode
DisjUnion
!
:
typeclass_instances
.
Instance
:
Params
(@
disj_union
)
2
:
=
{}.
Infix
"⊎"
:
=
disj_union
(
at
level
50
,
left
associativity
)
:
stdpp_scope
.
Notation
"(⊎)"
:
=
disj_union
(
only
parsing
)
:
stdpp_scope
.
Notation
"( x ⊎)"
:
=
(
disj_union
x
)
(
only
parsing
)
:
stdpp_scope
.
Notation
"(⊎ x )"
:
=
(
λ
y
,
disj_union
y
x
)
(
only
parsing
)
:
stdpp_scope
.
Class
Intersection
A
:
=
intersection
:
A
→
A
→
A
.
Hint
Mode
Intersection
!
:
typeclass_instances
.
Instance
:
Params
(@
intersection
)
2
:
=
{}.
...
...
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