Question: How to sum on j1, j2 and boolean expressions?

I want a function depending on n1 and n2, and a1 and a2, more or less in the following way: sum( sum( ((if ((j1*k1/n1 +j2*k2/n2+k2/n2 > 1/2) &and (j1*k1/n1 +j2*k2/n2 >1/2)) 1 else 0), j1=0..n1), j2=0..n2). How do I write in maple the previous expresion?. That is.. how may I write MYfunction( n1, n2) = sum( sum( BOOLEAN , j1=0..n1),j2=0..n2); where BOOLEAN stands for terms involving j1,j2,n1,n2 and other "constants"? Thanks in advance! Jacques
Please Wait...