Commit 7840da0e authored by POTTIER Francois's avatar POTTIER Francois

Added [CompletedNatWitness.compare].

parent 3807b162
......@@ -17,6 +17,17 @@ let equal p1 p2 =
| _, _ ->
false
let compare p1 p2 =
match p1, p2 with
| Finite (i1, _), Finite (i2, _) ->
if i1 < i2 then -1 else if i1 = i2 then 0 else 1
| Infinity, Infinity ->
0
| Finite _, Infinity ->
-1
| Infinity, Finite _ ->
1
let bottom =
Infinity
......
......@@ -12,6 +12,8 @@ val bottom: 'a t
val equal: 'a t -> 'b t -> bool
val is_maximal: 'a t -> bool
val compare: 'a t -> 'b t -> int
val epsilon: 'a t
val singleton: 'a -> 'a t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment