SageMathTools

sagemathtool.spad line 84 [edit on github]

SageMathTools provides some functionality from Sage https://sagemath.org.

join: (String, List String) -> String

join(sep,ls) returns an element that is the concatenation of all strings in ls but separated by sep, for example, concat("/",[“a”,"b","c"]) returns “a/b/c”.

sage: String -> List String

sage(cmd) executes the command cmd in sage and returns the resulting lines of output (unparsed)/

sageGroebnerBasis: (List Polynomial Integer, List Symbol) -> List Polynomial Integer

sageGroebnerBasis(pols, vars) assumes that pols are in the variables vars and computes a Groebner basis of pols with respect to the degrevlex order in vars.

sageGroebnerEliminate: (List Polynomial Integer, List Symbol, List Symbol) -> List Polynomial Integer

sageGroebnerEliminate(pols,elimvars,vars) assumes that pols are in the variables concat(elimvars,vars), computes a Groebner basis of pols with respect to a block order that is degrevlex in elimvars followed by degrevlex in vars. Only the part of the Groebner basis that have no variables in elimvars is returned.

sageInteger: String -> Integer

sageInteger(cmd) executes a sage command that yields and integer and returns this integer. For example sageInteger(“print(factorial(10))”).

sageModularFormBasisGamma0: (Integer, Integer, Integer) -> List Polynomial Integer

sageModularFormBasisGamma0(level,weight,precision) returns the result from the command “ModularForms(Gamma0(level),weight,prec=precision)” as a polynomial tuncated at precision.

sageVersion: () -> List String

sageVersion() returns the list of lines that Sage's version() command outputs. It returns the empty list, if Sage is not available. Note that the availability of Sage is checked only at the time this package is instantiated.