Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

55 Additive Magmas
 55.1 (Near-)Additive Magma Categories
 55.2 (Near-)Additive Magma Generation
 55.3 Attributes and Properties for (Near-)Additive Magmas
 55.4 Operations for (Near-)Additive Magmas

55 Additive Magmas

This chapter deals with domains that are closed under addition +, which are called near-additive magmas in GAP. Together with the domains closed under multiplication * (see 35), they are the basic algebraic structures. In many cases, the addition is commutative (see IsAdditivelyCommutative (55.3-1)), the domain is called an additive magma then. Every module (see 57), vector space (see 61), ring (see 56), or field (see 58) is an additive magma. In the cases of all (near-)additive magma-with-zero or (near-)additive magma-with-inverses, additional additive structure is present (see 55.1).

55.1 (Near-)Additive Magma Categories

55.1-1 IsNearAdditiveMagma
‣ IsNearAdditiveMagma( obj )( category )

A near-additive magma in GAP is a domain A with an associative but not necessarily commutative addition +: A × A → A.

55.1-2 IsNearAdditiveMagmaWithZero
‣ IsNearAdditiveMagmaWithZero( obj )( category )

A near-additive magma-with-zero in GAP is a near-additive magma A with an operation 0* (or Zero (31.10-3)) that yields the zero element of A.

So a near-additive magma-with-zero A does always contain a unique additively neutral element z, i.e., z + a = a = a + z holds for all a ∈ A (see AdditiveNeutralElement (55.3-5)). This zero element z can be computed with the operation Zero (31.10-3), by applying this function to A or to any element a in A. The zero element can be computed also as 0 * a, for any a in A.

Note that it may happen that a near-additive magma containing a zero does not lie in the category IsNearAdditiveMagmaWithZero (see 31.6).

55.1-3 IsNearAdditiveGroup
‣ IsNearAdditiveGroup( obj )( category )
‣ IsNearAdditiveMagmaWithInverses( obj )( category )

A near-additive group in GAP is a near-additive magma-with-zero A with an operation -1*: A → A that maps each element a of A to its additive inverse -1*a (or AdditiveInverse( a ), see AdditiveInverse (31.10-9)).

The addition + of A is assumed to be associative, so a near-additive group is not more than a near-additive magma-with-inverses. IsNearAdditiveMagmaWithInverses is just a synonym for IsNearAdditiveGroup, and can be used alternatively in all function names involving the string "NearAdditiveGroup".

Note that not every trivial near-additive magma is a near-additive magma-with-zero, but every trivial near-additive magma-with-zero is a near-additive group.

55.1-4 IsAdditiveMagma
‣ IsAdditiveMagma( obj )( category )

An additive magma in GAP is a domain A with an associative and commutative addition +: A × A → A, see IsNearAdditiveMagma (55.1-1) and IsAdditivelyCommutative (55.3-1).

55.1-5 IsAdditiveMagmaWithZero
‣ IsAdditiveMagmaWithZero( obj )( category )

