Theory of a lossless nonlinear Fabry-Perot interferometer