<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  rings.xml                    GAP documentation              Thomas Breuer -->
<!-- %% -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Rings">
<Heading>Rings</Heading>

This chapter deals with domains that are additive groups
(see <Ref Filt="IsAdditiveGroup"/> closed under multiplication <C>*</C>.
Such a domain, if <C>*</C> and <C>+</C> are distributive,
is called a <E>ring</E> in &GAP;.
Each division ring, field (see&nbsp;<Ref Chap="Fields and Division Rings"/>),
or algebra (see&nbsp;<Ref Chap="Algebras"/>) is a ring.
Important examples of rings are the integers (see&nbsp;<Ref Chap="Integers"/>)
and matrix rings.
<!-- %(see&nbsp;<Ref Chap="???"/>). -->
<!-- % residue class rings ? -->
<P/>
In the case of a <E>ring-with-one</E>, additional multiplicative structure is
present, see&nbsp;<Ref Filt="IsRingWithOne"/>. There is a little support in &GAP;
for rings that have no additional structure: it is possible to perform some
computations for small finite rings; infinite rings are handled by &GAP; in 
an acceptable way in the case that they are algebras. 
<P/>
Also, the <Package>SONATA</Package> package provides support for near-rings,
and a related functionality for multiplicative semigroups of near-rings is
available in the <Package>Smallsemi</Package> package.
<P/>
Several functions for ring elements,
such as <Ref Oper="IsPrime"/> and <Ref Oper="Factors"/>,
are defined only relative to a ring <A>R</A>,
which can be entered as an optional argument;
if <A>R</A> is omitted then a <E>default ring</E> is formed
from the ring elements given as arguments,
see&nbsp;<Ref Func="DefaultRing" Label="for ring elements"/>.


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Generating Rings">
<Heading>Generating Rings</Heading>

<#Include Label="IsRing">
<#Include Label="Ring">
<#Include Label="DefaultRing">
<#Include Label="RingByGenerators">
<#Include Label="DefaultRingByGenerators">
<#Include Label="GeneratorsOfRing">
<!-- %W <#Include Label="AsRing"> -->
<#Include Label="Subring">
<#Include Label="ClosureRing">
<#Include Label="Quotient">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Ideals of Rings">
<Heading>Ideals of Rings</Heading>

<#Include Label="[1]{ideal}">
<#Include Label="TwoSidedIdeal">
<#Include Label="TwoSidedIdealNC">
<#Include Label="IsTwoSidedIdeal">
<#Include Label="TwoSidedIdealByGenerators">
<#Include Label="LeftIdealByGenerators">
<#Include Label="RightIdealByGenerators">
<#Include Label="GeneratorsOfTwoSidedIdeal">
<#Include Label="GeneratorsOfLeftIdeal">
<#Include Label="GeneratorsOfRightIdeal">
<#Include Label="LeftActingRingOfIdeal">
<#Include Label="AsLeftIdeal">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Rings With One">
<Heading>Rings With One</Heading>

<#Include Label="IsRingWithOne">
<#Include Label="RingWithOne">
<#Include Label="RingWithOneByGenerators">
<#Include Label="GeneratorsOfRingWithOne">
<#Include Label="SubringWithOne">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Properties of Rings">
<Heading>Properties of Rings</Heading>

<#Include Label="IsIntegralRing">
<#Include Label="IsUniqueFactorizationRing">
<#Include Label="IsLDistributive">
<#Include Label="IsRDistributive">
<#Include Label="IsDistributive">
<#Include Label="IsAnticommutative">
<#Include Label="IsZeroSquaredRing">
<#Include Label="IsJacobianRing">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Units and Factorizations">
<Heading>Units and Factorizations</Heading>

<#Include Label="IsUnit">
<#Include Label="Units">
<#Include Label="IsAssociated">
<#Include Label="Associates">
<#Include Label="StandardAssociate">
<#Include Label="StandardAssociateUnit">
<#Include Label="IsIrreducibleRingElement">
<#Include Label="IsPrime">
<#Include Label="Factors">
<#Include Label="PadicValuation">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Euclidean Rings">
<Heading>Euclidean Rings</Heading>

<#Include Label="IsEuclideanRing">
<#Include Label="EuclideanDegree">
<#Include Label="EuclideanQuotient">
<#Include Label="EuclideanRemainder">
<#Include Label="QuotientRemainder">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Gcd and Lcm">
<Heading>Gcd and Lcm</Heading>

<#Include Label="Gcd">
<#Include Label="GcdOp">
<#Include Label="GcdRepresentation">
<#Include Label="GcdRepresentationOp">
<#Include Label="ShowGcd">
<#Include Label="Lcm">
<#Include Label="LcmOp">
<#Include Label="QuotientMod">
<#Include Label="PowerMod">
<#Include Label="InterpolatedPolynomial">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Homomorphisms of Rings">
<Heading>Homomorphisms of Rings</Heading>

A <E>ring homomorphism</E> is a mapping between two rings
that respects addition and multiplication.

<P/>

Currently &GAP; supports ring homomorphisms between finite rings
(using straightforward methods)
and ring homomorphisms with additional structures,
where source and range are in fact algebras
and where also the linear structure is respected,
see <Ref Sect="Homomorphisms of Algebras"/>.

<#Include Label="RingGeneralMappingByImages">
<#Include Label="RingHomomorphismByImages">
<#Include Label="RingHomomorphismByImagesNC">
<!-- Are ring-with-one homomorphisms not supported? -->
<#Include Label="NaturalHomomorphismByIdeal">
</Section>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Small Rings">
<Heading>Small Rings</Heading>

&GAP; contains a library of small (order up to 15) rings.

<#Include Label="SmallRing">
<#Include Label="NumberSmallRings">
<#Include Label="Subrings">
<#Include Label="Ideals">
<#Include Label="DirectSum">
<#Include Label="RingByStructureConstants">


</Section>
</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->

