If I have a set of objects which support + and <, is that necessarily isomorphic to a subset of the real numbers?
I ask this question because I'm trying to figure out the most general type of a parameter in a Scala program I'm writing. The only thing I assume about the type is that it supports addition and ordering. I.e., given two of them,
b, I need
a+b to be in the type; and given any two of them,
b, I need to be able to evaluate
(a < b) to make an if/then decision. Someone suggested, that this is just the set of what Scala calls
Numbers. My first reaction was, no that's too restrictive, but then I can't think of any other example.