The factorization of integers results in a factorization sequence, consisting of a sequence of pairs of prime and exponent. It is sometimes convenient to perform operations on such sequences without converting back to the integers they represent --- it would, for example, be very inefficient to factor the product of two integers that have both been factored already. In this section we briefly list the operations that are allowed on such factorization sequences --- note that these factorization sequences now have their own special type: RngIntEltFact. Conversion functions are supplied as well.
Factorization sequence usually arise as the result of the Factorization of an integer, possibly via functions like FactoredOrder. The functions below allow conversion from and to ordinary sequences, and the inverse operation to factorization, creating an integer from a factorization.
Create the integer corresponding to the factorization sequence f.
Given a sequence of tuples, each consisting of pairs of prime integers and positive integer exponents, create the corresponding factorization sequence. The pairs must be ordered with strictly increasing primes as first components.
Given a factorization sequence f, create the enumerated sequence containing the same pairs of primes and exponents.
The difference of two factorization sequences is only permitted when the first integer represented is greater than the second integer represented. An error results from division when the quotient does not correspond to an integer.
The functions listed below can be applied to factorization sequences; their behaviour will be clear, and all of them are documented elsewhere when the argument is the corresponding positive integer.
All predicates listed below are applicable both to factorization sequences and to the positive integers these represent, and have been documented for integer arguments elsewhere.