/usr/share/gap/lib/boolean.g is in gap-libs 4r6p5-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 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 | #############################################################################
##
#W boolean.g GAP library Thomas Breuer
#W & Frank Celler
##
##
#Y Copyright (C) 1997, 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 deals with booleans.
##
#############################################################################
##
#C IsBool(<obj>) . . . . . . . . . . . . . . . . . . . category of booleans
##
## <#GAPDoc Label="IsBool">
## <ManSection>
## <Filt Name="IsBool" Arg='obj' Type='Category'/>
##
## <Description>
## tests whether <A>obj</A> is <K>true</K>, <K>false</K> or <K>fail</K>.
## <Example><![CDATA[
## gap> IsBool( true ); IsBool( false ); IsBool( 17 );
## true
## true
## false
## ]]></Example>
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareCategoryKernel( "IsBool", IsObject, IS_BOOL );
#############################################################################
##
#V BooleanFamily . . . . . . . . . . . . . . . . . . . . family of booleans
##
## <ManSection>
## <Var Name="BooleanFamily"/>
##
## <Description>
## </Description>
## </ManSection>
##
BIND_GLOBAL( "BooleanFamily",
NewFamily( "BooleanFamily", IS_BOOL ) );
#############################################################################
##
#F TYPE_BOOL . . . . . . . . . . . . . . . . . . . type of internal booleans
##
## <ManSection>
## <Func Name="TYPE_BOOL" Arg='obj'/>
##
## <Description>
## </Description>
## </ManSection>
##
BIND_GLOBAL( "TYPE_BOOL",
NewType( BooleanFamily, IS_BOOL and IsInternalRep ) );
#############################################################################
##
#m String( <bool> ) . . . . . . . . . . . . . . . . . . . . . for a boolean
##
InstallMethod( String,
"for a boolean",
true,
[ IsBool ], 0,
function( bool )
if bool = true then
return "true";
elif bool = false then
return "false";
elif bool = fail then
return "fail";
else
Error( "unknown boolean <bool>" );
fi;
end );
#############################################################################
##
#E
|