Nonnegative matrices in dynamic programming by Zym