  
  [1X8 [33X[0;0YApplications of the Wedderga package[133X[101X
  
  
  [1X8.1 [33X[0;0YCoding theory applications[133X[101X
  
  [1X8.1-1 CodeWordByGroupRingElement[101X
  
  [33X[1;0Y[29X[2XCodeWordByGroupRingElement[102X( [3XF[103X, [3XS[103X, [3Xa[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe  code  word  of length the length of [3XS[103X associated to the group
            ring element [3Xa[103X.[133X
  
  [33X[0;0YThe  input  [3XF[103X should be a finite field. The input [3XS[103X is a fixed ordering of a
  group [22XG[122X and [3Xa[103X is an element in the group algebra [22XFG[122X.[133X
  
  [33X[0;0YEach  element  [22Xc[122X  in  [22XFG[122X  is  of the form [22Xc=∑_i=1^n f_i g_i[122X, where we fix an
  ordering  [22X{g_1,g_2,...,g_n  }[122X  of  the group elements of [22XG[122X and [22Xf_i∈ F[122X. If we
  look at [22Xc[122X as a codeword, we will write [22X[f_1 f_2 ... f_n][122X. ([14X9.23[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG:=DihedralGroup(8);;[127X[104X
    [4X[25Xgap>[125X [27XF:=GF(3);;          [127X[104X
    [4X[25Xgap>[125X [27XFG:=GroupRing(F,G);;[127X[104X
    [4X[25Xgap>[125X [27Xa:=AsList(FG)[27];[127X[104X
    [4X[28X(Z(3)^0)*<identity> of ...+(Z(3)^0)*f1+(Z(3)^0)*f2+(Z(3)^0)*f3+(Z(3)^[128X[104X
    [4X[28X0)*f1*f2+(Z(3)^0)*f2*f3+(Z(3))*f1*f2*f3[128X[104X
    [4X[25Xgap>[125X [27XS:=AsSet(G);[127X[104X
    [4X[28X[ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 ][128X[104X
    [4X[25Xgap>[125X [27XCodeWordByGroupRingElement(F,S,a);[127X[104X
    [4X[28X[ Z(3)^0, Z(3)^0, Z(3)^0, Z(3)^0, Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X8.1-2 CodeByLeftIdeal[101X
  
  [33X[1;0Y[29X[2XCodeByLeftIdeal[102X( [3XF[103X, [3XG[103X, [3XS[103X, [3XI[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YAll  code  words of length the length of [3XS[103X associated to the group
            ring elements in the ideal [3XI[103X of [3XFG[103X.[133X
  
  [33X[0;0YThe  input  [3XF[103X should be a finite field. The input [3XS[103X is a fixed ordering of a
  group [22XG[122X and [3XI[103X is a left ideal of the group algebra [22XFG[122X.[133X
  
  [33X[0;0YEach  element  [22Xc[122X  in  [22XFG[122X  is  of the form [22Xc=∑_i=1^n f_i g_i[122X, where we fix an
  ordering  [22X{g_1,g_2,...,g_n  }[122X  of  the group elements of [22XG[122X and [22Xf_i∈ F[122X. If we
  look at [22Xc[122X as a codeword, we will write [22X[f_1 f_2 ... f_n][122X. ([14X9.23[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG:=DihedralGroup(8);;[127X[104X
    [4X[25Xgap>[125X [27XF:=GF(3);;          [127X[104X
    [4X[25Xgap>[125X [27XFG:=GroupRing(F,G);;[127X[104X
    [4X[25Xgap>[125X [27XS:=AsSet(G);[127X[104X
    [4X[28X[ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 ][128X[104X
    [4X[25Xgap>[125X [27XH:=StrongShodaPairs(G)[5][1];[127X[104X
    [4X[28XGroup([ f1*f2*f3, f3 ])[128X[104X
    [4X[25Xgap>[125X [27XK:=StrongShodaPairs(G)[5][2];[127X[104X
    [4X[28XGroup([ f1*f2 ])[128X[104X
    [4X[25Xgap>[125X [27XN:=Normalizer(G,K);[127X[104X
    [4X[28XGroup([ f1*f2*f3, f3 ])[128X[104X
    [4X[25Xgap>[125X [27Xepi:=NaturalHomomorphismByNormalSubgroup(N,K);[127X[104X
    [4X[28X[ f1*f2*f3, f3 ] -> [ f1, f1 ][128X[104X
    [4X[25Xgap>[125X [27XQHK:=Image(epi,H);[127X[104X
    [4X[28XGroup([ f1, f1 ])[128X[104X
    [4X[25Xgap>[125X [27Xgq:=MinimalGeneratingSet(QHK)[1];[127X[104X
    [4X[28Xf1[128X[104X
    [4X[25Xgap>[125X [27XC:=CyclotomicClasses(Size(F),Index(H,K))[2];[127X[104X
    [4X[28X[ 1 ][128X[104X
    [4X[25Xgap>[125X [27Xe:=PrimitiveIdempotentsNilpotent(FG,H,K,C,[epi,gq]);   [127X[104X
    [4X[28X[ (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3)^0)*f1*f2+(Z(3))*f1*f2*f3, [128X[104X
    [4X[28X  (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3))*f1*f2+(Z(3)^0)*f1*f2*f3 ][128X[104X
    [4X[25Xgap>[125X [27XFGe := LeftIdealByGenerators(FG,[e[1]]);;[127X[104X
    [4X[25Xgap>[125X [27XV := VectorSpace(F,CodeByLeftIdeal(F,G,S,FGe));;[127X[104X
    [4X[25Xgap>[125X [27XB := Basis(V);;[127X[104X
    [4X[25Xgap>[125X [27XLoadPackage("guava");;[127X[104X
    [4X[25Xgap>[125X [27Xcode := GeneratorMatCode(B,F);[127X[104X
    [4X[28Xa linear [8,2,1..4]4..5 code defined by generator matrix over GF(3)[128X[104X
    [4X[25Xgap>[125X [27XMinimumDistance(code);[127X[104X
    [4X[28X4[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
