This file is indexed.

/usr/share/gap/lib/addmagma.gd is in gap-libs 4r7p9-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
#############################################################################
##
#W  addmagma.gd                 GAP library                     Thomas Breuer
##
##
#Y  Copyright (C)  1996,  Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file declares the operations for additive magmas,
##  Note that the meaning of generators for the three categories
##  additive magma, additive-magma-with-zero,
##  and additive-magma-with-inverses is different.
##


#############################################################################
##
#C  IsNearAdditiveMagma( <obj> )
##
##  <#GAPDoc Label="IsNearAdditiveMagma">
##  <ManSection>
##  <Filt Name="IsNearAdditiveMagma" Arg='obj' Type='Category'/>
##
##  <Description>
##  A <E>near-additive magma</E> in &GAP; is a domain <M>A</M>
##  with an associative but not necessarily commutative addition
##  <C>+</C><M>: A \times A \rightarrow A</M>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory( "IsNearAdditiveMagma",
    IsDomain and IsNearAdditiveElementCollection );


#############################################################################
##
#C  IsNearAdditiveMagmaWithZero( <obj> )
##
##  <#GAPDoc Label="IsNearAdditiveMagmaWithZero">
##  <ManSection>
##  <Filt Name="IsNearAdditiveMagmaWithZero" Arg='obj' Type='Category'/>
##
##  <Description>
##  A <E>near-additive magma-with-zero</E> in &GAP; is a near-additive magma
##  <M>A</M> with an operation <C>0*</C> (or <Ref Func="Zero"/>)
##  that yields the zero element of <M>A</M>.
##  <P/>
##  So a near-additive magma-with-zero <A>A</A> does always contain a unique
##  additively neutral element <M>z</M>,
##  i.e., <M>z + a = a = a + z</M> holds for all <M>a \in A</M>
##  (see&nbsp;<Ref Func="AdditiveNeutralElement"/>).
##  This zero element <M>z</M> can be computed with the operation
##  <Ref Func="Zero"/>, by applying this function to <M>A</M> or to any
##  element <M>a</M> in <M>A</M>.
##  The zero element can be computed also as <C>0 * </C><M>a</M>,
##  for any <M>a</M> in <M>A</M>.
##  <P/>
##  <E>Note</E> that it may happen that
##  a near-additive magma containing a zero does <E>not</E> lie in the
##  category <Ref Func="IsNearAdditiveMagmaWithZero"/>
##  (see&nbsp;<Ref Sect="Domain Categories"/>).
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory( "IsNearAdditiveMagmaWithZero",
    IsNearAdditiveMagma and IsNearAdditiveElementWithZeroCollection );


#############################################################################
##
#C  IsNearAdditiveGroup( <obj> )
#C  IsNearAdditiveMagmaWithInverses( <obj> )
##
##  <#GAPDoc Label="IsNearAdditiveGroup">
##  <ManSection>
##  <Filt Name="IsNearAdditiveGroup" Arg='obj' Type='Category'/>
##  <Filt Name="IsNearAdditiveMagmaWithInverses" Arg='obj' Type='Category'/>
##
##  <Description>
##  A <E>near-additive group</E> in &GAP; is a near-additive magma-with-zero
##  <M>A</M> with an operation <C>-1*</C><M>: A \rightarrow A</M> that maps
##  each element <M>a</M> of <M>A</M> to its additive inverse
##  <C>-1*</C><M>a</M> (or <C>AdditiveInverse( </C><A>a</A><C> )</C>,
##  see&nbsp;<Ref Func="AdditiveInverse"/>).
##  <P/>
##  The addition <C>+</C> of <M>A</M> is assumed to be associative,
##  so a near-additive group is not more than a
##  <E>near-additive magma-with-inverses</E>.
##  <Ref Func="IsNearAdditiveMagmaWithInverses"/> is just a synonym for
##  <Ref Func="IsNearAdditiveGroup"/>,
##  and can be used alternatively in all function names involving the string
##  <C>"NearAdditiveGroup"</C>.
##  <P/>
##  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.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory( "IsNearAdditiveGroup",
        IsNearAdditiveMagmaWithZero
    and IsNearAdditiveElementWithInverseCollection );

DeclareSynonym( "IsNearAdditiveMagmaWithInverses", IsNearAdditiveGroup );


