Generalize some types, introduce inRange.

Generlize allDifferent and allEqual. Introduce inRange as  a new
symbolic predicate.