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 inlsbut separated bysep, for example, concat("/",[“a”,"b","c"]) returns “a/b/c”.
- sage: String -> List String
sage(cmd)executes the commandcmdin sage and returns the resulting lines of output (unparsed)/
- sageGroebnerBasis: (List Polynomial Integer, List Symbol) -> List Polynomial Integer
sageGroebnerBasis(pols, vars)assumes thatpolsare in the variables vars and computes a Groebner basis ofpolswith respect to the degrevlex order in vars.
- sageGroebnerEliminate: (List Polynomial Integer, List Symbol, List Symbol) -> List Polynomial Integer
sageGroebnerEliminate(pols,elimvars,vars)assumes thatpolsare in the variables concat(elimvars,vars), computes a Groebner basis ofpolswith respect to a block order that is degrevlex inelimvarsfollowed by degrevlex invars. Only the part of the Groebner basis that have no variables inelimvarsis 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 atprecision.
- sageVersion: () -> List String
sageVersion()returns the version string from sage, i.e. the output of ‘import from sage.version; print(sage.version.version)’ as a one element list. 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.