# Attributes

In this rather technical section, we describe the programming interface to the abelian extension module. Most of the internal representation is available as attributes and may be used to extend the package.

## Orders

The only attribute of orders `RngOrd` that is of interest here concerns cyclotomic extensions. The first and usually most time consuming step while computing defining extensions is to adjoin certain roots of unity and to compute class groups of these rather large fields.

The cyclotomic extensions are stored and are available via an attribute. This attribute is a read-only attribute.

### `o`CyclotomicExtensions: RngOrd -> [Rec]`

If defined, `CyclotomicExtensions` is a list of records, each containing data for one cyclotomic extension, i.e. for an order $o$ this is an extension of the form $O := o[\zeta_l]$ for a prime power $l = p^n$. The components are

**`Abs`**
a maximal order $Oa$ of $O$ given as an absolute extension

**`Rel`**
$O$ as an extension of $o$

**`p2n`**
the “$l$”, i.e. the cyclotomic order

**`Zeta`**
a primitive $l$th root of unity as an element of the absolute extension `Abs`

**`Aut`**
a list of records describing generators for the automorphism group of $O$ over $o$. If $p$ is an odd prime then the list will always be of length $1$. This list consists of the following components:

**`Aut`Abs`**
the automorphism as an automorphism of $Oa$

**`Aut`Rel`**
the automorphism as an automorphism of $O$. Note that in general this is not an $o$-automorphism, as $o$ itself may contain roots of unity.

**`Aut`Order`**
the order of the automorphism

**`Aut`r`**
the image of $\zeta_l$, this automorphism sends $\zeta_l$ to $\zeta_l^r$.

Due to possible common subfields of $o$ and ${\mathbb{Q}}(\zeta_k)$, the degree of $O$ over $o$ may be smaller than expected. Furthermore, $Oa$ will be in optimized representation.

### `Example: Cyclotomic Extension (ex-44588f)`

We will demonstrate this with the Hilbert class field of ${\mathbb{Q}}(\sqrt{-1001})$:

```magma
> Zx<x> := PolynomialRing(Integers());
> k := NumberField(x^2+1001);
> g, m :=ClassGroup(k); g;
Abelian Group isomorphic to Z/2 + Z/2 + Z/10
Defined on 3 generators
Relations:
    2*$.1 = 0
    2*$.2 = 0
    10*$.3 = 0
> K := HilbertClassField(k);
Number Field with defining polynomial [ $.1^2 - 2*k.1 + 136,
    $.1^2 - 4*k.1 - 47, $.1^2 + 2*k.1 - 136, $.1^5 + 37210*$.1^3
    + (-2104500*k.1 + 61148840)*$.1^2 + (-292068000*k.1 +
    14636593760)*$.1 + 305212632000*k.1 - 1779009360128] over k
> o := MaximalOrder(k);
> c := o`CyclotomicExtensions;
> #c;
2

```

Since there are two non-isomorphic direct cyclic factors of prime power order in the class group of $k$, we have two cyclotomic extensions stored in $o$. One has order $2$ and the other has order $5$:

```magma
> c[1]`p2n;
2
> c[2]`p2n;
5

```

Since the order $2$ extension is essentially trivial, we will discuss the other extension in detail.

```magma
> c[2]`Abs;
Maximal Order of Equation Order with defining polynomial x^8 +
    4*x^7 + 4016*x^6 + 12034*x^5 + 6032056*x^4 + 12044060*x^3 +
    4016040045*x^2 + 4010020020*x + 1000000005005 over Z
> c[2]`Rel;
Maximal Equation Order with defining polynomial x^4 + x^3 + x^2 +
    x + [1, 0] over o

```

The relative extension is generated by a root of the $5$th-cyclotomic polynomial of degree $4$, so there are no common subfields. The corresponding absolute extension has degree $8$. As one can see, the class group (at least a conditional class group) is known:

```magma
> c[2]`Abs:Maximal;
   F[1]
    |
   F[2]
  /
 /
Q
F  [ 1]     Given by transformation matrix
F  [ 2]     x^8 + 4*x^7 + 4016*x^6 + 12034*x^5 + 6032056*x^4 +
    12044060*x^3 + 4016040045*x^2 + 4010020020*x + 1000000005005
Discriminant: 4016024016004000000
Index: 4100090871676479535981/1
Class Number 12800
Class Group Structure C2 * C4 * C20 * C80
Signature: [0, 4]

```

We will illustrate the `Aut` entries by showing their effect on $\zeta_5$. Since the maps operate between the number fields rather than the orders, we will coerce the results back into the orders for clarity. The only difference between `Rel` and `Abs` is that `Rel` implements the automorphism in the relative extension.

