> < ^ Date: Thu, 07 Nov 1996 14:16:00 +0100 (MET)
> < ^ From: Thomas Breuer <Thomas.Breuer@Math.RWTH-Aachen.DE >
> ^ Subject: FIX 27 for DANGEROUS bug in GAP/lib 3.4.3.16 character tables

This mail contains a bugfix for a dangerous problem in GAP 3.4.3.
*You should apply this bugfix as soon as possible*.
The problem is in 'PrimeBlocks', and causes it to produce
wrong results when it is called for other characters than the list
of all irreducible characters of a character table.

VERSION

GAP/lib 3.4.3.16

PRIORITY

The problem is a *dangerous* problem, because it may cause
a computation to produce incorrect results without a warning.
Thus the bugfix has *high priority*, and we recommend that
you apply it as soon as possible.

HOW TO APPLY

Go to the GAP directory (the directory with the 'lib/' subdirectory),
name this mail 'fix27lib.dif', and issue the command:

patch -p0 < fix27lib.dif

If 'patch' writes "I can't seem to find a patch in there" try 'patch -v'.
If 'patch -v' gives an error message or reports a version older than 2.1,
get 2.1 from 'ftp://FTP.Math.RWTH-Aachen.DE/pub/gap/utils/patch2_1.zoo'.

This fix changes only the library.
Thus you need not recompile the GAP kernel.

DESCRIPTION

When 'PrimeBlocks' is called with three arguments, it treats the list
of characters given as second argument as if it would be the list of
all irreducible characters.

gap> t:= CharTable( "A5" );;
gap> PrimeBlocks( t, t.irreducibles{[1]}, 2 );
rec(
  block := [ 1 ],
  defect := [ 0 ] )

CORRECT BEHAVIOUR

gap> t:= CharTable( "A5" );;
gap> PrimeBlocks( t, t.irreducibles{[1]}, 2 );
rec(
  block := [ 1 ],
  defect := [ 2, 0 ] )

COMMENT

The clean solution would have been to get rid of the three argument
version of 'PrimeBlocks'.

DIFFS

Prereq: 3.52.1.3
--- lib/ctcharac.g	Tue Nov  5 16:33:52 1996
+++ lib/ctcharac.g	Wed Nov  6 16:02:40 1996
@@ -3,14 +3,17 @@
 #A  ctcharac.g                  GAP library                     Thomas Breuer
 #A                                                              & Ansgar Kaup
 ##
-#A  @(#)$Id: 1.html,v 1.2 2004/04/21 15:03:10 felsch Exp $
+#A  @(#)$Id: 1.html,v 1.2 2004/04/21 15:03:10 felsch Exp $
 ##
 #Y  Copyright 1990-1992,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
 ##
 ##  This file contains those functions which mainly deal with characters.
 ##
 #H  $Log: 1.html,v $
 #H  Revision 1.2  2004/04/21 15:03:10  felsch
 #H  Corrected links in the Forum Archive pages.   VF
 #H
 #H  Revision 1.1.1.1  2004/04/20 13:39:30  felsch
 #H  The final GAP-Forum archive until 2003.
 #H
 #H  Revision 1.3  2003/06/12 19:20:34  gap
 #H  Further update. AH
 #H
 #H  Revision 1.2  2003/06/12 17:28:26  gap
 #H  Address updates by JN. AH
 #H
 #H  Revision 1.1  1997/08/15 11:19:41  gap
 #H  New forum setup. AH
 #H
 #H  Revision 1.1  1997/04/06 10:39:29  gap
 #H  Added forum archives (ahulpke)
 #H
-#H  Revision 3.52.1.3  1996/06/19  14:58:39  sam
+#H  Revision 3.52.1.4  1996/11/06 15:02:12  sam
+#H  fixed 'PrimeBlocks' for three arguments
+#H
+#H  Revision 3.52.1.3  1996/06/19 14:58:39  sam
 #H  'List' does no longer accept lists with holes.
 #H
 #H  Revision 3.52.1.2  1995/06/28  07:03:38  sam
@@ -1883,11 +1886,7 @@
 
     tbl:= arg[1];
     prime:= arg[ Length( arg ) ];
-    if Length( arg ) = 2 then
-      characters:= tbl.irreducibles;
-    else
-      characters:= arg[2];
-    fi;
+    characters:= tbl.irreducibles;
     nccl:= Length( characters[1] );
     classes:= tbl.classes;
     primeblocks:= rec( block:= [], defect:= [] );
@@ -1962,25 +1961,26 @@
         fi;
       fi;
     od;
-    if Length( arg ) = 2 then
-      if not IsBound( tbl.irredinfo ) then tbl.irredinfo:= []; fi;
-      for i in [ 1 .. Length( characters ) ] do
-        if not IsBound( tbl.irredinfo[i] ) then tbl.irredinfo[i]:= rec(); fi;
-        if not IsBound( tbl.irredinfo[i].pblock ) then
-          tbl.irredinfo[i].pblock:= [];
-        fi;
-        tbl.irredinfo[i].pblock[ prime ]:= primeblocks.block[i];
-      od;
-      InfoCharTable2( "#I PrimeBlocks: prime blocks for prime ", prime,
-                      " written to the table\n" );
-    fi;
-    
+
+    if not IsBound( tbl.irredinfo ) then tbl.irredinfo:= []; fi;
+    for i in [ 1 .. Length( characters ) ] do
+      if not IsBound( tbl.irredinfo[i] ) then tbl.irredinfo[i]:= rec(); fi;
+      if not IsBound( tbl.irredinfo[i].pblock ) then
+        tbl.irredinfo[i].pblock:= [];
+      fi;
+      tbl.irredinfo[i].pblock[ prime ]:= primeblocks.block[i];
+    od;
+    InfoCharTable2( "#I PrimeBlocks: prime blocks for prime ", prime,
+                    " written to the table\n" );
+
     # compute the defects
     inverse:= InverseMap( primeblocks.block );
     for i in inverse do
       if IsInt( i ) then
         Add( primeblocks.defect, 0 );    # defect zero character
-        InfoCharTable2( "#I defect 0: X[", i, "]\n" );
+        if Length( arg ) = 2 then
+          InfoCharTable2( "#I defect 0: X[", i, "]\n" );
+        fi;
       else
         d:= ppart;
         for j in i do d:= GcdInt( d, characters[j][1] ); od;
@@ -1991,7 +1991,7 @@
         fi;
         Add( primeblocks.defect, d );
     
-        if InfoCharTable2 = Print then
+        if Length( arg ) = 2 and InfoCharTable2 = Print then
     
           # print defect and heights
           Print( "#I defect ", d, ";\n" );
@@ -2006,6 +2006,15 @@
         fi;
       fi;
     od;
+
+    if Length( arg ) = 3 then
+      characters:= List( arg[2], x -> Position( tbl.irreducibles, x ) );
+      if ForAll( characters, IsInt ) then
+        primeblocks.block:= primeblocks.block{ characters };
+      else
+        Error( "the entries of 'arg[2]' must be irreducible characters" );
+      fi;
+    fi;
     
     return primeblocks;
     end;
END OF  fix27lib.dif ________________________________________________________

> < [top]