How to define sequential conditions inside sum() ?

For example, embedding the block

```
tot=0
for j in Set1
if (i,j) in Set2 condition1
if k in Set3[(i,j)] condition2
tot = tot + f(i,j,k)
end
end
end
```

inside sum(), keeping the condition2 dependent on condition1 concisely as follows

`sum( f(i,j,k) for j in Set1 if ((i,j) in Set2) if (k in Set3[(i,j)]) )`