A Gröbner basis criterion for birational equivalence of affine varieties Effective Łojasiewicz inequality for arithmetically defined varieties and a geometric application to bihomogeneous polynomials 