muEC::SP::SpSpecialize – specializes a set of variables

The muEC::SP::SpSpecialize function is devoted to specialize a set of variables. This can be all variables generated by the generic name gname in such a way that the variable gname.i is sent onto f(i, args). This function can also be used to specialize indexed variables named gname[sequence] onto f([sequence], args).

→ Examples

Call:

muEC::SP::SpSpecialize(expr, gname, f, args)

Parameters:

expr

any expression

gname

any string or indexed

f

any procedure

args

any (extra) parameters for f

Related Functions:

muEC::SG::Perm2Code, muEC::SP::TableX, muEC::SP::TableXX

Example 1:

muEC::SP::SpSpecialize(x1 + y3 + xx2 + x3^3, x, i->y.i);

math

deg:=3: // you should use a map to specialize a table...

map(muEC::SP::TableX(deg), muEC::SP::SpSpecialize, x,

    proc(i,d) begin q^(d-i) end_proc, deg);

math

// specialization of the yi's as  the permutation [3,1,2] of the  xi's...

map(muEC::SP::TableXX(3), muEC::SP::SpSpecialize, y,

    (i,perm)->x.(perm[i]), [3,1,2]);

math