The general form of divergence invariant to transformations