GAP Manual: 56.1. RequirePackage

RequirePackage( name )

RequirePackage will try to initialize the share library name. If the package name is not installed at your site RequirePackage will signal an error. If the package name is already initialized RequirePackage simply returns without any further actions.

    gap> CartanMat( "A", 4 );
    Error, Variable: 'CartanMat' must have a value
    gap> ?Cartan
        'CartanMat( <type>, <n> )'

        returns the Cartan matrix of Dynkin type <type> and rank <n>.

            gap> CartanMat( "F", 4 );
            [ [  2, -1,  0,  0 ],
              [ -1,  2, -1,  0 ],
              [  0, -2,  2, -1 ],
              [  0,  0, -1,  2 ] ]

        This function requires the package  "weyl"  (see "RequirePackage").

    # on some system <name> is case-sensitive, so watch out for typos
    gap> RequirePackage( "Weyl" );
    Error, share library "Weyl" is not installed
    gap> RequirePackage( "weyl" );
    gap> CartanMat( "A", 4 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0 ],
      [  -1,   2,  -1,   0 ],
      [   0,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]

[next] ~~~ [up]