/usr/share/axiom-20170501/src/algebra/SGROUP.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 28 29 30 31 | )abbrev category SGROUP SemiGroup
++ Description:
++ the class of all multiplicative semigroups, that is, a set
++ with an associative operation \spadop{*}.
++
++ Axioms\br
++ \tab{5}\spad{associative("*":(%,%)->%)}\tab{5}\spad{(x*y)*z = x*(y*z)}
++
++ Conditional attributes\br
++ \tab{5}\spad{commutative("*":(%,%)->%)}\tab{5}\spad{x*y = y*x}
SemiGroup() : Category == SIG where
SIG ==> SetCategory with
"*" : (%,%) -> %
++ x*y returns the product of x and y.
"**" : (%,PositiveInteger) -> %
++ x**n returns the repeated product of x n times, exponentiation.
"^" : (%,PositiveInteger) -> %
++ x^n returns the repeated product of x n times, exponentiation.
add
import RepeatedSquaring(%)
x:% ** n:PositiveInteger == expt(x,n)
_^(x:%, n:PositiveInteger):% == x ** n
|