14.5 Set Functions for Gaussians

As already mentioned in the introduction of this chapter the objects GaussianRationals and GaussianIntegers are the domains of Gaussian rationals and integers respectively. All set theoretic functions, i.e., Size and Intersection, are applicable to these domains and their elements (see chapter Domains). There does not seem to be an important use of this however. All functions not mentioned here are not treated specially, i.e., they are implemented by the default function mentioned in the respective section.

in

The membership test for Gaussian rationals is implemented via IsGaussRat (IsGaussRat). The membership test for Gaussian integers is implemented via IsGaussInt (see IsGaussInt).

Random

A random Gaussian rational a + b*E(4) is computed by combining two random rationals a and b (see Set Functions for Rationals). Likewise a random Gaussian integer a + b*E(4) is computed by Set Functions for Integers).

    gap> Size( GaussianRationals );
    "infinity"
    gap> Intersection( GaussianIntegers, [1,1/2,E(4),-E(6),E(4)/3] );
    [ 1, E(4) ] 

Previous Up Top Next
Index

GAP 3.4.4
April 1997