module type IndexedType =Signature for types with natural number indexing.sig
..end
type
t
val index : t -> int
t
.
index x >= 0
. (index x = index y) = (x = y)
inverse (index x) = x
val inverse : int -> t
inverse i
is the x
such that index x = i
.
i >= 0
(inverse i = inverse j) = (i = j)
index (inverse i) = i