| LIB "tropical.lib";
ring r=(0,t),(x,y),dp;
poly f=t2x+1/t*y-1;
tropicalSubst(f,2,x,x+t,y,tx+y+t2);
==> [1]:
==> x-1/2
==> [2]:
==> y-1
==> [3]:
==> 5/2
// The procedure can be used to study the effect of a transformation of
// the form x -> x+t^b, with b a rational number, on the tropicalisation and
// the j-invariant of a cubic over the Puiseux series.
f=t7*y3+t3*y2+t*(x3+xy2+y+1)+xy;
// - b=3/2, then the cycle length of the tropical cubic equals -val(j-inv)
list g32=tropicalSubst(f,2,x,x+t3,y,y);
tropicalJInvariant(g32);
==> 5
// - b=1, then it is still true, but only just ...
list g1=tropicalSubst(f,1,x,x+t,y,y);
tropicalJInvariant(g1);
==> 5
// - b=2/3, as soon as b<1, the cycle length is strictly less than -val(j-inv)
list g23=tropicalSubst(f,3,x,x+t2,y,y);
tropicalJInvariant(g23);
==> 14/3
|