Understanding the global residue theorem I am studying the global residue theorem which applies for multivariate residues. The theorem is reported in the following references e.g. (1) (Eq.87) , (2) (Eq. 109) in different formulations, that now I would try to understand. 
It is unnecessary to reveal that my education is not from math studies, so I am sorry if I won't be precise.


*

*First of all, let us focus on the following definition (1) (see Eq.87).



Theorem 2. (Global residue theorem). Let $\omega$ denote a
  meromorphic $n$-form defined on a compact manifold $M$. Given an open
  covering $\{U_i\}$, let $\omega$ take the local form
$$ \omega=\frac{h(z)dz_1 ∧ · · · ∧ dz_n}{f_1(z)· · · f_n(z)} $$  where $f(z) = (f_1(z), . . . , f_n(z)):\mathbb{C}^n \rightarrow \mathbb{C}^n$ and
  $h(z): \mathbb{C}^n \rightarrow C$ are holomorphic functions. Let 
  $D_j= \{z ∈ M : f_j (z) = 0\}$ with $j = 1, . . . , n$ denote the divisors of $\omega$, and assume that $V = D_1 ∩· · ·∩ D_n$ is a finite set.
  Then $$ \sum_{p∈V} Res_p\omega = 0$$ where each $Res_p\omega$ is
  evaluated locally on a patch $U_i$ which contains $p$.

Strictly speaking, if we have a form which is defined on $\mathbb{C}^n$, the theorem does not apply. This is why in (1) is suggested to compactify $\mathbb{C}^n$ into $\mathbb{CP}^n$ and then apply the theorem. This is done through the change of coordinate
$$
z_1 = \frac{w_1}{w_0}\,,\,. . . \,,\,z_n = \frac{w_n}{w_0}
$$
and the open covering $\{U_k\}$ is defined as
$$
U_k = \{(w_0,w_1,...w_n): w_k=1\}\,, \text{for } k=0,1,...n
$$
The form $\omega$ on the patch $U_k$ then takes the expression (see Eq. 92 in (1))
$$
\omega|_{U_k} = \frac{(-1)^k\, h(w/w_0)\, dw_0\,\wedge\,...\wedge dw_n}{w_0^{n+1}f_1(w/w_0)...f_n(w/w_0)}
$$
Question: Is there a sufficient condition on the polynomials $h(z),f_i(z)$ such that the zeros of $f(z) = (f_1(z),...,f_n(z))$ are all the points contained in the set $V$ in the open covering $U_0$?


*

*According to (2) the theorem can also be stated in the following way



Let $\omega = h\,dz/f_1 ...f_n$ be defined by polynomials $h$ and $f_i$. Let $F_i = \{z ∈ \mathbb{C}^n : f_i(z) = 0\}$ be the hypersurface (i.e. $n − 1$ dimensional subspace) associated with $f_i$ and $Z = F_1 ∩F_2 ∩...∩F_n$ be the set of zeroes of $f$. Here we assume that $Z$ is a discrete set of points. Then one defines the Global residue of $h$ with respect to the map $f$ as
  $$
Res_f (h) = \sum_{a∈Z} res(ω)_a.
$$
  Now, the Global Residue Theorem (GRT) states that if $deg(h) < deg(f_1) + . . . + deg(f_n) − n$ then $Res_f (h) = 0$.

