calculating distance between members of a set

Hi,

I'm wondering if anyone can help me please, i'm wanting to know the mathematical notation for representing calculating the ditancaes of a set. What i want is a new set with the distances.

e.g. i have an ordered set X = {1,5,12,15,25}

the distance would be |Xi - Xi+1|

how can i represent in mathematical terms a new set that contains the distances of the set X.

e.g. in pseudo code it would look like

Set X = new Set{1,5,12,15,25}

Set Y = new Set() // for the distances

for(i = 0; i < X.length -1; ++i)

{

Y.Add(X[i] - X[i+1])

}

What i want would be the math notation for obtaining set Y

Thanks.