#############################################################################
##
#P  IsAdditivelyCommutative( <A> )
##
##  <#GAPDoc Label="IsAdditivelyCommutative">
##  <ManSection>
##  <Prop Name="IsAdditivelyCommutative" Arg='A'/>
##
##  <Description>
##  A near-additive magma <A>A</A> in &GAP; is <E>additively commutative</E>
##  if for all elements <M>a, b \in <A>A</A></M> the equality
##  <M>a + b = b + a</M> holds.
##  <P/>
##  Note that the commutativity of the <E>multiplication</E> <C>*</C> in a
##  multiplicative structure can be tested with <Ref Func="IsCommutative"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareProperty( "IsAdditivelyCommutative", IsNearAdditiveMagma );

InstallTrueMethod( IsAdditivelyCommutative,
    IsAdditivelyCommutativeElementCollection and IsMagma );

InstallSubsetMaintenance( IsAdditivelyCommutative,
    IsNearAdditiveMagma and IsAdditivelyCommutative, IsNearAdditiveMagma );

InstallFactorMaintenance( IsAdditivelyCommutative,
    IsNearAdditiveMagma and IsAdditivelyCommutative,
    IsObject, IsNearAdditiveMagma );

InstallTrueMethod( IsAdditivelyCommutative,
    IsNearAdditiveMagma and IsTrivial );


InstallTrueMethod( IsAdditiveElementCollection,
    IsNearAdditiveElementCollection and IsAdditivelyCommutative );
InstallTrueMethod( IsAdditiveElementWithZeroCollection,
    IsNearAdditiveElementWithZeroCollection and IsAdditivelyCommutative );
InstallTrueMethod( IsAdditiveElementWithInverseCollection,
        IsNearAdditiveElementWithInverseCollection
    and IsAdditivelyCommutative );


#############################################################################
##
#C  IsAdditiveMagma( <obj> )
##
##  <#GAPDoc Label="IsAdditiveMagma">
##  <ManSection>
##  <Filt Name="IsAdditiveMagma" Arg='obj' Type='Category'/>
##
##  <Description>
##  An <E>additive magma</E> in &GAP; is a domain <M>A</M> with an
##  associative and commutative addition
##  <C>+</C><M>: A \times A \rightarrow A</M>,
##  see&nbsp;<Ref Func="IsNearAdditiveMagma"/> and
##  <Ref Func="IsAdditivelyCommutative"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareSynonym( "IsAdditiveMagma",
    IsNearAdditiveMagma and IsAdditivelyCommutative );


#############################################################################
##
#C  IsAdditiveMagmaWithZero( <obj> )
##
##  <#GAPDoc Label="IsAdditiveMagmaWithZero">
##  <ManSection>
##  <Filt Name="IsAdditiveMagmaWithZero" Arg='obj' Type='Category'/>
##
##  <Description>
##  An <E>additive magma-with-zero</E> in &GAP; is an additive magma <M>A</M>
##  (see <Ref Func="IsAdditiveMagma"/> with an operation <C>0*</C>
##  (or <Ref Func="Zero"/>) that yields the zero of <M>A</M>.
##  <P/>
##  So an additive magma-with-zero <M>A</M> does always contain a unique
##  additively neutral element <M>z</M>, i.e.,
##  <M>z + a = a = a + z</M> holds for all <M>a \in A</M>
##  (see&nbsp;<Ref Func="AdditiveNeutralElement"/>).
##  This element <M>z</M> can be computed with the operation
##  <Ref Func="Zero"/> as <C>Zero( </C><M>A</M><C> )</C>,
##  and <M>z</M> is also equal to <C>Zero( </C><M>a</M><C> )</C> and to
##  <C>0*</C><M>a</M> for each element <M>a</M> in <M>A</M>.
##  <P/>
##  <E>Note</E> that it may happen that
##  an additive magma containing a zero does <E>not</E> lie in the category
##  <Ref Func="IsAdditiveMagmaWithZero"/>
##  (see&nbsp;<Ref Sect="Domain Categories"/>).
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareSynonym( "IsAdditiveMagmaWithZero",
    IsNearAdditiveMagmaWithZero and IsAdditiveMagma );


