/usr/share/axiom-20170501/src/algebra/INTRET.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 | )abbrev package INTRET IntegerRetractions
++ Author: Manuel Bronstein
++ Date Created: March 1990
++ Date Last Updated: 9 April 1991
++ Description:
++ Provides integer testing and retraction functions.
IntegerRetractions(S) : SIG == CODE where
S : RetractableTo(Integer)
SIG ==> with
integer : S -> Integer
++ integer(x) returns x as an integer;
++ error if x is not an integer;
integer? : S -> Boolean
++ integer?(x) is true if x is an integer, false otherwise;
integerIfCan : S -> Union(Integer, "failed")
++ integerIfCan(x) returns x as an integer,
++ "failed" if x is not an integer;
CODE ==> add
integer s == retract s
integer? s == retractIfCan(s) case Integer
integerIfCan s == retractIfCan s
|