4.5 Interface to KASH

Module: sage.interfaces.kash

SAGE provides an interface to the KASH computer algebra system, which is a free (as in beer!) but closed source program for algebraic number theory that shares much common code with Magma. To use KASH, you must install the appropriate optional SAGE package by typing something like "sage -i kash3-linux-2005.11.22" or "sage -i kash3_osx-2005.11.22". For a list of optional packages type "sage -optional". If you type one of the above commands, the (about 16MB) package will be downloaded automatically (you don't have to do that).

It is not enough to just have KASH installed on your computer. Note that the KASH SAGE package is currently only available for Linux and OSX. If you need Windows, support contact me (wstein@ucsd.edu).

The KASH interface offers three pieces of functionality:

  1. kash_console() - A function that dumps you into an interactive command-line KASH session. Alternatively,

    type !kash from the SAGE prompt.

  2. kash(expr) - Creation of a SAGE object that wraps a KASH object. This provides a Pythonic interface to KASH. For example, if f=kash.new(10), then f.Factors() returns the prime factorization of $ 10$ computed using KASH.

  3. kash.function_name(args ...) - Call the indicated KASH function with the given arguments are return the result as a KASH object.

  4. kash.eval(expr) - Evaluation of arbitrary KASH expressions, with the result returned as a string.



Subsections
See About this document... for information on suggesting changes.