Class Group and Unit Group

The ClassGroup routine and related functions are described in Section Ideal Class Groups. The routines for computing units in maximal orders of number fields are described in Section Unit Groups.

Example FldNum_ClassGroupUnitGroup (H36E13)

In our field defined by x4 - 420 * x2 + 40000, we obtain the class and unit groups as follows.
> R<x> := PolynomialRing(Integers());
> f := x^4 - 420*x^2 + 40000;
> K<y> := NumberField(f);
> C := ClassGroup(K);
> C;
Abelian Group of order 1
> U := UnitGroup(K);
> U;
Abelian Group isomorphic to Z/2 + Z + Z + Z
Defined on 4 generators
Relations:
      2*U.1 = 0
> T := TorsionUnitGroup(K);
> T;
Abelian Group isomorphic to Z/2
Defined on 1 generator
Relations:
    2*T.1 = 0
V2.28, 13 July 2023