# Testing whether a list of permutations avoids two permutations

I have a list of $n$-permutations in Sage, for example:

```
U=[[2, 3, 1, 4, 5], [2, 4, 1, 3, 5], [2, 5, 1, 3, 4], [2, 1, 3, 4, 5], [1, 3, 4, 2, 5], [1, 3, 5, 2, 4], [1, 3, 2, 4, 5], [3, 1, 4, 2, 5], [3, 4, 1, 2, 5], [3, 5, 1, 2, 4], [3, 1, 2, 4, 5], [1, 2, 4, 5, 3], [1, 2, 4, 3, 5], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 2, 3, 5], [4, 1, 2, 5, 3], [4, 1, 5, 2, 3], [4, 5, 1, 2, 3], [4, 1, 2, 3, 5], [1, 2, 3, 5, 4], [1, 2, 5, 3, 4], [1, 5, 2, 3, 4], [5, 1, 2, 3, 4], [1, 2, 3, 4, 5]]
```

Now I want to check whether this lists is in Av($\pi_1,\pi_2$) , the permutations that avoid the two permutations $\pi_1$ and $\pi_2$ when $\pi_1$ and $\pi_2$ are given (or maybe even more than two given permutations).

Is there an easy or even existing way to do this with Sage?