CoCoA:Alias

From ApCoCoAWiki

Alias

define aliases for package names

Description

This function is for declaring both global and local aliases for

package names. Recall that package names are meant to be long in

order to avoid conflicts between the names of functions that are read into a CoCoA session. However, it is inconvenient to have to type out the long package name when referencing a function. So the user chooses an alias to take the place of the package name; the alias is just a means to avoid typing. Aliases for packages that are routinely loaded, may be added to userinit.coc (see User Initialization).

1. Global aliases. To avoid typing the full package name as a prefix

to package functions, one may declare a short global alias during a

CoCoA session. A list of the global aliases is produced by the function <ttref>Aliases</ttref>. For examples, see the chapter on packages in the manual, in particular the section, Global Aliases. Online, enter ?global aliases.

2. Local aliases. A local alias has the same syntax as a global

alias, however it appears inside a package definition. The local

aliases work only inside the package and do not conflict with any global aliases already defined. In fact, in order to avoid conflicts, global aliases are not recognized within a package. For examples, again look in the chapter for packages.

Example

  Alias LL := $abcd;
  Aliases();

Coclib       = $coclib
Approx       = $approx
   ---&gt; Output suppressed &lt;---
TP           = $contrib/thmproving
TV           = $contrib/typevectors
LL           = $abcd
-------------------------------

Syntax

Alias B_1,..., B_r

where each B_i is a <em>binding</em> of the form: Identifier := $PackageName

Alias In

Aliases

Global Aliases

Introduction to Packages

Local Aliases

   <type>packages</type>