|
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.
FactorizationToInteger(f) : RngIntEltFact -> RngIntElt
Create the integer corresponding to the factorization sequence f.
SequenceToFactorization(s) : SeqEnum -> RngIntEltFact
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.
ElementToSequence(f) : RngIntEltFact -> SeqEnum
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.
s + t : RngIntEltFact, RngIntEltFact -> RngIntEltFact
s - t : RngIntEltFact, RngIntEltFact -> RngIntEltFact
s * t : RngIntEltFact, RngIntEltFact -> RngIntEltFact
s / t : RngIntEltFact, RngIntEltFact -> RngIntEltFact
s ^ k : RngIntEltFact, RngIntElt -> RngIntEltFact
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.
Lcm(s, t) : RngIntEltFact, RngIntEltFact -> RngIntEltFact
Gcd(s, t) : RngIntEltFact, RngIntEltFact -> RngIntEltFact
SquarefreeFactorization(f) : RngIntEltFact -> RngIntEltFact, RngIntEltFact
MoebiusMu(f) : RngIntEltFact -> RngIntElt
Divisors(f) : RngIntEltFact -> SeqEnum
PrimeDivisors(f) : RngIntEltFact -> SeqEnum
NumberOfDivisors(f) : RngIntEltFact -> RngIntElt
SumOfDivisors(f) : RngIntEltFact -> RngIntElt
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.
IsOne(s) : RngIntEltFact -> BoolElt
IsOdd(s) : RngIntEltFact -> BoolElt
IsEven(s) : RngIntEltFact -> BoolElt
IsUnit(s) : RngIntEltFact -> BoolElt
IsPrime(s) : RngIntEltFact -> BoolElt
IsPrimePower(s) : RngIntEltFact -> BoolElt
IsSquare(s) : RngIntEltFact -> BoolElt
IsSquarefree(s) : RngIntEltFact -> BoolElt
[Next][Prev] [Right] [Left] [Up] [Index] [Root]
|