aboutsummaryrefslogtreecommitdiff
path: root/script.it/shapes/matrix/EltsI.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-02-05 09:08:39 +0100
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 14:39:30 +0100
commit561d0f0155f4906d90eb7e73a3ff9cb28909126f (patch)
tree9a606c2d7832272ea33d7052512a5fa59805d582 /script.it/shapes/matrix/EltsI.ml
parent86ec559f913c389e8dc055b494630f21a45e039b (diff)
Update project structure
Diffstat (limited to 'script.it/shapes/matrix/EltsI.ml')
-rwxr-xr-xscript.it/shapes/matrix/EltsI.ml28
1 files changed, 28 insertions, 0 deletions
diff --git a/script.it/shapes/matrix/EltsI.ml b/script.it/shapes/matrix/EltsI.ml
new file mode 100755
index 0000000..fcfdb50
--- /dev/null
+++ b/script.it/shapes/matrix/EltsI.ml
@@ -0,0 +1,28 @@
+module type ORDERED_AND_OPERATIONAL =
+sig
+
+ (* Exception for from_string. Is raised when from_string is passed something
+ * that is not an elt *)
+ exception NonElt
+
+ type t
+
+ (* The zero element *)
+ val zero : t
+
+ (* The one element *)
+ val one: t
+
+ (* ts must be comparable *)
+ val compare : t -> t -> Order.order
+
+ (* Basic mathematical operations must be possible *)
+ val add: t -> t -> t
+
+ val subtract: t -> t -> t
+
+ val multiply: t -> t -> t
+
+ val divide: t -> t -> t
+
+end