This assumes that the graph of the input map Phi is defined by a simplified system of equations, which may not be true. If the option Verify is set to true, which is the default choice, then it is verified that the left and right composition of Phi with the returned map is the identity, throwing an error if this is not the case.
i1 : K = ZZ/10000019; |
i2 : -- map defined by the cubics through the secant variety to the rational normal curve of degree 6 Phi = multirationalMap rationalMap(ring PP_K^6,ring GG_K(2,4),gens ideal PP_K([6],2)); o2 : MultirationalMap (rational map from PP^6 to GG(2,4)) |
i3 : time Psi = inverse2 Phi; -- used 0.743688 seconds o3 : MultirationalMap (birational map from GG(2,4) to PP^6) |
i4 : assert(Phi * Psi == 1) |
i5 : Phi' = Phi || Phi; o5 : MultirationalMap (rational map from PP^6 x PP^6 to GG(2,4) x GG(2,4)) |
i6 : time Psi' = inverse2 Phi'; -- used 2.70193 seconds o6 : MultirationalMap (birational map from GG(2,4) x GG(2,4) to PP^6 x PP^6) |
i7 : assert(Phi' * Psi' == 1) |
The object inverse2 is a method function.