Defining congruence through rigid transformations