The Legal Foundations of Inequality