This formulation seems to give an answer to my question about the sufficient condition, i.e. provided $deg(h) < deg(f_1) + . . . + deg(f_n) − n$ . However, I don't understand it. For example, this formulation does not talk about compact manifolds and seems to be very general. However, it does not seem quite exact (maybe I am misunderstanding). Consider for example the form
$$
\omega = \frac{z_2^2 z_1 dz_1\wedge dz_2}{(1-z_2 -z_1 +2z_1 z_2)z_1(z_2-z_1)z_2(z_1-1)}
$$
with the map $f(z) =\left((1-z_2 -z_1 +2z_1 z_2)z_1(z_2-z_1),z_2(z_1-1)\right) $. The set $Z$ is given by discrete points $Z=\{(0,0),(1,0),(1,1)\} $. Moreover, $\text{deg}(h) = 3$ and $\text{deg}(f_1)+\text{deg}(f_2) = 5 + 1 = 6 $, then the condition $3 < 6 - 2 = 4$ is satisfied and I would expect the theorem holds. Instead, by direct computation (by hand) I get a non-zero global residue. If you don't want to do computations by hand, you can use the Mathematica package MultivariateResidues, the code is shown below.
Where am I wrong? Is the definition of $\text{deg}(...)$ more complicated?
You can copy and past the following Mathematica Code to reproduce my result
Get["MultivariateResidues.m"];
sols = {(1 - w2 + w1 (-1 + 2 w2)) w1 (w2 - w1) == 0, w2 (w1 - 1) == 0} // Solve;
listResidues = {};
Print[Dynamic[ii], "/", Length[sols]]
For[ii = 1, ii <= Length[sols], ii++,
AppendTo[listResidues, (MultivariateResidue[w2^2 w1, {(1 - 1 w2 + w1 (-1 + 2 w2)) w1 (w2 - w1), w2 (w1 - 1)},sols[[ii]]] // Simplify)]]
listResidues2 /. List -> Plus // Simplify
(* Output: -1 *)

 A: *

*Let us start by discussing OP's example. One of the 3 singularities that OP mentions, namely the point $(0,0)$, is a removable singularity. Let us for simplicity remove common factors in the numerator and the denominator. 

*OP's 2-form then becomes: 
$$\omega ~=~ \frac{z_2 \mathrm{d}z_1\wedge \mathrm{d}z_2}{\underbrace{(1-z_2- z_1 +2z_1 z_2)}_{=g_3(z)}\underbrace{(z_2-z_1)}_{=g_2(z)}\underbrace{(z_1-1)}_{=g_1(z)}}. \tag{1}$$

*We are interested in points where precisely 2 of the denominator parenthesis vanish$^1$
$$\begin{align} 
g_1(z)~=~0 ~\wedge~ g_2(z)~=~0:& \qquad z~=~(1,1), \cr
 g_1(z)~=~0 ~\wedge~ g_3(z)~=~0:& \qquad z~=~(1,0), \cr
 g_2(z)~=~0 ~\wedge~ g_3(z)~=~0:& \qquad z~=~(b_{\pm},b_{\pm}),
\qquad b_{\pm}~:=~\frac{1\pm i}{2}.\end{align}\tag{2}$$ 
The first 2 poles $(1,1)$ and $(1,0)$ were already mentioned by OP. OP did not mention the last 2 poles $(b_{\pm},b_{\pm})$. 

*The issue is that we might have to change how we factorize into 2 factors $f_1(z)$ and $f_2(z)$ in the denominator $f_1(z)f_2(z)=g_3(z)g_2(z)g_1(z)$ to get to all pertinent poles. Apart from this point, which isn't really spelled out in Ref. 2, the non-compact version of the global residue theorem (GRT) is correct.

*Let us calculate all the 4 residues:
$$\begin{align} \oint\oint_{(1,1)} \omega
~=~& \oint\oint_{(0,0)}\frac{ \mathrm{d}h_1\wedge \mathrm{d}h_2}{(h_2-h_1)h_1}
~=~(2\pi i)^2, \cr
 \oint\oint_{(1,0)} \omega
~=~& \oint\oint_{(0,0)}\frac{h_2 \mathrm{d}h_1\wedge \mathrm{d}h_2}{(h_2- h_1)(-1)h_1} \cr
~=~& \oint\oint_{(0,0)}\frac{(k_2+h_1) \mathrm{d}h_1\wedge \mathrm{d}k_2}{k_2(-1)h_1}~=~0, \cr
 \oint\oint_{(b_{\pm},b_{\pm})} \omega
~=~& \oint\oint_{(0,0)}\frac{b_{\pm} \mathrm{d}h_1\wedge \mathrm{d}h_2}{(h_1+h_2)(h_2-h_1)(b_{\pm}-1)^2}\cr
~=~& \oint\oint_{(0,0)}\frac{b_{\pm} \mathrm{d}k_1\wedge \mathrm{d}k_2}{k_1k_2(\mp i)}~=~\frac{-1\pm i}{2}(2\pi i)^2.\end{align}\tag{3}$$
Note that the residues indeed sums up to zero as they should according to the non-compact version of the global residue theorem (GRT) in Ref. 2.
References:


*

*K.J. Larsen & R. Rietkerk, MultivariateResidues: a Mathematica package for computing multivariate residues, arXiv:1701.01040; eq. (87).

*N. Arkani-Hamed, F. Cachazo, C. Cheung, & J. Kaplan, A Duality For The S-Matrix, arXiv:0907.5418; eq. (109).
--
$^1$ Another potential candidate is if the second-order polynomial $g_3(z)$ simultaneously has a simple zero wrt. both the variables $z_1$ and $z_2$. However, this is not the case since the differential $$\mathrm{d}g_3~=~ (2z_2-1)\mathrm{d}z_1+(2z_1-1)\mathrm{d}z_2\tag{4}$$ does not vanish on the curve 
$$0~=~g_3(z)~\equiv~ 2\left(z_1-\frac{1}{2}\right)\left(z_2-\frac{1}{2}\right)+\frac{1}{2}.\tag{5}$$
