text:
\section{Introduction}\label{intro}
Calabi Yau algebras play an important role in theoretical physics because their derived categories can be used to
describe brane configurations in the $B$-model of topological string theory. There are several ways to construct examples of this kind of algebras such as McKay correspondence \cite{GB, CT} or exceptional sequences \cite{aspin}. Another important construction method are dimer models \cite{HanKen,FranHan,HanHer}. A dimer model ${\cal D}$ consists of a bipartite graph (with black and white vertices) that is embedded in a compact surface.
To construct the corresponding algebra $A_{\cal D}$ one looks at the dual graph which one orients by giving a cycle around
a black (white) vertex a (anti-)clockwise orientation. This gives a quiver and the corresponding Calabi Yau algebra
is the quotient of its path algebra with an ideal of relations coming from the partial derivatives of a superpotential which is the sum of all black cycles minus the sum of all white cycles.

It was shown by Nathan Broomhead in \cite{broomhead}, by Sergey Mozgovoy and Markus Reineke in \cite{MR} and by Ben Davison in \cite{davison} that if the dimer model satisfies certain consistency conditions, the algebra $A_{\cal D}$ is a $3$-dimensional Calabi Yau Algebra.

In this paper we will show why dimer models appear in this setting and to what extent they arise from the Calabi Yau property.

The Calabi Yau algebras that one obtains from dimer models on a torus share quite specific properties.
They are meant to be noncommutative toric resolutions of a toric variety and therefore
these algebras are prime and finitely generated modules over their centers, which are the coordinate rings of the
affine toric varieties one wishes to resolve. The fact that the resolution is supposed to be toric implies that
the algebra is a graded subalgebra of $\mathsf{Mat}_n(T)$ where $T=\mathbb{C}[\mathbb{Z}^k]$ is the coordinate ring of the torus inside the toric variety. We will call any such algebra a toric order and discuss how they fit in the notion of a noncommutative crepant resolution as introduced by Michel van den Bergh.

In this paper we will prove that a positively graded toric order is CY-3 if and only if it comes from a consistent dimer model on a torus. This result follows from a more general result. It is possible to relax the definition of a toric order to algebras with a certain cancellation property. Imposing the CY-3 condition on these algebras is equivalent to the existence of a weighted quiver polyhedron, which is a generalization of a dimer model on any two-dimensional orientable orbifold. These algebra sit inside $\mathsf{Mat}_n(\mathbb{C}[G])$ where  $G$ is the fundamental group of a three-dimensional manifold. In the case of toric orders $G=\mathbb{Z}^3$.

Not every such quiver polyhedron gives rise to an algebra which is CY-3. For this to happen the polyhedron must be consistent in the sense of Davison. We study this consistency and prove equivalences between different notions of
consistency from the literature in this setting.

\section{Acknowledgements}
I wish to thank Jan Stienstra for the talk he gave in Antwerp \cite{stienstra},
which initiated my interest into the theory of dimer models. I also want to thank Nathan Broomhead, Alastair King, Michael Wemyss, Travis Schedler and Sergei Mozgovoy for the interesting discussions about these subjects at the Liegrits workshop in Oxford in January 2008 and during my stays in Bath, Chicago and Wuppertal. Finally I want to thank Lieven Le Bruyn for sharing his insights in the theory of reflexive Azumaya algebras.

\section{Preliminaries}\label{prelim}

\subsection{Path algebras with relations}
As usual a \emph{quiver} $Q$ is an oriented graph. We denote the set of vertices by $Q_0$, the set of arrows by $Q_1$ and the maps $h,t$ assign to each arrow its head and tail.
A \emph{nontrivial path} $p$ is a sequence of arrows $a_1\cdots a_k$ such that $t(a_i)=h(a_{i+1})$, whereas a \emph{trivial path} is just a vertex. We will denote the length of a path by $|p|:= k$ and the head and tail by $h(p)=h(a_1),~ t(p)=t(a_k)$. A path is called cyclic if $h(p)=t(p)$.
Later on we will denote by $p[i]$ the $n-i^{th}$ arrow of $p$ and by $p[i\dots j]$ the subpath $p[i]\dots p[j]$.
\[
 \xymatrix{\vtx{}&\vtx{}\ar[l]_{p[n-1]}&\vtx{}\ar[l]_{p[n-2]}&\vtx{}\ar@{.>}[l]_{p[1]}&\vtx{}\ar[l]_{p[0]}}\text{ and }p = p[n-1]p[n-2]\dots p[1]p[0].
\]
A quiver is called \emph{connected} if it is not the disjoint union of two subquivers and it is \emph{strongly connected} if there is a cyclic path through each pair of vertices.

The \emph{path algebra} $\mathbb{C} Q$ is the complex vector space with as basis the paths in $Q$ and the multiplication of two paths $p$, $q$ is their concatenation $pq$ if $t(p)=h(q)$ or else $0$.
The span of all paths of nonzero length form an ideal which we denote by ${\cal J}$.
A \emph{path algebra with relations} $A=\mathbb{C} Q/{\cal I}$ is the quotient of a path algebra by a finitely generated ideal ${\cal I} \subset {\cal J}^2$. A path algebra is connected or strongly connected if and only if its underlying quiver is.

We will call a path algebra with relations $\mathbb{C} Q/{\cal I}$ \emph{positively graded} if there exists a grading $\mathtt R: Q_1 \to {\blb Q}_{>0}$ such that ${\cal I}$ is generated by homogeneous relations. Borrowing terminology from physics, we will sometimes call this map the $R$-charge.

A special type of path algebras with relations are Jacobi algebras. To define these we need to introduce some notation.
The vector space $\mathbb{C} Q/[\mathbb{C} Q,\mathbb{C} Q]$ has as basis the set of cyclic paths up to cyclic permutation of the arrows. We can embed this space into $\mathbb{C} Q$ by mapping a cyclic path onto the sum of all its possible cyclic permutations:
\[
\circlearrowright : \mathbb{C} Q/[\mathbb{C} Q,\mathbb{C} Q] \to \mathbb{C} Q: a_1\cdots a_n \mapsto \sum_i a_i\cdots a_na_1\cdots a_{i-1}.
\]
An element of the form $p +[\mathbb{C} Q,\mathbb{C} Q]$ where $p$ is a cyclic path will be called a \emph{cycle}. Usually we will drop the $+[\mathbb{C} Q,\mathbb{C} Q]$ from the notation and represent the cycle by one of its cyclic paths.

Another convention we will use is the deletion of arrows: if $p:= a_1\cdots a_n$ is a path and $b$ an arrow, then
$p \cancel b=a_1\cdots a_{n-1}$ if $b=a_n$ and zero otherwise. Similarly one can define $\cancel bp$. These new defined maps can be combined to obtain a 'derivation'
\[
\partial_a : \mathbb{C} Q/[\mathbb{C} Q,\mathbb{C} Q] \to \mathbb{C} Q : p \mapsto \circlearrowright(p)\cancel a =\cancel a \circlearrowright(p).
\]
An element  $W \in {\cal J}^3/[\mathbb{C} Q,\mathbb{C} Q] \subset \mathbb{C} Q/[\mathbb{C} Q,\mathbb{C} Q]$ is called a \emph{superpotential}. This element does not need to be homogeneous. If we quotient out the partial derivatives of a superpotential we get an algebra which is called the \emph{Jacobi algebra}:
\[
 A_W := \mathbb{C} Q /\<\partial_a W: a \in Q_1\>.
\]
Note that if $W$ is homogeneous for some $R$-charge $\mathtt R$, then the corresponding Jacobi Algebra is a positively graded algebra. The converse does not need to be true.

\subsection{Calabi Yau Algebras}

\begin{definition}
A path algebra with relations $A$ is \emph{$n$-dimensional Calabi Yau} (CY-n)
if $A$ is has a projective bimodule resolution ${\cal P}^\bullet$ that is dual to its $n^{th}$ shift
\[
 \textrm{Hom}_{A-A}({\cal P}^\bullet,A\otimes A)[n] \cong {\cal P}^\bullet
\]
\end{definition}
For further details about this property we refer to \cite{bocklandt} and \cite{GB}.
In this paper we will only need the following results:

\begin{property}\label{CYprop}
If $A$ is CY-n then
\begin{itemize}
\item[C1]
The global dimension of $A$ is $n$
\item[C2]
If $X, Y \in \ensuremath{\mathsf{Mod}} A$ then
\[
\mathsf{Ext}^k_A(X,Y) \cong \mathsf{Ext}^{n-k}_A(Y,X)^*.
\]
\item[C3]
The identifications above gives us a pairings $\<,\>^k_{XY}: \mathsf{Ext}^k_A(X,Y) \times \mathsf{Ext}^{n-k}_A(Y,X) \to \mathbb{C}$ which satisfy
\[
\<f,g\>^k_{XY} = \<1_X,g*f\>^0_{XX} = (-1)^{k(n-k)}\<1_Y,f*g\>^0_{YY},
\]
where $*$ denotes the standard composition of extensions.
\item[C4]
If $A$ is prime and a finitely generated module over a central subalgebra $S$ then
the center of $A$ is a Cohen Macaulay normal domain of dimension $n$.
\end{itemize}
\end{property}
Proofs of C1-C3 can be found in \cite{bocklandt} while C4 is proved in \cite{StaffordVDB}[theorem 2.2].

\subsection{Noncommutative resolutions and orders}

Suppose ${\blb V}$ is a normal variety with coordinate ring $R$ and function field $K$. A resolution of ${\blb V}$ is a birational surjective map $\pi: \tilde {\blb V} \to {\blb V}$ such that $\tilde {\blb V}$ is smooth.
The birationality of $\pi$ implies that it gives an isomorphism on the level of the function fields: $K(\tilde {\blb V})=K$.

A nice method to try to construct a resolution is by using orders. An \emph{$R$-order} in $\mathsf{Mat}_n(K)$ is an $R$-algebra $A\subset \mathsf{Mat}_n(K)$ that is a finitely generated $R$-module and
\[
A \cdot K =A \otimes_R K= \mathsf{Mat}_n(K).
\]
The embedding $R \subset A$ can be seen as a noncommutative generalization of the resolution because birationally (i.e. tensoring with $K$) it gives a Morita equivalence instead of an isomorphism.

Given an order $A$, we have a notion of a trace $\textrm{Tr}: A \to R$, which is the restriction of the standard trace function in $\mathsf{Mat}_n(K)$. Traces of elements in $A$ sit in $R$ because $R$ is a normal domain.
This trace allows us to consider the $n$-dimensional trace preserving representations of $A$:
\[
 \ensuremath{\mathsf{trep}} A := \{ \rho: A \to \mathsf{Mat}_n(\mathbb{C})| \textrm{Tr} \rho(a)=\rho(\textrm{Tr} a)\}
\]
This object can be given the structure of an affine scheme (take care, it can consist of several components). It has an action of $\ensuremath{\mathsf{GL}}_n(\mathbb{C})$ by conjugation and using this action we can reconstruct $A$ as the ring of equivariant maps and $R$ as the ring of invariant maps (see \cite{procesi}):
\se{
A &= \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_n} ( \ensuremath{\mathsf{trep}} A, \mathsf{Mat}_n(\mathbb{C})) := \{f: \ensuremath{\mathsf{trep}} A \to \mathsf{Mat}_n(\mathbb{C})|\forall g \in \ensuremath{\mathsf{GL}}_n: f(\rho^g) = f(\rho)^g\},\\
R &= \mathsf{Inv}_{\ensuremath{\mathsf{GL}}_n} ( \ensuremath{\mathsf{trep}} A, \mathbb{C}) := \{f: \ensuremath{\mathsf{trep}} A \to \mathbb{C}|\forall g \in \ensuremath{\mathsf{GL}}_n: f(\rho^g) = f(\rho)\}.
}
Geometrically this means that $R$ is the coordinate ring of the categorical quotient $\ensuremath{\mathsf{trep}} A/\!\!/\ensuremath{\mathsf{GL}}_n$ and
this quotient parameterizes the \emph{isomorphism classes of semisimple trace preserving representations of $A$}.
In general the space $\ensuremath{\mathsf{trep}} A$ consists of more than one component but there is only one component that maps surjectively
onto the quotient. This is the component that contains the generic simples and we denote it by $\ensuremath{\mathsf{srep}} A$.

To construct a resolution of ${\blb V}=\ensuremath{\mathsf{srep}} A/\!\!/\ensuremath{\mathsf{GL}}_n$, we can try to take a Mumford quotient instead of the categorical quotient. To do this, one must specify a stability condition, which in the case of path algebras with relations mounts to choosing a $\theta \in \mathbb{Z}^{Q_0}$ (see \cite{Kingstab}). The new quotient ${\blb V}_\theta = \ensuremath{\mathsf{srep}} A/\!\!/_\theta\ensuremath{\mathsf{GL}}_n$ parameterizes the \emph{isomorphism classes of (direct sums of) $\theta$-stable trace preserving representations of $A$}.
If one is lucky the new quotient is smooth and then it provides a resolution of ${\blb V}$.

The idea of using orders for the construction of resolutions motivates the notion of a noncommutative resolution.
There are many possible definitions but they all share the following properties:
\begin{itemize}
\item $A$ is an $R$-order in $\mathsf{Mat}_n(K)$
\item $A$ has some smoothness property: finite homological dimension/homologically homogeneous/Calabi Yau.
\end{itemize}
In this paper the focus is on the Calabi Yau property, so for us noncommutative resolutions are Calabi Yau orders.

\section{Toric orders}

If ${\blb V}$ is a toric variety, then it has a faithful action of a torus ${\blb T}^k = \mathbb{C}^{*k}$ with a dense open orbit.
Ring-theoretically this means that $R$ is $\mathbb{Z}^k$-graded and we can embed it as a graded subring of $T :=\mathbb{C}[{\blb T}^k] = \mathbb{C}[X_1,X_1^{-1},\dots, X_k,X_k^{-1}]$.

To resolve the singularities of ${\blb V}$, we want to keep the toric structure of ${\blb V}$ so we need to construct a toric resolution. By this we mean that the map $\pi: \tilde {\blb V} \to {\blb V}$ is a $\mathbb{C}^{*k}$-equivariant map that is one to one on the torus ${\blb T}^k$. From the point of view of rings, the coordinate ring of the torus now substitutes for the function field $K$ and everything gets $\mathbb{Z}^k$-graded.

