QuadraticIntegers
The ring of integers of : with when , else .
SageMath
QuadraticField(d).ring_of_integers()mathlib4NumberField.RingOfIntegersQuadraticIntegers(d)the ring of integers of , for a non-square integer ; a square factor of names the same fieldSageMath
QuadraticField(d).ring_of_integers()Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> set<quadratic_integer> | number-theory | always |
Details
- A value for the
Overoption:IsPrime(x, Over -> QuadraticIntegers(-5))asks whether is prime in .IsPrime,IsComposite,FactorInteger,Divisors,PrimeNu,PrimeOmega,MoebiusMuandIsSquareFreeread it QuadraticIntegers(-1)is GaussianIntegers, answered with the Gaussian conventions- Primality holds in every ring: is prime when the ideal is prime. Most of these rings do not factor uniquely ( in ), so
FactorInteger,Divisorsand the counting heads answer only where the class number is 1, and stay unevaluated elsewhere - An irreducible that is not prime is not composite either:
IsComposite(2, Over -> QuadraticIntegers(-5))isFalse, and so isIsPrime - The guide Quadratic integers draws these rings as lattices
Examples
Basic #
2 is irreducible in ℤ[√−5] but not prime: it divides (1 + √−5)(1 − √−5) without dividing either
live ↗InOut
live ↗
InOut
Scope #
About
| Examples | 7 |
|---|---|
| Crosswalk | SageMath ×2mathlib4 |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsWolfram has no ring-of-integers value to pass as a domain: its number-theory heads take GaussianIntegers -> True for Z[i] only, and NumberFieldClassNumber and friends take an algebraic number, not a ring.
mapped
sagepackages/oracle/src/mappings.ts See also: QuadraticInteger, GaussianIntegers, IsPrime, FactorInteger