This constructs an object of the class FormalGroupLaw out of a FormalSeries living in a PolynomialRing with two generators. The axioms of the neutral element, commutativity and associativity are checked up to the precision of s.
i1 : R=ZZ[x,y]
o1 = R
o1 : PolynomialRing
i2 : s = series(x+y+x*y,2)
o2 = FormalSeries{x*y + x + y, 2}
o2 : FormalSeries
i3 : f= FGL(s)
o3 = FormalGroupLaw{x*y + x + y, 2}
o3 : FormalGroupLaw