Type Inference, Type Improvement, and Type Simplification in a Language with User-Defined Polymorphic Relational Operators