Module ArithLit.Util

module Util: sig .. end

Some Utils for arith



type divisor = {
   prime : Z.t;
   power : int;
}
val is_prime : Z.t -> bool
Is the integer prime?
val prime_decomposition : Z.t -> divisor list
Decompose the number into a product of power-of-primes. Cheap if is_prime n was called before.
Raises Invalid_argument if the number is negative
val primes_leq : Z.t -> Z.t Sequence.t
Sequence of prime numbers smaller than (or equal to) the given number