Dynamics of Caste and Law