"Source: Text/Geometry/AlgSrf.text";
"Line: 7084";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Geometry/AlgSrf.text, line: 7084
// Example: H126E43 ()
print "Example: H126E43";
ei := GetEchoInput();
SetEchoInput(true);
R<a,b,c> := PolynomialRing(Rationals(),3);
f := 4*a*b^2*c*(a+c)^2+(a*(b+c)^2+b*(a+c)^2)*(a*(-b+c)^2+b*(c-a)^2);
S := DegreeTwoK3Surface(f);
x,y,z,w := Explode([Ambient(S).i : i in [1..4]]);
eqns := [[x-z,y^2*z+2*y*z^2+z^3+w],
 [x,y*z^2+w], [y+z,x^2*z-z^3+w],
 [y,x*z^2+w], [z,x^2*y+x*y^2+w],
 [x^2+y*z, x*y^2-y^2*z-x*z^2-y*z^2-w],
 [x^2+x*y+y^2+x*z+2*y*z,y^3+x*y*z+4*y^2*z+x*z^2+3*y*z^2+w]];
Ls := [Scheme(Ambient(S),e) : e in eqns];
Lsd := [Scheme(Ambient(S),[Evaluate(u,[x,y,z,-w]) : u in e]) : e in eqns];
dsds := ResolveSingularSurface(S); // get the desing data objects
B,F := EllipticFibrationRRSpaceDeg2K3(S,[ [*Ls[2],1*],[*Lsd[2],1*],
[*Ls[3],1*], [*Lsd[3],1*] ], [ [*dsds[4],j,1*] : j in [3,4] ] cat
[ [*dsds[5],j,1*] : j in [1..4] ]);
B; F;
C,pts,subst := EllipticGeneralFibreDeg2K3(S,B,[Ls[4],Lsd[4],
  Ls[5],Lsd[5]]);   
C; Ambient(C);
pts;
subst;
E,Emp := EllipticCurve(C,pts[4]);
E;
SetEchoInput(ei);
