///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Verifying r=5 case in Theorem 6.1


P<t>:=PolynomialRing(Rationals());

f5:=127358629188153017343112694654244*t^30-14476726558441542259500980593582900*t^27+767540949843094964859507359162484321*t^24-23227949011157855871750302161149318060*t^21+486933739385947419621206507920009537350*t^18-8471956828413213486742748322179256745500*t^15+139665528153448288531118705650287136663899*t^12-1509800364506319291441531124462079071041720*t^9+14597743197263467927181474503046907251979462*t^6-135004259433655686521826532061360904927910680*t^3+543592155691663960065241800360826161610140961;

C5:=HyperellipticCurve(P!f5);
F5<u,y>:=FunctionField(C5);

y51:=11285328049647162*u^15-612703879315493343*u^12+11259180860536474740*u^9+124175441794992816207*u^6-2894185136924624900028*u^3+23315023973129417008893;
y52:=11285328049647162*u^15-637837872300913137*u^12+15898504501345253760*u^9-133140352448943347487*u^6+2895345088136314829232*u^3-23315023973129417008893;
y53:=11285328049647162*u^15-641395912765696179*u^12+15779426445792454284*u^9-132367737077167916373*u^6+2891689893601551455028*u^3-23295069079544963156463;
y54:=11285328049647162*u^15-787772412770249571*u^12+14665379977955069244*u^9-219254957235699134757*u^6+2621647313739427449588*u^3-35358708563462647994607;
y55:=11285328049647162*u^15+2985212511317920527*u^12+74598289369102611840*u^9+1831498005344531215377*u^6+17007935571912588694272*u^3+183122730884960782522323;

D51:=PrincipalDivisor(y-y51) div 3;
D52:=PrincipalDivisor(y-y52) div 3;
D53:=PrincipalDivisor(y-y53) div 3;
D54:=PrincipalDivisor(y-y54) div 3;
D55:=PrincipalDivisor(y-y55) div 3;

IsPrincipal(3*D51);
IsPrincipal(3*D52);
IsPrincipal(3*D53);
IsPrincipal(3*D54);
IsPrincipal(3*D55);

for i1,i2,i3,i4,i5 in [0..2] do
D:=i1*D51+i2*D52+i3*D53+i4*D54+i5*D55;
if IsPrincipal(D) then
i1,i2,i3,i4,i5;
end if;
end for;