reduce_overlap function

Eliminates redundant terms.