/usr/share/axiom-20170501/src/algebra/ABELSG.spad is in axiom-source 20170501-3.
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 | )abbrev category ABELSG AbelianSemiGroup
++ Description:
++ The class of all additive (commutative) semigroups, that is,
++ a set with a commutative and associative operation \spadop{+}.
++
++ Axioms\br
++ \tab{5}\spad{associative("+":(%,%)->%)}\tab{5}\spad{(x+y)+z = x+(y+z)}\br
++ \tab{6}\spad{commutative("+":(%,%)->%)}\tab{5}\spad{x+y = y+x}
AbelianSemiGroup() : Category == SIG where
SIG ==> SetCategory with
"+" : (%,%) -> %
++ x+y computes the sum of x and y.
"*" : (PositiveInteger,%) -> %
++ n*x computes the left-multiplication of x by the positive
++ integer n. This is equivalent to adding x to itself n times.
add
import RepeatedDoubling(%)
if not (% has Ring) then
n:PositiveInteger * x:% == double(n,x)
|