I do not understand what you really want to do. I attach a notebook that does "something" to H by comparing matrix-elements. But you will notice in the printout that your condition G[i,j] > A[i,j] is often matched for low values of i and j, so higher elements of H are left alone.
Further you can see the condition often is fulfilled for i = j , so {j-> hj+hi, i-> 0 translates to j -> j + i = 2 i and j -> 0. Is it this what you want?
Perhaps you could describe your problem a bit more lucid, or write down the actions you think of "by hand".
Regards HD
Attachments: