fix the sanity of the rule ∏_eq by adding a cast