Examples

[hanaki@kissme home]$ gap 
 игибибибибибибибид   GAP, Version 4.5.5 of 16-Jul-2012 (free software, GPL)
 ив  GAP  ив   http://www.gap-system.org
 ижибибибибибибибие   Architecture: i686-pc-linux-gnu-gcc-default32
 Libs used:  gmp
 Loading the library and packages ...
#I  You are using an old /home/hanaki/.gaprc file. 
#I  See '?Ref: The former .gaprc file' for hints to upgrade.
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   AClib 1.2, Alnuth 3.0.0, AutPGrp 1.5, CRISP 1.3.5, 
             Cryst 4.1.10, CrystCat 1.1.6, CTblLib 1.2.1, FactInt 1.5.3, 
             FGA 1.1.1, GAPDoc 1.5.1, IRREDSOL 1.2.1, LAGUNA 3.6.1, 
             Polenta 1.3.1, Polycyclic 2.10.1, RadiRoot 2.6, 
             ResClasses 3.1.1, Sophus 1.23, TomLib 1.2.2
 Try '?help' for help. See also  '?copyright' and  '?authors'
gap> Read("association_scheme.gap");
ибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибиб
Loading  GRAPE 4.6.1 (GRaph Algorithms using PErmutation groups)
by Leonard H. Soicher (http://www.maths.qmul.ac.uk/~leonard/).
Homepage: http://www.maths.qmul.ac.uk/~leonard/grape/
ибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибибиб
gap> R := HammingScheme(4,2);;
gap> Display(R);
[ [  0,  1,  1,  2,  1,  2,  2,  3,  1,  2,  2,  3,  2,  3,  3,  4 ],
  [  1,  0,  2,  1,  2,  1,  3,  2,  2,  1,  3,  2,  3,  2,  4,  3 ],
  [  1,  2,  0,  1,  2,  3,  1,  2,  2,  3,  1,  2,  3,  4,  2,  3 ],
  [  2,  1,  1,  0,  3,  2,  2,  1,  3,  2,  2,  1,  4,  3,  3,  2 ],
  [  1,  2,  2,  3,  0,  1,  1,  2,  2,  3,  3,  4,  1,  2,  2,  3 ],
  [  2,  1,  3,  2,  1,  0,  2,  1,  3,  2,  4,  3,  2,  1,  3,  2 ],
  [  2,  3,  1,  2,  1,  2,  0,  1,  3,  4,  2,  3,  2,  3,  1,  2 ],
  [  3,  2,  2,  1,  2,  1,  1,  0,  4,  3,  3,  2,  3,  2,  2,  1 ],
  [  1,  2,  2,  3,  2,  3,  3,  4,  0,  1,  1,  2,  1,  2,  2,  3 ],
  [  2,  1,  3,  2,  3,  2,  4,  3,  1,  0,  2,  1,  2,  1,  3,  2 ],
  [  2,  3,  1,  2,  3,  4,  2,  3,  1,  2,  0,  1,  2,  3,  1,  2 ],
  [  3,  2,  2,  1,  4,  3,  3,  2,  2,  1,  1,  0,  3,  2,  2,  1 ],
  [  2,  3,  3,  4,  1,  2,  2,  3,  1,  2,  2,  3,  0,  1,  1,  2 ],
  [  3,  2,  4,  3,  2,  1,  3,  2,  2,  1,  3,  2,  1,  0,  2,  1 ],
  [  3,  4,  2,  3,  2,  3,  1,  2,  2,  3,  1,  2,  1,  2,  0,  1 ],
  [  4,  3,  3,  2,  3,  2,  2,  1,  3,  2,  2,  1,  2,  1,  1,  0 ] ]
gap> trad := ThinRadical(R);
[ 0, 4 ]
gap> tres := ThinResidue(R);
[ 0, 2, 4 ]
gap> R2 := RelationMatrixSortedByClosedSubset(R, trad);;
gap> Display(R2);                                       
[ [  0,  4,  1,  3,  1,  3,  2,  2,  1,  3,  2,  2,  2,  2,  3,  1 ],
  [  4,  0,  3,  1,  3,  1,  2,  2,  3,  1,  2,  2,  2,  2,  1,  3 ],
  [  1,  3,  0,  4,  2,  2,  1,  3,  2,  2,  1,  3,  3,  1,  2,  2 ],
  [  3,  1,  4,  0,  2,  2,  3,  1,  2,  2,  3,  1,  1,  3,  2,  2 ],
  [  1,  3,  2,  2,  0,  4,  1,  3,  2,  2,  3,  1,  1,  3,  2,  2 ],
  [  3,  1,  2,  2,  4,  0,  3,  1,  2,  2,  1,  3,  3,  1,  2,  2 ],
  [  2,  2,  1,  3,  1,  3,  0,  4,  3,  1,  2,  2,  2,  2,  1,  3 ],
  [  2,  2,  3,  1,  3,  1,  4,  0,  1,  3,  2,  2,  2,  2,  3,  1 ],
  [  1,  3,  2,  2,  2,  2,  3,  1,  0,  4,  1,  3,  1,  3,  2,  2 ],
  [  3,  1,  2,  2,  2,  2,  1,  3,  4,  0,  3,  1,  3,  1,  2,  2 ],
  [  2,  2,  1,  3,  3,  1,  2,  2,  1,  3,  0,  4,  2,  2,  1,  3 ],
  [  2,  2,  3,  1,  1,  3,  2,  2,  3,  1,  4,  0,  2,  2,  3,  1 ],
  [  2,  2,  3,  1,  1,  3,  2,  2,  1,  3,  2,  2,  0,  4,  1,  3 ],
  [  2,  2,  1,  3,  3,  1,  2,  2,  3,  1,  2,  2,  4,  0,  3,  1 ],
  [  3,  1,  2,  2,  2,  2,  1,  3,  2,  2,  1,  3,  1,  3,  0,  4 ],
  [  1,  3,  2,  2,  2,  2,  3,  1,  2,  2,  3,  1,  3,  1,  4,  0 ] ]
gap> R3 := RelationMatrixSortedByClosedSubset(R, tres);;
gap> Display(R3);
[ [  0,  2,  2,  2,  2,  2,  2,  4,  1,  1,  1,  3,  1,  3,  3,  3 ],
  [  2,  0,  2,  2,  2,  2,  4,  2,  1,  1,  3,  1,  3,  1,  3,  3 ],
  [  2,  2,  0,  2,  2,  4,  2,  2,  1,  3,  1,  1,  3,  3,  1,  3 ],
  [  2,  2,  2,  0,  4,  2,  2,  2,  3,  1,  1,  1,  3,  3,  3,  1 ],
  [  2,  2,  2,  4,  0,  2,  2,  2,  1,  3,  3,  3,  1,  1,  1,  3 ],
  [  2,  2,  4,  2,  2,  0,  2,  2,  3,  1,  3,  3,  1,  1,  3,  1 ],
  [  2,  4,  2,  2,  2,  2,  0,  2,  3,  3,  1,  3,  1,  3,  1,  1 ],
  [  4,  2,  2,  2,  2,  2,  2,  0,  3,  3,  3,  1,  3,  1,  1,  1 ],
  [  1,  1,  1,  3,  1,  3,  3,  3,  0,  2,  2,  2,  2,  2,  2,  4 ],
  [  1,  1,  3,  1,  3,  1,  3,  3,  2,  0,  2,  2,  2,  2,  4,  2 ],
  [  1,  3,  1,  1,  3,  3,  1,  3,  2,  2,  0,  2,  2,  4,  2,  2 ],
  [  3,  1,  1,  1,  3,  3,  3,  1,  2,  2,  2,  0,  4,  2,  2,  2 ],
  [  1,  3,  3,  3,  1,  1,  1,  3,  2,  2,  2,  4,  0,  2,  2,  2 ],
  [  3,  1,  3,  3,  1,  1,  3,  1,  2,  2,  4,  2,  2,  0,  2,  2 ],
  [  3,  3,  1,  3,  1,  3,  1,  1,  2,  4,  2,  2,  2,  2,  0,  2 ],
  [  3,  3,  3,  1,  3,  1,  1,  1,  4,  2,  2,  2,  2,  2,  2,  0 ] ]
gap> R4 := Subscheme(R, trad);;
gap> Display(R4);
[ [  0,  1 ],
  [  1,  0 ] ]
gap> R5 := Subscheme(R, tres, 1);;
gap> Display(R5);                 
[ [  0,  1,  1,  1,  1,  1,  1,  2 ],
  [  1,  0,  1,  1,  1,  1,  2,  1 ],
  [  1,  1,  0,  1,  1,  2,  1,  1 ],
  [  1,  1,  1,  0,  2,  1,  1,  1 ],
  [  1,  1,  1,  2,  0,  1,  1,  1 ],
  [  1,  1,  2,  1,  1,  0,  1,  1 ],
  [  1,  2,  1,  1,  1,  1,  0,  1 ],
  [  2,  1,  1,  1,  1,  1,  1,  0 ] ]
gap> R6 := FactorScheme(R, trad);;   
gap> Display(R6);                    
[ [  0,  1,  1,  2,  1,  2,  2,  1 ],
  [  1,  0,  2,  1,  2,  1,  1,  2 ],
  [  1,  2,  0,  1,  2,  1,  1,  2 ],
  [  2,  1,  1,  0,  1,  2,  2,  1 ],
  [  1,  2,  2,  1,  0,  1,  1,  2 ],
  [  2,  1,  1,  2,  1,  0,  2,  1 ],
  [  2,  1,  1,  2,  1,  2,  0,  1 ],
  [  1,  2,  2,  1,  2,  1,  1,  0 ] ]
gap> R7 := FactorScheme(R, tres);;
gap> Display(R7);                 
[ [  0,  1 ],
  [  1,  0 ] ]
gap> IsThin(R6);
false
gap> IsThin(R7);
true
gap> IsQuasiThin(R6);
false
gap> IsQuasiThin(R7);
false
gap> quit;
[hanaki@kissme home]$