  We present a generalisation of the sifting procedure introduced originally by
Sims for computation with finite permutation groups, and now used for many
computational procedures for groups, such as membership testing and finding
group orders. Our procedure is a Monte Carlo algorithm, and is presented and
analysed in the context of black-box groups. It is based on a chain of subsets
instead of a subgroup chain. Two general versions of the procedure are worked
out in detail, and applications are given for membership tests for several of
the sporadic simple groups.
  Our major objective was that the procedures could be proved to be Monte Carlo
algorithms, and their costs computed. In addition we explicitly determined
suitable subset chains for six of the sporadic groups, and we implemented the
algorithms involving these chains in the {\sf GAP} computational algebra
system. It turns out that sample implementations perform well in practice. The
implementations will be made available publicly in the form of a {\sf GAP}
package.