```magma
> Oa := c[2]`Abs;
> z := c[2]`Zeta; z;
[0, 1, 0, 0, 0, 0, 0, 0]
> Oa!c[2]`Aut[1]`Abs(z);
[0, 0, 1, 0, 0, 0, 0, 0]
> z^c[2]`Aut[1]`r;
[0, 0, 1, 0, 0, 0, 0, 0]

```

The `Order` entry gives the order of the automorphism:

```magma
> c[2]`Aut[1]`Order;
4
>  Oa!c[2]`Aut[1]`Abs(z);
[0, 0, 1, 0, 0, 0, 0, 0]
>  Oa!(c[2]`Aut[1]`Abs($1));
[-1, -1, -1, -1, 0, 0, 0, 0]
>  Oa!(c[2]`Aut[1]`Abs($1));
[0, 0, 0, 1, 0, 0, 0, 0]
>  Oa!(c[2]`Aut[1]`Abs($1));
[0, 1, 0, 0, 0, 0, 0, 0]

```

As a by–product one can see the optimized representation: the first four basis elements are clearly $1$, $\zeta_5$, $\zeta_5^2$, $\zeta_5^3$ which are the $T_2$ shortest integral elements in $m$.

## Abelian Extensions

Abelian extensions have several attributes. Most of them are only useful in programming.

### `A`Components: FldAb -> [Rec]`

This read-only attribute contains a record for each cyclic factor of prime power degree that occurs in the abelian extension. In order to describe the contents we have to fix some definitions. Let $o$ be the base ring of the abelian extension $A$. Then $O$ will be the maximal order of the cyclotomic extension $o[\zeta_l]$ as an extensions of ${\mathbb{Z}}$. The algorithm for the computation of defining extensions will firstly compute a generator $a\in O$ such that $O(a^{1/l})$ equals $A(\zeta_l)$. This element will be a certain $S$-unit of $O$.

The components are

**`Basis`**
a matrix $B$ containing order elements. This represents a “multiplicative basis” for the generator $a$ and all the $S$-units that are used.

**`GenRaw`**
the exponent vector $G$ defining $a$, i.e.

$$
a = \prod_i {B_{1,i}}^{G_{i,1}}.
$$

**`UnitsRaw`**
a matrix $U$ defining a basis for the group of $S$-units, i.e.

$$
u_j = \prod_i {B_{1,i}}^{U_{j,i}}.
$$

**`S`**
a list containing the prime ideals of $S$

**`Gen`**
$a$ as an element of $Oa$

**`GenAut`**
the image of a generator for the class field (an image of `ClassField.2`) in the field of fractions of $O$ under a generator for the cyclic group corresponding to this component.

**`GenInv`**
$1/a$ as an element of the field of fractions of $Oa$

**`O`**
the big Kummer extension $Oa(a^{1/l})$

**`ClassField`**
an equation order for the cyclic extension corresponding to this component. This will be an extension of $o$.

