Both the stack and the buffer will be represented as lists, although the stack will have its head (or top) to the right for reasons of perspicuity.
σ|i represents a stack with top i and tail σ, and j|β represents a buffer with head j and tail β.