This enables us to define \emph{toric orders}.
\begin{definition}
Let $R\subset T=\mathbb{C}[X_1,X_1^{-1},\dots, X_k,X_k^{-1}]$ be the coordinate ring of a toric variety. A toric $R$-order $A$ is a $\mathbb{Z}^k$-graded $R$-subalgebra of $\mathsf{Mat}_n(T)$ that is a finitely generated $R$-module and
\begin{itemize}
\item[TO1] $A \cdot T = \mathsf{Mat}_n(T)$
\item[TO2] $R^{\oplus n}\subset A$
\end{itemize}
\end{definition}
Toric orders are special orders, so we can also reconstruct $R$ and $A$ from the invariant and equivariant maps on $\ensuremath{\mathsf{trep}} A$. If we do this we leave the toric context because $\ensuremath{\mathsf{GL}}_n$ is not toric. However, with a slight modification we
can make everything we said in the previous section work in the toric context.

We can get rid of $\ensuremath{\mathsf{GL}}_n$ by looking at $\alpha$-dimensional representations with $\alpha=(1,\dots,1)$.
Because of condition TO2, the standard idempotents $e_i \subset \mathsf{Mat}_n(\mathbb{C}) \subset \mathsf{Mat}_n(T)$ must sit in $A$. We now define
\[
\ensuremath{\mathsf{trep}}_{\alpha} A := \{\rho \in \ensuremath{\mathsf{trep}} A| \rho(e_i)=e_i\}
\]
This is a closed subscheme of $\ensuremath{\mathsf{trep}} A$ that meets every orbit. The action of $\ensuremath{\mathsf{GL}}_n$ on $\ensuremath{\mathsf{trep}} A$ transforms
in an action of ${\ensuremath{\mathsf{GL}}_{\alpha}} = \mathbb{C}^{*n} \subset \ensuremath{\mathsf{GL}}_n$ on $\ensuremath{\mathsf{trep}}_{\alpha} A$ and
\[
 \ensuremath{\mathsf{trep}} A = \ensuremath{\mathsf{trep}}_{\alpha} A \times_{\ensuremath{\mathsf{GL}}_{\alpha}} \ensuremath{\mathsf{GL}}_n.
\]
Furthermore we have again that
\[
A = \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ( \ensuremath{\mathsf{trep}}_{\alpha} A, \mathsf{Mat}_n(\mathbb{C})) \text{ and }R = \mathsf{Inv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ( \ensuremath{\mathsf{trep}}_{\alpha} A, \mathbb{C}).
\]

Just as in before we single out one component $\ensuremath{\mathsf{srep}}_{\alpha} A = \ensuremath{\mathsf{srep}} A \cap \ensuremath{\mathsf{trep}}_{\alpha} A$.
This component contains a $n-1+k$-dimensional torus coming from the pullback of the representations
of $\mathsf{Mat}_n(T)$ and there is a combined action of $\mathbb{C}^{*n-1}$ from $\ensuremath{\mathsf{GL}}_{\alpha}/\mathbb{C}^*$ and $\mathbb{C}^{*k}$ by scaling of the variables. Therefore $\ensuremath{\mathsf{srep}}_{\alpha} A$ can be seen as a toric variety but it is not necessarily normal.

Unlike in the general case of orders, toric orders have the advantage that one only needs $\ensuremath{\mathsf{srep}}_{\alpha} A$ to
reconstruct the order and not the whole space $\ensuremath{\mathsf{trep}}_\alpha A$.

\begin{theorem}\label{srep}
If $A$ is a toric $R$-order in $\mathsf{Mat}_n(K)$ then
\[
A = \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ( \ensuremath{\mathsf{srep}}_{\alpha} A, \mathsf{Mat}_n(\mathbb{C})) \text{ and }R = \mathsf{Inv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ( \ensuremath{\mathsf{srep}}_{\alpha} A, \mathbb{C}).
\]
\end{theorem}
\begin{proof}
We have a map $\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}( \ensuremath{\mathsf{trep}}_\alpha, \mathsf{Mat}_n(\mathbb{C}))  \to \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}( \ensuremath{\mathsf{srep}}_\alpha A, \mathsf{Mat}_n(\mathbb{C}))$
by restriction. This map decomposes as a direct sum of maps according to the matrix entries
\[
\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}( \ensuremath{\mathsf{trep}}_\alpha, \mathsf{Mat}_n(\mathbb{C}))_{ij}  \to \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}( \ensuremath{\mathsf{srep}}_\alpha, \mathsf{Mat}_n(\mathbb{C}))_{ij}
\]
But $\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}( \ensuremath{\mathsf{trep}}_\alpha A, \mathsf{Mat}_n(\mathbb{C}))_{ij}$ is the subspace $\mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A]_{ij} \subset \mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A]$ of weight $i-j$ for the $\ensuremath{\mathsf{GL}}_{\alpha}$-action. The same holds for $\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}}(\ensuremath{\mathsf{srep}} A, \mathsf{Mat}_n(\mathbb{C}))_{ij}$.

The map $\mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A] \to \mathbb{C}[\ensuremath{\mathsf{srep}}_{\alpha} A]$ is a surjection that is compatible with the $\mathbb{C}^{*n}$-action.
This means that $\mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A]_{ij} \to \mathbb{C}[\ensuremath{\mathsf{srep}}_{\alpha} A]_{ij}$ is surjective.
$\mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A] \to \mathbb{C}[\ensuremath{\mathsf{srep}}_{\alpha} A]$ is not an injection but it becomes an injection if we tensor it over $R$
with the torus ring $T$ (note that $R$ sits both in $\mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A]$ and $\mathbb{C}[\ensuremath{\mathsf{srep}}_{\alpha} A]$ as a subring because $\ensuremath{\mathsf{srep}}_\alpha A$ is the component that maps surjectively to ${\blb V}$). Therefore if $a \in \mathbb{C}[\ensuremath{\mathsf{trep}}_{\alpha} A]_{ij}$ sits in the kernel then we can lift $a$ to an element in $A$ such that $a \otimes_R 1_T =0$ but this is impossible because $A \subset \mathsf{Mat}_n(T)$.

The second statement follows directly from the first.
\end{proof}

In general one can define $\ensuremath{\mathsf{srep}}_\alpha A$ for any path algebra of a strongly connected quiver with relations of the form $p-q$ where $p$ and $q$ are paths.
By definition it is then the closure of all $\alpha$-dimensional representations for which all arrows are invertible (we cannot impose the trace-preserving condition because no trace is defined on $A$).

If $A$ is positively graded then $\ensuremath{\mathsf{srep}}_\alpha A$ is connected. The open subset ${\blb U}$ of representations with invertible arrows forms is also connected and it forms an abelian group under
arrow-wise multiplication.
Hence this subset must be a torus $\mathbb{C}^{*u}$ for some $u \in \mathbb{N}$ and $\ensuremath{\mathsf{srep}}_\alpha A$ is a (not necessarily normal) toric variety.
The group $\ensuremath{\mathsf{GL}}_{\alpha}$ maps to ${\blb U}$: $g \mapsto \rho_g$ with $\rho_g(a)=g_{h(a)}\rho(a)g_{t(a)}^{-1}$ and this map gives us the $\ensuremath{\mathsf{GL}}_{\alpha}$-action.
The quotient ${\blb U}/{(\ensuremath{\mathsf{GL}}_{\alpha}/\mathbb{C}^*)}$ is also a torus: $\mathbb{C}^{*u-n+1}$.
Because $Q$ is strongly connected the representations in ${\blb U}$ are all simple and hence their orbits are closed in
$\ensuremath{\mathsf{srep}}_\alpha A$, so the quotient  ${\blb U}/{(\ensuremath{\mathsf{GL}}_{\alpha}/\mathbb{C}^*)}$ sits inside the quotient $\ensuremath{\mathsf{srep}}_{\alpha}A/\!\!/\ensuremath{\mathsf{GL}}_\alpha$.

Following Le Bruyn in chapter 2 of \cite{lievenbook} we define:
\[
\Uparrow_\alpha A := \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} (\ensuremath{\mathsf{srep}}_{\alpha} A, \mathsf{Mat}_n(\mathbb{C}))
\]
There is a canonical morphism
\[
\tau: A \to \Uparrow_{\alpha}A: a \mapsto \tau(a) \text{ such that } \tau(a)(\rho)=\rho(a).
\]

\begin{theorem}\label{whento}
For a strongly connected quiver $Q$, a graded algebra $A=\mathbb{C} Q/{\cal I}$ is a toric order if and only if $\tau$ is an isomorphism and $Z(A)$ is normal.
\end{theorem}
\begin{proof}
The condition is necessary because of the definition of a toric order and theorem \ref{srep}.

The condition is also sufficient. First we remark that the sequence
$\ensuremath{\mathsf{GL}}_{\alpha}\to {\blb U} \to \mathbb{C}^{u-n+1}$ gives an identification
\[
\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ({\blb U}, \mathsf{Mat}_n(\mathbb{C}))\cong \mathsf{Mat}_n(\mathbb{C}[X_1,X_1^{-1},\dots, X_{u-n+1},X_{u-n+1}^{-1}])
\]
and because ${\blb U}$ is dense in $\ensuremath{\mathsf{srep}}_\alpha$ and closed orbits in ${\blb U}$ remain closed in $\ensuremath{\mathsf{srep}}_\alpha$, the map
\[
A=\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} (\ensuremath{\mathsf{srep}} A, \mathsf{Mat}_n(\mathbb{C})) \to \mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} ({\blb U}, \mathsf{Mat}_n(\mathbb{C}))
\]
is an embedding. $A$ is a $\mathbb{Z}^{u-n+1}$-graded subalgebra because of the $\mathbb{C}^{u}$-action on $\ensuremath{\mathsf{srep}} A$.

By the geometrical nature of the construction $\mathsf{Eqv}_{\ensuremath{\mathsf{GL}}_{\alpha}} (\ensuremath{\mathsf{srep}} A, \mathsf{Mat}_n(\mathbb{C}))=A$ is finitely generated over its center $\mathsf{Inv}_{\ensuremath{\mathsf{GL}}_{\alpha}}(\ensuremath{\mathsf{srep}} A, \mathbb{C})=Z(A)=R$ and $R^{\oplus n} \subset A$.
The only extra property for $A$ to be a toric order is that $Z(A)$ is normal, which we have imposed.
\end{proof}

\section{Category algebras and cancellation algebras}

In this section we will extend the notion of toric orders to a non-Noetherian setting. This generalization gives rise to the notion of a cancellation algebra.

\subsection{Motivation and definition}

From any toric algebra $A \subset \mathsf{Mat}_n(T)$ we can construct a category ${\cal C}_A$. The objects
of this category are the elementary idempotents $e_i \subset A$ and the morphisms between $e_i$ and $e_j$
are the monomials of $T$ occur on the $i,j$th entries of elements in $A$. In other words:
\[
 \textrm{Hom}_{{\cal C}_A}(i,j) = \{\text{monomials in }iAj\}.
\]
We can reconstruct $A$ as the \emph{category algebra} of ${\cal C}_A$. This algebra is the vector space with as basis the set of all morphisms of ${\cal C}_A$ and as multiplication the composition of morphisms if possible and zero otherwise.

The category ${\cal C}_A$ has a special property: it is a cancellation category.
\begin{definition}
A category ${\cal C}$ is called a cancellation category if every morphism is epic and monic:
\[
 \forall a,b,c: ab=ac \implies b=c \text{ and }ac=bc \implies a=b \text{ (when defined).}
\]
The category algebra of a cancellation category is called a cancellation algebra.
\end{definition}
\begin{remark}
We will assume implicitly that a cancellation category only has a finite number of objects, and can be generated by a finite number of arrows. This is to make sure that the cancellation algebras we will consider are finitely generated as algebras. Later we will also investigate cancellation categories with a countable number of objects. In this case the category algebra will not be unital.
\end{remark}
\begin{remark}
A category algebra can equivalently be defined as a path algebra of a quiver with relations $\mathbb{C} Q/{{\cal I}}$ where ${\cal I}$ is generated by elements of the form $p-q$ with $p,q$ paths. Therefore it makes sense to use the notation $h(p)$ and $t(p)$ for morphisms in the category. In general it is not easy to check from a set of relations of the required form whether the corresponding category algebra is a cancellation algebra or not.

Just as for quivers we can speak of positively graded categories, category algebras and in specific positively graded toric orders. In this last case all monomials in a toric order are homogeneous for the grading $\mathtt R$.
\end{remark}

The simplest examples of cancellation categories are groupoids. In these categories the cancellation law holds trivially because every morphism is invertible. Subcategories of groupoids are also cancellation categories, however
unlike in the case of abelian groups and semigroups it is not true that every cancellation category embeds in a groupoid.

If we return to the section of toric orders, it is easy to check that $\mathsf{Mat}_n(T)$ is the category algebra of the groupoid with $n$ objects, that is equivalent to the group $\mathbb{Z}^k$.
By consequence, if $A$ is a toric order, then ${\cal C}_A$ is a cancellation category because it is a subcategory of that groupoid.

\begin{observation}
Every toric order is a cancellation algebra.
\end{observation}

\subsection{Bimodule resolutions}\label{GPR}

Let $A$ be a category algebra with corresponding category ${\cal C}$.
A (bi)-module $M$ of $A$ is called ${\cal C}$-graded if $M = \bigoplus_{p \in \ensuremath{\mathsf{Mor}}{\cal C}} M_p$ such that $M_p \subset h(p)Mt(p)$ and $\forall q: qM_p \subset M_{qp}$ and $M_pq \subset M_{pq}$, where we used the convention that $M_?=0$ to cover the case where $pq$ or $qp$ is not defined. A homogeneous map is a morphism $\phi :M \to N$ such that $\phi M_p \subset N_p$ and the kernel and image of a homogeneous map are clearly ${\cal C}$-graded. For every $p$ in ${\cal C}$ we define the projective bimodule $F_p= Ah(p) \otimes p \otimes t(p)A$ with the obvious grading $q_1\otimes p \otimes q_2 \in (F_p)_{q_1pq_2}$ and analogously the projective left module $P_p= Ah(p)$ with grading $q \in (P_p)_{qp}$.

