# Singular          #### D.5.4.2 invertBirMap

Procedure from library `paraplanecurves.lib` (see paraplanecurves_lib).

Usage:
invertBirMap(phi, I); phi ideal, I ideal

Assume:
The ideal phi in the basering R represents a birational map of the variety given by the ideal I in R to its image in projective space P = PP^(size(phi)-1).

Note:
The procedure might fail or give a wrong output if phi does not define a birational map.

Return:
ring, the coordinate ring of P, with an ideal named J and an ideal named psi.
The ideal J defines the image of phi.
The ideal psi gives the inverse of phi.
Note that the entries of psi should be considered as representatives of classes in the quotient ring R/J.

Theory:
We compute the ideal I(G) in R**S of the graph G of phi.
The ideal J is given by the intersection of I(G) with S.
The map psi is given by a relation mod J of those relations in I(G) which are linear in the variables of R.

Example:
 ```LIB "paraplanecurves.lib"; ring R = 0,(x,y,z),dp; poly f = y^8-x^3*(z+x)^5; ideal adj = adjointIdeal(f); def Rn = invertBirMap(adj,ideal(f)); ==> // 'invertBirMap' created a ring together with two ideals J and psi. ==> // Supposing you typed, say, def RPn = invertBirMap(phi,I); ==> // you may access the ideals by typing ==> // setring RPn; J; psi; setring(Rn); J; ==> J=y(5)*y(6)-y(4)*y(7) ==> J=y(4)*y(6)-y(3)*y(7) ==> J=y(2)*y(6)-y(1)*y(7) ==> J=y(4)*y(5)-y(2)*y(7) ==> J=y(3)*y(5)-y(1)*y(7) ==> J=y(1)*y(5)-y(7)^2 ==> J=y(4)^2-y(1)*y(7) ==> J=y(3)*y(4)-y(1)*y(6) ==> J=y(2)*y(4)-y(7)^2 ==> J=y(1)*y(4)-y(6)*y(7) ==> J=y(2)*y(3)-y(6)*y(7) ==> J=y(1)*y(3)-y(6)^2 ==> J=y(2)^2-y(5)*y(7) ==> J=y(1)*y(2)-y(4)*y(7) ==> J=y(1)^2-y(3)*y(7) ==> J=y(1)*y(6)^2-y(3)^2*y(7) ==> J=y(6)^4-y(3)^3*y(7) psi; ==> psi=-y(6)^2 ==> psi=-y(4)*y(7) ==> psi=y(6)^2-y(5)*y(7) ```

### Misc 