inequalities for length checking