If $A$ is positively graded then the category of ${\cal C}$-graded bimodules with bihomogeneous morphisms is a perfect category in the sense of Eilenberg \cite{Eilenberg} and hence we can construct a minimal projective bimodule resolution of $A$ as a bimodule over itself
with the obvious grading. The first terms of this map are
\[
\xymatrix{
\underset{s \in {\cal S}}\bigoplus F_{s}\ar[r]^{\delta_3}&
\underset{r \in {\cal R}}\bigoplus F_{r}\ar[r]^{\delta_2}&
\underset{b \in Q_1}\bigoplus F_{b}\ar[r]^{\delta_1}&
\underset{i \in Q_0}\bigoplus F_{i}\ar[r]^m&A
}
\]
where
\se{
m(q_1 \otimes i \otimes q_2) &= q_1q_2\\
\delta_1(q_1 \otimes b \otimes q_2) &= q_1b\otimes t(b) \otimes q_2 - q_1\otimes h(b)  \otimes bq_2\\
\delta_2(q_1 \otimes r \otimes q_2) &= \sum_k q_1a_1\dots \otimes a_{k} \otimes \dots a_n q_2 -
\sum_k q_1b_1\dots \otimes b_{k} \otimes \dots b_m q_2\\
\delta_3(q_1 \otimes s \otimes q_2) &= q_1sq_2.
}
\
and $r=a_1\dots a_n - b_1\dots b_m$, $F_r := F_{a_1\dots a_n}=F_{b_1\dots b_m}$ and ${\cal S}$ is a minimal set of homogeneous
generators of $\textrm{Ker} \delta_2$. This set might be infinite.

For every vertex $i \in Q_0$ we can tensor this resolution over $A$ on the right with the one-dimensional left module $S_i=Ai/{\cal J} i$ concentrated in ${\cal C}$-degree $i$. This gives us the minimal graded left module resolution of $S_i$.

\section{Quiver polyhedra}\label{polyhedron}

\subsection{Definition}
The last ingredient we need is quiver polyhedra.
\begin{definition}
A \emph{quiver polyhedron} ${\cal Q}$ is a strongly connected quiver $Q$ enriched with a 2 disjoint sets of cycles $Q^+_2$ and $Q_2^-$ and a map $\mathtt E: Q_2= Q_2^+\cup Q_2^- \to \mathbb{N}_{>0}$ such that
\begin{itemize}
 \item[PO] {\bf Orientability condition.} Every arrow is contained exactly once in one cycle in $Q_2^+$ and once in one in $Q_2^-$.
\item[PM] {\bf Manifold condition.} The incidence graph of the cycles and arrows meeting a given vertex is connected.
\end{itemize}
A quiver polyhedron is called \emph{weighted} if there is a map $\mathtt E: Q_2= Q_2^+\cup Q_2^- \to \mathbb{N}_{>0}$
such that $\forall c \in Q_2:\mathtt E_c|c|>2$.
We will use the symbol ${\cal Q}$ to denote a weighted quiver polyhedron.
If $\mathtt E$ is the constant map to $1$ we say ${\cal Q}$ is an unweighted quiver polyhedron.

A weighted quiver polyhedron is \emph{graded} if there is an $\mathtt R$-charge $\mathtt R: Q_1 \to \mathbb{R}_{>0}$
such that the expression $\mathtt E_c\mathtt R_c$ is the same for all cycles in $Q_2$.
\end{definition}
\begin{remark}
Unweighted quiver polyhedra are dual to what is known as a dimer models.
To construct the dimer model we take the dual graph with nodes $Q_2$ and edges $Q_1$.
this graph is bipartite ($Q_2=Q_2^+ \sqcup Q_2^-$) and can be drawn on a compact surface by lemma \ref{comsurf}.
\end{remark}
\begin{remark}
Not every weighted quiver polyhedron can be given a grading. In \cite{broomhead}[Remark 2.3.5] a combinatorial condition
is given for this to be true in the case of trivially weighted quiver polyhedra. At the end of this section we will
state this condition for weighted quiver polyhedra.

The grading that one can assign to a weighted quiver polyhedron is also far from unique, however
the algebraic properties that we will discuss further on do not depend on it. They depend merely on
the existence of a grading.
\end{remark}

From a quiver polyhedron we can build a topological space $X$ by associating to every cycle of length $k$ a $k$-gon. We label the edges of this $k$-gon cyclicly by the arrows of the quiver and identify edges of different polygon labeled with the same arrow.
\begin{lemma}\label{comsurf}
If ${\cal Q}$ is a quiver polyhedron then $X$ is a compact orientable surface.
\end{lemma}
\begin{proof}
We need to show that every point in $X$ has a neighborhood that is homeomorphic to an open disk.
For the internal points of the polygons this is trivially true. If $p$ lies on an edge of
a polygon but not on a corner then this is true because by condition PO a small enough neighborhood of $p$ which consist of
two half disks glued together.
If $p$ is a corner of a polygon, a neighborhood of $p$ consists of triangles glued together over common edges. The result in general will be a set of disks glued together at $p$, only if PM holds there is just one disk.

Using the condition PO, this surface
can be oriented by assigning an anticlockwise direction to the cycles in $Q_2^+$ and a clockwise direction for those
in $Q_2^-$.
\end{proof}
Vice versa if $Q$ is a strongly connected quiver drawn on an orientable surface such that the complement of the quiver consists of simply connected pieces bounded by cycles, then we can give $Q$ the structure of a quiver polyhedron by
taking as $Q^+_2$ the cycles that bound pieces anticlockwise and as $Q^-_2$ the cycles that bound pieces clockwise.
It can easily be checked that PO and PM hold.

If ${\cal Q}$ is a weighted quiver polyhedron, it is interesting to give the topological space $X$ the structure of an orbifold. We can do this by substituting the $k$-gon corresponding to a cycle $c$ with $\mathtt E_c=r$ with the orbifold
obtained by quotienting an $kr$-gon by the rotation group of order $r$. If we do this for all cycles we get an orbifold
that contains an orbifold singularity of order $\mathtt E_c$ for every cycle $c$. We will denote this orbifold by $|{\cal Q}|$.
It is clear from this construction that the orbifold $|{\cal Q}|$ of a trivially weighted quiver is just the compact surface $X$.

For any weighted quiver polyhedron it makes sense to define its Euler characteristic as the Euler characteristictic of
its orbifold $|{\cal Q}|$.
\[
\chi_{\cal Q} := \# Q_0 - \# Q_1 + \sum_{c \in Q_2} \frac 1{\mathtt E_c}.
\]

\begin{example}\label{antiprism}
Take the following quiver and let $a_{ij}$ denote the arrow $i \leftarrow j$.
\[
\xymatrix@=.2cm{
\vtx{1}\ar[rrrr]\ar[ddr]&&&&\vtx{2}\ar[dddd]\ar[dll]\\
&&\vtx{5}\ar[ull]\ar[dr]&&\\
&\vtx{8}\ar[ru]\ar[ldd]&&\vtx{6}\ar[ld]\ar[uur]&\\
&&\vtx{7}\ar[lu]\ar[rrd]&&\\
\vtx{3}\ar[uuuu]\ar[urr]&&&&\vtx{4}\ar[llll]\ar[uul]
}
\]
Set
\se{
Q_2^+&=\{a_{21}a_{14}a_{43}a_{32},a_{65}a_{52}a_{26},a_{76}a_{63}a_{37},a_{87}a_{74}a_{48},a_{58}a_{81}a_{15}\}\\
Q_2^-&=\{a_{65}a_{58}a_{87}a_{76},a_{21}a_{15}a_{52},a_{32}a_{26}a_{63},a_{43}a_{37}a_{74},a_{14}a_{48}a_{81}\}.
}
This polyhedron is an antiprism and has the topology of a sphere. It can be given a trivial weighting if we give the arrows in the squares
degree $2$ and the intermediate arrows degree $3$.

On the other hand it can be equipped with a nontrivial weighting by giving all arrows degree $1$, cycles of length $3$ weight $4$ and cycles of length $4$ weight $3$. This weighting gives rise to an orbifold with characteristic $\frac{-31}{6}$.
\end{example}

For a weighted quiver polyhedron ${\cal Q}$, we can define a superpotential
\[
W = W^+-W^- :=\sum_{c \in Q_2^+}\frac {c^{\mathtt E_c}}{\mathtt E_c}  - \sum_{c \in Q_2^-}\frac {c^{\mathtt E_c}}{\mathtt E_c}+[\mathbb{C} Q,\mathbb{C} Q].
\]
Here $c^{\mathtt E_c}$ stands for a cycle obtained by running through $c$ $\mathtt E_c$ times.
This superpotential gives rise to a Jacobi algebra $A_{{\cal Q}} := A_W$. Note that $W \in {\cal J}^3$ because for every cycle $\mathtt E_c|c|>2$.
\begin{lemma}
For any (graded) weighted quiver polyhedron ${\cal Q}$ the Jacobi algebra $A_{{\cal Q}}$ is a (graded) category algebra.
\end{lemma}
\begin{proof}
For any arrow $a$ the partial derivative $\partial_a W$ is $\mathtt E_c$ times the sum of two paths with opposite signs and therefore every relation is of the form $p-q$.

If ${\cal Q}$ is graded then the superpotential is homogeneous so the Jacobi algebra is graded.
\end{proof}
\begin{remark}
It is important to note that $A_{{\cal Q}}$ is a category algebra but not always a cancellation algebra.
We will come back to this issue in section \ref{cancellation}.
\end{remark}

\subsection{Galois covers}
A morphism between weighted quiver polyhedra ${\cal Q}^A$ and ${\cal Q}^B$ is a pair of maps $\phi:Q_0^A \to Q_0^B$ and
$\phi:Q_1^A \to Q_1^B$ respecting head and tails ($\phi(h(a))=h(\phi(a))$ and $\phi(t(a))=t(\phi(a))$)
such that if $c \in Q_2^{A+}$ ($Q_2^{A-}$) we can find a $d \in Q_2^{B+}$ ($Q_2^{B-}$) such that $\phi(c^{\mathtt E_c}) = d^{\mathtt E_d}$. One can check easily from the definition that a morphism between quiver polyhedra gives corresponding morphisms between their orbifolds and their path algebras.

Let $\grp G$ be a group of automorphisms of a weighted quiver polyhedron ${\cal Q}$ such that no nontrivial element $g \in \grp G$ fixes a vertex of ${\cal Q}$. The quotient quiver $Q/\grp G$ is defined as the quiver with vertices and arrows the orbit classes of vertices and arrows in ${\cal Q}$. There is a projection map $\pi:Q \to Q/\grp G$ that maps
each vertex and arrow to its orbit. Under $\pi$ every cycle $c \in Q_2$ is mapped to a cycle in ${\cal Q}/\grp G$.
This cycle can sometimes be the power of a smaller primitive cycle: $\pi(c)=d^k$ for some $k$. The unique way to equip
$Q/\grp G$ with a polyhedral structure is
\[
 (Q/\grp G)_2^\pm := \{d|\exists c \in Q_2^\pm: d^k=\pi(c) \text{ and $d$ is primitive}\},
\]
The weighting has the following form
\[
\mathtt E_d := k \mathtt E_c.
\]

The following theorem is straightforward:
\begin{theorem}
\begin{itemize}
\item[]
 \item
If $\grp G$ is a group of automorphisms of a weighted quiver polyhedron ${\cal Q}$ such that no nontrivial element $g \in \grp G$ fixes a vertex of ${\cal Q}$ then the quotient morphism $\pi:{\cal Q} \to {\cal Q}/\grp G$ induces a cover morphism between the
two orbifolds $\tilde\pi:|{\cal Q}| \to |{\cal Q}/\grp G|$ and the group of cover automorphisms of $\tilde \pi$ is $\grp G$.
\item
On the level of path algebras we have a surjective map $\pi: \mathbb{C}{\cal Q} \to \mathbb{C}{\cal Q}/\grp G$ such that
if $q$ is a path in ${\cal Q}/\grp G$ then for every vertex $v \in \pi^{-1}(h(q))$ there is a unique lifted path
$\ensuremath{\mathsf{lift}}_v q \in \pi^{-1}(q)$ such that $h(\ensuremath{\mathsf{lift}}_v q)=v$.
\item
Two paths in $q_1,q_2 \in \mathbb{C} {\cal Q}/\grp G$ are equivalent in $A_{{\cal Q}/\grp G}$ if and only if
there is a $v \in \pi^{-1}h(q_1)$ such that $\ensuremath{\mathsf{lift}}_v q_1$ is equivalent with $\ensuremath{\mathsf{lift}}_v q_2$ in $A_{{\cal Q}}$.
\end{itemize}
\end{theorem}
\begin{proof}
The first statement follows because by construction $|{\cal Q}/G|$ is the same orbifold as the quotient orbifold $|{\cal Q}|/\grp G$.

Suppose $q$ is a path in ${\cal Q}/\grp G$ and choose any lift $p \in \pi^{-1}(q)$. There is a unique $g \in \grp G$ that
maps $h(p)$ to $v \in \pi^{-1}(h(q))$ and therefore the lift of $q$ starting in $v$ is $g\cdot p$.

The last statement follows from the easily checked facts that $\pi (\partial_a W_{{\cal Q}})= \partial_{\pi{a}}W_{{\cal Q}/\grp G}$ and $\pi^{-1} \partial_b W_{{\cal Q}/\grp G} = \{\partial_a W_{{\cal Q}}| \pi(a)=b\}$.
\end{proof}

This theorem states in fact that $A_{{\cal Q}}$ is a Galois cover of $A_{{\cal Q}/\grp G}$ in the sense of \cite{galoiscover}.
It implies a close relationship between the two Jacobi algebras and many nice properties will either hold
in both or in none. An interesting example of such a property is the cancellation property.

\begin{theorem}\label{cancelcover}
The Jacobi algebra $A_{{\cal Q}}$ is a cancellation algebra if and only if $A_{{\cal Q}/\grp G}$ is a cancellation algebra.
\end{theorem}
\begin{proof}
Let $p$ and $q$ be paths and $a$ an arrows in ${\cal Q}$ such that $pa=qa$.
In the quotient we have that $\pi(p)\pi(a)=\pi(q)\pi(a)$ and $\pi(p)\ne\pi(q)$ because these paths cannot be in the same orbit as they start in the same vertices and $\grp G$ acts freely on the vertices.

