<!-- #################################################################### -->
<!-- ##                                                                ## -->
<!-- ##  z_pi.xml        ResClasses documentation         Stefan Kohl  ## -->
<!-- ##                                                                ## -->
<!-- ##  $Id: z_pi.xml,v 1.14 2005/02/28 17:00:28 stefan Exp $         ## -->
<!-- ##                                                                ## -->
<!-- #################################################################### -->

<Chapter Label="ch:Z_pi">
<Heading>Semilocalizations of the Integers</Heading>

In the following the semilocalizations <M>\Z_{(\pi)}</M> of the ring
of integers are needed as base rings for unions of residue classes.
Since these rings are not already implemented as domains in the &GAP;
library, they had to be implemented in this package. 

<!-- #################################################################### -->

<Section Label="sec:DefiningZ_pi">
<Heading>Entering semilocalizations of the integers</Heading>

<ManSection>
  <Func Name="Z_pi" Arg="pi" Label="pi"/>
  <Func Name="Z_pi" Arg="p" Label="pi"/>
  <Returns> The ring <M>\Z_{(\pi)}</M>. </Returns>
  <Description>
    The function also accepts a single prime <A>p</A> instead of the
    one-element list <C><A>pi</A> = [ <A>p</A> ]</C> as argument.
<Example>
<![CDATA[
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 )
]]>
</Example>
  </Description>
</ManSection>

<ManSection>
  <Prop Name="IsZ_pi" Arg="R" Label="R"/>
  <Returns>
    <C>true</C> if <A>R</A> is a ring <M>\Z_{(\pi)}</M> for some
    set of primes&nbsp;<M>\pi</M> and <C>false</C> otherwise.
  </Returns>
</ManSection>

<ManSection>
  <Attr Name="NoninvertiblePrimes" Arg="R" Label="R"/>
  <Returns>
    The set of noninvertible primes&nbsp;<A>pi</A>
    in the semilocalization&nbsp;<A>R</A> of the integers.
  </Returns>
</ManSection>

</Section>

<!-- #################################################################### -->

<Section Label="sec:MethodsForZ_pi">
<Heading>Methods for semilocalizations of the integers</Heading>

There are methods for the operations <C>in</C>, <C>Intersection</C>,
<C>IsSubset</C>, <C>StandardAssociate</C>, <C>Gcd</C>, <C>Lcm</C>,
<C>Factors</C> and <C>IsUnit</C> available for semilocalizations of the
integers. For the documentation of these operations, see the &GAP;
reference manual. The standard associate of an element of a ring
<M>\Z_{(\pi)}</M> is defined by the product of the non-invertible prime
factors of its numerator.

<Example>
<![CDATA[
gap> 4/7 in R;
true
gap> 3/2 in R;
false
gap> U := Intersection(R,S,T);
Z_( 2, 3, 5, 7, 11 )
gap> IsSubset(R,U);
true
gap> StandardAssociate(R,-6/7);
2
gap> Gcd(S,90/3,60/17,120/33);
10
gap> Lcm(S,90/3,60/17,120/33);
40
gap> Factors(R,840);
[ 105, 2, 2, 2 ]
gap> Factors(R,-2/3);
[ -1/3, 2 ]
gap> IsUnit(S,3/11);
true
]]>
</Example>

<Alt Only="HTML">&nbsp;</Alt>

</Section>

<!-- #################################################################### -->

</Chapter>

<!-- #################################################################### -->