#############################################################################
##
#C  IsAdditiveGroup( <obj> )
#C  IsAdditiveMagmaWithInverses( <obj> )
##
##  <#GAPDoc Label="IsAdditiveGroup">
##  <ManSection>
##  <Filt Name="IsAdditiveGroup" Arg='obj' Type='Category'/>
##  <Filt Name="IsAdditiveMagmaWithInverses" Arg='obj' Type='Category'/>
##
##  <Description>
##  An <E>additive group</E> in &GAP; is an additive magma-with-zero <M>A</M>
##  with an operation <C>-1*</C><M>: A \rightarrow A</M> that maps
##  each element <M>a</M> of <M>A</M> to its additive inverse
##  <C>-1*</C><M>a</M> (or <C>AdditiveInverse( </C><M>a</M><C> )</C>,
##  see&nbsp;<Ref Func="AdditiveInverse"/>).
##  <P/>
##  The addition <C>+</C> of <M>A</M> is assumed to be commutative and
##  associative, so an additive group is not more than an
##  <E>additive magma-with-inverses</E>.
##  <Ref Func="IsAdditiveMagmaWithInverses"/> is just a synonym for
##  <Ref Func="IsAdditiveGroup"/>,
##  and can be used alternatively in all function names involving the string
##  <C>"AdditiveGroup"</C>.
##  <P/>
##  Note that not every trivial additive magma is an additive
##  magma-with-zero,
##  but every trivial additive magma-with-zero is an additive group.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareSynonym( "IsAdditiveGroup",
    IsNearAdditiveGroup and IsAdditiveMagma );

DeclareSynonym( "IsAdditiveMagmaWithInverses", IsAdditiveGroup );


#############################################################################
##
#A  Zero( <D> )
##
##  (see the description in `arith.gd')
##
DeclareAttribute( "Zero", IsDomain and IsAdditiveElementWithZeroCollection );


#############################################################################
##
#F  NearAdditiveMagma( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveMagma">
##  <ManSection>
##  <Func Name="NearAdditiveMagma" Arg='[Fam, ]gens'/>
##
##  <Description>
##  returns the (near-)additive magma <M>A</M> that is generated by the
##  elements in the list <A>gens</A>, that is,
##  the closure of <A>gens</A> under addition <C>+</C>.
##  The family <A>Fam</A> of <M>A</M> can be entered as first argument;
##  this is obligatory if <A>gens</A> is empty
##  (and hence also <M>A</M> is empty).
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "NearAdditiveMagma" );

DeclareSynonym( "AdditiveMagma", NearAdditiveMagma );


#############################################################################
##
#F  NearAdditiveMagmaWithZero( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveMagmaWithZero">
##  <ManSection>
##  <Func Name="NearAdditiveMagmaWithZero" Arg='[Fam, ]gens'/>
##
##  <Description>
##  returns the (near-)additive magma-with-zero <M>A</M> that is generated by
##  the elements in the list <A>gens</A>, that is,
##  the closure of <A>gens</A> under addition <C>+</C> and
##  <Ref Func="Zero"/>.
##  The family <A>Fam</A> of <M>A</M> can be entered as first argument;
##  this is obligatory if <A>gens</A> is empty
##  (and hence <M>A</M> is trivial).
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "NearAdditiveMagmaWithZero" );

DeclareSynonym( "AdditiveMagmaWithZero", NearAdditiveMagmaWithZero );


#############################################################################
##
#F  NearAdditiveGroup( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveGroup">
##  <ManSection>
##  <Func Name="NearAdditiveGroup" Arg='[Fam, ]gens'/>
##
##  <Description>
##  returns the (near-)additive group <M>A</M> that is generated by
##  the elements in the list <A>gens</A>, that is,
##  the closure of <A>gens</A> under addition <C>+</C>, <Ref Func="Zero"/>,
##  and <Ref Func="AdditiveInverse"/>.
##  The family <A>Fam</A> of <M>A</M> can be entered as first argument;
##  this is obligatory if <A>gens</A> is empty
##  (and hence <M>A</M> is trivial).
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "NearAdditiveGroup" );

DeclareSynonym( "AdditiveGroup", NearAdditiveGroup );
DeclareSynonym( "NearAdditiveMagmaWithInverses", NearAdditiveGroup );
DeclareSynonym( "AdditiveMagmaWithInverses", NearAdditiveGroup );


#############################################################################
##
#O  NearAdditiveMagmaByGenerators( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveMagmaByGenerators">
##  <ManSection>
##  <Oper Name="NearAdditiveMagmaByGenerators" Arg='[Fam, ]gens'/>
##
##  <Description>
##  An underlying operation for <Ref Func="NearAdditiveMagma"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "NearAdditiveMagmaByGenerators", [ IsCollection ] );

