Weby shortcut
teste

SEARCHC

  • Given a polynomial this routine produces a list of  summands which are substitutable from a list of relations.


ORD:=function(l1, l2) return l1[2] < l2[2];end;

FREL:=function(lrel)
local siz, nlrel, laux, x, ulrel, laux_par;

siz:=Size(lrel);
nlrel:=List([1..siz], i -> [lrel[i], i]);
ulrel:= List([1..siz], i -> lrel[i][1]);
ulrel:=Union(ulrel, ulrel);

laux:=[];
for x in ulrel do
    laux_par:=Filtered(nlrel, i -> i[1][1] = x);
    Add(laux, laux_par[Size(laux_par)]);
od;
Sort(laux, ORD);
return laux;
end;
    


SEARCHC:=function(pol, lrel)
local frel, x;

frel:=FREL(lrel);



for x in frel do
    if SUBSC( pol, x[1]) <> pol then
        Print("Coincident relation ", x[2], " :   ", x[1][1] , " = ??","\n");
    fi;
od;
end;   

Listar Todas Voltar