Consistency, stability, a priori and a posteriori errors for Petrov-Galerkin methods applied to nonlinear problems