I've read in various threads on stack exchange as well as other webpages that every CFL has a corresponding PDA with just one state. I've studied PDA from Peter Linz's Automata book. However there is no mention of a single state PDA. In the text, they have mentioned a method for 3 state PDA and in the exercises they have reduced it to 2 states.
For a single state, I've come up with the idea of using multiple initial symbols on the stack so that I can simulate two different states in a single state in the following way:
Initially stack contains $xy$.
$\delta (a,xy,ay)$ #with $x$ gone from stack, a langauge such as $a^nb^na^mb^m$ won't be accepted.
$\delta (a,a,aa)$
$\delta (b,a,\lambda)$
Accept if we get the $y$ on stack at the end of the input. I don't know if such assumptions and operations are allowed on a PDA. In any case, how do I represent the above language in a single state PDA?
Regarding accessing two elements from top prior to any operation: I would think of $\delta(a,xy,ay)$ as $\delta(a,x,M)$, $\delta(y,M,N)$, $\delta(a,N,ay)$.