Allow to specify weight when defining an equality