4.5.2.12 Number Fields

We create an equation order.
sage: f = kash('X^5 + 4*X^4 - 56*X^2 -16*X + 192')
sage: OK = f.EquationOrder()
sage: OK
Equation Order with defining polynomial X^5 + 4*X^4 - 56*X^2 - 16*X + 192
over Z

sage: f = kash('X^5 + 4*X^4 - 56*X^2 -16*X + 192')
sage: O = f.EquationOrder()
sage: a = O.gen(2)
sage: a
[0, 1, 0, 0, 0]
sage: O.Basis()        # output somewhat random
[
_NG.1,
_NG.2,
_NG.3,
_NG.4,
_NG.5
]
sage: O.Discriminant()
1364202618880
sage: O.MaximalOrder()     # name sage2 below somewhat random
Maximal Order of sage2

sage: O = kash.MaximalOrder('X^3 - 77')
sage: I = O.Ideal(5,[2, 1, 0])
sage: I                    # name sage14 below random
Ideal of sage14
Two element generators:
[5, 0, 0]
[2, 1, 0]

sage: F = I.Factorisation()
sage: F                    # name sage14 random
[
<Prime Ideal of sage14
Two element generators:
[5, 0, 0]
[2, 1, 0], 1>
]

Determining whether an ideal is principal.

sage: I.IsPrincipal()
FALSE, extended by:
ext1 := Unassign

Computation of class groups and unit groups:

sage: f = kash('X^5 + 4*X^4 - 56*X^2 -16*X + 192')
sage: O = kash.EquationOrder(f)
sage: OK = O.MaximalOrder()
sage: OK.ClassGroup()       # name sage32 below random
Abelian Group isomorphic to Z/6
  Defined on 1 generator
  Relations:
  6*sage32.1 = 0, extended by:
  ext1 := Mapping from: grp^abl: sage32 to ids/ord^num: _AA

sage: U = OK.UnitGroup()
sage: U        # name sage34 below random
Abelian Group isomorphic to Z/2 + Z + Z
  Defined on 3 generators
  Relations:
  2*sage34.1 = 0, extended by:
  ext1 := Mapping from: grp^abl: sage34 to ord^num: sage30

sage: kash.Apply('x->%s.ext1(x)'%U.name(), U.Generators().List())
   [ [1, -1, 0, 0, 0]
        ,
      [1, 1, 0, 0, 0],
      [-1, 0, 0, 0, 0] ]

See About this document... for information on suggesting changes.