[constraints] provide proper comparison and hashability between constraints [applied]