If $p(x,y)$ is the joint distribution of two discrete random variables $x, y$. The sum rule states that: $$p(x) = \sum_{y \in T} p(x,y)$$
Where $T$ are that states of the target space of random variable $Y$
As per my understanding, this is basically the law of total probability. If events associated with target space of Y are a partition of the outcome space $\Omega$. We can calculate the probability of $x$ (marginal) regardless of $y$ (please correct me if there is something not accurate).
Now, my issue is with the other form of the sum rule (for continuous random variables): $$p(x) = \int_{T} p(x,y) dy$$
It seems logical to me, but I want to understand how can we end up with this form for continuous r.v., so any pointers?
The keyword is the probability measure you define on the space $T$. The last notation is the most general one in probability theory. When $T$ is discrete and has the Dirac point measure, it reduces to a sum. The measure tells you how elements of the set $T$ are to be "counted in" when computing probabilities. The measure here is $dy$ i.e. an uniform democratic probability for all elements in $T$.