Generalized Martelli Semiring