How is this probability distribution evaluated with Kronecker Delta and summation

kronecker-deltaprobabilityprobability distributionssummation

I am reading through Robert Swendsen's An Introduction to Statistical Mechanics and Thermodynamics, and in section 3.4, he provided an example of the probability of the sum of two dice using Kronecker delta, I am extremely lost on the latter half of this example.

So we have two dice with 6 sides on each dice, let $X=\{x|x=1,2,3,4,5,6\}$ represent random number outcome of first die, and $Y$ represent second die.

Let $S=X+Y$ be the sum, with values range from $2$ to $12$.

Let the probability distribution be $$P(x,y)=P_{X}(x)P_{Y}(x)=(\frac{1}{6})(\frac{1}{6})=\frac{1}{36}$$

Now we evaluate $P(s)$ using Kronecker Delta, $$P(s)=\frac{1}{36}\sum_{x=1}^{6}\sum_{y=1}^{6}\delta_{s,x+y}$$

First, evaluate the sum over $y$:
$$\sum_{y=1}^{6}\delta_{s,x+y}=\begin{cases}
1 & 1\leq s-x \leq 6 \\
0 & otherwise
\end{cases}$$

Only for $y$ within interval $[1,6]$ does the Kronecker Delta has a value.

Because of this, the value of $x$ is limited by $$s-6 \leq x \leq s-1$$, further more, $x$ must satisfy $$1 \leq x \leq 6$$.

Robert then proposed the following:
$$P(s)=\begin{cases}
\sum_{x=1}^{s-1} \frac{1}{36} =\frac{s-1}{36} & s \leq 7 \\
\sum_{x=s-1}^{6} \frac{1}{36} =\frac{13-s}{36} & s \geq 7
\end{cases}$$

How was $P(s)$ evaluated over the sum at the end? I feel like I am missing something obvious here but my brain can't figure it out.

Normally, I would expect something like this: $$\sum_{i=1}^{3} 2i+1=[2(1)+1]+[2(2)+1]+[2(3)+1]=15$$

But I am not sure how to evaluate $$\sum_{x=s-6}^{6} \frac{1}{36} =\frac{13-s}{36} \,\,\, s \geq 7$$ ?

Edit: here's a screenshot of the original text
enter image description here

Best Answer

Let $a$ and $b$ be integers, $a>b$.

Then, for any constant $c$, one can easily prove that: $$\sum_{i=a}^b c = c(b-a+1)$$

This fact is being used in the last two summations.