Inequality theory and applications