LogTo("f5-3-ath.log");

LoadPackage("GBNP");

GBNP.ConfigPrint("g0","g1","g2","g3","g4","y0","y1","y2","y3","y4","x0","x1","x2","x3","x4","U");

s:=Indeterminate(Rationals,"L1");;
t:=Indeterminate(Rationals,"L2");;

K:=[
[[[1,6],[6,1]],[1,1]],
[[[1,7],[9,1]],[1,1]],
[[[1,8],[7,1]],[1,1]],
[[[1,9],[10,1]],[1,1]],
[[[1,10],[8,1]],[1,1]],
[[[2,6],[9,2]],[1,1]],
[[[2,7],[7,2]],[1,1]],
[[[2,8],[10,2]],[1,1]],
[[[2,9],[8,2]],[1,1]],
[[[2,10],[6,2]],[1,1]],
[[[3,6],[7,3]],[1,1]],
[[[3,7],[10,3]],[1,1]],
[[[3,8],[8,3]],[1,1]],
[[[3,9],[6,3]],[1,1]],
[[[3,10],[9,3]],[1,1]],
[[[4,6],[10,4]],[1,1]],
[[[4,7],[8,4]],[1,1]],
[[[4,8],[6,4]],[1,1]],
[[[4,9],[9,4]],[1,1]],
[[[4,10],[7,4]],[1,1]],
[[[5,6],[8,5]],[1,1]],
[[[5,7],[6,5]],[1,1]],
[[[5,8],[9,5]],[1,1]],
[[[5,9],[7,5]],[1,1]],
[[[5,10],[10,5]],[1,1]],
[[[1,11],[11,1]],[1,-1]],
[[[1,12],[12,1]],[1,-1]],
[[[1,13],[13,1]],[1,-1]],
[[[1,14],[14,1]],[1,-1]],
[[[1,15],[15,1]],[1,-1]],
[[[2,11],[11,2]],[1,-1]],
[[[2,12],[12,2]],[1,-1]],
[[[2,13],[13,2]],[1,-1]],
[[[2,14],[14,2]],[1,-1]],
[[[2,15],[15,2]],[1,-1]],
[[[3,11],[11,3]],[1,-1]],
[[[3,12],[12,3]],[1,-1]],
[[[3,13],[13,3]],[1,-1]],
[[[3,14],[14,3]],[1,-1]],
[[[3,15],[15,3]],[1,-1]],
[[[4,11],[11,4]],[1,-1]],
[[[4,12],[12,4]],[1,-1]],
[[[4,13],[13,4]],[1,-1]],
[[[4,14],[14,4]],[1,-1]],
[[[4,15],[15,4]],[1,-1]],
[[[5,11],[11,5]],[1,-1]],
[[[5,12],[12,5]],[1,-1]],
[[[5,13],[13,5]],[1,-1]],
[[[5,14],[14,5]],[1,-1]],
[[[5,15],[15,5]],[1,-1]],
[[[6,11],[11,6]],[1,-1]],
[[[6,12],[12,6]],[1,-1]],
[[[6,13],[13,6]],[1,-1]],
[[[6,14],[14,6]],[1,-1]],
[[[6,15],[15,6]],[1,-1]],
[[[7,11],[11,7]],[1,-1]],
[[[7,12],[12,7]],[1,-1]],
[[[7,13],[13,7]],[1,-1]],
[[[7,14],[14,7]],[1,-1]],
[[[7,15],[15,7]],[1,-1]],
[[[8,11],[11,8]],[1,-1]],
[[[8,12],[12,8]],[1,-1]],
[[[8,13],[13,8]],[1,-1]],
[[[8,14],[14,8]],[1,-1]],
[[[8,15],[15,8]],[1,-1]],
[[[9,11],[11,9]],[1,-1]],
[[[9,12],[12,9]],[1,-1]],
[[[9,13],[13,9]],[1,-1]],
[[[9,14],[14,9]],[1,-1]],
[[[9,15],[15,9]],[1,-1]],
[[[10,11],[11,10]],[1,-1]],
[[[10,12],[12,10]],[1,-1]],
[[[10,13],[13,10]],[1,-1]],
[[[10,14],[14,10]],[1,-1]],
[[[10,15],[15,10]],[1,-1]],
[[[1,1],[1,1]],[1,-1]],
[[[1,2],[4,1]],[1,-1]],
[[[1,3],[2,1]],[1,-1]],
[[[1,4],[5,1]],[1,-1]],
[[[1,5],[3,1]],[1,-1]],
[[[2,1],[4,2]],[1,-1]],
[[[2,2],[2,2]],[1,-1]],
[[[2,3],[5,2]],[1,-1]],
[[[2,4],[3,2]],[1,-1]],
[[[2,5],[1,2]],[1,-1]],
[[[3,1],[2,3]],[1,-1]],
[[[3,2],[5,3]],[1,-1]],
[[[3,3],[3,3]],[1,-1]],
[[[3,4],[1,3]],[1,-1]],
[[[3,5],[4,3]],[1,-1]],
[[[4,1],[5,4]],[1,-1]],
[[[4,2],[3,4]],[1,-1]],
[[[4,3],[1,4]],[1,-1]],
[[[4,4],[4,4]],[1,-1]],
[[[4,5],[2,4]],[1,-1]],
[[[5,1],[3,5]],[1,-1]],
[[[5,2],[1,5]],[1,-1]],
[[[5,3],[4,5]],[1,-1]],
[[[5,4],[2,5]],[1,-1]],
[[[5,5],[5,5]],[1,-1]],
[[[7,6],[6,8],[8,9],[9,7],[16]],[1,1,1,1,-t]],
[[[8,6],[6,10],[10,7],[7,8],[16]],[1,1,1,1,-t]],
[[[9,6],[6,7],[7,10],[10,9],[16]],[1,1,1,1,-t]],
[[[10,6],[6,9],[9,8],[8,10],[16]],[1,1,1,1,-t]],
[[[8,7],[7,9],[9,10],[10,8],[16]],[1,1,1,1,-t]],
[[[12,11],[11,13],[13,14],[14,12]],[1,1,1,1]],
[[[13,11],[11,15],[15,12],[12,13]],[1,1,1,1]],
[[[14,11],[11,12],[12,15],[15,14]],[1,1,1,1]],
[[[15,11],[11,14],[14,13],[13,15]],[1,1,1,1]],
[[[13,12],[12,14],[14,15],[15,13]],[1,1,1,1]],
[[[6,6],[16]],[1,-s]],
[[[7,7],[16]],[1,-s]],
[[[8,8],[16]],[1,-s]],
[[[9,9],[16]],[1,-s]],
[[[10,10],[16]],[1,-s]],
[[[11,11]],[1]],
[[[12,12]],[1]],
[[[13,13]],[1]],
[[[14,14]],[1]],
[[[15,15]],[1]],
[[[16,1],[1,16]],[1,-1]],
[[[16,2],[2,16]],[1,-1]],
[[[16,3],[3,16]],[1,-1]],
[[[16,4],[4,16]],[1,-1]],
[[[16,5],[5,16]],[1,-1]],
[[[16,6],[6,16]],[1,-1]],
[[[16,7],[7,16]],[1,-1]],
[[[16,8],[8,16]],[1,-1]],
[[[16,9],[9,16]],[1,-1]],
[[[16,10],[10,16]],[1,-1]],
[[[16,11],[11,16]],[1,-1]],
[[[16,12],[12,16]],[1,-1]],
[[[16,13],[13,16]],[1,-1]],
[[[16,14],[14,16]],[1,-1]],
[[[16,15],[15,16]],[1,-1]]
];;

