Gap solitons, discrete nonlinear Schroedinger equation, critical point theory