Formalization (and background) of a formula, concering the integral points of a polygon. I have recently become aware of the following neat statement.
Consider a convex polygon $P$ in the real plane with integral vertices. If we associate with every integral point $(a,b)$ the monomial $x^ay^b$ we then arrive at the Laurent polynomial $S(P)$ equal to the sum of corresponding monomials over all the integral points of the (closed) polygon.
Now consider the angles $A_i$ of our polygon, where by "angle" I mean a geometrical figure bounded by two rays with the same endpoint. In the same fashion we may consider the Laurent series $S(A_i)$. It turns out that, in a sense, $S(P)=\sum_i S(A_i)$ (briefly speaking, that is if one allows himself the formal application of the formula for the sum of an infinite geometrical progression and other natural arithmetic transformations).
My questions are, probably, addressed to those who are more familiar with this subject than I am. First of all: what is the proper (accepted) way of formalizing this? This is an identity between elements of what algebraic structure?
Second, I would like to put this in some sort of perspective. What is the proper name(s) for such theorems? What are the known generalizations here? I only know such formulas to hold for very specific polytopes I happened to work with, most of them in countable dimensional space. There is some continuous version concerning analogous integrals, isn't there?
Where does one read about all this?
 A: You are describing special cases of a lovely theorem due to Brion.  A very readable reference, with notes and further references to the literature, is Chapter 9 of the book Computing the Continuous Discretely by Matthias Beck and Sinai Robins.  From this link you can get to a free pdf version of the book.
A: As the other answer pointed out, this is Brion's theorem, and you can probably find several articles devoted to it. There are many proofs in the literature, the original one using equivariant K-theory and toric geometry, but there are more elementary proofs as well.
My perspective is that Brion's formula gives you an identity of rational functions (or meromorphic functions depending on what polyhedra one considers), which can be obtained by applying the appropriate valuation to a well known geometric decomposition of the polytope.
First let me talk about valuations. The vector space at hand, $\mathbb P$, will be generated by indicator functions of polyhedra with rational coordinates. A valuation will be a linear map to a specified target vector space $V$. There are many useful valuations, such as volume or euler characteristic. The valuation that is relevant here is
$$\varphi: \mathbb P\to \mathbb C(x_1,x_2,\dots,x_n)$$
which takes values in rational functions, and which takes a polyhedron to the generating function of lattice points contained in it, whenever this generating function converges, and takes the value zero, otherwise. 
Therefore polyhedra containing a line get sent to zero by this valuation. The fact that $\varphi$ is a valuation is not trivial and is attributed independently to Pukhlikov and Khovanskii, "Finitely additive measures of virtual polytopes", and Lawrence, "Valuations and polarity". Notice that if we were to allow irrational polyhedra, we would have to replace rational functions with meromorphic functions.
Now, to the geometric part, we have the following identity of characteristic functions for any polytope $P$
$$\mathbb 1_{P}=\sum_{F \text{ is a face of } P}(-1)^{\operatorname{dim}(F)}\mathbb 1_{T_FP}$$
where $T_FP$ is the tangent cone of $P$ at face $F$. Clearly these tangent cones will contain lines if $\operatorname{dim} F\geq 1$. So the identity $$\mathbb 1_P=\sum_{v \text{ is a vertex of } P}\mathbb 1_{T_vP}$$ holds "modulo lines". And indeed applying the valuation $\varphi$ gives you Brion's formula.
Of course, another important perspective is that Brion's formula is essentially a combinatorial incarnation of the localization formula for equivariant K-theory, so "the right" perspective on this result may vary, depending on who you ask. :)
