The first computational question in a number field is not merely “what polynomial defines it?” but “what is the correct integer lattice inside it?”
If K=Q(α), the obvious lattice Z[α] may fail to contain every algebraic integer in K. Arithmetic done in a nonmaximal order can misstate discriminants, prime decomposition, ideal factorisation and unit structure. The correct global integer ring is the ring of integers O_K, and a Z-basis of O_K is an integral basis.
This is Guide 37 in the Bukit Timah Tutor Computational Number Theory series. It extends Guide 16: Algebraic Number Fields, Ideals and Norms and prepares Guide 38: Prime-Ideal Decomposition.
1. Algebraic integers
An element β in a number field K is an algebraic integer when it satisfies a monic polynomial with coefficients in Z.
The algebraic integers in K form a ring:
O_K={β in K : β is integral over Z}.
If [K:Q]=n, then O_K is a free Z-module of rank n.
An integral basis is a Z-basis
ω1,...,ωn
for O_K.
2. Power orders
If α is an algebraic integer and K=Q(α), then
Z[α]={a0+a1α+...+a_(n−1)α^(n−1): a_i in Z}
is an order in K.
It has finite index in O_K:
[O_K:Z[α]] < ∞.
But Z[α] need not equal O_K.
This distinction is one of the first places where computational algebraic number theory departs from naïve polynomial arithmetic.
3. Orders
An order O in K is a subring of O_K containing 1 that is a free Z-module of full rank n.
Thus
Z ⊂ O ⊂ O_K
with finite index [O_K:O].
The maximal order is O_K itself. “Maximal” here means maximal among orders, not maximal among ideals.
4. The quadratic field Q(√5)
Let
K=Q(√5).
The obvious algebraic integer √5 generates the order
Z[√5].
Its basis is
1, √5.
But this is not the full ring of integers.
5. A missing algebraic integer
Define
ω=(1+√5)/2.
It satisfies
ω²−ω−1=0.
This polynomial is monic with integer coefficients, so ω is an algebraic integer.
Yet ω is not in Z[√5] because of the denominator 2.
Therefore
Z[√5] ⊊ O_K.
6. The full ring of integers of Q(√5)
In fact,
O_K=Z[ω], ω=(1+√5)/2.
An integral basis is
1, ω.
The change of basis is
√5=2ω−1.
Hence Z[√5] has index 2 in O_K.
7. Trace and norm
For β in K, multiplication by β is a Q-linear map on K.
The field trace and norm are
Tr_K/Q(β)=trace of multiplication-by-β, N_K/Q(β)=determinant of multiplication-by-β.
For quadratic conjugates β and β’,
Tr(β)=β+β', N(β)=ββ'.
8. Discriminant of a basis
For a Q-basis b1,…,bn, define
disc(b1,...,bn)=det(Tr(b_i b_j)).
Equivalent formulations use the determinant of embeddings into C.
If the basis is an integral basis of O_K, its discriminant is the field discriminant
D_K.
9. Discriminant of the power basis 1,√5
The minimal polynomial is
x²−5.
Its polynomial discriminant is
20.
Thus
disc(1,√5)=20.
This is the discriminant of the order Z[√5], not the field discriminant.
10. Discriminant of the integral basis
The minimal polynomial of ω is
x²−x−1.
Its discriminant is
1²−4(−1)=5.
Therefore
D_K=5.
The correct arithmetic discriminant of Q(√5) is 5, not 20.
11. The index–discriminant formula
If O is an order in O_K, then
disc(O)=[O_K:O]² D_K.
For Z[√5]:
20=2²·5.
This formula is a powerful diagnostic. Whenever the discriminant of a known order contains a square factor, that factor may reflect a nontrivial index.
It does not mean every square divisor of a polynomial discriminant must come from the index, but it identifies the primes that require investigation.
12. Polynomial discriminant versus field discriminant
If f is the monic minimal polynomial of an algebraic integer α, then
disc(f)=disc(1,α,...,α^(n−1)).
Therefore
disc(f)=[O_K:Z[α]]² D_K.
A defining polynomial does not automatically reveal D_K unless its power basis is integral.
13. Monogenic fields
A number field is monogenic if
O_K=Z[θ]
for some algebraic integer θ.
Even when a field is monogenic, a particular defining element α may fail to generate the maximal order.
Thus “K is given as Q(α)” and “O_K=Z[α]” are separate claims requiring separate evidence.
14. Integral closure viewpoint
The ring O_K is the integral closure of Z in K.
This definition is coordinate-free. It explains why changing the primitive element of K does not change O_K.
Computationally, however, we need a basis, multiplication tables and ideal arithmetic, so the integral closure must eventually be converted into explicit lattice data.
15. Localising the maximal-order problem
Suppose O=Z[α] has discriminant d.
If a rational prime p does not divide [O_K:O], then O is already p-maximal: no denominator involving p is needed to enlarge it locally.
Only primes dividing the order index need correction.
Since
[O_K:O]² | disc(O),
the primes dividing disc(O) are the finite candidate set for maximalisation.
16. p-maximal orders
An order O is p-maximal if its index in O_K is not divisible by p.
A maximal-order algorithm can therefore proceed prime by prime:
start from an order O
factor or partially analyse disc(O)
for each relevant p:
enlarge O until it is p-maximal
combine the local corrections.
The final result is O_K.
17. Why denominator elements appear
Suppose β=(a0+a1α+…)/p is integral.
Then adding β to the current basis enlarges the order by a factor divisible by p and reduces the discriminant by a square factor.
In Q(√5),
ω=(1+√5)/2
is exactly such a 2-denominator correction.
18. Testing integrality
An element β is integral if its characteristic polynomial for multiplication on K has integer coefficients.
Equivalently, all conjugates are algebraic integers.
In practice, maximal-order algorithms use modular linear algebra and valuation information rather than recomputing a full characteristic polynomial for every candidate denominator element.
19. The trace-dual lattice
Given an order O, define its trace dual
O*={x in K : Tr(xO)⊂Z}.
The quotient O*/O carries discriminant information.
If p divides the index of O in O_K, extra integral elements often appear inside suitable p-primary portions of the trace-dual lattice.
This gives one conceptual route to p-maximalisation algorithms.
20. Dedekind’s criterion
Dedekind’s criterion analyses the factorisation of the minimal polynomial modulo p and the index of Z[α].
When p does not divide the index, polynomial factorisation modulo p translates cleanly into prime-ideal factorisation in O_K.
When p divides the index, repeated modular factors can reflect either genuine ramification or merely a bad power basis. One must first repair the order.
Guide38 develops the prime-decomposition side of this distinction.
21. Conductor of an order
For an order O⊂O_K, the conductor is
f={x in O_K : xO_K⊂O}.
It is an ideal of both O and O_K and measures where O fails to be maximal.
In quadratic fields, orders are often described by integer conductors:
O_f=Z+fO_K.
The discriminant satisfies
disc(O_f)=f²D_K.
22. Quadratic discriminant rule
For squarefree d, the ring of integers of Q(√d) is
Z[(1+√d)/2] if d≡1 (mod4), Z[√d] otherwise.
Correspondingly,
D_K=d if d≡1 (mod4), D_K=4d otherwise.
This familiar formula is the simplest complete maximal-order algorithm.
23. A cubic example where a naïve power basis fails
Computer algebra systems provide examples beyond quadratic fields where denominator corrections are needed.
For the cubic field defined by
f(x)=x³+x²−2x+8,
SageMath documents an integral basis
1, (a²+a)/2, a²
for a root a of f.
This is a useful warning: nontrivial integral bases are not exceptional artefacts of quadratic fields.
24. Lattice representation of an order
Fix a Q-basis of K. Represent each order basis vector by its coordinate column.
The order becomes an integer lattice inside Q^n.
Change-of-basis determinants give indices. Hermite normal form gives canonical lattice descriptions. Smith normal form exposes quotient structure.
This directly connects Guide18’s integer normal forms to maximal-order computation.
25. Multiplication closure
A full-rank Z-lattice L inside K is an order only if:
1 in L and xy in L for all x,y in L.
Given a basis, it is enough to check pairwise products of basis elements and express them with integer coordinates in the basis.
Maximal-order algorithms must preserve this multiplicative closure while enlarging the lattice.
26. Discriminant as a ramification signal
A rational prime p ramifies in K only if
p | D_K.
In fact, for number fields, the prime divisors of D_K are exactly the ramified rational primes.
This is why obtaining the field discriminant—not merely a polynomial discriminant—is essential before discussing ramification.
27. Discriminant and geometry of numbers
Under the Minkowski embedding, O_K becomes a lattice in R^r1×C^r2.
The covolume is proportional to
2^(−r2) √|D_K|.
Thus D_K measures arithmetic complexity and geometric lattice density simultaneously.
Minkowski bounds, class-group algorithms and regulator computations all depend on this geometry.
28. Software contract
A reliable computer-algebra workflow should distinguish:
defining polynomial power order Z[α] maximal order O_K integral basis polynomial discriminant field discriminant index [O_K:Z[α]].
Do not infer one object from another merely because a system prints a convenient basis automatically.
29. SageMath example
SageMath exposes methods such as
K.integral_basis() K.maximal_order()
for number fields. Its documentation explicitly includes fields whose integral basis differs from the standard power basis.
The correct verification habit is to inspect the returned basis, compare discriminants and check the index of the starting order.
30. Certification and partial factorisation
Some maximal-order algorithms need factorisation of discriminants or local information at their prime divisors.
For enormous discriminants, complete integer factorisation can become a bottleneck.
Practical systems may support local maximalisation at specified primes, but a result that is only known to be maximal at selected primes must not be presented as the globally maximal order without the missing proof.
31. Verification receipt
For a claimed integral basis b1,…,bn, retain:
minimal polynomial / field definition basis coordinates proof or computation that each b_i is integral multiplication table with integer structure constants basis discriminant index relative to a known order.
If the basis discriminant is the certified field discriminant, the lattice is the maximal order.
32. Common mistakes
1. Assuming Z[α]=O_K. 2. Calling the polynomial discriminant the field discriminant without checking the index. 3. Confusing maximal orders with maximal ideals. 4. Treating square factors of a discriminant as proof of nonmaximality without local analysis.
5. Forgetting multiplication closure when enlarging a lattice. 6. Using Dedekind factorisation at a prime dividing the power-order index without correction. 7. Ignoring denominator elements in an integral basis. 8. Reporting a locally maximal order as globally maximal.
33. Practice set
1. Define an algebraic integer. 2. Define an order. 3. What is the maximal order? 4. Why is (1+√5)/2 integral?
5. Compute the discriminant of x²−5. 6. Compute the discriminant of x²−x−1. 7. Find [O_K:Z[√5]]. 8. State the index–discriminant formula.
9. What primes need local maximalisation? 10. Define the conductor. 11. State the quadratic ring-of-integers rule. 12. Why does the field discriminant matter for ramification?
34. Answers
1. An element satisfying a monic polynomial in Z[x]. 2. A full-rank subring of O_K containing1. 3. O_K, the full ring of integers. 4. It satisfies x²−x−1=0.
5. 20. 6. 5. 7. 2. 8. disc(O)=[O_K:O]²D_K.
9. Primes dividing the index, hence among primes dividing the starting order discriminant. 10. {x in O_K:xO_K⊂O}. 11. For squarefree d, use (1+√d)/2 when d≡1 mod4, otherwise √d. 12. Its prime divisors are precisely the ramified rational primes.
Sources and further study
SageMath, Number fields — constructions, includes explicit integral-basis examples, including a cubic field whose basis is not the standard power basis. The SageMath number-field reference documents maximal-order computation. Henri Cohen’s A Course in Computational Algebraic Number Theory develops practical algorithms for integral bases and maximal orders.
Continue through Batch 10
Continue to Guide 38: Prime-Ideal Decomposition, Guide 39: Local Fields and Completions, and Guide 40: S-Units, Norm and Thue Equations.
