A Purity Criterion for Pairs of Linear Transformations