# Structure Operations

## Related Structures

### `Category(Q): FldRat -> Cat`

### `Parent(Q): FldRat -> PowerStructure`

### `PrimeField(Q): FldRat -> FldRat`

### `IntegralBasis(Q): FldRat -> [ FldRatElt ]`

An integral basis for $Q$ as a number field as a sequence of elements of $Q$ (giving the sequence containing 1 for the rational field).

### `MinimalField(q): FldRatElt -> FldRat`

Return the least cyclotomic field containing the cyclotomic field element $q$; if $q$ is rational this returns the rational field.

### `MinimalField(S): SetEnum -> FldRat`

Returns the minimal cyclotomic field containing the cyclotomic field elements in the enumerated set $S$; this will return the rational field if all elements of $S$ are rational numbers.

### `BaseField(Q): FldRat -> FldRat`

In analogy to the number fields, returns the coefficient field of $Q$ which will be ${\mathbb{Q}}$.

### `Basis(Q): FldRat -> [FldRatElt]`

### `AbsoluteBasis(Q): FldRat -> [FldRatElt]`

A basis for $Q$ as a ${\mathbb{Q}}$-vector space, i.e. $[1]$.

### `UnitGroup(Q): FldRat -> GrpAb, Map`

The unit group of the maximal order of ${\mathbb{Q}}$ (i.e. of ${\mathbb{Z}}$).

### `ClassGroup(Q): FldRat -> GrpAb, Map`

The class group of the ring of integers ${\mathbb{Z}}$ of ${\mathbb{Q}}$ (which is trivial).

### `AutomorphismGroup(Q): FldRat -> GrpPerm, PowMapAut, Map`

### `AutomorphismGroup(Q, Q): FldRat, FldRat -> GrpPerm, PowMapAut, Map`

The group of ${\mathbb{Q}}$ automorphisms of ${\mathbb{Q}}$, ie. a trivial finitely presented group, the parent structure for ${\mathbb{Q}}$-automorphisms and a map from the group to actual field automorphisms. In this case, of course the only ${\mathbb{Q}}$-automorphism will be the identity.

### `Algebra(Q, Q): FldRat, Fld -> AlgAss, Map`

The rational numbers form canonically an algebra. This function returns an associative ${\mathbb{Q}}$-algebra isomorphic to ${\mathbb{Q}}$ and the map from the algebra to ${\mathbb{Q}}$.

### `VectorSpace(Q, Q): FldRat, Fld -> ModTupFld, Map`

The rational numbers form canonically a vector space. This function returns a ${\mathbb{Q}}$-vector space isomorphic to ${\mathbb{Q}}$ and the map from the vector space to ${\mathbb{Q}}$.

### `Decomposition(Q, p): FldRat, RngIntElt -> []`

### `Decomposition(Q, p): FldRat, Infty -> []`

For a prime $p$ or for the “infinite prime” `Infinity()` compute the decomposition in ${\mathbb{Q}}$ as a number field. This returns a list of length one containing a 2-tuple describing the splitting behaviour: the first component contains $p$ and the second it’s ramification degree, ie. 1.

## Numerical Invariants

The functions below are defined for the rational field ${\mathbb{Q}}$ mainly because it often arises as a degenerate case of quadratic or cyclotomic field constructions. See the corresponding Chapters [Quadratic Fields](../../GlobalFields/QuadraticFields/index-quadratic-fields.md#chapfldquad) and [Cyclotomic Fields](../../GlobalFields/CyclotomicFields/index-cyclotomic-fields.md#chapfldcyc) for more.

### `Characteristic(Q): FldRat -> RngIntElt`

### `Conductor(Q): FldRat -> RngIntElt`

The smallest positive integer $n$ such that $Q$ is contained in the cyclotomic field ${\mathbb{Q}}(\zeta_n)$. For the rational field this is $1$.

### `Degree(Q): FldRat -> RngIntElt`

### `AbsoluteDegree(Q): FldRat -> RngIntElt`

The degree of $Q$ as a number field (which is 1 for the rational field).

### `Discriminant(Q): FldRat -> RngIntElt`

### `AbsoluteDiscriminant(Q): FldRat -> RngIntElt`

The field discriminant of $Q$ (which is 1 for the rational field).

### `DefiningPolynomial(Q): FldRat -> RngUPolElt`

An irreducible polynomial over ${\mathbb{Q}}$ a root of which generates $Q$ as a number field (for the rational field this returns the linear polynomial $x-1$).

### `Signature(Q): FldRat -> RngIntElt, RngIntElt`

The signature (number of real embeddings and pairs of complex embeddings) of ${\mathbb{Q}}$.

## Ring Predicates and Booleans

### `IsCommutative(Q): FldRat -> BoolElt`

### `IsUnitary(Q): FldRat -> BoolElt`

### `IsFinite(Q): FldRat -> BoolElt`

### `IsOrdered(Q): FldRat -> BoolElt`

### `IsField(Q): FldRat -> BoolElt`

### `IsEuclideanDomain(Q): FldRat -> BoolElt`

### `IsPID(Q): FldRat -> BoolElt`

### `IsUFD(Q): FldRat -> BoolElt`

### `IsDivisionRing(Q): FldRat -> BoolElt`

### `IsEuclideanRing(Q): FldRat -> BoolElt`

### `IsPrincipalIdealRing(Q): FldRat -> BoolElt`

### `IsDomain(Q): FldRat -> BoolElt`

### `Q eq R: FldRat, FldRat -> BoolElt`

### `Q eq R: FldRat, RngInt -> BoolElt`

### `Q ne R: FldRat, FldRat -> BoolElt`

### `Q ne R: FldRat, RngInt -> BoolElt`
