2. Semilocalizations of the Integers
In the following we need the semilocalizations Z_(pi) of the ring of integers as base rings for unions of residue classes. Since these rings are not already implemented as domains in the GAP library, we had to implement them in this package.
2.1 Defining semilocalizations of the integers
2.1-1 Z_pi
Returns: the ring Z_(pi).
The function also accepts a single prime p instead of the one-element list pi = [ p ]
as argument.
gap> R := Z_pi(2);
Z_( 2 )
gap> S := Z_pi([2,5,7]);
Z_( 2, 5, 7 )
gap> T := Z_pi([3,11]);
Z_( 3, 11 )
|
2.1-2 IsZ_pi
> IsZ_pi ( R ) | ( property ) |
Indicates whether R is a ring Z_(pi) for some set of primes pi.
2.1-3 NoninvertiblePrimes
> NoninvertiblePrimes ( R ) | ( attribute ) |
The noninvertible primes pi in the semilocalization R of the integers.
2.2 Methods for semilocalizations of the integers
2.2-1 \in
Checks whether x is an element of the semilocalization R of the integers.
gap> 4/7 in R;
true
gap> 3/2 in R;
false
gap> 17/35 in S;
false
gap> 3/17 in S;
true
|
2.2-2 Intersection
> Intersection ( R, S ) | ( method ) |
Returns: the intersection of the semilocalizations R and S of the integers.
gap> U := Intersection(R,S,T);
Z_( 2, 3, 5, 7, 11 )
|
2.2-3 IsSubset
> IsSubset ( R, S ) | ( method ) |
Checks whether S is a subring of R, where R and S are semilocalizations of the integers.
gap> IsSubset(R,U);
true
gap> IsSubset(T,R);
false
|
2.2-4 StandardAssociate
> StandardAssociate ( R, x ) | ( method ) |
Returns: the standard associate of x in the semilocalization R of the integers.
We define the standard associate of an element of Z_(pi) by the product of the non-invertible prime factors of its numerator.
gap> StandardAssociate(R,-6/7);
2
gap> StandardAssociate(R,36/5);
4
gap> StandardAssociate(U,37/13);
1
gap> StandardAssociate(U,36/13);
36
|
2.2-5 GcdOp
> GcdOp ( R, x, y ) | ( method ) |
> Gcd ( R, x, y ) | ( method ) |
Returns: the greatest common divisor of x and y in the semilocalization R of the integers.
gap> GcdOp(S,-10/3,8/13);
2
gap> Gcd(S,90/3,60/17,120/33);
10
|
2.2-6 LcmOp
> LcmOp ( R, x, y ) | ( method ) |
> Lcm ( R, x, y ) | ( method ) |
Returns: the least common multiple of x and y in the semilocalization R of the integers.
gap> LcmOp(S,-10/3,8/13);
40
gap> Lcm(S,90/3,60/17,120/33);
40
|
2.2-7 Factors
> Factors ( R, x ) | ( method ) |
Returns: a prime factorization of x in the semilocalization R of the integers.
gap> Factors(U,840);
[ 2, 2, 2, 3, 5, 7 ]
gap> Factors(R,840);
[ 105, 2, 2, 2 ]
gap> Factors(R,-2/3);
[ -1/3, 2 ]
gap> Factors(S,60/17);
[ 3/17, 2, 2, 5 ]
|
2.2-8 IsUnit
> IsUnit ( R, x ) | ( method ) |
Checks whether x is a unit in the semilocalization R of the integers. The method returns fail
if x is not an element of R.
gap> IsUnit(S,3/11);
true
gap> IsUnit(T,-2);
true
gap> IsUnit(T,0);
false
gap> IsUnit(T,3);
false
gap> IsUnit(T,3/11);
fail
|