teste

POTENBASIS

  • Give a list of relations [ [m_1, p_1], [m_2, p_2], ...], this function check if a relation of this list is independent of its predecessors, for this its uses a matricial representation provided by file matrep.
  • This function calls an external funtion, sed.

listona1:=[];
listona2:=[];
POTENBASIS:=function(rel, lmon)
local pos;
PrintTo("TEMP", "listona1:=", rel, ";");
AppendTo("TEMP", "listona2:=", lmon, ";");
Exec("sed -e 's/U/u/g' -e 's/V/v/g' -e 's/<zero> of .../0*u/g'  TEMP > TEMP1");
Read("TEMP1");
Exec("rm TEMP TEMP1");
if Position(listona2, listona1[1]) <> fail then
    pos:=Position(listona2, listona1[1] );
    if listona1[2] in Algebra(FIELD, List([1..pos-1],i -> listona2[i]) ) then
        return true;
    else
        return false;
    fi;
else
    return false;
fi;
end;