#############################################################################
##
#A  genVtestprogs        CHEVIE library          Meinolf Geck & Frank L"ubeck
##
#Y  Copyright 1992--1993,  Lehrstuhl D f"ur Mathematik,    RWTH Aachen,   and
#Y                         IWR   der   Universit"at    Heidelberg,   Germany.
##
# Gunters Programme zum Testen von Greenfunktionen (inoffiziell):
#
qpart:=proc(order)
local ff, i, s;
   s:=1; ff:=factor(order);
   for i from 1 to nops(ff) do if divide(op(i,ff),q) then s:= op(i,ff);
   fi: od:
   RETURN(s):
end:

gtest:=proc(table)
local A, i, j, k, pPart, s;
   M:=array(1..table[-2,2],1..table[-2,2]):
   pPart:= qpart(table[-2,1]):
   for i from 1 to table[-2,2] do
      for j from 1 to table[-2,2] do
         s:= 0:
         for k from 1 to table[-2,4] do
            s:= s + table[0,k]*table[i,k]*table[j,k]:
         od:
         s:= factor(s/lcoeff(table[i,0])/table[i,0]/pPart):
         M[i,j]:= s: M[j,i]:= s:
      od:
   od:
   RETURN(op(M));
end:

TestOrtho1 := proc(t)
local a0, a1, erg;
erg := array(1..t[-2,2],1..t[-2,2]);
for a0 to t[-2,2] do
for a1 to a0 do
erg[a0,a1] := Scalar(t,a0,t,a1);
od;
od;
op(erg);
end:
 
