<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  addmagma.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="Additive Magmas">
<Heading>Additive Magmas</Heading>

This chapter deals with domains that are closed under addition <C>+</C>,
which are called <E>near-additive magmas</E> in &GAP;.
Together with the domains closed under multiplication <C>*</C>
(see&nbsp;<Ref Chap="Magmas"/>),
they are the basic algebraic structures.
In many cases, the addition is commutative
(see&nbsp;<Ref Prop="IsAdditivelyCommutative"/>),
the domain is called an <E>additive magma</E> then.
Every module (see&nbsp;<Ref Chap="Modules"/>),
vector space (see&nbsp;<Ref Chap="Vector Spaces"/>),
ring (see&nbsp;<Ref Chap="Rings"/>),
or field (see&nbsp;<Ref Chap="Fields and Division Rings"/>)
is an additive magma.
In the cases of all <E>(near-)additive magma-with-zero</E> or
<E>(near-)additive magma-with-inverses</E>,
additional additive structure is present
(see&nbsp;<Ref Sect="(Near-)Additive Magma Categories"/>).


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="(Near-)Additive Magma Categories">
<Heading>(Near-)Additive Magma Categories</Heading>

<#Include Label="IsNearAdditiveMagma">
<#Include Label="IsNearAdditiveMagmaWithZero">
<#Include Label="IsNearAdditiveGroup">
<#Include Label="IsAdditiveMagma">
<#Include Label="IsAdditiveMagmaWithZero">
<#Include Label="IsAdditiveGroup">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="(Near-)Additive Magma Generation">
<Heading>(Near-)Additive Magma Generation</Heading>

This section describes
functions that create additive magmas from generators
(see <Ref Func="NearAdditiveMagma"/>,
<Ref Func="NearAdditiveMagmaWithZero"/>,
<Ref Func="NearAdditiveGroup"/>),
the underlying operations for which methods can be installed
(see <Ref Oper="NearAdditiveMagmaByGenerators"/>,
<Ref Oper="NearAdditiveMagmaWithZeroByGenerators"/>,
<Ref Oper="NearAdditiveGroupByGenerators"/>)
and functions for forming additive submagmas
(see <Ref Func="SubnearAdditiveMagma"/>,
<Ref Func="SubnearAdditiveMagmaWithZero"/>,
<Ref Func="SubnearAdditiveGroup"/>).

<#Include Label="NearAdditiveMagma">
<#Include Label="NearAdditiveMagmaWithZero">
<#Include Label="NearAdditiveGroup">
<#Include Label="NearAdditiveMagmaByGenerators">
<#Include Label="NearAdditiveMagmaWithZeroByGenerators">
<#Include Label="NearAdditiveGroupByGenerators">
<#Include Label="SubnearAdditiveMagma">
<#Include Label="SubnearAdditiveMagmaWithZero">
<#Include Label="SubnearAdditiveGroup">

<!-- %The following functions can be used to regard a collection as an additive -->
<!-- %magma. -->
<!-- % -->
<!-- %Declaration{AsAdditiveMagma} -->
<!-- %Declaration{AsSubadditiveMagma} -->

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Attributes and Properties for (Near-)Additive Magmas">
<Heading>Attributes and Properties for (Near-)Additive Magmas</Heading>

<#Include Label="IsAdditivelyCommutative">
<#Include Label="GeneratorsOfNearAdditiveMagma">
<#Include Label="GeneratorsOfNearAdditiveMagmaWithZero">
<#Include Label="GeneratorsOfNearAdditiveGroup">
<#Include Label="AdditiveNeutralElement">
<#Include Label="TrivialSubnearAdditiveMagmaWithZero">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operations for (Near-)Additive Magmas">
<Heading>Operations for (Near-)Additive Magmas</Heading>

<#Include Label="ClosureNearAdditiveGroup">
<#Include Label="ShowAdditionTable">

</Section>
</Chapter>


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

