Distribution of X+U when X is a discrete and U is a continous random variable Suppose $X$ and $U$ are independent random variables. $X$ is a discrete uniform variable and $U$ is a continuous uniform $[0,1]$ variable. What is the value of $\mathbb P(X+U\leq y)$, where $y$ is a real number?
 A: The question can be solved without the recourse to Dirac masses and distributions (à la Laurent Schwartz). Starting with $\mathbb P(X+U\leq y)$, when assuming $X$ is uniform over the set $\{x_1,\ldots,x_m\}$, conditioning by $X$ does produce the result:
\begin{align*}
\mathbb P(X+U\leq y) &= \mathbb E^{X,U}[\mathbb I_{X+U\leq y}]\\
&= \mathbb E^{X}[\mathbb E^{U|X}\{\mathbb I_{X+U\leq y}|X\}]\\
&= \mathbb E^{X}[\max\{0,\min(1,y-X)\}]\\
&= \sum_{i=1}^m \frac{1}{m} \max\{0,\min(1,y-x_i)\}\\
&= \sum_{i;\,x_i\le y} \frac{1}{m} \min(1,y-x_i)\\
&= \sum_{i;\,y-1<x_i\le y} \frac{y-x_i}{m} + \sum_{i;\,y-1\ge x_i} \frac{1}{m}\\
&= y\,\mathbb P(y-1<X\le y)+\mathbb P(X\le y-1) - \frac{1}{m} \sum_{\stackrel{i}{y-1<x_i\le y}} x_i
\end{align*}
A: Here is an alternative (possibly simpler) expression for the result.  Following Xi'an by taking $\{ x_1,...,x_m \}$ to be the support of $X$, we have:
$$\begin{align}
\mathbb{P}(X+U \leqslant y) 
&= \sum_{i=1}^m \mathbb{P}(X+U \leqslant y | X = x_i) \cdot \mathbb{P}(X = x_i) \\[6pt]
&= \sum_{i=1}^m \mathbb{P}(U \leqslant y-x_i) \cdot \mathbb{P}(X = x_i) \\[6pt]
&= \sum_{i=1}^m F_U(y-x_i) \cdot p_X(x_i) \\[6pt]
&= \frac{1}{m} \sum_{i=1}^m \min(1, y-x_i) \cdot \mathbb{I}(x_i \leqslant y). \\[6pt]
\end{align}$$
We can program this function in R as follows:
PROB <- function(y, xsupp) {
  xsupp <- unique(xsupp);
  T1 <- pmin(1, y-xsupp);
  T2 <- (xsupp <= y);
  sum(T1*T2)/length(xsupp); }

Here is an example:
PROB(y = 1.3, xsupp = c(0.1, 0.3, 0.5, 0.9, 1.1, 2));
[1] 0.5666667

A: If you are accustomed with distributions, aka "generalized functions", you can easily unify the description of discrete and continuous random varaibles (RV), because the probability density of a discrete RV merely is a distribution. Let $a_1,\ldots,a_k$ be the possible values of the discrete RV with probabilities $P(a_1),\ldots,P(a_k)$. Then the probability density of this RV is
$$g(x) = \sum_{i=1}^k P(a_i)\cdot \delta(x-a_i)$$
where $\delta$ denotes Dirac's delta distribution.
The probability density of the sum of two independent RVs with densities $g$ and $f$ is the convolution $h=g*f$ of their densities. If $f$ denotes the density of your continuous RV, the convolution yields
\begin{eqnarray*}
h(y) & = & \int_{-\infty}^\infty g(x)\cdot f(y-x)\,dx \\
& = & \sum_{i=1}^k P(a_i) \int_{-\infty}^\infty \delta(x-a_i)\cdot f(y-x)\, dx \\
 & = & \sum_{i=1}^k P(a_i)\cdot f(y-a_i)
\end{eqnarray*}
Addendum: If you are unfamiliar with the delta distribution, it is sufficient in this context to know its defining property:
$$\int_{-\infty}^\infty \delta(x)\, f(x)\, dx = f(0)$$
for every sufficiently smooth "test function" $f$. Distributions are a much more powerful tool than merely for assigning a density function to discrete random vaiables. To this end, the Stieltjes integral is sufficient, albeit a much more restricted concept. But physicists and engineers have to learn distributions anyway, so it seems natural to use them here, too. The advantage is that you can formally use the familiar notation of integrals.
