(* lin-ord.sig *) (* Copyright (C) 2006 Alley Stoughton This file is part of crypto, a cryptogram encoder/decoder. See the file COPYING.txt for copying and usage restrictions *) (* a type together with a linear ordering on that type *) signature LIN_ORD = sig type elem (* compare(x, y) always terminates, has no side-effects, and always evaluates to the same value (two values are the SAME, or are EQUAL, iff there is no way of telling them apart) compare(x, y) = EQUAL iff x and y are equal compare(x, y) = LESS iff compare(y, x) = GREATER if compare(x, y) = LESS and compare(y, z) = LESS, then compare(x, z) = LESS *) val compare : elem * elem -> order end;