Question: Writing the erdos gallai theorem in maple?

So for the part of the erdos gallai theorem that says:


\sum^{k}_{i=1}d_i\leq k(k-1)+ \sum^n_{i=k+1} \min(d_i,k)

 

how could I translate this into maple? I'm assuming I'll need to use nested for...dos

Please Wait...