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 inls
but separated bysep
, for example, concat("/"
,[“a”,"b"
,"c"
]) returns “a/b/c”.
- sage: String -> List String
sage(cmd)
executes the commandcmd
in sage and returns the resulting lines of output (unparsed)/
- sageGroebnerBasis: (List Polynomial Integer, List Symbol) -> List Polynomial Integer
sageGroebnerBasis(pols, vars)
assumes thatpols
are in the variables vars and computes a Groebner basis ofpols
with respect to the degrevlex order in vars.
- sageGroebnerEliminate: (List Polynomial Integer, List Symbol, List Symbol) -> List Polynomial Integer
sageGroebnerEliminate(pols,elimvars,vars)
assumes thatpols
are in the variables concat(elimvars
,vars
), computes a Groebner basis ofpols
with respect to a block order that is degrevlex inelimvars
followed by degrevlex invars
. Only the part of the Groebner basis that have no variables inelimvars
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))”).