DeclareSynonym( "AdditiveMagmaByGenerators", NearAdditiveMagmaByGenerators );


#############################################################################
##
#O  NearAdditiveMagmaWithZeroByGenerators( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveMagmaWithZeroByGenerators">
##  <ManSection>
##  <Oper Name="NearAdditiveMagmaWithZeroByGenerators" Arg='[Fam, ]gens'/>
##
##  <Description>
##  An underlying operation for <Ref Func="NearAdditiveMagmaWithZero"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "NearAdditiveMagmaWithZeroByGenerators",
    [ IsCollection ] );

DeclareSynonym( "AdditiveMagmaWithZeroByGenerators",
    NearAdditiveMagmaWithZeroByGenerators );


#############################################################################
##
#O  NearAdditiveGroupByGenerators( [<Fam>, ]<gens> )
##
##  <#GAPDoc Label="NearAdditiveGroupByGenerators">
##  <ManSection>
##  <Oper Name="NearAdditiveGroupByGenerators" Arg='[Fam, ]gens'/>
##
##  <Description>
##  An underlying operation for <Ref Func="NearAdditiveGroup"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "NearAdditiveGroupByGenerators", [ IsCollection ] );

DeclareSynonym( "AdditiveGroupByGenerators",
    NearAdditiveGroupByGenerators );
DeclareSynonym( "NearAdditiveMagmaWithInversesByGenerators",
    NearAdditiveGroupByGenerators );
DeclareSynonym( "AdditiveMagmaWithInversesByGenerators",
    NearAdditiveGroupByGenerators );


#############################################################################
##
#F  SubnearAdditiveMagma( <D>, <gens> )
#F  SubnearAdditiveMagma( <D>, <gens> )
#F  SubadditiveMagmaNC( <D>, <gens> )
#F  SubadditiveMagmaNC( <D>, <gens> )
##
##  <#GAPDoc Label="SubnearAdditiveMagma">
##  <ManSection>
##  <Func Name="SubnearAdditiveMagma" Arg='D, gens'/>
##  <Func Name="SubadditiveMagma" Arg='D, gens'/>
##  <Func Name="SubnearAdditiveMagmaNC" Arg='D, gens'/>
##  <Func Name="SubadditiveMagmaNC" Arg='D, gens'/>
##
##  <Description>
##  <Ref Func="SubnearAdditiveMagma"/> returns the near-additive magma
##  generated by the elements in the list <A>gens</A>,
##  with parent the domain <A>D</A>.
##  <Ref Func="SubnearAdditiveMagmaNC"/> does the same, except that it
##  does not check whether the elements of <A>gens</A> lie in <A>D</A>.
##  <P/>
##  <Ref Func="SubadditiveMagma"/> and <Ref Func="SubadditiveMagmaNC"/>
##  are just synonyms of these functions.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "SubnearAdditiveMagma" );

DeclareGlobalFunction( "SubnearAdditiveMagmaNC" );

DeclareSynonym( "SubadditiveMagma", SubnearAdditiveMagma );
DeclareSynonym( "SubadditiveMagmaNC", SubnearAdditiveMagmaNC );


#############################################################################
##
#F  SubnearAdditiveMagmaWithZero( <D>, <gens> )
#F  SubnearAdditiveMagmaWithZeroNC( <D>, <gens> )
##
##  <#GAPDoc Label="SubnearAdditiveMagmaWithZero">
##  <ManSection>
##  <Func Name="SubnearAdditiveMagmaWithZero" Arg='D, gens'/>
##  <Func Name="SubadditiveMagmaWithZero" Arg='D, gens'/>
##  <Func Name="SubnearAdditiveMagmaWithZeroNC" Arg='D, gens'/>
##  <Func Name="SubadditiveMagmaWithZeroNC" Arg='D, gens'/>
##
##  <Description>
##  <Ref Func="SubnearAdditiveMagmaWithZero"/> returns the near-additive
##  magma-with-zero generated by the elements in the list <A>gens</A>,
##  with parent the domain <A>D</A>.
##  <Ref Func="SubnearAdditiveMagmaWithZeroNC"/> does the same, except that
##  it does not check whether the elements of <A>gens</A> lie in <A>D</A>.
##  <P/>
##  <Ref Func="SubadditiveMagmaWithZero"/> and
##  <Ref Func="SubadditiveMagmaWithZeroNC"/>
##  are just synonyms of these functions.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "SubnearAdditiveMagmaWithZero" );

