Ring of Integers
- Introduction
- Creation Functions
- Creation of Structures
- Creation of Elements
- Printing of Elements
- Element Conversions
FactorizationToInteger(s): [ <RngIntElt, RngIntElt> ] → RngIntElt
FactorisationToInteger(s): [ <RngIntElt, RngIntElt> ] → RngIntElt
Facint(s): [ <RngIntElt, RngIntElt> ] → RngIntElt
IntegerToSequence(n, b): RngIntElt, RngIntElt → [RngIntElt]
Intseq(n, b): RngIntElt, RngIntElt → [RngIntElt]
SequenceToInteger(s, b): [RngIntElt], RngIntElt → RngIntElt
Seqint(s, b): [RngIntElt], RngIntElt → RngIntElt
IntegerToString(n): RngIntElt → ModStgElt
IntegerToString(n, b): RngIntElt, RngIntElt → ModStgElt
Eltseq(n): RngIntElt → [RngIntElt]
Denominator(n): RngIntElt → RngIntElt
- Structure Operations
- Element Operations
- Arithmetic Operations
+ n: RngIntElt → RngIntElt
- n: RngIntElt → RngIntElt
m + n: RngIntElt, RngIntElt → RngIntElt
m - n: RngIntElt, RngIntElt → RngIntElt
m * n: RngIntElt, RngIntElt → RngIntElt
n ^ k: RngIntElt, RngIntElt → RngIntElt
m / n: RngIntElt, RngIntElt → RngIntElt
m +:= n: RngIntElt, RngIntElt → RngIntElt
m -:= n: RngIntElt, RngIntElt → RngIntElt
m *:= n: RngIntElt, RngIntElt → RngIntElt
m /:= n: RngIntElt, RngIntElt → RngIntElt
m ^:= k: RngIntElt, RngIntElt → RngIntElt
n div m: RngIntElt, RngIntElt → RngIntElt
n mod m: RngIntElt, RngIntElt → RngIntElt
ExactQuotient(n, d): RngIntElt, RngIntElt → RngIntElt
n div:= m: RngIntElt, RngIntElt → RngIntElt
n mod:= m: RngIntElt, RngIntElt → RngIntElt
- Bit Operations
- Bitwise Operations
- Equality and Membership
- Parent and Category
- Predicates on Ring Elements
- Comparison of Ring Elements
- Conjugates, Norm and Trace
- Other Elementary Functions
AbsoluteValue(n): RngIntElt → RngIntElt
Abs(n): RngIntElt → RngIntElt
Ilog2(n): RngIntElt → RngIntElt
Ilog(b, n): RngIntElt, RngIntElt → RngIntElt
Quotrem(m, n): RngIntElt, RngIntElt → RngIntElt, RngIntElt
Valuation(x, p): RngIntElt, RngIntElt → RngIntElt, RngIntElt
Iroot(a, n): RngIntElt, RngIntElt → RngIntElt
Sign(n): RngIntElt → RngIntElt
Ceiling(n): RngIntElt → RngIntElt
Floor(n): RngIntElt → RngIntElt
Round(n): RngIntElt → RngIntElt
Truncate(n): RngIntElt → RngIntElt
SquarefreeFactorization(n): RngIntElt → RngIntElt, RngIntElt
Isqrt(n): RngIntElt → RngIntElt
- Random Numbers
Random(a, b): RngIntElt, RngIntElt → RngIntElt
Random(b): RngIntElt → RngIntElt
RandomBits(n): RngIntElt → RngIntElt
RandomPrime(n: parameter): RngIntElt → RngIntElt
RandomPrime(n, a, b, x: parameter): RngIntElt, RngIntElt, RngIntElt → BoolElt, RngIntElt
RandomConsecutiveBits(n, a, b): RngIntElt, RngIntElt → RngIntElt
- GCD and LCM
GreatestCommonDivisor(m, n): RngIntElt, RngIntElt → RngIntElt
Gcd(m, n): RngIntElt, RngIntElt → RngIntElt
GCD(m, n): RngIntElt, RngIntElt → RngIntElt
GreatestCommonDivisor(s): [RngIntElt] → RngIntElt
Gcd(s): [RngIntElt] → RngIntElt
GCD(s): [RngIntElt] → RngIntElt
ExtendedGreatestCommonDivisor(m, n): RngIntElt, RngIntElt → RngIntElt, RngIntElt, RngIntElt
Xgcd(m, n): RngIntElt, RngIntElt → RngIntElt, RngIntElt, RngIntElt
XGCD(m, n): RngIntElt, RngIntElt → RngIntElt, RngIntElt, RngIntElt
ExtendedGreatestCommonDivisor(s): [RngIntElt] → RngIntElt, [RngIntElt]
Xgcd(s): [RngIntElt] → RngIntElt, [RngIntElt]
XGCD(s): [RngIntElt] → RngIntElt, [RngIntElt]
LeastCommonMultiple(m, n): RngIntElt, RngIntElt → RngIntElt
Lcm(m, n): RngIntElt, RngIntElt → RngIntElt
LCM(m, n): RngIntElt, RngIntElt → RngIntElt
LeastCommonMultiple(s): [RngIntElt] → RngIntElt
Lcm(s): [RngIntElt] → RngIntElt
LCM(s): [RngIntElt] → RngIntElt
- Arithmetic Functions
CarmichaelLambda(n): RngIntElt → RngIntElt
CarmichaelLambda(Q): RngIntEltFact → RngIntElt
CarmichaelLambda(Q): [Tup] → RngIntElt
DickmanRho(u): FldReElt → FldReElt
FactoredCarmichaelLambda(n): RngIntElt → RngIntEltFact
FactoredCarmichaelLambda(Q): RngIntEltFact → RngIntEltFact
FactoredCarmichaelLambda(Q): [Tup] → RngIntEltFact
DivisorSigma(i, n): RngIntElt, RngIntElt → RngIntElt
DivisorSigma(i, Q): RngIntElt, RngIntEltFact → RngIntElt
NumberOfDivisors(n): RngIntElt → RngIntElt
NumberOfDivisors(Q): RngIntEltFact → RngIntElt
SumOfDivisors(n): RngIntElt → RngIntElt
SumOfDivisors(Q): RngIntEltFact → RngIntElt
EulerPhi(n): RngIntElt → RngIntElt
EulerPhi(Q): RngIntEltFact → RngIntElt
EulerPhi(Q): [Tup] → RngIntElt
FactoredEulerPhi(n): RngIntElt → RngIntEltFact
FactoredEulerPhi(Q): RngIntEltFact → RngIntEltFact
FactoredEulerPhi(Q): [Tup] → RngIntEltFact
EulerPhiInverse(m): RngIntElt → RngIntElt
EulerPhiInverse(Q): RngIntEltFact → RngIntElt
FactoredEulerPhiInverse(n): RngIntElt → RngIntEltFact
FactoredEulerPhiInverse(Q): RngIntEltFact → RngIntEltFact
LegendreSymbol(n, m): RngIntElt, RngIntElt → RngIntElt
JacobiSymbol(n, m): RngIntElt, RngIntElt → RngIntElt
KroneckerSymbol(n, m): RngIntElt, RngIntElt → RngIntElt
MoebiusMu(n): RngIntElt → RngIntElt
MoebiusMu(Q): RngIntEltFact → RngIntElt
Example: Amicable
- Combinatorial Functions
Binomial(n, r): RngIntElt, RngIntElt → RngIntElt
Multinomial(n, [r₁, ... rₙ]): RngIntElt, [RngIntElt] → RngIntElt
Factorial(n): RngIntElt → RngIntElt
IsFactorial(n): RngIntElt → BoolElt, RngIntElt
Partitions(n): RngIntElt → [ [ RngIntElt ] ]
NumberOfPartitions(n): RngIntElt → RngIntElt
RestrictedPartitions(n, M): RngIntElt, SetEnum → [ [ RngIntElt ] ]
RestrictedPartitions(n, k, M): RngIntElt, RngIntElt, SetEnum → [ [ RngIntElt ] ]
StirlingFirst(n, k): RngIntElt, RngIntElt → RngIntElt
StirlingSecond(n, k): RngIntElt, RngIntElt → RngIntElt
Bell(n): RngIntElt → RngIntElt
Fibonacci(n): RngIntElt → RngIntElt
Lucas(n): RngIntElt → RngIntElt
GeneralizedFibonacciNumber(g0, g1, n): RngIntElt, RngIntElt, RngIntElt → RngIntElt
- Primes and Primality Testing
- Factorization
- General Factorization
SetVerbose("Factorization", v): MonStgElt, RngIntElt
Factorization(n): RngIntElt → RngIntEltFact, RngIntElt, SeqEnum
Factorisation(n): RngIntElt → RngIntEltFact, RngIntElt, SeqEnum
Factorization(n: parameters): RngIntElt → RngIntEltFact, RngIntElt, SeqEnum
Factorisation(n: parameters): RngIntElt → RngIntEltFact, RngIntElt, SeqEnum
- Storing Potential Factors
- Specific Factorization Algorithms
SetVerbose("Cunningham", b): MonStgElt, BoolElt
SetVerbose("ECM", b): MonStgElt, Elt
SetVerbose("MPQS", b): MonStgElt, Elt
Cunningham(b, k, c): RngIntElt, RngIntElt, RngIntElt → SeqEnum
AssertAttribute({RngInt, }{"CunninghamStorageLimit", l}): Cat, MonStgElt, RngIntElt
TrialDivision(n): RngIntElt → RngIntEltFact, RngIntElt
TrialDivision(n, B): RngIntElt, RngIntElt → RngIntEltFact, RngIntElt
PollardRho(n): RngIntElt → RngIntEltFact, [ RngIntElt ]
PollardRho(n, c, s, k): RngIntElt, RngIntElt, RngIntElt, RngIntElt → RngIntEltFact, [ RngIntElt ]
pMinus1(n, B1): RngIntElt, RngIntElt → RngIntElt
pPlus1(n, B1): RngIntElt, RngIntElt → RngIntElt
SQUFOF(n): RngIntElt → RngIntEltFact, [ RngIntElt ]
SQUFOF(n, k): RngIntElt, RngIntElt → RngIntEltFact, [ RngIntElt ]
ECM(n, B1): RngIntElt, RngIntElt → RngIntElt, RngIntElt
ECMSteps(n, L, U): RngIntElt, RngIntElt, RngIntElt → RngIntElt, RngIntElt
MPQS(n): RngIntElt → RngIntEltFact, [ RngIntElt ]
- Factorization Related Functions
- Factorization Sequences
- Modular Arithmetic
- Arithmetic Operations
Modexp(n, k, m): RngIntElt, RngIntElt, RngIntElt → RngIntElt
n mod m: RngIntElt, RngIntElt → RngIntElt
Modinv(n, m): RngIntElt, RngIntElt → RngIntElt
InverseMod(n, m): RngIntElt, RngIntElt → RngIntElt
Modsqrt(n, m): RngIntElt, RngIntElt → BoolElt, RngIntElt
Modorder(n, m): RngIntElt, RngIntElt → RngIntElt
IsPrimitive(n, m): RngIntElt, RngIntElt → BoolElt
PrimitiveRoot(m): RngIntElt → RngIntElt
- The Solution of Modular Equations
Solution(a, b, m): RngIntElt, RngIntElt, RngIntElt → RngIntElt, RngIntElt
ChineseRemainderTheorem(X, N): [RngIntElt], [RngIntElt] → RngIntElt
CRT(X, N): [RngIntElt], [RngIntElt] → RngIntElt
Solution(A, B, N): [RngIntElt], [RngIntElt], [RngIntElt] → RngIntElt
NormEquation(d, m): RngIntElt, RngIntElt → BoolElt, RngIntElt, RngIntElt
NormEquation(d, m: parameters)): RngIntElt, RngIntElt → BoolElt, RngIntElt, RngIntElt
Example: Norm Equation
- Infinities
- Creation
- Arithmetic
- x: Infty → Infty
x + y: Infty, Infty → Infty
x + y: Infty, RngIntElt → Infty
x + y: RngIntElt, Infty → Infty
x - y: Infty, Infty → Infty
x - y: Infty, RngIntElt → Infty
x - y: RngIntElt, Infty → Infty
x * y: Infty, Infty → Infty
x * y: Infty, RngIntElt → Infty
x * y: RngIntElt, Infty → Infty
x / y: RngIntElt, Infty → RngIntElt
x / y: Infty, RngIntElt → Infty
x ^ n: Infty, Infty → Infty
x ^ n: Infty, RngIntElt → Infty
- Comparison
x eq y: Infty, Infty → BoolElt
x eq y: Infty, RngIntElt → BoolElt
x eq y: RngIntElt, Infty → BoolElt
x ne y: Infty, Infty → BoolElt
x ne y: Infty, RngIntElt → BoolElt
x ne y: RngIntElt, Infty → BoolElt
x lt y: Infty, Infty → BoolElt
x lt y: Infty, RngIntElt → BoolElt
x lt y: RngIntElt, Infty → BoolElt
x le y: Infty, Infty → BoolElt
x le y: Infty, RngIntElt → BoolElt
x le y: RngIntElt, Infty → BoolElt
x gt y: Infty, Infty → BoolElt
x gt y: Infty, RngIntElt → BoolElt
x gt y: RngIntElt, Infty → BoolElt
x ge y: Infty, Infty → BoolElt
x ge y: Infty, RngIntElt → BoolElt
x ge y: RngIntElt, Infty → BoolElt
Maximum(x, y): Infty, Infty → .
Maximum(x, y): Infty, RngIntElt → .
Maximum(x, y): RngIntElt, Infty → .
Minimum(x, y): Infty, Infty → .
Minimum(x, y): Infty, RngIntElt → .
Minimum(x, y): RngIntElt, Infty → .
- Miscellaneous
- Advanced Factorization Techniques: The Number Field Sieve
- The Magma Number Field Sieve Implementation
- Naive NFS
NumberFieldSieve(n, F, m1, m2): RngIntElt, RngMPolElt, RngIntElt, RngIntElt → RngIntElt
NFS(n, F, m1, m2): RngIntElt, RngMPolElt, RngIntElt, RngIntElt → RngIntElt
- Factoring with NFS Processes
- Data Files
- Distributing NFS Factorizations
- Magma and CWI NFS Interoperability
- Tools for Finding a Suitable Polynomial
BaseMPolynomial(n, m, d): RngIntElt, RngIntElt, RngIntElt → RngMPolElt
MurphyAlphaApproximation(F, b): RngMPolElt, RngIntElt → FldReElt
OptimalSkewness(F): RngMPolElt → FldReElt, FldReElt
Example: Get Poly
BestTranslation(F, m, a): RngMPolElt, RngIntElt, FldReElt, FldReElt → RngMPolElt, RngIntElt, FldReElt, FldReElt
PolynomialSieve({F, m, J0, J1,}{MaxAlpha}): RngMPolElt, RngIntElt, RngIntElt, RngIntElt, FldReElt → List