/usr/share/axiom-20170501/src/algebra/PI.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 | )abbrev domain PI PositiveInteger
++ Author:
++ Description:
++ \spadtype{PositiveInteger} provides functions for positive integers.
PositiveInteger() : SIG == CODE where
SIG ==> Join(AbelianSemiGroup, OrderedSet, Monoid) with
gcd : (%, %) -> %
++ gcd(a, b) computes the greatest common divisor of two
++ positive integers \spad{a} and b.
commutative("*")
++ commutative("*") means multiplication is commutative : x*y = yu*x
qcoerce : Integer -> %
++ qcoerce(n) coerces \spad{n} to \spad{%} trusting that
++ \spad{n} is positive
CODE ==> SubDomain(NonNegativeInteger, #1 > 0) add
qcoerce(n) == n pretend %
|