Cramer's theorem (algebraic curves)