Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alphaLib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
POTTIER Francois
alphaLib
Commits
fe9964e4
Commit
fe9964e4
authored
8 years ago
by
POTTIER Francois
Browse files
Options
Downloads
Patches
Plain Diff
Added [disjoint_union_monoid].
parent
3efe72c3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Atom.ml
+8
-1
8 additions, 1 deletion
src/Atom.ml
src/Atom.mli
+8
-2
8 additions, 2 deletions
src/Atom.mli
with
16 additions
and
3 deletions
src/Atom.ml
+
8
−
1
View file @
fe9964e4
...
...
@@ -154,11 +154,18 @@ module Set = struct
(* Sets of atoms form a monoid under union. *)
class
[
'
z
]
monoid
=
object
class
[
'
z
]
union_
monoid
=
object
method
zero
:
'
z
=
empty
method
plus
:
'
z
->
'
z
->
'
z
=
union
end
(* Sets of atoms form a monoid under disjoint union. *)
class
[
'
z
]
disjoint_union_monoid
=
object
method
zero
:
'
z
=
empty
method
plus
:
'
z
->
'
z
->
'
z
=
disjoint_union
end
(* These printing functions should be used for debugging purposes only. *)
let
print_to_scratch
xs
=
...
...
This diff is collapsed.
Click to expand it.
src/Atom.mli
+
8
−
2
View file @
fe9964e4
...
...
@@ -33,9 +33,15 @@ module Set : sig
exception
NonDisjointUnion
of
atom
val
disjoint_union
:
t
->
t
->
t
(* Sets of atoms form
a
monoid under union. *)
(* Sets of atoms form monoid
s
under
union and disjoint
union. *)
class
[
'
z
]
monoid
:
object
class
[
'
z
]
union_monoid
:
object
constraint
'
z
=
t
method
zero
:
'
z
method
plus
:
'
z
->
'
z
->
'
z
end
class
[
'
z
]
disjoint_union_monoid
:
object
constraint
'
z
=
t
method
zero
:
'
z
method
plus
:
'
z
->
'
z
->
'
z
...
...
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