/usr/share/axiom-20170501/src/algebra/EVALCYC.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | )abbrev package EVALCYC EvaluateCycleIndicators
++ Author: William H. Burge
++ Date Created: 1986
++ Date Last Updated: Feb 1992
++ Description:
++ This package is to be used in conjuction with the CycleIndicators package.
++ It provides an evaluation function for SymmetricPolynomials.
EvaluateCycleIndicators(F) : SIG == CODE where
F : Algebra Fraction Integer
I==>Integer
L==>List
SPOL==SymmetricPolynomial
RN==>Fraction Integer
PR==>Polynomial(RN)
PTN==>Partition()
lc ==> leadingCoefficient
red ==> reductum
SIG ==> with
eval : ((I->F),SPOL RN)->F
++\spad{eval(f,s)} evaluates the cycle index s by applying
++ the function f to each integer in a monomial partition,
++ forms their product and sums the results over all monomials.
CODE ==> add
evp:((I->F),PTN)->F
fn:I->F
pt:PTN
spol:SPOL RN
i:I
evp(fn, pt)== _*/[fn i for i in pt::(L I)]
eval(fn,spol)==
if spol=0
then 0
else ((lc spol)* evp(fn,degree spol)) + eval(fn,red spol)
|