DeclareGlobalFunction( "SubnearAdditiveMagmaWithZeroNC" );

DeclareSynonym( "SubadditiveMagmaWithZero", SubnearAdditiveMagmaWithZero );
DeclareSynonym( "SubadditiveMagmaWithZeroNC",
    SubnearAdditiveMagmaWithZeroNC );


#############################################################################
##
#F  SubnearAdditiveGroup( <D>, <gens> )
#F  SubnearAdditiveGroupNC( <D>, <gens> )
##
##  <#GAPDoc Label="SubnearAdditiveGroup">
##  <ManSection>
##  <Func Name="SubnearAdditiveGroup" Arg='D, gens'/>
##  <Func Name="SubadditiveGroup" Arg='D, gens'/>
##  <Func Name="SubnearAdditiveGroupNC" Arg='D, gens'/>
##  <Func Name="SubadditiveGroupNC" Arg='D, gens'/>
##
##  <Description>
##  <Ref Func="SubnearAdditiveGroup"/> returns the near-additive group
##  generated by the elements in the list <A>gens</A>,
##  with parent the domain <A>D</A>.
##  <Ref Func="SubadditiveGroupNC"/> does the same, except that it does not
##  check whether the elements of <A>gens</A> lie in <A>D</A>.
##  <P/>
##  <Ref Func="SubadditiveGroup"/> and <Ref Func="SubadditiveGroupNC"/>
##  are just synonyms of these functions.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "SubnearAdditiveGroup" );

DeclareGlobalFunction( "SubnearAdditiveGroupNC" );

DeclareSynonym( "SubadditiveGroup", SubnearAdditiveGroup );
DeclareSynonym( "SubnearAdditiveMagmaWithInverses", SubnearAdditiveGroup );
DeclareSynonym( "SubadditiveMagmaWithInverses", SubnearAdditiveGroup );

DeclareSynonym( "SubadditiveGroupNC", SubnearAdditiveGroupNC );
DeclareSynonym( "SubnearAdditiveMagmaWithInversesNC",
    SubnearAdditiveGroupNC );
DeclareSynonym( "SubadditiveMagmaWithInversesNC", SubnearAdditiveGroupNC );


#############################################################################
##
#A  GeneratorsOfNearAdditiveMagma( <A> )
#A  GeneratorsOfAdditiveMagma( <A> )
##
##  <#GAPDoc Label="GeneratorsOfNearAdditiveMagma">
##  <ManSection>
##  <Attr Name="GeneratorsOfNearAdditiveMagma" Arg='A'/>
##  <Attr Name="GeneratorsOfAdditiveMagma" Arg='A'/>
##
##  <Description>
##  is a list of elements of the near-additive magma <A>A</A>
##  that generates <A>A</A> as a near-additive magma,
##  that is, the closure of this list under addition is <A>A</A>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "GeneratorsOfNearAdditiveMagma", IsNearAdditiveMagma );

DeclareSynonymAttr( "GeneratorsOfAdditiveMagma",
    GeneratorsOfNearAdditiveMagma );


#############################################################################
##
#A  GeneratorsOfNearAdditiveMagmaWithZero( <A> )
#A  GeneratorsOfAdditiveMagmaWithZero( <A> )
##
##  <#GAPDoc Label="GeneratorsOfNearAdditiveMagmaWithZero">
##  <ManSection>
##  <Attr Name="GeneratorsOfNearAdditiveMagmaWithZero" Arg='A'/>
##  <Attr Name="GeneratorsOfAdditiveMagmaWithZero" Arg='A'/>
##
##  <Description>
##  is a list of elements of the near-additive magma-with-zero
##  <A>A</A> that generates <A>A</A> as a near-additive magma-with-zero,
##  that is,
##  the closure of this list under addition and <Ref Func="Zero"/>
##  is <A>A</A>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "GeneratorsOfNearAdditiveMagmaWithZero",
    IsNearAdditiveMagmaWithZero );

DeclareSynonymAttr( "GeneratorsOfAdditiveMagmaWithZero",
    GeneratorsOfNearAdditiveMagmaWithZero );


