If one wanted to obtain a fan for a toric variety of dimension $ n>1 $ whose Cox ring is $ \mathbb{Z}^{2} $ graded with weights $ \{(a\_{i},b\_{i})\}\_{i=1}^{n+2} $, then one could let $ B $ be the $ n \times (n+2) $ matrix whose $ (i,j) $-th entry is $ \delta(i,j) $ if $ 1 \le i, j \le n $, $ a\_{i} $ if $ j $ is equal to $ n+1 $ and $ b\_{i} $ if $ n $ is equal to $ n+2 $. After performing row reduction over the integers, one ends up with an $ n \times (n+2) $ matrix $ A $ with entries in $ \mathbb{Z} $. The $ n+2 $ columns of $ A $ are the rays for a fan in $ \mathbb{R}^{n} $. If the rays are $ \{u\_{\rho\_{1}},\dots,u\_{\rho\_{n+2}} \} $, then maximal dimensional cones $ \sigma $ are of the form $ \operatorname{Cone}(u\_{\rho\_{i\_{1}}},\dots,u\_{\rho\_{i\_{n}}}) $. The fan $ \Sigma $ is then obtained from the maximal cones and their faces. From $ \Sigma $ one obtains an ideal $ B(\Sigma) = \langle x^{\widehat{\sigma}} \rangle\_{\sigma \in \Sigma} $ where $ x^{\widehat{\sigma}} $ is $ \prod\_{i \mid \rho\_{i} \notin \sigma} x\_{i} $. From here the quotient of $ \mathbb{A}^{n+2}\_{\mathbb{C}} \setminus Z(B(\Sigma)) $ by the $ \mathbb{G}\_{m}^{2} $ action which sends $ x\_{i} $ to $ z\_{1}^{a\_{i}}z\_{2}^{b\_{i}}x\_{i} $ is isomorphic to the variety $ X\_{\Sigma} $ obtained from the fan $ \Sigma $. As a result, the Cox ring of $ X\_{\Sigma} $ has the desired grading.


What if instead of wanting to find an explicit fan of a toric variety of dimension $ n>1 $ whose Cox ring is $ \mathbb{Z}^{2} $ graded, one wants to find an explicit fan of a toric variety of dimension $ n>1 $ whose Cox ring is $ \operatorname{Hom}(\mathbb{Z}/\langle M \rangle \mathbb{Z}, \mathbb{C}^{\ast}) \times \operatorname{Hom}(\mathbb{Z}/\langle N \rangle \mathbb{Z}, \mathbb{C}^{\ast}) $ graded with weights $ (\overline{a\_{i}}, \overline{b\_{i}})\_{i=1}^{n} $? Is there a similar algorithm for obtaining the fan for such a variety?



How to create a toric variety whose Cox ring has a specific grading?
I realized an answer to this. Let $ B $ be the $ n \times (n+2) $-matrix with entries $ \delta(i,j) $ if $ 1 \le i,j \le n $, $ a\_{i} $ if $ j $ is equal to $ n+1 $ and $ b\_{i} $ if $ j $ is equal to $ n+2 $. Now perform row reduction (with operations strictly in the integers) on the matrix $ B $ until all entries of $ B $ in the $ n+1 $-st column are $ c \delta(1,i) $ and are equal to $ d \delta(2,j) $ for some integers $ c $ and $ d $. If $ \ell\_{1} $ is equal to $ \operatorname{LCM}(c,M) $ and $ \ell\_{2} $ is equal to $ \operatorname{LCM}(d,N) $, then multiply the first row by $ M/\ell\_{1} $ and the second row by $ N/\ell\_{2} $. The $ i $-th column is $ u\_{\rho\_{i}} \in \mathbb{N}^{n} $. If $ \rho\_{i} $ is equal to $ \mathbb{R}\_{+} u\_{\rho\_{1}} $, then the cone $ \sigma $ equal to $ \operatorname{Cone}(\rho\_{1},\dots,\rho\_{n}) $ is an affine toric variety.


The fan for the affine toric variety $ \operatorname{Spec}(\mathbb{C}[\sigma^{\vee} \cap M]) $ determines an ideal $ B(\Sigma) $. If $ \mathbb{A}^{n}\_{\mathbb{C}} $ is isomorphic to $ \operatorname{Spec}(\mathbb{C}[y\_{1},\dots,y\_{n}]) $ he variety $ \left(\mathbb{A}^{n}\_{k} \setminus Z(B(\Sigma))\right)//\left(\operatorname{Hom}(\mathbb{Z}/\langle M \rangle \mathbb{Z}, \mathbb{C}^{\ast}) \times \operatorname{Hom}(\mathbb{Z}/\langle N \rangle \mathbb{Z}, \mathbb{C}^{\ast})\right) $ is isomorphic to this variety and therefore has the desired grading. Here the action sends $ y\_{i} $ to $ z\_{1}^{\overline{a\_{1}}} z\_{2}^{\overline{b\_{i}}} y\_{i} $. If others up-vote this answer, then I will accept it. If someone sees something wrong with this, then let me know.


