Description: Valuation of a pair in a monoid. (Contributed by Stefan O'Rear, 23-Aug-2015) (Revised by Mario Carneiro, 27-Feb-2016)