A Mathematical Formulation of the Ricardian System