Suppose on the other hand that $r,s$ are paths and $b$ is an arrow in ${\cal Q}/\grp G$ with $rb=sb$. Fix a vertex
$v \in \pi^{-1}(h(r))$. By the lifting property $\ensuremath{\mathsf{lift}}_{v}(rb)=\ensuremath{\mathsf{lift}}_{v}(sb)$ and both must end in the same arrow
$a \in \pi^{-1}(b)$, so $\ensuremath{\mathsf{lift}}_{v}(r)a=\ensuremath{\mathsf{lift}}_{v}(s)a$ but  $\ensuremath{\mathsf{lift}}_{v}(r)\ne\ensuremath{\mathsf{lift}}_{v}(s)$ because their projections
to $A_{{\cal Q}/\grp G}$ are different.
\end{proof}

The existence of a grading is compatible with the notion of Galois covers
\begin{lemma}\label{covergrad}
${\cal Q}$ admits a grading if and only if ${\cal Q}/\grp G$ does.
\end{lemma}
\begin{proof}
If ${\cal Q}$ is graded, we can also give the new polyhedron a grading:
\[
\mathtt R_{\pi(a)} := \frac 1{|\grp G|}\sum_{b\in \grp Ga} \mathtt R_b.
\]
If ${\cal Q}/\grp G$ is graded we transfer the grading as follows:
\[
\mathtt R_{a} := \mathtt R_{\pi(a)}.
\]
\end{proof}

The technique of Galois covers can be used to simplify the structure of the polyhedron, without
changing the important properties of the cancellation algebra.

\begin{theorem}
A weighted quiver polyhedron can be covered by a quiver polyhedron with trivial weighting if and only if
it is not of the following forms:
\begin{itemize}
\item It has the topology of a sphere and 1 face with non-trivial weight.
\item It has the topology of a sphere and 2 faces with different non-trivial weights.
\end{itemize}
\end{theorem}
\begin{proof}
Given an orbifold $X$ with a weighted quiver polyhedron ${\cal Q}$ on it, we can use every orbifold cover $\tilde X \to X$
to obtain a Galois cover $\tilde {\cal Q} \to {\cal Q}$. If $\tilde X$ is a manifold then $\tilde {\cal Q}$ is unweighted.
From theorem 13.3.6 in \cite{thurston} we know that in dimension 2 the only orientable orbifolds that cannot be covered by a manifold
are the sphere with 1 or 2 different orbifold points. These correspond to the quiver polyhedra described above.
\end{proof}
In accordance with the theory of orbifolds we call ${\cal Q}$ \emph{developable} if it has an unweighted galois cover.
We will denote the unweighted cover of a weighted quiver polyhedron ${\cal Q}$ by ${\cal Q}^u$.
This cover can be used to check whether ${\cal Q}$ admits a grading.

\begin{theorem}
A weighted quiver polyhedron ${\cal Q}$ admits a grading if and only if it is developable and
for any subset $S^+ \subset (Q^u)_2^+$ we have that if $S^-\subset (Q^u)^-_2$ is the set of cycles
connected to cycles of $S^+$ then
\[
|S^+|\ge |S^-|
\]
with equality only happening if $S^+$ is not a proper subset.
\end{theorem}
\begin{proof}
Suppose ${\cal Q}$ has the topology of a sphere and has 2 cycles $u_1,u_2$
such that all other cycles are unweighted.
For any grading compatible with the Jacobi relations we have
\[
 \mathtt R_{u_1} = \mathtt R_{u_2} \mod \mathtt R_u
\]
with $u$ an unweighted cycle.
Indeed the cycles $u_1,u_2$ have the same homology class in the union of all unweighted faces.
Because all these faces have the same degree $\mathtt R_u$, the difference in degree between
$u_1$ and $u_2$ must be a multiple of $\mathtt R_u$.
But $\mathtt R_{u_i}=\frac{\mathtt R_{u}}{\mathtt E_{u_i}}$  so the weights of $u_1$ and $u_2$ must be the same and hence
a grading is only possible if ${\cal Q}$ is developable.

The second part of the proof can be found in \cite{broomhead} Remark 2.3.5.
\end{proof}

The fact that a grading implies developability implies that
for any graded weighted quiver polyhedron we also have the notion of its \emph{universal cover}.
This is the pullback of the quiver polyhedron under the universal cover map.
This quiver is infinite if the Euler characteristic of $|{\cal Q}|$ is zero or negative.
It still makes sense to define the corresponding category and category algebra, however one must take
care that the latter is not a unital algebra any more. We will denote the universal cover of ${\cal Q}$ by
$\tilde {\cal Q}$.

\section{The CY-3 property and quiver polyhedra}

Jacobi algebras coming from quiver polyhedra appear naturally in the context of CY-3 algebras.
\begin{theorem}\label{qpol}
If a positively graded cancellation algebra $A$ is CY-3 then it comes from a graded weighted quiver polyhedron.
\end{theorem}

To prove this theorem we need a lemma which is an adaptation of a theorem from \cite{bocklandt}.
\begin{lemma}\label{gradedcalab}
If a positively graded cancellation algebra $A=\mathbb{C} Q/{\cal I}$ is CY-3 then it is a Jacobi algebra of some superpotential $W$ and there exist a coefficients $\lambda_a\in \mathbb{C}$ depending on $a \in Q_1$ such that
$\partial_a W = \lambda_a (p-q)$ for some $p-q \in {\cal R}$.
\end{lemma}
\begin{proof}
We adapt the proof in \cite{bocklandt}[Theorem 3.1] which worked for an $\mathbb{N}$-graded algebra generated in degree $1$, to
this setting (where arrows can have different $\mathtt R$-degree).

