14.3 Interface to GAP

Module: sage.interfaces.gap

Interface to GAP

Sage provides an interface to the GAP system. This system provides extensive group theory, combinatorics, etc.

The GAP interface will only work if GAP is installed on your computer; this should be the case, since GAP is included with Sage. The interface offers three pieces of functionality:

  1. gap_console() - A function that dumps you into an interactive command-line GAP session.

  2. gap(expr) - Evaluation of arbitrary GAP expressions, with the result returned as a string.

  3. gap.new(expr) - Creation of a Sage object that wraps a AP object. This provides a Pythonic interface to GAP. For example, if f=gap.new(10), then f.Factors() returns the prime factorization of $ 10$ computed using GAP.



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