And I want a function, let's call it g, that statisfies the following equation for any string a and b:
(!g(a, b))&&(!g(b, a))==f(a, b)
Any help, at least pseudocode?
That would't be it! Ok, assume the f() function is a kind of an equality operator (==), and g() is the less-than operator! That's what I need. Many times, when only one operator is needed to define them all, the == operator is defined as (!a<b && !b<a), so that's what I want.
> when only one operator is needed to define them all ...
In general two operators would need to be defined. The standard library does not require a (less than) comparison operator to impose a strong ordering.