In the lists below, K denotes a quadratic field, O a quadratic order, and B a magma of binary quadratic forms.
This function returns a sequence of elements of the quadratic field K that form an integral basis for K.
A Z-basis for the order O, as a sequence of two elements of the quadratic field K in which O is contained. The two elements are 1 and f omega , where 1, omega form the standard integral basis for K, and f is the conductor of O.
The class group of an order O or the maximal order of the quadratic field K, as an abelian group. The function also returns a map between the group and the magma of quadratic forms of the associated discriminant.
The structure of the class group of the order O or the maximal order of the quadatic field K, as a sequence of integers giving the abelian invariants.
The class number of O or the order O or the maximal order of the quadatic field K.
The unit group of the order O or the maximal order of the quadatic field K, as an abelian group, together with a map to the order (or field).
Returns the torsion part of the unit group of the order O or of the maximal order of the quadratic field K, as a finite abelian group together with a map from the group to the order O or the field K.
A generator for the unit group of the order O or the maximal order of the quadatic field K.
The rank of the free part of the unit group of the order O or the maximal order of the quadatic field K, which equals 1 for real quadratic fields and 0 for imagnary quadratic fields.
The (absolute) degree of K over Q, or of the order O (as a Z-module), which is 2 for all quadratic fields and orders.
The discriminant of the quadratic field K or of an order O of K. If K=Q(sqrt(d)), with d squarefree, this returns d if d = 0, 1 mod 4, and 4d otherwise. For the order the discriminant equals f^2 times the field discriminant, where f is the index of O in the maximal order.
The finite part of the conductor of the quadratic field K. This is the smallest positive integer n such that K is contained in Q(zeta_n). It equals the absolute value of the discriminant.
The conductor of order O, which equals the index of O in the ring of integers of its field of fractions.
The regulator of the order O or the maximal order of the quadatic field K.
The signature of the quadratic field, that is, the number of real embeddings and the number of pairs of complex embeddings of K. So this function returns either 2, 0 or 0, 1 depending on whether the field is real or imaginary quadratic.
The predicates listed below are available both for quadratic fields and for their orders.