An additive magma-with-zero in GAP is an additive magma A (see IsAdditiveMagma (55.1-4) with an operation 0* (or Zero (31.10-3)) that yields the zero of A.

So an additive magma-with-zero A does always contain a unique additively neutral element z, i.e., z + a = a = a + z holds for all a ∈ A (see AdditiveNeutralElement (55.3-5)). This element z can be computed with the operation Zero (31.10-3) as Zero( A ), and z is also equal to Zero( a ) and to 0*a for each element a in A.

Note that it may happen that an additive magma containing a zero does not lie in the category IsAdditiveMagmaWithZero (see 31.6).

55.1-6 IsAdditiveGroup
‣ IsAdditiveGroup( obj )( category )
‣ IsAdditiveMagmaWithInverses( obj )( category )

An additive group in GAP is an additive magma-with-zero A with an operation -1*: A → A that maps each element a of A to its additive inverse -1*a (or AdditiveInverse( a ), see AdditiveInverse (31.10-9)).

The addition + of A is assumed to be commutative and associative, so an additive group is not more than an additive magma-with-inverses. IsAdditiveMagmaWithInverses is just a synonym for IsAdditiveGroup, and can be used alternatively in all function names involving the string "AdditiveGroup".

Note that not every trivial additive magma is an additive magma-with-zero, but every trivial additive magma-with-zero is an additive group.

55.2 (Near-)Additive Magma Generation

This section describes functions that create additive magmas from generators (see NearAdditiveMagma (55.2-1), NearAdditiveMagmaWithZero (55.2-2), NearAdditiveGroup (55.2-3)), the underlying operations for which methods can be installed (see NearAdditiveMagmaByGenerators (55.2-4), NearAdditiveMagmaWithZeroByGenerators (55.2-5), NearAdditiveGroupByGenerators (55.2-6)) and functions for forming additive submagmas (see SubnearAdditiveMagma (55.2-7), SubnearAdditiveMagmaWithZero (55.2-8), SubnearAdditiveGroup (55.2-9)).

55.2-1 NearAdditiveMagma
‣ NearAdditiveMagma( [Fam, ]gens )( function )

returns the (near-)additive magma A that is generated by the elements in the list gens, that is, the closure of gens under addition +. The family Fam of A can be entered as first argument; this is obligatory if gens is empty (and hence also A is empty).

55.2-2 NearAdditiveMagmaWithZero
‣ NearAdditiveMagmaWithZero( [Fam, ]gens )( function )

returns the (near-)additive magma-with-zero A that is generated by the elements in the list gens, that is, the closure of gens under addition + and Zero (31.10-3). The family Fam of A can be entered as first argument; this is obligatory if gens is empty (and hence A is trivial).

55.2-3 NearAdditiveGroup
‣ NearAdditiveGroup( [Fam, ]gens )( function )

returns the (near-)additive group A that is generated by the elements in the list gens, that is, the closure of gens under addition +, Zero (31.10-3), and AdditiveInverse (31.10-9). The family Fam of A can be entered as first argument; this is obligatory if gens is empty (and hence A is trivial).

55.2-4 NearAdditiveMagmaByGenerators
‣ NearAdditiveMagmaByGenerators( [Fam, ]gens )( operation )

An underlying operation for NearAdditiveMagma (55.2-1).

55.2-5 NearAdditiveMagmaWithZeroByGenerators
‣ NearAdditiveMagmaWithZeroByGenerators( [Fam, ]gens )( operation )

An underlying operation for NearAdditiveMagmaWithZero (55.2-2).

55.2-6 NearAdditiveGroupByGenerators
‣ NearAdditiveGroupByGenerators( [Fam, ]gens )( operation )

An underlying operation for NearAdditiveGroup (55.2-3).

55.2-7 SubnearAdditiveMagma
‣ SubnearAdditiveMagma( D, gens )( function )
‣ SubadditiveMagma( D, gens )( function )
‣ SubnearAdditiveMagmaNC( D, gens )( function )
‣ SubadditiveMagmaNC( D, gens )( function )

SubnearAdditiveMagma returns the near-additive magma generated by the elements in the list gens, with parent the domain D. SubnearAdditiveMagmaNC does the same, except that it does not check whether the elements of gens lie in D.

SubadditiveMagma and SubadditiveMagmaNC are just synonyms of these functions.

55.2-8 SubnearAdditiveMagmaWithZero
‣ SubnearAdditiveMagmaWithZero( D, gens )( function )
‣ SubadditiveMagmaWithZero( D, gens )( function )
‣ SubnearAdditiveMagmaWithZeroNC( D, gens )( function )
‣ SubadditiveMagmaWithZeroNC( D, gens )( function )

SubnearAdditiveMagmaWithZero returns the near-additive magma-with-zero generated by the elements in the list gens, with parent the domain D. SubnearAdditiveMagmaWithZeroNC does the same, except that it does not check whether the elements of gens lie in D.

SubadditiveMagmaWithZero and SubadditiveMagmaWithZeroNC are just synonyms of these functions.

55.2-9 SubnearAdditiveGroup
‣ SubnearAdditiveGroup( D, gens )( function )
‣ SubadditiveGroup( D, gens )( function )
‣ SubnearAdditiveGroupNC( D, gens )( function )
‣ SubadditiveGroupNC( D, gens )( function )

SubnearAdditiveGroup returns the near-additive group generated by the elements in the list gens, with parent the domain D. SubadditiveGroupNC does the same, except that it does not check whether the elements of gens lie in D.

SubadditiveGroup and SubadditiveGroupNC are just synonyms of these functions.

55.3 Attributes and Properties for (Near-)Additive Magmas

55.3-1 IsAdditivelyCommutative
‣ IsAdditivelyCommutative( A )( property )

A near-additive magma A in GAP is additively commutative if for all elements a, b ∈ A the equality a + b = b + a holds.

Note that the commutativity of the multiplication * in a multiplicative structure can be tested with IsCommutative (35.4-9).

55.3-2 GeneratorsOfNearAdditiveMagma
‣ GeneratorsOfNearAdditiveMagma( A )( attribute )
‣ GeneratorsOfAdditiveMagma( A )( attribute )

is a list of elements of the near-additive magma A that generates A as a near-additive magma, that is, the closure of this list under addition is A.

55.3-3 GeneratorsOfNearAdditiveMagmaWithZero
‣ GeneratorsOfNearAdditiveMagmaWithZero( A )( attribute )
‣ GeneratorsOfAdditiveMagmaWithZero( A )( attribute )

is a list of elements of the near-additive magma-with-zero A that generates A as a near-additive magma-with-zero, that is, the closure of this list under addition and Zero (31.10-3) is A.

55.3-4 GeneratorsOfNearAdditiveGroup
‣ GeneratorsOfNearAdditiveGroup( A )( attribute )
‣ GeneratorsOfAdditiveGroup( A )( attribute )

is a list of elements of the near-additive group A that generates A as a near-additive group, that is, the closure of this list under addition, taking the zero element, and taking additive inverses (see AdditiveInverse (31.10-9)) is A.

55.3-5 AdditiveNeutralElement
‣ AdditiveNeutralElement( A )( attribute )

returns the element z in the near-additive magma A with the property that z + a = a = a + z holds for all a ∈ A, if such an element exists. Otherwise fail is returned.

A near-additive magma that is not a near-additive magma-with-zero can have an additive neutral element z; in this case, z cannot be obtained as Zero( A ) or as 0*a for an element a in A, see Zero (31.10-3).

55.3-6 TrivialSubnearAdditiveMagmaWithZero
‣ TrivialSubnearAdditiveMagmaWithZero( A )( attribute )

is the additive magma-with-zero that has the zero of the near-additive magma-with-zero A as its only element.

55.4 Operations for (Near-)Additive Magmas

55.4-1 ClosureNearAdditiveGroup
‣ ClosureNearAdditiveGroup( A, a )( operation )
‣ ClosureNearAdditiveGroup( A, B )( operation )

returns the closure of the near-additive magma A with the element a or with the near-additive magma B, w.r.t. addition, taking the zero element, and taking additive inverses.

55.4-2 ShowAdditionTable
‣ ShowAdditionTable( R )( function )
‣ ShowMultiplicationTable( M )( function )

For a structure R with an addition given by +, respectively a structure M with a multiplication given by *, this command displays the addition (multiplication) table of the structure in a pretty way.

gap> ShowAdditionTable(GF(4));
+        | 0*Z(2)   Z(2)^0   Z(2^2)   Z(2^2)^2
---------+------------------------------------
0*Z(2)   | 0*Z(2)   Z(2)^0   Z(2^2)   Z(2^2)^2
Z(2)^0   | Z(2)^0   0*Z(2)   Z(2^2)^2 Z(2^2)
Z(2^2)   | Z(2^2)   Z(2^2)^2 0*Z(2)   Z(2)^0
Z(2^2)^2 | Z(2^2)^2 Z(2^2)   Z(2)^0   0*Z(2)

gap> ShowMultiplicationTable(GF(4));
*        | 0*Z(2)   Z(2)^0   Z(2^2)   Z(2^2)^2
---------+------------------------------------
0*Z(2)   | 0*Z(2)   0*Z(2)   0*Z(2)   0*Z(2)
Z(2)^0   | 0*Z(2)   Z(2)^0   Z(2^2)   Z(2^2)^2
Z(2^2)   | 0*Z(2)   Z(2^2)   Z(2^2)^2 Z(2)^0
Z(2^2)^2 | 0*Z(2)   Z(2^2)^2 Z(2)^0   Z(2^2)

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind

generated by GAPDoc2HTML