G:=SGrobnerTrunc(K,4,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2]);


d0:=[[[6],[1,11]],[1,1]];;
d1:=[[[7],[2,12]],[1,1]];;
d2:=[[[8],[3,13]],[1,1]];;
d3:=[[[9],[4,14]],[1,1]];;
d4:=[[[10],[5,15]],[1,1]];;

d0:=[[[6],[1,11]],[1,1]];;
d1:=[[[7],[2,12]],[1,1]];;
d2:=[[[8],[3,13]],[1,1]];;
d3:=[[[9],[4,14]],[1,1]];;
d4:=[[[10],[5,15]],[1,1]];;

d0d1:=MulNP(d0,d1);;
d1d0:=MulNP(d1,d0);;
z1:=MulNP(d0d1,d0d1);;
z2:=MulNP(d1d0,d1d0);;
z:=AddNP(z1,z2,1,1);;

zR:=StrongNormalFormNP(z,G);;

w1:=[[[6,7,6,7],[7,6,7,6]],[1,1]];;
w2:=[[[1,2,1,2,11,12,11,12],[1,2,1,2,12,11,12,11]],[1,1]];;
w:=AddNP(w1,w2,1,1);;

aX:=StrongNormalFormNP(AddNP(zR,w,1,-1),G);;

Print("rho(z) - (z otimes 1 + gz otimes z) is: \n");

PrintNP(aX);

Print("Taking U=1 this yields: \n");

Print(" L2(g0g2 \otimes x1x0 + g0g1 \otimes x0x1 - g1y4 \otimes x1 + g1y0 \otimes x1 -  g0y2 \otimes x0 + g0y1 \otimes x0)	 \n");