**`Artin`**
the Artin map on the big Kummer extension $o[\zeta_l](U_S^{1/l})$ where the automorphisms are represented as elements in some abelian group of type $C_l^{\#S}$.

### `A`DefiningGroup: FldAb -> Rec`

### `A`NormGroup: FldAb -> Rec`

These two attributes give access to the ideal group used to define $A$, and they have the same structure. `DefiningGroup` is the group used to create $A$ in the first place whereas `NormGroup` contains the group defined modulo the conductor. The user needs to call the function [`Conductor`](invariants.md#function-fldab-conductor) in order to define this component. These attributes are read-only.

The records contain the following components:

**`Map`**
the map as passed into the [`AbelianExtension`](creation.md#function-fldab-abelianextension) constructor, respectively, an equivalent map.

**`m0`**
the “finite” part of the modulus underlying `Map`

**`m_inf`**
the “infinite” part of the modulus underlying `Map`

**`RcgMap`**
if present, contains the map returned from the call to [`RayClassGroup`](creation.md#function-fldab-rayclassgroup) with `m0` and `m_inf`.

**`GrpMap`**
if present, the “rest” of `Map`, i.e. `Map` $=$ `RcgMap` $\circ$ `GrpMap`.

### `A`IsAbelian: FldAb -> Bool`

Stores the result of a call to [`IsAbelian`](galois-module-structure.md#function-fldab-isabelian) with parameter `All := ``true`.

### `A`IsNormal: FldAb -> Bool`

Stores the result of a call to [`IsNormal`](galois-module-structure.md#function-fldab-isnormal) with parameter `All := ``true`.

### `A`IsCentral: FldAb -> Bool`

Stores the result of a call to [`IsCentral`](galois-module-structure.md#function-fldab-iscentral) with parameter `All := ``true`.

### `Example: Abelian Extension Attributes (ex-63b1eb)`

To illustrate the preceding examples we will investigate the $3$-part of the ray class field modulo $36$ over ${\mathbb{Z}}[\sqrt{-10}]$:

```magma
> Zx<x> := PolynomialRing(Integers());
> o := MaximalOrder(x^2+10);
> r, mr := RayClassGroup(36*o);
> q, mq := quo<r| [r.i*3 : i in [1..Ngens(r)]]>;
> A := AbelianExtension(Inverse(mq)*mr); A;
FldAb, defined by (<[36, 0]>, [])
of structure: Z/3 + Z/3

```

At this stage, the only attribute that is assigned is `DefiningGroup`.

```magma
> la := GetAttributes(FldAb);
> [ <assigned A``i, i> : i in la];
[ <false, Components>, <true, DefiningGroup>, <false, IsAbelian>,
<false, IsCentral>, <false, IsNormal>, <false, NormGroup> ]

```

So let us have a closer look at `DefiningGroup`:

```magma
> d := A`DefiningGroup;
> d;
rec<recformat<Map, m0, m_inf, RcgMap, GrpMap> | Map := Mapping
from: GrpAb: q to Set of ideals of o
Composition of Mapping from: GrpAb: q to GrpAb: r and
Mapping from: GrpAb: r to Set of ideals of o, m0 := Principal
Ideal of o
Generator:
    [36, 0], m_inf := [], RcgMap := Mapping from: GrpAb: r to Set
of ideals of o, GrpMap := Mapping from: GrpAb: q to GrpAb: r>

```

As one can see, `Map` is the original map used to define $A$. Note that this is the composition of `RcgMap` and `GrpMap`, the first being equivalent to `mr`, the second to `mq`. Furthermore, the defining modulus is now available in `m0` and `m_inf`.

After having set up $A$, we now need to transform it into a number field in order for the `Components` to be assigned:

```magma
> K := NumberField(A);
> K;
Number Field with defining polynomial [ $.1^3 - 3*$.1 - 6*$.1 -
    11, $.1^3 - 3*$.1 - 6*$.1 + 11] over its ground field
> c := A`Components;
> #c;
2

```

We will focus on the first component only.

```magma
> B := c[1]`Basis;
> a := &* [ B[1][i] ^ c[1]`GenRaw[i][1] : i in [1..Ncols(B)]];
> a;
-11/1*$.2 + 4/1*$.3 + 2/1*$.4
> c[1]`Gen;
[0, -11, 4, 2]
> c[1]`Gen eq a;
true
> c[1]`GenInv * a eq 1;
true
> c[2]`GenInv * a eq 1;
false

```

In $S$ we need all primes dividing the degree $9$ of our extension, all primes dividing the modulus $36$ and enough primes to generate the $3$-part of the class group. Since the class group can be generated by the prime ideal over $2$, this leaves us with only two prime ideals in $S$. Since $k$ is imaginary quadratic, the base field $k[\zeta_3]$ is totally complex of degree $4$ which implies unit rank $1$. So the free rank of our $S$-unit group will be $3$, and since we have to take care of the torsion unit, `GenRaw` will have $4$ columns.

```magma
> #c[1]`S;
2
> UnitRank(o);
1
> Ncols(c[1]`UnitsRaw);
4
> U := c[1]`UnitsRaw;
> u := [ &* [B[1][i] ^ U[i][j] : i in [1..Ncols(B)]] : j in [1..4]];

```

Now $u_1$ should be a fundamental unit for $Oa$, $u_2$ and $u_3$ are $S$-units and $u_4$ is the torsion unit, since we adjoin the $3$rd-roots of unity, this will be a $6$th root of unity.

```magma
> Oa := Parent(B[1][1]);
> Oa!u[1];
[0, -11, 4, 2]
> IsUnit($1);
true
> Decomposition(u[2]);
[
    <Prime Ideal of Oa
    Two element generators:
        [3, 0, 0, 0]
        [-9, 0, 1, 2], 1>
]
> u[4]^6 eq 1;

```

Now $O$ should be an extension of $Oa$:

```magma
> c[1]`O:Maximal;
         F[1]
           /
          /
      E2[1]
        /
       /
   E1[1]
  /
 /
Q
F  [ 1]     x^3 + [[0, -4], [11, -2]]
E 2[ 1]     x^2 + x + [1, 0]
E 1[ 1]     x^2 + 10
Index : <[[1, 0], [0, 0]]>

```

The class field $K$ we are seeking is a subfield of $O$:

```magma
> c[1]`ClassField;
Equation Order with defining polynomial x^3 + [-3, 0]*x + [-11,
    -6] over o
> g := c[1]`ClassField.2;
> c[1]`O!g;
[[[0, 0], [0, 0]], [[1, 0], [0, 0]], [[11, 2], [11, -2]]]

```

Note that the absolute term of the defining polynomial is $a$. Since `GenAut` is an image of $g$, its minimal polynomial should be the same as that of $g$:

```magma
> MinimalPolynomial(g);
$.1^3 - 3/1*o.1*$.1 - 11/1*o.1 - 6/1*o.2
> Evaluate($1, c[1]`GenAut);
0

```
