# Memory full and Weyl group

I have a problem of finding all regular intervals in the Coxeter group A9. When I use the code below for small groups A1 up to A4 I find the intervals. But for big groups like A7, A8 (these are symmetric groups S8 and S9), etc in sage 9.5 they say that the memory is full. Is there a way of cleaning the used memory so that I can get the last intervals? Because I want to see how the last few intervals look like. Down is the code.

```
W = WeylGroup('A9', prefix='s')
s1, s2, s3, s4, s5 = W.simple_reflections()
S = W.simple_reflections()
T = W.reflections()
for u in W:
for v in W:
if u != v and v != W.long_element() and u.bruhat_le(v):
K = Set([t for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v)])
if K.cardinality() == v.length() - u.length():
print([u, v])
```

You can directly iterate over the Bruhat intervals using

Why do you use Set instead of a list ?

and in fact maybe you can replace

`K=...`

byto compute directly the cardinality.