The basic procedure for defining and expanding a pattern is shown below without the practical details of working with PBE.