Suppose I want to calculate the following probability:
$$ P(A|B) $$
And I know a partition of $B$, that is $D_1$, $D_2$, $D_3$, ...
How can I express the probability $P(A|B)$ in terms of the probabilities of the partition of $B$: $P(D_1)$, $P(D_2)$ ...
Following @hardmath comment:
$$ P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{\sum P(A \cap D_i)}{\sum P(D_i)} $$