On the equilibrium of coexisting sedimentary carbonates