Sign factors of integers #
The factor if x < 0 then -1 else 1 is the sign of a nonzero integer x, and its variant
if p ∧ x < 0 then -1 else 1, which switches the sign on only under a side condition p, is
multiplicative in x over nonzero factors. Such factors occur in the Kronecker symbol, whose value
at the denominator -1 is the sign factor of the numerator.
Main statements #
Int.ite_lt_zero_eq_sign: forx ≠ 0,(if x < 0 then -1 else 1) = x.sign.Int.ite_and_mul_lt_zero: the factorif p ∧ x < 0 then -1 else 1is multiplicative inxover nonzero factors.Int.sign_sub_mul_add_sign: for0 ≤ a < M, the signs ofa - m Mandmcancel, except atm = 0.