4. If real numbers $x, y$ satisfy $1+\cos ^{2}(2 x+3 y-1)=$ $\frac{x^{2}+y^{2}+2(x+1)(1-y)}{x-y+1}$, then the minimum value of $x y$ is $\qquad$ .
4. $\frac{1}{25}$ Detailed Explanation: Since $1 \leqslant 1+\cos ^{2}(2 x+3 y-1) \leqslant 2$, then $\frac{x^{2}+y^{2}+2(x+1)(1-y)}{x-y+1}>0$, and because
$$
\begin{array}{l}
\frac{x^{2}+y^{2}+2(x+1)(1-y)}{x-y+1}=\frac{(x-y)^{2}+2(x-y)+2}{x-y+1}=\frac{(x-y+1)^{2}+1}{x-y+1} \\
=(x-y+1)+\frac{1}{x-y+1} \geqslant 2 .
\end{array}
$$

At this point $\left\{\begin{array}{c}x-y+1=1 \\ 2 x+3 y-1=k \pi\end{array}\right.$, solving gives $x=y=\frac{k \pi+1}{5}$, therefore $x y=\left(\frac{k \pi+1}{5}\right)^{2} \geqslant \frac{1}{25}$.