let lcm_of_denominators a = let p = constant_of a in let lcm0 = if Q.is_zero p then Z.one else Q.denominator p in Monomials.fold Monomials.is_true (fun q _ -> Z.lcm (Q.denominator q)) a lcm0