The following is the well known Van der Waerden theorem:
Th. Given positive integers $k,r$ there exists positive integer $N=N(k,r)$ such that if $\{1,2,...,N\}$ is $r$-colored then there exists a monochromatic AP of length $k$.
Now consider the following statement $S(k,m)$:
Th. Given any two positive integers $k,m$ there exists a positive integer $p=p(k,m)$ such that for any $p$ positive integers $a_1<a_2<...<a_p$ with the property that $|a_{j+1}-a_j|\leq m$ for all $j=1,2,...,p-1$ ,there exists an AP within $a_1,a_2,...,a_p$ of length $k$.
Now our instructor proved that Van der Waerden $\implies S(k,m).$
I have some difficulty in understanding the proof.I think I am not getting the main philosophy.I give the proof below:
Proof: Assume that Van der Waerden theorem is true.
Let $p=p(k,m)=N(k,m)-(m-1)$,we will show that this $p$ does the job.
Let $A_0=\{a_1,a_2,...,a_p\}$ be a set of positive integers with the property that $|a_{j+1}-a_j|\leq m$ for all $1\leq j\leq p-1$.
Define $A_1=\{a_1+1,a_2+1,...,a_p+1\}\setminus A_0$
$A_2=\{a_1+2,a_2+2,...,a_p+2\}\setminus A_0\cup A_1$
$\vdots$
$A_{m-1}=\{a_1+(m-1),...,a_p+(m-1)\}\setminus A_0\cup A_1\cup\dots\cup A_{m-2}$
Then $\{a_1,a_1+1,...,a_p+(m-1)\}=A_0\cup A_1\cup\dots \cup A_{m-1}$ $($Why?$)$
Now $a_p+(m-1)-a_1+1=a_p+m-a_1\geq p+a_1-1+m-a_1=N(k,m)$ $($ Why?$)$
which completes the proof.$($Why?$)$
I do not really understand what is going on here.I have marked the lines I do not understand by writing 'Why?'.Please go through the proof and help me to digest the essence of the proof.