Generate invariants for subrange types