#############################################################################
##
#A  GeneratorsOfNearAdditiveGroup( <A> )
#A  GeneratorsOfAdditiveGroup( <A> )
##
##  <#GAPDoc Label="GeneratorsOfNearAdditiveGroup">
##  <ManSection>
##  <Attr Name="GeneratorsOfNearAdditiveGroup" Arg='A'/>
##  <Attr Name="GeneratorsOfAdditiveGroup" Arg='A'/>
##
##  <Description>
##  is a list of elements of the near-additive group <A>A</A>
##  that generates <A>A</A> as a near-additive group,
##  that is, the closure of this list under addition,
##  taking the zero element, and taking additive inverses
##  (see&nbsp;<Ref Func="AdditiveInverse"/>) is <A>A</A>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "GeneratorsOfNearAdditiveGroup", IsNearAdditiveGroup );

DeclareSynonymAttr( "GeneratorsOfAdditiveMagmaWithInverses",
    GeneratorsOfNearAdditiveGroup );
DeclareSynonymAttr( "GeneratorsOfNearAdditiveMagmaWithInverses",
    GeneratorsOfNearAdditiveGroup );
DeclareSynonymAttr( "GeneratorsOfAdditiveGroup",
    GeneratorsOfNearAdditiveGroup );


#############################################################################
##
#A  TrivialSubnearAdditiveMagmaWithZero( <A> )
##
##  <#GAPDoc Label="TrivialSubnearAdditiveMagmaWithZero">
##  <ManSection>
##  <Attr Name="TrivialSubnearAdditiveMagmaWithZero" Arg='A'/>
##
##  <Description>
##  is the additive magma-with-zero that has the zero of
##  the near-additive magma-with-zero <A>A</A> as its only element.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "TrivialSubnearAdditiveMagmaWithZero",
    IsNearAdditiveMagmaWithZero );

DeclareSynonymAttr( "TrivialSubadditiveMagmaWithZero",
    TrivialSubnearAdditiveMagmaWithZero );


#############################################################################
##
#A  AdditiveNeutralElement( <A> )
##
##  <#GAPDoc Label="AdditiveNeutralElement">
##  <ManSection>
##  <Attr Name="AdditiveNeutralElement" Arg='A'/>
##
##  <Description>
##  returns the element <M>z</M> in the near-additive magma <A>A</A>
##  with the property that <M>z + a = a = a + z</M> holds for all
##  <M>a \in</M> <A>A</A>, if such an element exists.
##  Otherwise <K>fail</K> is returned.
##  <P/>
##  A near-additive magma that is not a near-additive magma-with-zero
##  can have an additive neutral element <M>z</M>;
##  in this case, <M>z</M> <E>cannot</E> be obtained as
##  <C>Zero( <A>A</A> )</C> or as <C>0*</C><M>a</M>
##  for an element <M>a</M> in <A>A</A>, see&nbsp;<Ref Func="Zero"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "AdditiveNeutralElement", IsNearAdditiveMagma );


#############################################################################
##
#O  ClosureNearAdditiveGroup( <A>, <a> )  . . for near-add. group and element
#O  ClosureNearAdditiveGroup( <A>, <B> )  . . . . .  for two near-add. groups
##
##  <#GAPDoc Label="ClosureNearAdditiveGroup">
##  <ManSection>
##  <Heading>ClosureNearAdditiveGroup</Heading>
##  <Oper Name="ClosureNearAdditiveGroup" Arg='A, a'
##   Label="for a near-additive group and an element"/>
##  <Oper Name="ClosureNearAdditiveGroup" Arg='A, B'
##   Label="for two near-additive groups"/>
##
##  <Description>
##  returns the closure of the near-additive magma <A>A</A> with the element
##  <A>a</A> or with the near-additive magma <A>B</A>, w.r.t.&nbsp;addition,
##  taking the zero element, and taking additive inverses.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "ClosureNearAdditiveGroup",
    [ IsNearAdditiveGroup, IsNearAdditiveElement ] );

DeclareSynonym( "ClosureNearAdditiveMagmaWithInverses",
    ClosureNearAdditiveGroup );
DeclareSynonym( "ClosureAdditiveGroup",
    ClosureNearAdditiveGroup );
DeclareSynonym( "ClosureAdditiveMagmaWithInverses",
    ClosureNearAdditiveGroup );


#############################################################################
##
#E