1#############################################################################
2##
3#W  dltest.g             GAP 4 package CTblLib          Michael Claßen-Houben
4##
5#Y  Copyright (C)  2005,   Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
6##
7
8
9#############################################################################
10##
11#V  DeltigTestFcts
12##
13BindGlobal( "DeltigTestFcts", rec(
14  info:= "test functions"
15)
16);
17
18DeltigTestFcts.Degree:= function(r)
19  local record, degree, elem, bool, tbl;
20  record:= DeltigNames.GetRecordFromLib(r);
21  if record = fail then
22    Display("this group is not in the library. try adjoint isogenytype.");
23    return fail;
24  fi;
25  degree:= DeltigConstructionFcts.(Concatenation("DegreeType", r.isoc));
26  tbl:= CharacterTable(DeltigGroups.Name(r));
27  bool:= true;
28  for elem in record.labeling do
29    if not degree(elem.label, r.q) = Irr(tbl)[elem.index][1] then
30      Display(Concatenation("Error in ", DeltigGroups.String(r), " label:"));
31      Display(elem.label);
32      bool:= false;
33    fi;
34  od;
35  return bool;
36end;
37
38DeltigTestFcts.PermChar:= function(r)
39  local lst, tbl, wtbl, theta, elem;
40    lst:= DeligneLusztigNames(r);
41  if lst = fail then
42    Display("this group is not in the library.");
43    return fail;
44  fi;
45  tbl:= CharacterTable(DeltigGroups.Name(r));
46  theta:=0*Irr(tbl)[1];
47  if r.isoc = "A" then
48    wtbl:= CharacterTable("Symmetric", r.l + 1);
49    for elem in CharacterParameters(wtbl) do
50      theta:= theta +
51        Irr(wtbl)[Position(CharacterParameters(wtbl), elem)][1]
52        * Irr(tbl)[Position(lst,elem[2])]
53      ;
54    od;
55  elif r.isoc in [ "B", "C" ] then
56    wtbl:= CharacterTable("WeylB", r.l );
57    for elem in CharacterParameters(wtbl) do
58      theta:= theta +
59        Irr(wtbl)[Position(CharacterParameters(wtbl), elem)][1]
60        * Irr(tbl)[Position(lst,SymbolPartitionTuple(elem[2], 1))]
61      ;
62    od;
63  fi;
64  return theta;
65  return TestPerm1(tbl, theta) = 0
66     and TestPerm2(tbl, theta) = 0
67     and TestPerm3(tbl, [theta]) = [theta]
68     and TestPerm4(tbl, [theta]) = [theta]
69  ;
70end;
71
72DeltigTestFcts.PermCharParabolic:= function(r)
73  local lst, tbl, cox, comb, bool, elem, u, it, symb, type, l, pos,
74    symbols, theta, i;
75    lst:= DeltigNames.GetRecordFromLib(r);
76  if lst = fail then
77    Display("this group is not in the library.");
78    return fail;
79  fi;
80  tbl:= CharacterTable(DeltigGroups.Name(r));
81  if r.isoc = "A" then
82    cox:= CoxeterGroupByReflectionDatum("A", r.l);
83  elif r.isoc = "B" then
84    cox:= CoxeterGroupByReflectionDatum("B", r.l);
85  elif r.isoc = "C" then
86    cox:= CoxeterGroupByReflectionDatum("C", r.l);
87  elif r.isoc = "D" then
88    cox:= CoxeterGroupByReflectionDatum("D", r.l);
89  elif r.isoc = "2D" then
90    cox:= CoxeterGroupByReflectionDatum("C", r.l);
91  fi;
92  comb:= Combinations([1 .. r.l]);
93  Sort(comb, function(l1,l2) return (Length(l1) > Length(l2)); end);
94  Unbind(comb[Length(comb)]);
95  Unbind(comb[1]);
96  bool:= true;
97  for elem in comb do
98    u:= ReflectionSubgroupByPositions(cox, elem);
99    it:= InductionTable(u, cox);
100    symb:= [  ];
101    for type in ReflectionType(u) do
102      if type.series = "C" then
103        Add(symb,[ [ type.rank ], [  ] ]);
104      elif type.series = "A" then
105        Add(symb,[ type.rank + 1 ]);
106      elif type.series = "D" then
107        Add(symb,[ [ type.rank ], '+' ]);
108      fi;
109    od;
110    pos:= Position(ClassParameters(u), symb);
111    symbols:= ShallowCopy(ClassParameters(cox));
112    for i in [1..Length(symbols)] do
113      if IsBound(symbols[i][1][2]) and IsChar(symbols[i][1][2]) then
114        symbols[i]:= [symbols[i][1][1],symbols[i][1][1]];
115      else
116        symbols[i]:= symbols[i][1];
117      fi;
118    od;
119    theta:= Sum([ 1 .. Length(symbols)], i ->
120      it[i][pos] * Irr(tbl)[lst.labeling[i].index]
121    );
122    if not (TestPerm1(tbl, theta)   = 0
123       and  TestPerm2(tbl, theta)   = 0
124#       and  TestPerm3(tbl, [theta]) = [theta]
125#       and  TestPerm4(tbl, [theta]) = [theta]
126    ) then
127      Display([false,elem]);
128      bool:= false;
129    else
130      Display([true,elem]);
131    fi;
132  od;
133  return bool;
134end;
135
136DeltigTestFcts.AlmostChar:= ReturnFalse;
137
138
139BindGlobal( "DeltigTestFunction", function(record, str)
140  if not record in DeltigGroups.records then
141    Display("this group is not available");
142    return fail;
143  fi;
144  if   str = "Degree" then
145    return DeltigTestFcts.Degree(record);
146  elif str = "PermChar" then
147    return DeltigTestFcts.PermChar(record);
148  elif str = "PermCharParabolic" then
149    return DeltigTestFcts.PermCharParabolic(record);
150  elif str = "AlmostChar" then
151    return DeltigTestFcts.AlmostChar(record);
152  else
153    return fail;
154  fi;
155end );
156
157
158#############################################################################
159##
160#E
161
162