Laurent Exp

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

l:=Matrix(R3,p,1,l);

ln:=Matrix(R3,B^(-1))*l;
ln:=[ln[i][1] : i in [1..p]];
l:=[l[i][1] : i in [1..p]];

B1:=B^(-1);
mon:=[[(ln[j]*ln[i]) : i in [1..p]] : j in [1..p]];

lu:=[(Rp[i][2]+y)/(x-Rp[i][1]) : i in [1..(p-1)]];
lu[p]:=y/x;
Rp[p]:=E1!0;

function ppart(f,i);
pole_cf:=Evaluate(f/lu[i],Rp[i]);
const_cf:=Evaluate(f-pole_cf*lu[i],Rp[i]);

return [pole_cf,const_cf];

end function;

function ppart2(f,i);
pole_cf:=Evaluate(f/lu[i],Rp[i]);
const_cf:=Evaluate(f-pole_cf*lu[i],Rp[i]);
return pole_cf*lu[i]+const_cf;
end function;

pp_rm:=[];
pp_rm_pole:=[];
pp_rm_const:=[];

for k in [1..p] do

pp:=[ppart(l[i],k) : i in [1..p]];
ppm_pole:=[pp[i][1] : i in [1..p]];
ppm_const:=[pp[i][2] : i in [1..p]];

ppm_pole:=Matrix(L,p,1,ppm_pole);
ppm_const:=Matrix(L,p,1,ppm_const);

pprm_pole:=B1*ppm_pole;
pprm_const:=B1*ppm_const;

pp_rm_pole[k]:=[pprm_pole[i][1] : i in [1..p]];
pp_rm_const[k]:=[pprm_const[i][1] : i in [1..p]];

end for;

pp_lin:=[Evaluate((l[i]-pp[i][1]*lu[p]-pp[i][2])*lu[p],Rp[p]) : i in [1..p]];
ppm_lin:=Matrix(L,p,1,pp_lin);
pp_rm_lin:=B1*ppm_lin;
pp_rm_lin:=[pp_rm_lin[i][1] : i in [1..p]];

pp_rm:=Matrix(pp_rm);
pp_rm:=Transpose(pp_rm);
pp_rm_pole:=Matrix(pp_rm_pole);
pp_rm_pole:=Transpose(pp_rm_pole);

pp_rm_const:=Matrix(pp_rm_const);
pp_rm_const:=Transpose(pp_rm_const);

qd_const:=[];

qd_pole2:=[];
for k in [1..p] do
qd_pole2[k]:=[[hom(pp_rm_pole[i][k]*pp_rm_pole[j][k]) : j in [1..p]] : i in
[1..p]];
end for;

for k in [1..p] do
qd_pole2[p+k]:=[[hom(pp_rm_pole[i][k]*pp_rm_const[j][k]+pp_rm_pole[j]
[k]*pp_rm_const[i][k]) : j in [1..p]] : i in [1..p]];
end for;

qd_pole2[2*p+1]:=[[hom(pp_rm_pole[i][p]*pp_rm_lin[j]+pp_rm_pole[j][p]*pp_rm_lin[i]
+pp_rm_const[i][p]*pp_rm_const[j][p]) : j in [1..p]]: i in [1..p]];

q_pole2_mat:=[];
for i in [1..p] do
for j in [1..i] do
q_pole2_mat[i*(i-1) div 2 +j]:=[];
for t in [1..2*p] do
for k in [1..2*p+1] do
q_pole2_mat[i*(i-1) div 2 +j][(2*p+1)*(t-1)+k]:=qd_pole2[k][i][j][t];
end for;
end for;
end for;
end for;
q_pole2_mat:=Matrix(Rationals(),p*(p+1) div 2, 2*p*(2*p+1),q_pole2_mat);

q:=Matrix(q_pole2_mat);
Lat:=Lattice(q);
Lat:=PureLattice(Lat);
Lat:=LLL(Lat);
q:=BasisMatrix(Lat);

V:=RSpace(Integers(),p*(p+1) div 2);


W:=RSpace(Integers(),2*p*(2*p+1));
qh:=hom<V->W|q>;

You might also like