As the global dimension of $A$ must be $3$, we know from section \ref{GPR} the minimal projective ${\cal C}$-graded resolution of the trivial module
$S_i=Ai/{\cal J}$ with ${\cal C}$-degree $i$ looks like
\[
\xymatrix{
P_\omega\ar@{^(->}[r]^{(f_r)}&\bigoplus_{t(r)=i}P_{r}\ar[r]^{(r\cancel b)}&\bigoplus_{t(b)=i}P_{b}\ar[r]^{(\cdot b)}&P_i\ar@{->>}[r]&S_i.
}
\]
In the diagram above the $r's$ are elements of the minimal set of relations ${\cal R}$ and the $b's$ are arrows. Note that
the last term in the resolution $P_\omega$ is must be isomorphic to $P_i$ because $\dim \mathsf{Ext}^3(S_i,S_j)\stackrel{CY}{=}\dim \textrm{Hom}(S_j,S_i)=\delta_{ij}$.
However this $P_i$ is shifted in ${\cal C}$-degree, and let $\omega$ be the path that corresponds to $i\in P_\omega$.

Consider the finite dimensional quotient algebra
\[
M = A/(f_r: r \in {\cal R}, A_n: n\ge N) \text{ where }\forall r :N> \mathtt R_{f_r}.
\]
The Calabi Yau property allows us to calculate the dimension of $iMj$:
\[
\mathsf{Dim \,} iMj = \mathsf{Dim \,} \textrm{Hom}(P_i,Mj) = \mathsf{Dim \,} \mathsf{Ext}^3(S_i,Mj)\stackrel{CY}{=}\mathsf{Dim \,} \textrm{Hom}(Mj,S_i) = \delta_{ij},
\]
and conclude that $M$ must be isomorphic to the degree zero part of $A$. There are only as many $f_r$ as there are arrows
($\dim \mathsf{Ext}^2(S_i,S_j)\stackrel{CY}{=}\dim \mathsf{Ext}^1(S_j,S_i)$). An $f_r$ (with $r=p-q$) cannot be a linear combination of different arrows $a$ and $b$
because this would imply that $\omega$, $ap$ and $bp$ have the same ${\cal C}$-degree which contradicts the cancellation property. Hence, we can conclude that the $f_r$ must all be scalar multiples of arrows.

By rescaling our original relations, we can assume that the $f_r$ can be identified with the arrows. Let $r_a$ be the (nonzero) relation for which $f_{r_a}=a$.

Because the resolution of $S_i$ is a complex we have that $\sum_{a} ar_a\cancel b \in {\cal I}$ so we can write it as
\[
\sum_{h(a)=i} ar_a\cancel b = \sum g_{bc} r_c + rest\text{ with }rest \in {\cal J}{\cal I}+{\cal I}{\cal J}.
\]
If we apply property C3 we can conclude that $g_{bc}\ne 0 \iff b=c$.
The terms $ar_a\cancel{b}$ all have the same ${\cal C}$-degree which is equal to the degree of $r_b$.
As $r_b$ is a minimal relation, there are no ${\cal C}$-homogeneous elements in ${\cal J}{\cal I}+{\cal I}{\cal J}$ with the same ${\cal C}$-degree as $r_b$ and hence $rest=0$.

By introducing an appropriate rescaling of the relations we can assume that $g_{bb}=1$ and
\[
\sum_{h(a)=i} ar_a = \sum_{t(b)=i}r_bb.
\]
If we sum these equations we get a superpotential $W := \sum_a ar_a  = \sum_b r_b b$ and it is
clear that $iW$ is ${\cal C}$-homogeneous. Note that $ar_a$ and $r_aa$ have the same $\mathtt R$-degree
but sit in different parts of $W$ ($h(a)W$ and $Wt(a)$). We can use this together with the fact that ${\cal Q}$ is
strongly connected to show that $W$ is $\mathtt R$-homogeneous.

Finally, because of the rescalings $r_a =\lambda_a (p-q)$ for some $\lambda_a \in \mathbb{C}$ and some $p-q \in {\cal R}$.
\end{proof}

\begin{proof}[Proof of theorem \ref{qpol}]
Because $A$ is positively graded and CY-3 we know from lemma \ref{gradedcalab} that $A= A_W$ for
some superpotential $W$ and $\partial_{a} W=\lambda_a (p_a-q_a)$
for some scalar $\lambda_a$ and some relation $p_a-q_a \in {\cal R}$.

Every arrow occurs exactly in two cycles in $W$ ($ap_a$ and $aq_a$).
If an arrow $a$ occurs in a cycle $c$ it can occur only once in this cycle or $c$ is a power of a smaller cyclic path containing just one $a$. If this were not the case, the partial derivative to $a$ of this cycle would contain more than one term with the same sign which is impossible.

Let $Q_2$ be the set of all cycles $c$ such that a power $c^k$ occurs in $W$ and which are not powers of smaller cycles.
The grading $\mathtt R$ on $A$ gives a grading $\mathtt R$ on the arrows and we define $\mathtt E_c=k$ if and only if $c^k$ sits
in $W$.

This data turns $Q$ into a weighted quiver polyhedron:
\begin{itemize}
\item[PM] Fix a single vertex $i$ and consider the following graph $G_i$: its nodes correspond to the arrows
which have a head or a tail equal to $i$. There is an edge between two arrows $a,b$ with $t(a)=h(b)=i$ if
$ab$ is contained in a cycle of $W$.

For every connected component $C \subset G_i$ we can construct a syzygy:
\[
z_C = \sum_{a \in C,h(a)=i} a\otimes \partial_a W \otimes 1-\sum_{a \in C,t(a)=i}1\otimes\partial_a W\otimes a.
\]
Indeed for every vertex $i$ the expression $\sigma_i := \sum_{h(a)=i} a\otimes\partial_a W\otimes 1 -\sum_{t(a)=i}1\otimes\partial_a W\otimes a$ is
a syzygy. We can split this syzygy in parts because the sets of arrows occurring in $z_{C_1}$ and $z_{C_2}$ for
two different components $C_1$ and $C_2$ are disjoint.
By the CY-3 property C2 we know that the third syzygies are in one to one correspondence with the vertices.
We can conclude that $G_v$ consist of one component.
 \item[PO] Define the map $\text{cf}:Q_2\to \mathbb{C}$ such that $W = \sum_{c \in Q_2}\frac{\text{cf}(c)}{\mathtt E_c}c^{\mathtt E_c}$.
We will show that the image of this map is $\{\lambda,-\lambda\}$ for some $\lambda \in \mathbb{C}$.
We take $Q^\pm_2$ the preimage of $\pm \lambda$. Clearly if two cycles share an arrow $a$ then $\text{cf}(c_1)=-\text{cf}(c_2)=\lambda_a$.
So $\mathsf{Im \,} \text{cf}=\{\lambda,-\lambda\}$ if we can go from one cycle to every other cycle by hopping over joint arrows.
This follows from condition PM and the fact that $Q$ is strongly connected.
\end{itemize}
The fact that $Q$ is strongly connected also implies that the $c^{\mathtt E_c}$ have the same $\mathtt R$-degree and because
$W \subset {\cal J}^3$ we must also have that $\mathtt E_c|c|>2$. This implies that $\mathtt E$ is a weighting for the quiver polyhedron and $\mathtt R$ is a compatible grading.
\end{proof}

\section{CY-3 and cancellation}\label{cancellation}

In the previous section we showed that positively graded cancellation algebras that are CY-3 always come from
graded weighted quiver polyhedra. The opposite is however not true: not every graded weighted quiver polyhedron gives an algebra that is CY-3 and as we remarked in section \ref{polyhedron} not all graded weighted quiver polyhedra give cancellation algebras. In this section we combine results by Davison, Mozgovoy and Reineke to show that if the Euler characteristic of a quiver polyhedron is not strictly positive the cancellation property and the CY-3 property are equivalent.

\subsection{Cancellation for quiver polyhedra}
The relations in the Jacobi algebra $A_{{\cal Q}}$ imply that all cycles in $Q_2$ are equivalent: ${c_1}^{\mathtt E_{c_1}}p=p{c_2}^{\mathtt E_{c_2}}$ for every $p$ with $h(p)=t(c_1)$ and $t(p)=h(c_2)$. This implies that the algebra $A$ has a central element: $\sum c^{\mathtt E_c}$ where we sum over a subset representatives of $Q_2$ that contains just one cyclic path $c$  with $h(c)=i$ for every $i\in Q_0$. We will denote this central element by $\ell$. For every arrow $a$ we can find a path $p$ such that $ap=h(a)\ell$ and $pa=t(a)\ell$: just take
$p =\partial_a c^{\mathtt E_c}$ where $c$ is a cycle in $Q_2$ containing $a$.

The cancellation property states that the map
\[
 A_{{\cal Q}} \to A_{{\cal Q}} \otimes_{\mathbb{C}[\ell]} \mathbb{C}[\ell,\ell^{-1}]
\]
is an embedding. This tensor product is the algebra obtained by making every arrow invertible (i.e. for every $a$ we have an $a^{-1}$ such that $aa^{-1}=h(a)$ and
$a^{-1} a=t(a)$). This algebra is the localization of $A_{{\cal Q}}$ by the Ore set $\{\ell^k|k \in \mathbb{N}\}$ and we denote it by $\hat A_{{\cal Q}}$. This definition makes also sense if $A_{\cal Q}$ does not satisfy the cancellation property, the map $A_{{\cal Q}} \to \hat A_{{\cal Q}}$ is no more injective but $\hat A_{{\cal Q}}$ is still a flat $A_{{\cal Q}}$-module.

\begin{lemma}\label{localcy3}
If $A_{{\cal Q}}$ is CY-3 then $\hat A_{{\cal Q}}$ is also CY-3.
\end{lemma}
\begin{proof}
Let $P^\bullet$ be the bimodule resolution of $A_{{\cal Q}}$ as a module over itself.
The complex $\hat A_{{\cal Q}} \otimes_{A_{{\cal Q}}}P^\bullet \otimes_{A_{{\cal Q}}}\hat A_{{\cal Q}}$ is still exact because
$\hat A_{{\cal Q}}$ is a flat $A_{{\cal Q}}$-module. This implies that $\hat A_{{\cal Q}}$ has a selfdual resolution
and is hence CY-3.
\end{proof}

It is important to note that $\hat A_{{\cal Q}}$ always is a cancellation algebra
even when $A_{{\cal Q}}$ is not. It is not always a CY-3 algebra, but in the case that ${\cal Q}$ is graded and
$\chi_{{\cal Q}}\le 0$ it will be even CY-3 if $A_{{\cal Q}}$ is not. To prove this statement we first need recall to a well known lemma.

\begin{lemma}\label{homotop}
Let ${\cal Q}$ be a weighted quiver polyhedron and $\mathtt R:Q_1 \to \mathbb{R}$ be any (not necessarily positive) grading such that $\mathtt R_\ell\ne 0$. Two paths in $\hat A_{{\cal Q}}$ are equivalent if and only if they are homotopic and have the same $\mathtt R$-degree.
\end{lemma}
\begin{proof}
It is clear that the relations $\partial_a W$ imply that equivalent paths are homotopic and must have the same $\mathtt R$-charge.
Because homotopies in the quiver polyhedron are generated by substituting paths $p\to q$ such that
$pq^{-1}=\ell$, homotopic paths can only differ by a factor $\ell^k$. The degree of $\ell$ is not zero, so
if homotopic paths have the same degree they must be equal in $\hat A_{{\cal Q}}$.
\end{proof}
\begin{remark}
By homotopic we mean homotopic as paths in $|{\cal Q}|$ considered as an orbifold, not merely as a topological space.
\end{remark}

\begin{theorem}\label{fundgroup}
For any graded weighted quiver polyhedron ${\cal Q}$,
\[
\hat A_{\cal Q} \cong \mathsf{Mat}_n(\mathbb{C}[\Pi])
\]
where $n$ is the number of vertices and $\mathbb{C}[\Pi]$ is the group algebra of the fundamental group of some compact
three-dimensional manifold.

The algebra $\hat A_{{\cal Q}}$ is CY-3 if and only if $\chi_{{\cal Q}}\le 0$.
\end{theorem}
\begin{proof}
Note that because of the gradedness ${\cal Q}$ is developable.
Let $|\tilde {\cal Q}| \to |{\cal Q}|$ be the universal cover of the orbifold $|{\cal Q}|$ and fix a vertex $i\in Q_0$. To every path in $p \in i\hat A_{|{\cal Q}|} i$ corresponds an element in the fundamental group of $|{\cal Q}|$, which gives a cover automorphism $\phi_p: |\tilde {\cal Q}| \to |{\cal Q}|$. Vice versa, every element in the fundamental group can be represented by a path in ${\cal Q}$.

Now consider the simply connected space $|\tilde {\cal Q}| \times {\blb R}$ and consider the group of diffeomorphisms
\[
\Pi = \{\psi_p: |\tilde {\cal Q}|\times {\blb R} \to |\tilde {\cal Q}|\times {\blb R}: (x,a) \mapsto (\phi_p(x),a+\mathtt R_p)| p \in \textrm{Hom}_{{\cal C}_{\hat{A_{{\cal Q}}}}}(i,i) \}
\]
By lemma \ref{homotop}, every element in $\textrm{Hom}_{{\cal C}_{\hat A_{{\cal Q}}}}(i,i)$ gives a different diffeomorphism and
none of these diffeomorphisms has fixpoints. The quotient of $|\tilde {\cal Q}|\times {\blb R}/\Pi$ is thus a manifold and
${i\hat A_{{\cal Q}} i} \cong \mathbb{C}[\Pi] =\mathbb{C}[\pi_1(|\tilde {\cal Q}|\times {\blb R}/\Pi)]$.

For every vertex $j$, fix a path $p_{j}:i \leftarrow j$. Construct the following morphism
\[
 \mathsf{Mat}_n(i\hat A_{{\cal Q}} i) \to \hat A_{{\cal Q}}: qE_{uv} \mapsto p_u^{-1}qp_v
\]
where $E_{uv}$ is the matrix with one on the entry $(u,v)$ and zero everywhere else.
This morphism has an inverse
\[
 \hat A_{{\cal Q}} \to \mathsf{Mat}_n(i\hat A_{{\cal Q}} i): q \mapsto p_{h(q)}qp_{t(q)}^{-1} E_{h(q)t(q)}.
\]

In general the fundamental group algebra of a compact manifold is CY-n if it is orientable and its universal cover
is contractible (see \cite{GB} Corollary 6.1.4). Note that this is the case as soon as $|\tilde {\cal Q}|\times {\blb R}$  is contractible. This is the case when $\chi_{{\cal Q}}\le 0$.

If the quiver polyhedron ${\cal Q}$ has positive Euler characteristic, then its universal cover $\tilde{\cal Q}$ has the topology of a sphere and the quotient manifold of the cover is ${\blb S}_2 \times {\blb S}_1$.
The fundamental group is $\mathbb{Z}$ so $\hat A_{\tilde{\cal Q}}$ is Morita equivalent to $\mathbb{C}[\ell,\ell^{-1}]$. This last algebra is
not CY-3.
\end{proof}
\begin{corollary}\label{nonpos}
For any graded weighted quiver polyhedron ${\cal Q}$,
if $A_{\cal Q}$ is CY-3 then the Euler characteristic $\chi({\cal Q})$ is not bigger than zero.
\end{corollary}

\subsection{Cancellation and CY-3 are equivalent}
In the nonpositive Euler characteristic case it turns out that the cancellation condition and the CY-3 condition
are equivalent.

That cancellation implies CY-3 was proved by Ben Davison in \cite{davison}
\begin{theorem}[Davison]\label{canc}
The Jacobi algebra of a graded weighted quiver polyhedron with nonpositive Euler characteristic is CY-3 if it is a cancellation algebra.
\end{theorem}
\begin{remark}
Although Davison proved this only in the case of dimer models (which are in our terminology the trivially weighted
quiver polyhedra) his proof generalizes to the weighted case because we can cover any graded weighted quiver polyhedron
by a graded unweighted quiver polyhedron.
Davison's work was a generalization of work by Mozgovoy and Reineke \cite{MR} which used an extra consistency condition. This extra condition turned out to be a consequence of the cancellation property.
\end{remark}

The converse of this theorem also holds:
\begin{theorem}\label{canc}
The Jacobi algebra of a graded weighted quiver polyhedron with nonpositive Euler characteristic is a cancellation algebra if it is CY-3.
\end{theorem}
\begin{proof}
Suppose that $p$ and $q$ are paths such that $(p-q)a=0$ for some arrow $a$ with $h(a)=t(p)=t(q)$
Because $a$ sits in a cycle, we also have that $(p-q)\ell=0$.
The fact that ${\cal Q}$ is strongly connected implies that there exists at least one path $u$ in the opposite direction of $p$ (i.e $h(u)=t(p)$ and $t(u)=h(p)$) such that $u(p-q)=(p-q)u=0$. Indeed take any path in the opposite direction of $p$
and multiply it with $\ell$.

Now we chose the pair $(p,q)$ in such a way that the degree $\mathtt R_p=\mathtt R_q$ is minimal and
for the pair $(p,q)$ we take the $u$ with the smallest $\mathtt R_u$.
We can now construct 2 syzygies:
\se{
s_1:=& u(pu \Rightarrow qu) - (u p \Rightarrow u q)u \\
s_2:=& (pu \Rightarrow qu)(p-q)-(p-q)(up \Rightarrow uq).
}
Here $(pu \Rightarrow qu)$ stands for an expression $\sum v_i \otimes \partial_{a_i}W \otimes w_i \in A\otimes\mathrm{Span}({\cal R})\otimes A$ representing the relation $pu - qu$. We will chose among the $p$ and $q$ and $u$ with minimal $\mathtt R$-charge the ones for which the number of relations in this expression is minimal. For this
$p$ we will also take the expression $(u p \Rightarrow u q)$
for which the number of relations is minimal.

For this reason and by the minimality of $p$ and $u$ we can assume that this expression will look like
\[
\lambda_1v_1 \otimes \partial_{a_1}W \otimes w_1 +\dots + \lambda_k v_k \otimes \partial_{a_k}W \otimes w_k.
\]
with $\lambda_i \in \mathbb{C}$ and $v_i,w_i$ paths
such that:
\begin{itemize}
 \item at least one of the $v_i$ has degree 0 (otherwise we can shorten $p$),
 \item none of the $v_i$ is a multiple of $p$ and none of the $w_i$ is a multiple of $u$ (otherwise we can reduce the number of relations used).
\end{itemize}
The syzygy $s_1$ is nonzero: by the second property, none of the $uv_i$ is zero so none of the terms
in $u(pu \Rightarrow qu)$ disappear. These terms cannot occur in $(u p \Rightarrow u q)u$ because none of the $w_i$ is a multiple of $u$.

We can write the syzygy $s_1$ in terms of the standard syzygies coming from the CY-3 property $\sigma_i :=
i(\sum a\otimes \partial_a W \otimes 1 - 1\otimes \partial_a W \otimes a)$.  The coefficients in this expression
$s_1 = \sum x_i\sigma_iy_i$ satisfy the property that there is at least one $i$ for which neither $x_i$ nor $y_i$ is
a multiple of $u$. Every $x_i\sigma y_i$ comes from a grouping of terms in $u(pu \Rightarrow qu) - (u p \Rightarrow u q)u$.
We can suppose that every $x_i\sigma_iy_i$ contains terms of both parts because otherwise we could find
new expressions for $(pu \Rightarrow qu)$ or $(u p \Rightarrow u q)$ that are shorter.
Because $x_i\sigma_iy_i$ contains a term of the first part then $y_i$ cannot be a multiple of $u$ because none of the $w_i$ is. Not all of the $x_i$ are multiples of $u$, otherwise the terms of $(u p \Rightarrow u q)$ would all
be multiples of $u$ but then this would give us a transformation of $p$ in $q$ without using $u$.

We can conclude that $(p-q)s_1$ is nonzero (some $x_i$ are not multiples of $u$) and
because $u$ does not divide all
of the $y_i$, $(p-q)s_1 - s_2u$ is a real syzygy between the $\sigma_i$. This means that the global
dimension of the algebra is at least $4$, contradicting the CY-3 property.
\end{proof}

We can summerize the results of the previous sections to the following theorem.
\begin{theorem}
For a positively graded category algebra $A$, any two of the properties below implies the other remaining property
 \begin{itemize}
  \item $A$ is cancellation,
  \item $A$ is CY-3,
  \item $A$ is the Jacobi algebra of a weighted quiver polyhedron with nonpositive Euler characteristic.
 \end{itemize}
\end{theorem}
\begin{remark}
In the positive Euler characteristic cancellation and  CY-3 do not coincide anymore. The easiest examples of this
are the octahedron and the unweighted version of example \ref{antiprism}: their Jacobi algebra are cancellation but they are not CY-3 by \ref{nonpos}. The first example was pointed out to me by A. King and N. Broomhead.
\end{remark}

Theorem \ref{cancelcover} can be translated to the CY-3 property:
\begin{corollary}
If ${\cal Q}\to {\cal Q}/\grp G$ is a cover map then $A_{\cal Q}$ is CY-3 if and only if ${\cal Q}/\grp G$ is CY-3.
\end{corollary}
\begin{remark}
This statement can also be proved directly by showing that one can lift the standard bimodule complex of ${\cal Q}/\grp G$
to the standard bimodule complex ${\cal Q}$ and that each is exact if and only if the other is.
\end{remark}

\subsection{Cancellation and zigzag paths}

Checking whether ${\cal C}_{{\cal Q}}$ is a cancellation category is not an easy task. Here we will introduce a combinatorial criterion that will enable us to check this property visually. We will restrict ourselves to the case when the Euler characteristic is nonpositive as this is the relevant case for the Calabi Yau property. In this situation we know that the universal cover of a quiver polyhedron
is contractible. By theorem \ref{cancelcover}, we can check the cancellation property in the universal cover.
From now on we will assume that $|{\cal Q}|$ is a contractible manifold and hence ${\cal Q}$ is trivially weighted.

We can split any given path $p$ into \emph{positive (negative) arcs}. These are maximal subpaths that are contained in a positive (negative) cycle. We will a call path \emph{positively (negatively) irreducible} if none of its positive (negative) arcs is the derivative of a positive (negative) cycle.

A \emph{zigzag path} is an infinite length path ${\cal Z} = \dots {\cal Z}[2]{\cal Z}[1]{\cal Z}[0]{\cal Z}[-1]{\cal Z}[-2]\dots$ for which all positive
and negative arcs have length $2$. It is easy to see that there are exactly two zigzag paths
for which ${\cal Z}[0]$ equals a given arrow $a$ (nl. the ones for which ${\cal Z}[1]{\cal Z}[0]$ is a positive or negative arc).
We denote these two zigzag paths by ${\cal Z}^+_a$ and ${\cal Z}^-_a$. The part of the zigzag path ${\cal Z}^+_a$
starting from $a$, ${\cal Z}^+_a[i]_{i \ge 0}$ is called the zig ray from $a$ and is denoted by $\vec {\cal Z}^+_a$.
Similarly we denote the zag ray by $\vec {\cal Z}^-_a$.
The notion of a zigzag path is based on work by Kenyon in \cite{kenyon} and Kenyon and Schlenker in \cite{rhombic}.

Every zigzag path ${\cal Z}$ is bounded by a positively and a negatively irreducible path consisting of the positive (negative) arcs $u_i$ such that $u_i {\cal Z}[2i+1]{\cal Z}[2i]$ is a positive (negative) cycle.

\begin{theorem}\label{zigzag}
If $|{\cal Q}|$ is a contractible manifold then ${\cal Q}$ is cancellation if and only if
for every arrow $a \in Q_1$ the following condition hold
\begin{itemize}
 \item[Z] $\vec {\cal Z}^+_a$ and $\vec {\cal Z}^-_a$ only intersect in $a$ i.e.
\[\forall i,j> 0: {\cal Z}^+_a[i] \ne {\cal Z}^-_a[j] \]
(note that the zigzag paths can intersect but only in different directions (f.i. ${\cal Z}^+_a[i] = {\cal Z}^-_a[j]$ with $i>0$ and $j<0$)
\end{itemize}
\end{theorem}
\begin{remark}\label{Z1}
Condition Z also implies that a zigzag path cannot selfintersect. Indeed if there are selfintersecting zigzag paths, we can take ${\cal Z}$ such that $a={\cal Z}[0]={\cal Z}[i]$ and the loop ${\cal Z}[i-1]\dots {\cal Z}[0]$ encompasses the smallest number of cycles. If ${\cal Z}={\cal Z}_a^\pm$ then the zigzag path ${\cal Z}_a^\mp$ has an arrow inside the loop and as it cannot make a smaller
loop it must enter and leave the loop and hence there the zig and the zag ray of some arrow in ${\cal Z}$ intersect.
\end{remark}
\begin{proof}
Because $|{\cal Q}|$ is contractible it cannot have the topology of a sphere. Therefore we have a
definition of the interior and the exterior of a cyclic path that does not selfintersect.
{\bf These conditions are necessary.}\\
If ${\cal Z}^+_a[i] = {\cal Z}^-_a[j]$ and $i,j$ are both positive and minimal, we look at the paths $p_+,p_-$ that
are the irreducible paths accompanying ${\cal Z}^+_a[i]\dots{\cal Z}^+_a[0]$ and ${\cal Z}^-_a[j]\dots {\cal Z}^-_a[0]$ which lie in the exterior of
${\cal Z}^+_a[i]\dots{\cal Z}^+_a[0]({\cal Z}^-_a[j]\dots {\cal Z}^-_a[0])^{-1}$. We must have that $p_+=p_-\ell^k$ or  $p_+\ell^k=p_-$ for some $k\ge 0$.
This is impossible because $p_+$ or $p_-$ is positively or negatively irreducible.
\[
\xymatrix@=.4cm{
&&\vtx{}\ar[rd]\ar@/_/@{.>}[lldd]&&\vtx{}\ar[rdd]\ar@/_/@{.>}[ll]|{p_+}&\\
&&&\vtx{}\ar[ru]&&\\
\vtx{}\ar[r]^a&\vtx{}\ar[ruu]_{{\cal Z}^+_a}\ar[rdd]^{{\cal Z}^-_a}&&&&\vtx{}\ar[r]&\vtx{}\ar@/_/@{.>}[lluu]\ar@/^/@{.>}[lldd]\\
&&&\vtx{}\ar[rd]&&\\
&&\vtx{}\ar[ru]\ar@/^/@{.>}[lluu]&&\vtx{}\ar[ruu]\ar@/^/@{.>}[ll]|{p_-}&
}
\]
{\bf These conditions are sufficient.}\\
If ${\cal Q}$ is not cancellation, we will assume that condition Z holds and search for a contradiction.

Let $p$, $q$ be two paths such that
$p\ell^k=q\ell^k$ for some $k>0$ but not $p=q$. We take the couple for which $p,q$ have minimal $\mathtt R$-degree.
Minimality implies if $p$ or $q$ selfintersect the loop must be reducible to a power of $\ell$ (other wise we could take this loop for a new $p$ or $q$ with smaller $\mathtt R$-degree). So without loss of generality we can assume that $p$ is not a multiple of $\ell$ and $q=q'\ell^s$ with $s\in \mathbb{N}$. If $q'$ intersects $h(p[i])=h(q'[j])$ then
$p[i]\dots p[0]$, $q[j]\dots q[0]\ell^t$ will be an example of a couple with smaller $\mathtt R$-degree, so $p$, $q'$ don't intersect and form the boundary of a simply connected piece $S \subset |{\cal Q}|$. Without loss of generality, we can assume that $p$ goes clockwise around this piece and $q'$ anticlockwise.

By applying the relations to $p$ we can try to make this piece as small as possible but we cannot shrink it to zero, because ${\cal Q}$ is not cancellation. After this shrinking $p$ will be a negatively irreducible path.

At $t(p)$ we consider the arrow $a$ with $h(a)=t(p)$ such that $a$ sits in the same negative cycle as the last positive arc of $p$.  The zigzag path ${\cal Z}_a^+$ must enter $S$ at some vertex on the boundary.

This vertex $v$ cannot lie on $p$. Indeed, if this
were the case it would be the head of one of the negative arcs of $p$ and ${\cal Z}_a^+[j_1]=b$ with $j_1<0$ odd, $p= r_2br_1$ and $h(b)=v$. Now the negative cycle containing $b$ contains at least two arrows not in $p$ because $p$ is negatively reduced.
One of these arrows is $c={\cal Z}_a^+[j_1+1]$. Through $c$ we can look at the zigzag path ${\cal Z}_c^-$. This path enters the  simply connected piece $S^{(1)}$ bounded by $p^{(1)}=br_1$ and ${\cal Z}_a^+[0]\dots {\cal Z}_a^+[j_1+1]$. It cannot leave $S^{(1)}$ through ${\cal Z}_a^+$ by Z, so it must leave $S^{(1)}$ at a vertex which is the tail of some negative arc of $p$. This cannot be the first arc or otherwise the two zigzag paths intersect at $a$. This means that for some $j_2>0$ ${\cal Z}_c^-[j_2-1]\dots{\cal Z}_c^-[0]$ and a piece $p^{(2)}$ of $p$ cut out an even smaller piece $S^{(2)}$.
\begin{center}
\begin{tikzpicture}
\draw [<-] (0,0) -- (.5,-.5) -- (1,0) -- (1.5,-.5) -- (2,0) -- (2.5,-.5) -- (3,0);
\draw [->] (2,0) -- (2.5,.5) -- (2,1) -- (2.5,1.5) -- (2,2);
\draw [<-] (2.5,.5) -- (2.8,.5);
\draw [->,very thick] (0,0) arc (180:90:.5);
\draw [->,very thick] (.5,.5) arc (180:90:.5);
\draw [->,very thick] (1,1) arc (180:0:.5);
\draw [->,very thick] (2,1) -- (2.5,1.5);
\draw [->,very thick] (2.5,1.5) arc (90:0:.5);
\draw [->,very thick] (3,1) arc (90:-90:.5);
\draw [->,very thick] (3,0) -- (2.5,-.5);
\draw (0,-.5) node{$a$};
\draw (1,-.5) node{${\cal Z}_a^+$};
\draw (2,.5) node{${\cal Z}_c^-$};
\draw (3,-.5) node{$b$};
\draw (2,-.5) node{$c$};
\draw (1,.5) node{$S^{(1)}$};
\draw (2.5,0) node{$S^{(2)}$};
\draw (2.5,1) node{$S^{(3)}$};
\draw (.5,1) node{$p^{(1)}$};
\draw (4,0.5) node{$p^{(2)}$};
\draw (3,0.5) node{${\cal Z}_d^+$};
\end{tikzpicture}
\end{center}
Through $d={\cal Z}_c^-[j_2-1]$ we can look at the zigzag path ${\cal Z}_d^-$ which cuts out an even smaller piece $S^{(3)}$.
If we continue this procedure we get to a point where $p^{(k)}$ has length zero. But this implies that the corresponding zigzag path will selfintersect (contradicting remark \ref{Z1}).

So ${\cal Z}_a^+$ will leave $S$ through $q$. Because Z does hold, ${\cal Z}_a^-$ must also leave through $q$. Analogously to the previous paragraph we can now construct a sequence of zigzag paths cutting a shorter and shorter pieces of $q'$ until we
get a selfintersecting zigzag path (contradicting remark \ref{Z1}).
\end{proof}

\subsection{Summary}
\begin{theorem}
For a graded weighted quiver polyhedron ${\cal Q}$ with $\chi_{\cal Q}\le 0$ the following are equivalent:
\begin{enumerate}
\item $A_{\cal Q}$ is CY-3.
\item $A_{\cal Q}$ is cancellation.
\item The zig and zag rays in the universal cover do not intersect twice.
\end{enumerate}
\end{theorem}

\section{Cancellation for $\chi_{\cal Q}=0$}\label{flatcancel}

From now on we assume ${\cal Q}$ is a graded unweighted quiver polyhedron with $\chi_{\cal Q}=0$ and $\tilde {\cal Q}$ is
its universal cover. We will look a certain consistency notions introduced in \cite{Kennaway} and \cite{broomhead} and show they are all equivalent to cancellation.

\subsection{Consistent $\mathtt R$-charges}
We borrow the following definition from Kennaway \cite{Kennaway}
\begin{definition}
A grading $\mathtt R: Q_1 \to \mathbb{R}_{>0}$ is consistent if
\begin{itemize}
\item
the superpotential has degree $2$: (i.e. $\forall c \in Q_2: \mathtt E_c\mathtt R_c =2$),
\item
$\forall v \in Q_0: \sum_{h(a)=v}(1-\mathtt R_a) + \sum_{t(a)=v}(1-\mathtt R_a)=2$.
\end{itemize}
\end{definition}
\begin{remark}
In \cite{broomhead} a distinction is made between geometrically consistent and marginally consistent $\mathtt R$-charges.
The former have the extra condition that $\mathtt R_a<1$ for every $a$, while for the latter one also allows $\mathtt R_a \ge 1$.
We will not make this distinction: for us marginally consistent $\mathtt R$-charges are also consistent.
\end{remark}
\begin{remark}
Although in this section we will work with unweighted quivers, we deliberately included $\mathtt E_c$ in the definition, to be able to extend it to the weighted case later on.
\end{remark}

It has been pointed out in e.g. \cite{Kennaway} that
consistency implies that the Euler characteristic is zero
\se{
2\chi_{{\cal Q}} &= 2(\sum_{c \in \#Q_2}\frac 1{\mathtt E_c} - \#Q_1 + \#Q_0)\\
&= \sum_{c \in Q_2}\sum_{a \in c} \mathtt R_a - \sum_a 2 + \sum_v \left(\sum_{h(a)=v}(1-\mathtt R_a) + \sum_{t(a)=v}(1-\mathtt R_a)\right)\\
&=\sum_a\left( \underbrace{2\mathtt R_a}_{a \text{ sits in 2 cycles}} - 2 + \underbrace{1-\mathtt R_a}_{v=h(a)}+ \underbrace{1-\mathtt R_a}_{v=t(a)}\right)=0
}

Given a consistent $\mathtt R$-charge we can realize the universal cover of the quiver polyhedron, which is the Euclidean plane, in the following way:
turn every cycle in $Q_2$ into a polygon the vertices of which are all on the unit circle and every arrow $a$ stands on an arc of $\pi \mathtt R_a$ radians.
The first consistency condition implies that such a polygon exists as the arcs add up to $2\pi$.
If $a$ and $b$ are consecutive arrows in a cycle then one can check that the angle between the two
arrows is $\frac \pi 2(2 - \mathtt R_a -\mathtt R_b)$ because it is the inscribed angle standing on the arc spanned by the rest of the cycle.
Pasting all these polygon together one gets a tiling of the plane because the second consistency condition implies that the angles of the polygons at one vertex add up to $2 \pi$ (see also \cite{rhombic}).
Such an embedding is called \emph{isoradial}.

A second ingredient we need are perfect matchings.
\begin{definition}
A perfect matching is a subset of arrows ${\cal P} \subset {\cal Q}_1$ such
that every cycle in ${\cal Q}_2$ has exactly one arrow from ${\cal P}$. A perfect matching gives a nonnegative grading on $A_{\cal Q}$ by assigning degree $1$ to each arrow in ${\cal P}$ and zero to the others:
\[
\deg_{\cal P} a = \begin{cases}
1&a \in{\cal P}\\
0&a\not \in {\cal P}
\end{cases}
\]
\end{definition}

For an isoradial embedding we can construct special perfect matchings:
\begin{lemma}[Definition of ${\cal P}_\theta^\pm$]
Given an isoradial embedded ${\cal Q}$ and a direction $\theta$, then the set ${\cal P}_\theta^+$  (${\cal P}_\theta^-$) of all arrows $a$ such that the ray from the center of its positive cycle in direction $\theta$ in the isoradial embedding hits $a$ but not in its head (tail), is a perfect matching.
\end{lemma}
\begin{proof}
It is clear from the construction that every positive cycle has exactly one arrow in ${\cal P}_\theta^\pm$.
The same holds for the negative cycles because
$a \in {\cal P}_\theta^\pm$ if and only if the ray from the center of its negative cycle in direction $-\theta$ in the isoradial embedding hits $a$ but not in its tail (head).
\begin{center}
\begin{tikzpicture}
\draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- (1,0);
\draw (0,1) arc (90:360:1);
\draw (1,0) arc (-90:180:1);
\draw (0,1) -- (.29, 1.71) -- (1.71,1.71) -- (1.71,.29) -- (1,0);
\draw [->,very thick] (0,0) -- (.5,.86) node [above] {$\theta$};
\draw [->,very thick] (1,1) -- (.5,.14) node [below] {$-\theta$};
\end{tikzpicture}
\end{center}
\end{proof}

Now let ${\cal Z}={\cal Z}_a^+$ be a zigzag path in an isoradial embedded quiver polyhedron.
We define ${\epsilon}_{{\cal Z}} \in {\blb R}/2\pi{\blb R}$ to be the angle of $h(a)$ as viewed from the center
of the positive cycle containing ${\cal Z}_a^+[1]{\cal Z}_a^+[0]$.
It is easy to check that this definition does not depend on the $a$.
\begin{lemma}\label{PMZZ}Let $\theta={\epsilon}_{{\cal Z}_a^\pm}$.
\begin{enumerate}
\item ${\cal P}_\theta^\pm$ intersects ${\cal Z}_a^\pm$ in all the arrows ${\cal Z}_a^\pm[i]$ with $i$ odd.
\item Both $a$ and ${\cal Z}_a^\mp[1]$ are not in ${\cal P}_{\theta}^\pm$.
\end{enumerate}
\end{lemma}
\begin{proof}
We prove the statement for $\theta={\epsilon}_{{\cal Z}_a^+}$.
Viewed from the centers of the positive cycles $t({\cal Z}_a^+[i])$ points in direction ${\epsilon}_{{\cal Z}_a^+}$ for all odd $i$.
Viewed from the center of the negative cycle $t(a)$ points in the direction $-\theta$, so
the arrow $b$ with head $t(a)$ must sit in ${\cal P}_{\theta}^+$, this cannot be ${\cal Z}_a^-[1]$ because
the cycle has length at least $3$.
\end{proof}

We are now ready to prove the equivalence between cancellation and the existence of a consistent $\mathtt R$-charge.
\begin{theorem}\label{rcharge}
Let ${\cal Q}$ be a graded unweighted quiver polyhedron with $\chi_{{\cal Q}}=0$ then ${\cal Q}$ is cancellation if and
only if it admits a consistent $\mathtt R$-charge.
\end{theorem}
\begin{proof}
We will prove the equivalence of the existence of a consistent $\mathtt R$-charge with property Z. After that we can apply theorem \ref{zigzag}.

{\bf The condition is sufficient.}
Suppose ${\cal Q}$ has an $\mathtt R$-charge and construct the corresponding isoradial tiling of the plain.
Suppose ${\cal Z}_a^+[i]={\cal Z}_a^-[j]=b$ and let $p_+$ and $p_-$ be the positively and negatively reduced paths in the opposite direction.

Let $\theta={\epsilon}_{{\cal Z}_a^+}$, by lemma \ref{PMZZ}
$\deg_{{\cal P}_\theta^+} p_+=0$ but $\deg_{{\cal P}_\theta^+} p_->0$ because neither
$a$ nor ${\cal Z}_a^-[1]$ sit in ${\cal P}_\theta^+$. This means that in $\hat A_{\cal Q}$,  $p_-=\ell^k p_+$ for some $k>0$.

On the other hand if we take $\theta={\epsilon}_{{\cal Z}_a^-}$ then for similar reasons
$\deg_{{\cal P}_\theta^-} p_-=0$ but $\deg_{{\cal P}_\theta^-} p_+>0$ and we get in $\hat A_{\cal Q}$,  $p_+=\ell^l p_-$ for some $l>0$.
This contradicts the previous paragraph.

{\bf The condition is necessary.}
Every zigzag path ${\cal Z}$ on the torus $|{\cal Q}|$ is periodical and hence its lift $|\tilde {\cal Q}|$ can be assigned a direction vector in the Euclidean plane. The unit vector in this direction will be denoted by $e_{\cal Z}$.

From condition Z, we can deduce that for every arrow $a$ $e_{{\cal Z}^+_a}\ne e_{{\cal Z}^-_a}$. If this were not
the case ${\cal Z}^+_a$ and ${\cal Z}^-_a$ would intersect an infinite number of times (in shifts of $a$ in the direction $e_{{\cal Z}^-_a}$).

We now define an $\mathtt R$-charge as $\frac 1\pi$ times the positive angle in clockwise direction from $e_{{\cal Z}^-_a}$ to  $e_{{\cal Z}^+_a}$
\[
\mathtt R_a := \frac 1\pi \measuredangle(e_{{\cal Z}^-_a}, e_{{\cal Z}^+_a}).
\]
The value of $\mathtt R_a$ is always nonzero and smaller than $2$.

We now prove that the following two conditions hold:
\[
 \sum_{a \in c} \mathtt R_a=2 \text{ and }\sum_{h(a)=v} (1-\mathtt R_a)+ \sum_{t(a)=v} (1-\mathtt R_a)=2.
\]
First look at the incidence structure of the zag rays starting from arrows around a positive cycle $c$ (i.e the $\vec {\cal Z}^-_a$).
These rays do not intersect. If $a,b$ are consecutive arrows, the intersection of $\vec{\cal Z}^-_a$ and $\vec{\cal Z}^-_b$ would imply that
$\vec {\cal Z}^+_a = a\vec{\cal Z}^-_b$ and $\vec {\cal Z}^-_a$ intersect twice.
If $a,b$ are not consecutive in the cycle, there must be an arrow $u$ between $a$ and $b$. But then $\vec{\cal Z}_u^-$ must either intersect $\vec{\cal Z}_a^-$ or $\vec{\cal Z}_b^-$.
Proceeding like this we can always find two consecutive arrows for which the zag rays intersect.

The non-intersection implies that the directions $e_{{\cal Z}^-_a}$ are ordered on the unit circle in the same way as the arrows $a$.
For consecutive arrows $a,b$ $e_{{\cal Z}^+_a}=e_{{\cal Z}^-_b}$ so the sum of the angles add up to $2\pi$ and hence the sum of the $\mathtt R$-charges is $2$.

We can now do the same for the vertices. Look at all arrows leaving a vertex $v$. The zig rays of two consecutive leaving arrows do not intersect because otherwise
we could follow the second zig path backwards inside the piece cut out by the two zig rays. This backwards path must leave this piece either by an arrow $b$ of the first zig ray (because the second zag path cannot selfintersect). But now the zigzag rays from $b$ intersect twice, which contradicts Z.
If two zag rays of non-consecutive leaving arrows intersect then the zig ray of an arrow in between must intersect one of these zig rays so we can always reduce to the consecutive case.

The angle between the directions of the zig rays of 2 consecutive leaving arrows $a_1,a_2$ is $\pi(2-\mathtt R_{a_1} -\mathtt R_b)$ where $b$ is the incoming arrow between $a_1$ and $a_2$. The fact that these angles add up to $2\pi$ gives us the second consistency condition.
\[
\xymatrix@C=.3cm@R=.5cm{
&&\ar@{<-}[rd]_{{\cal Z}_b^-}^{{\cal Z}_a^+}&&&&\ar@{<-}[ld]^{{\cal Z}_a^-}\ar@{<.>}@/_/[llll]|{\pi\mathtt R_a}&&\\
&&&\vtx{}\ar[ld]&&\vtx{}\ar[ll]_b&&&\\
\ar@{<-}[rr]&&\vtx{}\ar[rd]&&c&&\vtx{}\ar[lu]_a&&\ar@{<-}[ll]\\
&&&\vtx{}\ar[rr]&&\vtx{}\ar[ru]&&&\\
&&\ar@{<-}[ru]&&&&\ar@{<-}[lu]&&\\
}
\hspace{1cm}
\xymatrix@C=.3cm@R=.5cm{
&&&&\ar@{<-}[rd]^{{\cal Z}_{a_1}^+}&&&&\\
&&&\vtx{}&&\vtx{}\ar@{<-}[ld]^{a_1}&&\ar@{<-}[ll]^{{\cal Z}_{a_1}^-}_{{\cal Z}_b^+}\ar@{<.>}@/_20pt/[ulll]|{\pi\mathtt R_{a_1}}&\\
&&\vtx{}\ar@{<-}[rr]_{a_2}&&\vtx{v}\ar@{<-}[lu]_b\ar@{<-}[rr]\ar@{<-}[ld]&&\vtx{}&&\\
&\ar@{<-}[ru]^{{\cal Z}_b^-}_{{\cal Z}_{a_2}^+}\ar@{<.>}@/_40pt/[uurrrrrr]|{\pi\mathtt R_b}&&\vtx{}&&\vtx{}\ar@{<-}[lu]&&&\\
&&&&\ar@{<-}[ru]&&&&
}
\]
\end{proof}
\begin{remark}
The first part of this theorem is an extension of Lemma 5.3.1
in \cite{HanHer} to the marginally consistent case.
\end{remark}
\begin{remark}\label{goodtiling}
The second part of the theorem gives us an $\mathtt R$-charge from the directions of the zigzag paths in the plane.
We can use this $\mathtt R$-charge to construct the isoradial embedding. Note however that the angles between the zigzag paths in this isoradial embedding are in general not the same as the ones we used to construct the $\mathtt R$-charge.
We can recover the original directions from the isoradial embedding, because the $e_{{\cal Z}_a^+}$ in the original embedding point precisely in the directions ${\epsilon}_{{\cal Z}_a^+}$ of the isoradial embedding.
\end{remark}

\subsection{Toric orders and algebraic consistency}

In our original motivation we introduced the notion of a toric order to model the kind of algebras that appear as noncommutative crepant resolutions. However we haven't yet proved that that the CY-3 algebras we get from quiver polyhedra do in fact give us toric orders, not just cancellation algebras.
This is only possible if the quiver polyhedron is unweighted and has $\chi_{\cal Q}=0$, because only then $A_{\cal Q}$ sits inside the matrix ring over the fundamental group algebra of the $3$-torus: $\mathsf{Mat}_n(\mathbb{C}[X_1^{\pm 1},X_2^{\pm 1},X_3^{\pm 1}])$.

We are now going to prove that a consistent $\mathtt R$-charge for an unweighted quiver polyhedron ${\cal Q}$ implies that $A_{\cal Q}$ is a toric order. To prove that something is a toric order we can use theorem \ref{whento}. This requires us to do two things:
prove that the map $\tau: A_{\cal Q} \to \Uparrow_\alpha A_{\cal Q}$ is an isomorphism and that $Z(A_{\cal Q})$ is normal. The second condition we get for free because
if $A_{\cal Q} \cong \Uparrow_\alpha A_{\cal Q}$ then $A_{\cal Q}$ is finite over its center and because $A_{\cal Q}$ is CY-3 by theorems \ref{cancellation} and \ref{rcharge} property C4 implies that
$Z(A)$ is normal.

So we need to prove that $\tau: A \to \Uparrow_\alpha A$ is an isomorphism. This condition was introduced by Broomhead in \cite{broomhead}.
\begin{definition}
A Jacobi algebra $A_{\cal Q}$ of a quiver polyhedron on a torus algebraically consistent if and only if the map
\[
 \tau:  A_{\cal Q} \to \Uparrow_\alpha A_{\cal Q}
\]
from \ref{whento} is an isomorphism.
\end{definition}
\begin{remark}
In \cite{broomhead} the algebra $\Uparrow_\alpha A_{\cal Q}$ is denoted by $B$ and is explicitly constructed from the dimer model.
\end{remark}
In \cite{broomhead} Nathan Broomhead proved that the existence of a geometrically consistent $\mathtt R$-charge implies algebraic consistency. In this section we will extend this result to any consistent $\mathtt R$-charge.
F
To do this we need the following fact:
\begin{lemma}\cite{broomhead}[Broomhead Lemma 6.1.1]
If ${\cal Q}$ is a graded unweighted quiver polyhedron with $\chi_{\cal Q}=0$ then
$A_{\cal Q}$ is algebraically consistent if it is cancellation and for every pair of vertices $v,w$ in the universal cover $\tilde {\cal Q}$, there is a path $p:v \to w$ and a perfect matching $\tilde{\cal P}$ that does not meet $p$.
\end{lemma}
We also need these three lemmas.
\begin{lemma}\label{opp}
If ${\cal Q}$ is a graded unweighted quiver polyhedron with $\chi_{\cal Q}=0$, ${\cal P}$ is a perfect matching and $p$, $q$ are cyclic paths with opposite
homology classes then either $p$ or $q$ meets ${\cal P}$.
\end{lemma}
\begin{proof}
Suppose $\deg_{\cal P} p=\deg_{\cal P} q=0$.
Take any path $r$ from $h(p)$ to $h(q)$, then $\deg_{\cal P} prq=\deg_{\cal P} r$ and $prq$ and $r$ have the same homology
class, so by lemma \ref{homotop} they must be the same. But this is impossible because for every positive grading $prq$ and $r$ must have different degrees.
\end{proof}\label{angle}
\begin{lemma}
If ${\cal Q}$ is a graded unweighted quiver polyhedron with $\chi_{\cal Q}=0$ then
given a zigzag path ${\cal Z}_1$ in the universal cover then there is always another zigzag path ${\cal Z}_2$ making an positive angle with ${\cal Z}_1$ less than $\pi$ radians: $0<\measuredangle(e_{{\cal Z}_1}, e_{{\cal Z}_2})<\pi$.
\end{lemma}
\begin{proof}
Suppose that it is not the case, let ${\cal Z}_2$ be the zigzag path whose angle with ${\cal Z}_1$ is smallest
let $a$ be an arrow in their intersection. There are two possibilities:
${\cal Z}_1 = \vec {\cal Z}_a^+$ and ${\cal Z}_2 = {\cal Z}_a^-$ or ${\cal Z}_1 = \vec {\cal Z}_a^-$ and ${\cal Z}_2 = {\cal Z}_a^+$
In the first case, the directions in the zigzag paths show, there must be another arrow in the intersection behaving like the second case
\[
\xymatrix@C=.5cm@R=.3cm{{\cal Z}_1&&\vtx{}\ar@{.>}[lld]\ar@{.>}[rrd]&&{\cal Z}_2\\
{\cal Z}_2&&\vtx{}\ar[u]\ar@{<.}[llu]\ar@{<.}[rru]&&{\cal Z}_1}
\]
So suppose ${\cal Z}_1 = \vec {\cal Z}_a^+$ and ${\cal Z}_2 = {\cal Z}_a^-$ and let $b={\cal Z}_a^+[-1]$.
By our hypothesis, the zigzag path ${\cal Z}_b^+$ makes a positive angle with ${\cal Z}_1$ that is at least as big as the angle with ${\cal Z}_2$.
Therefore the ${\cal Z}_b^+$ must intersect ${\cal Z}_1$ a second time, but by condition Z ${\cal Z}_b^+[i]={\cal Z}_1[j] \implies ij<0$. This also implies an intersection
of ${\cal Z}_b^+$ with ${\cal Z}_2$. This implies that ${\cal Z}_2$ and ${\cal Z}_b^+$ cannot have the same direction otherwise they would intersect multiple times in this direction (take shifts of the intersection). So ${\cal Z}_b^+$ makes a positive angle with ${\cal Z}_1$ that is bigger than the angle with ${\cal Z}_2$. Now this implies a second intersection with ${\cal Z}_2$ contradicting Z.
\[
\xymatrix@C=.4cm@R=.2cm{
{\cal Z}_1\ar@{..}[rrdd]&&\ar@{.>}@(l,u)[lddddddd]&&&{\cal Z}_b^+\ar@{..}@(d,r)[llddddddd]&{\cal Z}_2\ar@{.>}[lllddd]\\
&&&&&&\\
&&\vtx{}\ar[rd]_b&&&&\\
&&&\vtx{}\ar[d]_a\ar@{..}@(u,r)[uuul]&&&\\
&&&\vtx{}\ar@{.>}[rrrddd]\ar@{.>}[lllddd]&&&\\
&&&&&&\\
&&&&&&\\
{\cal Z}_2&{\cal Z}_b^+&&\ar@{.>}@(l,d)[uuuuul]&&&{\cal Z}_1\\
}
\]
\end{proof}

\begin{theorem}\label{algcon}
A graded unweighted quiver polyhedron with $\chi_{\cal Q}=0$ is algebraically consistent if and only if it is cancellation.
\end{theorem}
\begin{proof}
Note that algebraically consistent automatically implies cancellation as $\Uparrow_\alpha A_{\cal Q}\subset \mathsf{Mat}_n(\mathbb{C}[T])$ is a cancellation algebra.

Suppose that ${\cal Q}$ is cancellation and let $0\ge \theta_1>\dots> \theta_u> 2\pi$ be the directions of the zigzag paths. Use these directions to construct an $\mathtt R$-charge as in theorem \ref{rcharge} and its corresponding isoradial embedding.ions of the zigzag paths. Use these directions to construct an $\mathtt R$-charge as in theorem \ref{rcharge} and its corresponding isoradial embedding.
For each $i \in \{1,\dots, u\}$ we define ${\cal P}_i:= {\cal P}_{\theta_i}^+$ (note that by the isoradial construction $\theta_i={\epsilon}_{{\cal Z}_i}$).

Every vertex in the universal cover has an arriving and a leaving arrow not in ${\cal P}_{{i-1}} \cup {\cal P}_{i}$.
Indeed if we look at the arrows in a vertex $v$ then by remark \ref{goodtiling}
every arrow is a vector from $e_{{\cal Z}_a^-}$ to $e_{{\cal Z}_a^+}$, so the tail of each arriving arrow $a$
and the head of the leaving arrow $b$ in the same negative cycle are both in the same direction viewed from their
positive cycles. So if we shift all arrows arriving in and leaving from $v$ to the unit circle they will form a path
\begin{center}
\begin{tikzpicture}
\draw [->, very thick] ($(0:1cm)-(120:1cm)$) -- (0,0);
\draw [->, very thick] (0,0) --  ($(210:1cm)-(120:1cm)$);
\draw [->, very thick] ($(210:1cm)-(330:1cm)$) -- (0,0);
\draw [->, very thick] (0,0) -- ($(90:1cm)-(330:1cm)$);
\draw [->, very thick]  ($(90:1cm)-(225:1cm)$) -- (0,0);
\draw [->, very thick]  (0,0)-- ($(360:1cm)-(225:1cm)$);
\draw ($(0:1cm)-(120:1cm)$) arc (0:210:1);
\draw ($(210:1cm)-(330:1cm)$) arc (-150:90:1);
\draw ($(90:1cm)-(225:1cm)$) arc (90:360:1);
\end{tikzpicture}
\hspace{1cm}
\begin{tikzpicture}
\draw [->, very thick] (0:1cm) --(120:1cm) -- (210:1cm) -- (330:1cm) -- (90:1cm) -- (225:1cm) -- (360:1cm);
\draw [->] (0:1cm) arc (0:360:1cm);
\end{tikzpicture}
\end{center}

The 2nd consistency condition implies that the path goes around
the unit circle $n-1$ times where $n$ is the number of incoming arrows.
\[
\sum_{h(a)=v}(1-\mathtt R_a) + \sum_{t(a)=v}(1-\mathtt R_a)=2 \implies \sum_{h(a)=v}\mathtt R_a + \sum_{t(a)=v}\mathtt R_a=2n -2
\]
An arrow sits in ${\cal P}_{{i-1}} \cup {\cal P}_{i}$ if and only if its head, tail or body crosses
the direction $\theta_i$. If all incoming vertices would cross $\theta_i$, the path would go round $n$ times which is a contradiction. The same can be said about the leaving arrows.

This means there is a path from every vertex $v$ that does not meet ${\cal P}_{{i-1}} \cup {\cal P}_{i}$ and hence does not intersects the zigzag path ${\cal Z}_i$. It also does not selfintersect because it does not meet ${\cal P}_{i}$.
Therefore it must either be parallel or antiparallel to the zigzag path. Parallel is impossible because of lemma \ref{opp} and the existence of a path in the opposite direction of the zigzag path.

Let us call this ray ${\cal Y}_i^v$. If ${\cal Y}_i^v$ and ${\cal Y}_{i+1}^v$ intersect multiple times we know that the pieces between the intersections are equivalent
because they both do not meet ${\cal P}_{i}$. Hence they also both do not meet ${\cal P}_{i\pm 1}$. We can chose ${\cal Y}_i^v$ and ${\cal Y}_{i+1}^v$ to overlap
on that piece. Choosing the ${\cal Y}_i^v$ this way, we can divide the plane into sectors lying between the ${\cal Y}_i^v$ and ${\cal Y}_{i+1}^v$.

Now let $w$ be another vertex in the universal cover. If it lies on one of the rays ${\cal Y}_i$ then there is a path from $v$ to $w$ that does not meet ${\cal P}_{i}$.
If it lies between ${\cal Y}_i^v$ and ${\cal Y}_{i+1}^v$ we can find a vertex $u_1$ far enough on ${\cal Y}_i^v$ and $u_2$ far enough on ${\cal Y}_{i+1}^v$ such that $w$ lies in the piece
cut out by ${\cal Y}_i^v$,  ${\cal Y}_{i+1}^{u_1}$, ${\cal Y}_i^{u_2}$ and  ${\cal Y}_{i+1}^{v}$. Note that the middle two paths intersect
because by lemma \ref{angle} the angle in the original embedding between them is smaller than $\pi$.
\[
\xymatrix@=.3cm{
&&&&&&&&\\
&&\vtx{u_2}\ar@{.>}[rrrr]^{{\cal Y}_{i+1}^{u_2}}&&&&&&\\
&&\vtx{w}&&&&&&\\
\vtx{v}\ar@{.>}[uuurrr]^{{\cal Y}_{i}^v}\ar@{.>}[rrrrrr]_{{\cal Y}_{i+1}^v}&&&\vtx{u_1}\ar@{.>}[uuurrr]_{{\cal Y}_{i}^{u_1}}&&&&&
}
\]

The piece is bounded by two paths that do not meet ${\cal P}_{i}$ so they have the same homology and $\deg_{{\cal P}_i}$ and by lemma \ref{homotop} they are equivalent.
Hence, there is a sequence of relations turning the first path in to the second. One of the intermediate steps must meet $w$ because it is inside the piece.
This will give us a path from $v$ to $w$ that does not meet ${\cal P}_{i}$.
\end{proof}
\begin{remark}
The idea of this proof is an adaptation of section 6.3.1 in \cite{broomhead}.
\end{remark}
\begin{corollary}\label{consistentto}
The Jacobi algebra of a graded unweighted quiver polyhedron is a toric order if and only if it is cancellation.
\end{corollary}

\subsection{Noncommutative crepant resolutions}

In \cite{nccrep} Michel Van den Bergh introduced the notion of a noncommutative crepant resolution
\begin{definition}
Let $R$ be an affine commutative Gorenstein domain, with quotient field $K$. An algebra $A$ is a \emph{noncommutative crepant resolution}
of $R$ if $A$ is homologically homogeneous (i.e. the projective dimension of all simple representations of $A$ is the same)
and $A \cong \ensuremath{\mathsf{End}}_R(M)$ for some finitely generated $R$-reflexive module $M$  (reflexive means $\textrm{Hom}_R(\textrm{Hom}_R(M,R),R)\cong M$).
\end{definition}

As is explained in the discussion following this definition and using results from \cite{lebruynnote} and \cite{orzech}, the last condition is satisfied if we demand that
\begin{enumerate}
 \item $A \otimes_R K = \mathsf{Mat}_{n\times n}(K)$,
 \item $A$ is a reflexive $R$-module,
 \item the ramification locus has codimension $\ge 2$.
\end{enumerate}
The ramification locus of an order is defined as the set of points $\ideal p \in \mathtt{Mspec} R$ such
that $A \otimes_R R/\ideal p \ne \mathsf{Mat}_{n \times n}(\mathbb{C})$ (or in other words the representation of $A$ at the point $p$ is not simple).

These facts can be used to show that the Euler characteristic 0 case fits in this setting.

\begin{theorem}
The Jacobi algebra of a graded unweighted quiver polyhedron is a noncommutative crepant resolution of its center if and only if it is cancellation.
\end{theorem}
\begin{proof}
If $A_{\cal Q}$ is a noncommutative crepant resolution of its center then it is a prime algebra because ${\cal Q}$ is strongly connected and homologically homogeneous (see \cite{kenbrown}) and hence cancellation.

Suppose that $A_{\cal Q}$ is cancellation. We know that $A_{\cal Q}$ is finite over its center by corollary \ref{consistentto}, so all its simples have finite dimension.
$A$ is homologically homogeneous, because by the CY-3 property the global dimension is $3$ and all simples have that $\dim \mathsf{Ext}^3(S,S)=\dim \textrm{Hom}(S,S)=1$.
From \cite{StaffordVDB}[theorem 2.2] we conclude that $A$ is Cohen-Macaulay and therefore also reflexive.

Finally, if we show that the ramification locus has codimension at least $2$, we are done.
If $\ideal p\lhd Z(A)$ lies in the ramification locus then $\ell$ must be in $\ideal p$, because
otherwise all arrows must evaluate to something nonzero and the representation is simple.

Now we show that there is at least one cycle with nonzero homology class that evaluates to zero:
if this were not the case we could find two cycles $c_1$,$c_2$ one with linearly independent homotopy classes that
are not zero. If $v_1$ and $v_2$ are two vertices then we can look at $v_1\textrm{Tr} c_1$ and $v_2\textrm{Tr} c_2$.
These are two cycles, they are nonzero and because the homotopy classes are linearly independent, they must intersect.
This means that there is a path of nonzero arrows between $v_1$ and $v_2$. As this holds for
every couple of vertices, the representation must be simple.

Two zero cycles ($c$ and the one with nontrivial homology) with different homology generate an ideal which defines a subscheme of codimension $2$.
\end{proof}

To construct commutative crepant resolutions one can turn the categorical quotient of the space of trace preserving representations into a Mumford quotient by choosing an appropriate stability condition. This construction
is further explained in \cite{nccrep} and for a detailed study in the case of dimer models we refer to
\cite{Ishii}.

\subsection{Summary}
\begin{theorem}
For a graded unweighted quiver polyhedron ${\cal Q}$ with $\chi_{\cal Q}=0$ the following are equivalent:
\begin{enumerate}
\item $A_{\cal Q}$ is CY-3.
\item $A_{\cal Q}$ is cancellation.
\item $A_{\cal Q}$ is algebraically consistent.
\item $A_{\cal Q}$ is a toric order.
\item $A_{\cal Q}$ is an NCCR of its center.
\item The zig and zag rays in the universal cover do not intersect twice.
\item There exists a consistent $\mathtt R$-charge.
\end{enumerate}
\end{theorem}

\begin{remark}
In the weighted case with $\chi_{\cal Q}=0$, there are some similarities and differences. First of all
by lemma \ref{covergrad} we can transfer $\mathtt R$-charges between covers and this construction is compatible with the consistency condition, so
in the weighted cases cancellation is still equivalent to the existence of a consistent $\mathtt R$-charge. The algebra $A_{\cal Q}$ is not a toric order anymore
because the fundamental group is not $\mathbb{Z}^3$. The algebra itself is still finite over its center because this property is kept under taking Galois covers.

Finally we cannot say anymore that $A_{\cal Q}$ is an NCCR of its center. We illustrate this with an example:
Take the following quiver polyhedron on the sphere
\begin{center}
\begin{tikzpicture}
\draw (1.2,0) arc (0:360:1.2);
\draw (0,0) node {$\xymatrix{\vtx{}\ar@(ru,lu)_x^3\ar@(l,d)_y^3\ar@(d,r)_z^3}$};
\end{tikzpicture}
\end{center}
where the backside is a triangle bounded by $x,y$ and $z$.
Then $A_{\cal Q}=\mathbb{C}\<x,y,z\>/\<x^2-yz,y^2-zx,z^2 -xy\>$ which is a well-known three-dimensional Artin Schelter regular ring \cite{ASreg}.
The center of this ring is isomorphic to $\mathbb{C}[u^3,v^3,w^3,uvw]$, which is the quotient singularity of the $\grp G = \mathbb{Z}_3\times \mathbb{Z}_3$-action
$(i,j)\cdot u = \eta^i u$, $gv = \eta^{i+j} v$, $gw = \eta^{i+2j}w$ with $\eta$ the third root of unity. This singularity has as NCCR the smash product $B = \mathbb{C}[x,y,z]*\grp G$ whose
$K$-group has rank $9$. $A_{\cal Q}$ on the other hand has a rank $1$ $K$-group, so it cannot be derived equivalent to $B$. This implies that
$A_{\cal Q}$ cannot be an NCCR over its center.
\end{remark}

\bibliographystyle{amsplain}
\def$'${$'$}
\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
\providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }
\providecommand{\MRhref}[2]{%
  \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}
}
\providecommand{\href}[2]{#2}

redpajama_set_name: RedPajamaArXiv