\section{Introduction}The Wess-Zumino-Witten (WZW) model is a two dimensional rational conformal theory and conformal blocks associated to these models were explicitly constructed in the phenomenal works of Tsuchiya, Ueno, and Yamada \cite{TUY:89}. To a simple Lie algebra $\frg$, a positive integer $\ell$, an $n$-tuple $\vec{\lambda}$ of dominant integral weights of level $\ell$  (see Section \ref{sec:twistedaffinekm}) of an untwisted affine Kac-Moody Lie algebra, the WZW model in \cite{TUY:89} associates a vector bundle $\mathbb{V}^{\dagger}_{\vec{\lambda}}(\frg,\ell)$ of finite rank on the Deligne-Mumford-Knudsen moduli stack $\overline{\mathcal{M}}_{g,n}$ of stable $n$-pointed curves of genus $g$.  These vector bundles $\mathbb{V}^{\dagger}_{\vec{\lambda}}(\frg,\ell)$  are known as the {\em bundles of conformal blocks} and their duals $\mathbb{V}_{\vec{\lambda}}(\frg,\ell)$ are referred to as the {\em sheaf of covacua}. 
Moreover, these bundles are endowed with a flat projective connection with logarithmic singularities along the boundary divisor of $\overline{\mathcal{M}}_{g,n}$ and satisfy \cite{TUY:89} the axioms of conformal field theory like {\em factorization} and {\em propagation of vacua} (see Section \ref{sec:deftwistconf}). 
Now we briefly point out some major interactions of keen interest between algebraic geometry, representation theory and mathematical physics via conformal blocks. Most importantly, in all of the questions discussed below a central theme is to have a formula for the ranks of the conformal blocks bundles.

 Let ${G}$ be the simply connected Lie group with Lie algebra $\frg$ and let $\operatorname{Bun}_G(C)$ be the moduli stack of principal ${{G}}$-bundles on a smooth, projective curve $C$  of genus $g$.  It is well known \cite{KNR:94, LaszloSorger:97} that the Picard group of $\operatorname{Bun}_G(C)$ is $\mathbb{Z}\mathcal{L}$, where $\mathcal{L}$ is the ample generator. The stack $\operatorname{Bun}_{{G}}(C)$ generalizes the Jacobian of a curve and hence the spaces $H^0(\operatorname{Bun}_{{G}}(C),\mathcal{L}^{\otimes \ell})$ are known as the spaces of non abelian theta functions.  It is well known that the space of theta functions at level $\ell$ on the Jacobian of a curve is $\ell^g$-dimensional. Hence it is natural to ask for a formula for the dimension of $H^0(\operatorname{Bun}_{{G}}(C),\mathcal{L}^{\otimes \ell})$.  The works of \cite{BF, BL, Faltings:94, KNR:94, LaszloSorger:97} produce 
 canonical isomorphisms between $H^0(\operatorname{Bun}_G(C),\mathcal{L}^{\otimes \ell})$ and the fiber of the vector bundle $\mathbb{V}^{\dagger}_{0}(\frg,\ell)$ at a smooth curve $C$ along with their parabolic generalizations.  Hence many questions on $\operatorname{Bun}_G$ can be approached using conformal blocks and representation theory of affine Kac-Moody Lie algebras.
  
  
  From the representation theoretic viewpoint, we get that  the fibers of the conformal blocks $\mathbb{V}^{\dagger}_{\vec{\lambda}}(\frg,\ell)_{|\mathbb{P}^1,(p_1,\dots, p_n)}$  over $n$-pointed genus zero curves embed naturally  \cite{Fakhruddin:12,TUY:89} in the space of invariants of $\frg$-representations $\operatorname{Hom}_{\frg}(V_{\lambda_1}\otimes \dots \otimes V_{\lambda_n},\mathbb{C})$.  Moreover, if $\ell$ is large enough, then the vector spaces  $\mathbb{V}^{\dagger}_{\vec{\lambda}}(\frg,\ell)_{|\mathbb{P}^1,(p_1,\dots,p_n)}$ and $ \operatorname{Hom}_{\frg}(V_{\lambda_1}\otimes \dots \otimes V_{\lambda_n},\mathbb{C})$ are isomorphic. In particular, one can study the space of invariants of tensor products of representations using conformal blocks. Motivated by various formulas  for the Littlewood-Richardson coefficients, it is again natural to ask for a formula for the rank of the conformal block bundles. 
  
  Dualities in coset conformal field theory associated to a conformal pair $(\frg_1,\frg_2)$ predict that conformal blocks for a Lie algebra $\frg_1$ at level $\ell_1$ are often dual to conformal blocks for another Lie algebra $\frg_2$ at level $\ell_2$. These questions/conjectures are known as rank-level duality/strange duality conjectures. As a first step to check the validity of these conjectures, one needs to check whether the dimensions of the two conformal blocks arising in rank level duality have the same dimensions. 
  We refer the reader to \cite{Abe:08,Belkale:08, Mukhopadhyay:12, MukhopadhyayWentworth:16,NaculichSchnitzer:90} for more details on such calculations. 
  
 \iffalse Conformal blocks from the WZW models associated to affine Kac-Moody Lie algebras has played a crucial role in understanding the NEF cone of $\overline{\mathcal{M}}_{0,n}$. Extending the representation theoretic view point discussed above, N. Fakhruddin \cite{Fakhruddin:12} showed that the  bundles of the sheaf of covacua $\mathbb{V}_{\vec{\lambda}}(\frg,\ell)$ are globally generated   on  $\overline{\mathcal{M}}_{0,n}$ and hence their first Chern classes $c_1(\overline{\mathcal{M}}_{0,n})$ are NEF. Fakhruddin's  formula for these first Chern classes and its variant due to the second coauthor \cite{mukho4} have played a  significant role in producing extremal divisors in the NEF cone and its associated birational models.  Most importantly in all of the questions discussed above a central theme is to have a formula for the ranks of the conformal blocks bundles.
 
$1$ at level $\ell_1$ are often dual to conformal blocks for another Lie algebra $\frg_2$ at level $\ell_2$. 
  \fi
 
  In 1987, E. Verlinde conjectured \cite{Verlinde} an explicit formula for computing the rank of these   conformal blocks bundles which became well known as the Verlinde formula.  Moreover, he conjectured that the {\em S-matrix} given by the rules of the modular transformations $\tau \rightarrow -\frac{1}{\tau}$ {\em diagonalizes the fusion rules}. %
Verlinde's conjectural rank formula was proved for $\operatorname{SL}(2)$ independently by the works of Bertram, Bertram-Szenes, Daskalopoulos-Wentworth and M. Thaddeus  \cite{Bert, Bert-Sz,DW,Thaddeus:92}. 
  The Verlinde formula for classical groups and $\operatorname{G}_2$  was proved  by  G. Faltings \cite{Faltings:94} and by  C. Teleman  \cite{Teleman} in full generality.  A proof
   for the Verlinde rank formula was  also given later using methods from symplectic geometry \cite{ AWM,JKK}. In 1988, 
  Moore-Seiberg gave an outline of the proof of Verlinde's conjecture about diagonalization of fusion 
  rules and a conceptual connection between modular tensor categories and the Verlinde formula. This conjecture has been recently proved by Y. Huang \cite{Huang:08b, Huang:08a} in the more general setting of vertex algebras. We now discuss the twisted set-up. 

Automorphisms of affine Kac-Moody Lie algebras inherited from the underlying finite dimensional Lie algebras have been closely related to the constructions of  orbifold conformal blocks also known as twisted WZW models \cite{BFS, KT}. Twisted WZW models associated to order two diagram automorphisms of a simple Lie algebra has been constructed and studied by Shen-Wang \cite{WangShen} and also by Birke-Fuchs-Schweigert \cite{BFS}. Starting with a vertex algebra along with an action of a finite group $\Gamma$, Frenkel-Szczesny \cite{FS} constructed orbifold conformal blocks. More precisely, given a pointed  $\Gamma$-cover $(\widetilde{C},C,\widetilde{\bf{p}}, {\bf{p}})$ of a smooth curve $C$ with $n$-marked points ${\bf p}=(p_1, \dots, p_n)$ along with a lift ${\widetilde{\bf p}}$, they attached a module for a twisted vertex algebra. This construction can be carried out in families of stable curves to get a quasi-coherent sheaf $\mathbb{V}_{\Gamma}$ on the stack $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ of pointed $\Gamma$-cover introduced in Jarvis-Kimura-Kaufmann\cite{JKK}.

 Later, Szczesny \cite{szcz} realized $\mathbb{V}_{\Gamma}$ as a twisted $\mathcal{D}$-module on the open part $\mathcal{M}_{g,n}^{\Gamma}$ of the stack $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ corresponding to $\Gamma$-covers of smooth curves. It is natural to consider whether the $\Gamma$-twisted WZW model associated to level $\ell$-representations of a $\Gamma$-twisted affine Kac-Moody Lie algebra \cite{Kac} gives a vector bundle on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ which is also a twisted $\mathcal{D}$-module with logarithmic singularities at the boundary $\Delta^\Gamma_{g,n}$. 
 
 In her thesis, C. Damiolini \cite{Dam17} considered twisted conformal blocks associated to $\Gamma$-covers of curves where the marked points are never ramified. She proved factorization, propagation of vacua, existence of projective connections and local freeness over an open substack of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$, under the assumptions that $|\Gamma|$ is of prime order.
  
 
  
In \cite{KH}, Hong-Kumar studied  $\Gamma$-twisted WZW-models associated to an arbitrary $\Gamma$-twisted affine Kac-Moody Lie algebra. Adapting the constructions of Tsuchiya-Ueno-Yamada \cite{TUY:89} in the twisted setting along with an assumption that ``$\Gamma$ preserves a Borel subalgebra of $\frg$", Hong-Kumar \cite{KH} construct a locally free sheaf over $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ that satisfies factorization and propagation of vacua. Hong-Kumar further show that on $\mathcal{M}^{\Gamma}_{g,n}$ twisted conformal blocks admit a flat projective connection. Similar results for diagram automorphisms of $\frg$ were also obtained by the second coauthor independently. 


We now briefly recall the notion of twisted conformal blocks  \cite{Dam17, KH} and refer the reader to Section \ref{sec:deftwistconf} for a coordinate free construction. Let $\frg$ be a simple Lie algebra equipped with a $\Gamma$-action $\Gamma \rightarrow \operatorname{Aut}(\frg)$.  
For any $\gamma \in \Gamma$, we consider the twisted affine Kac-Moody Lie algebra (see Section \ref{sec:affineLiealgtwisted}) $\widehat{L}(\frg,\gamma)$.

 The set of irreducible, integrable, highest weight representations of $\widehat{L}(\frg,\gamma)$ of level $\ell\in \mathbb Z_{\geq 1}$ is denoted by $P^{\ell}(\frg,\gamma)$ (see Section \ref{sec:affineLiealgtwisted}). If $\gamma$ is trivial, then $P^{\ell}(\frg, \id)$ will often be denoted by $P_{\ell}(\frg)$. Now consider a stable nodal curve $\widetilde{C}$ with $n$ marked point $\widetilde{\bf{p}}$ with a $\Gamma$ action. Assume that $\widetilde{C}\setminus \Gamma\cdot\widetilde{\bf{p}}$ is affine on which $\Gamma$ acts freely and  each component has at least one marked point. 
 
 Let $(\gamma_1, \dots ,\gamma_n)$ be generators of stabilizers in $\Gamma$ of the points $(\widetilde{p}_1,\dots, \widetilde{p}_n)$ determined by using the orientation on the complex curve $\tildeC$. The element $\gamma_i$ will be called the monodromy around the point $\wtilde{p}_i$.
 
  Suppose for 
each point $\wtilde{p}_i$ we have attached a highest weight integrable module $\mathcal{H}_{\lambda_i}(\frg,\gamma_i)$ of weight $\lambda_{i} \in P^{\ell}(\frg,\gamma_i)$. Let $\mathcal{H}_{\vec{\lambda}}:=\mathcal{H}_{\lambda_1}(\frg, \gamma_1)\otimes \dots \otimes \mathcal{H}_{\lambda_n}(\frg, \gamma_n)$. Then the  {\em space of twisted covacua}  can be  defined as 
$$\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p},{\bf{\widetilde{z}}}):=\mathcal{H}_{\vec{\lambda}}/\big(\frg\otimes H^0(\widetilde{C},\mathcal{O}_{\widetilde{C}}(\ast \Gamma.{\widetilde{\bf p}})\big)^{\Gamma}\mathcal{H}_{\vec{\lambda}},$$ where ${\bf{\widetilde{z}}}$ denote a choice of a formal parameter along the points ${\bf{\widetilde{p}}}$. The corresponding vector bundles on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ will be denoted by $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p})$.
 Starting with the work of Pappas-Rapoport \cite{PR2, PR1}, the moduli stack of Bruhat-Tits torsor $\mathscr{G}$ associated to a pair $(G, \Gamma\subset \operatorname{Aut}(G))$ has been studied by several authors \cite{BalajiSesh, Hein}. Results of Hong-Kumar \cite{KH} (with some restrictions on level) and Zelaci \cite{Zel} (order two automorphisms of $\operatorname{SL}(r)$) connect twisted conformal blocks with global sections of line bundles on $\operatorname{Bun}\mathscr{G}$. Pappas-Rapoport \cite{PR2,PR1} ask the following: 
 \begin{question}
 	Is there is a Verlinde formula for these spaces of non-abelian theta functions or twisted conformal blocks?
 
 \end{question}
 
Birke-Fuchs-Schweigert \cite{BFS} conjectured a twisted Verlinde formula for $\Gamma=\mathbb{Z}/2$ and a double cover of $\mathbb{P}^1$ ramified at two points. Apart from the works in \cite{BFS}, there are no known description of the ranks of the above vector bundles for arbitrary $\Gamma$-twisted WZW conformal blocks.  In this article, we prove a twisted Verlinde formula that computes the rank of the $\Gamma$-twisted  conformal blocks for an arbitrary finite group $\Gamma$ with the assumption that ``$\Gamma$ preserves a Borel subalgebra of $\frg$". 

We first state a three pointed twisted Verlinde formula where the base curve is $\mathbb{P}^1$. By ``Factorization Theorem", one can reduce the computations for arbitrary $(g,n)$ to these cases. This theorem is proved in Section \ref{sec:threepointmtc}. We refer the reader to Remark \ref{rem:reducingtoconnectedpiece} on how to reduce to the condition that all the three points in $\widetilde{C}$ are in the same connected component.

\begin{theorem}\label{thm:mainminusone}Let $m_1,m_2, m_3 \in \Gamma^{3}$ be such that $m_1\cdot m_2 \cdot m_3=1$. Consider $(\widetilde{C}\rightarrow \mathbb{P}^1,\widetilde{\bf p}) \in \overline{\mathcal{M}}{}^{\Gamma}_{0,3}(m_1,m_2,m_3)$  a three pointed admissible cover such that the points $\widetilde{\bf p}$ lies in the same component of $\widetilde{C}$, then  
	$$\dim_{\mathbb{C}}\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},\mathbb{P}^1, \widetilde{\bf p},{\bf p})=\sum_{\mu \in P_{\ell}(\frg)^{\langle m_1, m_2, m_3\rangle}}\frac{S^{m_1}_{\lambda_1,\mu}S^{m_2}_{\lambda_2,\mu}S^{m_3}_{\lambda_3,\mu}}{S_{0,\mu}},$$ where the $m_i$-crossed S-matrices are determined by Proposition \ref{prop:charactertableviaSmatrix} (see also Corollary \ref{cor:signinverlinde}) and where the matrix $S$ that appears in the denominator is the untwisted $S$-matrix of type $\frg$ at level $\ell$ with 0 being the trivial weight in $P_\ell(\frg)$. 
\end{theorem}

We now state the general twisted Verlinde formula for an arbitrary pair $(g,n)$. After stating it, we discuss our approach to its proof via a categorical Verlinde formula for braided $\Gamma$-crossed fusion categories. Let $(C,\mathbf{p})$ be a smooth genus $g$ curve with $n$-marked points $\mathbf{p}$. The fundamental group of $C\setminus\mathbf{p}$  has a presentation of the form 
$$\pi_1(C\setminus\mathbf{p},\star)=\langle\alpha_1,\beta_1,\cdots,\alpha_g,\beta_g,\gamma_1,\cdots,\gamma_n|[\alpha_1,\beta_1]\cdots[\alpha_g,\beta_g]\gamma_1\cdots\gamma_n=1\rangle.$$ 
\subsubsection*{Assumption on $\widetilde{C}$}
Let us fix a group homomorphism $\chi:\pi_1(C\setminus\mathbf{p},\star)\twoheadrightarrow \Gamma^{\circ}\subset \Gamma$ with image $\Gamma^\circ$. Let $m_i\in \Gamma$ be the image of $\gamma_i$. This determines (see Sections \ref{sec:arbgenusdescription}, \ref{sec:ret} below and also \cite[\S2.3]{JKK}) an $n$-pointed admissible $\Gamma$-cover $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p})$ such that all the lifts $\wtilde{\mathbf{p}}$ lie in the {\em same connected component of $\tildeC$} and the monodromy around the points $\wtilde{\mathbf{p}}$ is given by $(m_1,\cdots,m_n)$. As before, let us assume that we have an action of $\Gamma$ on the simple lie algebra $\frg$ and we fix a level $\ell\in \mathbb Z_{\geq 1}$. Let $\vec{\lambda}=(\lambda_1,\cdots\lambda_n)$ with $\lambda_i\in P^{\ell}(\frg,m_i)$. We state the following Verlinde formula in the notation used above:
\begin{theorem}\label{conj:main1}Assume that ``$\Gamma$ preserves a Borel subalgebra of $\frg$". Then the  rank of the twisted conformal blocks bundle $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{{\bf{p}}}, {\bf p})$ at level $\ell$ is given by the following formula:
$$\operatorname{rank}\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{{\bf{p}}}, {\bf p})=\sum_{\mu \in P_{\ell}(\frg)^{\Gamma^\circ}}\frac{{S}_{\lambda_1,\mu}^{{m_1}}\cdots {S}_{\lambda_n,\mu}^{m_n}}{\big({S_{0,\mu}}\big)^{n+2g-2}},$$
where the summation is over the set of the untwisted dominant integral level-$\ell$ weights of $\frg$ fixed by the subgroup $\Gamma^\circ\subset \Gamma$,  the matrices ${S}^{m_i}$  are the $m_i$-crossed S-matrices  at level $\ell$ corresponding to the diagram automorphism class of $m_i\in \Gamma$ and which are described (see also Chapter 13 in \cite{Kac}) explicitly in Proposition \ref{prop:charactertableviaSmatrix} (see also Corollary \ref{cor:signinverlinde}) and where $0$ is the trivial weight in $P_\ell(\frg)$.
\end{theorem}

\begin{remark}\label{rem:gammapreservesborel}
We conjecture that the same Verlinde formula holds without the assumption that ``$\Gamma$ preserves a Borel subalgebra of $\frg$", however some 2-cocycles may appear in the general case. This assumption appears here since the same appears in the paper of Hong-Kumar \cite{KH}, where the proofs of the {\em factorization theorem} and {\em propagation of vacua} use this assumption. All our results will generalize if this assumption is dropped in the work \cite{KH}
\end{remark}


\begin{remark}
The stack $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}(\mathbf{m})$ may be disconnected.	It may appear a priori from the above Verlinde formula that the ranks of the twisted conformal blocks do not depend upon the connected component of the $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$, but this is not the case. A closer look reveals that the formula is dependent on the choice a group homomorphism $\chi:\pi_1(C\backslash  {\bf p},\star)\rightarrow \Gamma$ as described above, namely it depends on the image $\Gamma^\circ$ of this homomorphism (along with the monodromy data $\mathbf{m}$). The fact that the ranks only depend on the image $\Gamma^\circ$ is a curious consequence of the triviality of the 2-cocycles (mentioned also in the above remark) in the case when $\Gamma$ preserves a Borel subalgebra. We also refer to the general categorical analog (Corollary \ref{cor:highergenus}) where we see that the right hand side will in general depend on the homomorphism $\chi$ and not just its image.  We refer the reader to Sections \ref{sec:arbgenusdescription}, \ref{sec:ret} for the relations between covers and holonomies $\chi$.
\end{remark}

\begin{remark}
It is well known that the untwisted S-matrix $S$ of type $\frg$ and level $\ell$ is a $P_{\ell}(\frg)\times P_{\ell}(\frg)$ symmetric unitary matrix. On the other hand,  for each $m\in \Gamma$, the $m$-crossed S-matrix $S^m$ is a $P^{\ell}(\frg,m)\times P_{\ell}(\frg)^m$ matrix. It is not immediately clear, but nevertheless true that $S^m$ is a square matrix. Moreover, $S^m$ is also unitary.
\end{remark}

Theorem \ref{conj:main1} is proved in Section \ref{sec:modfuntwistedconformal} (see Corollary \ref{cor:main1}). We also refer the reader to Section \ref{sec:dimensioncrosscheck1} where we give a more concrete form of the above formula in some special cases.
  
 We now discuss the remaining results of 
 this article which are motivated by Theorems \ref{thm:mainminusone} and  \ref{conj:main1} and also the main steps in the proof of Theorem \ref{conj:main1}.  We have divided our paper into three parts. 
 
 \subsection*{Part I}
 
 There has been a comprehensive study by several authors \cite{MS1, Segal, TUY:89, Witten1} trying to understand the relations between modular tensor categories, 3-dimensional topological quantum field theory and 2-dimensional modular functors. A key bridge between these three topics has been conformal blocks associated to untwisted affine Lie algebras. Moore-Seiberg \cite{MS1} has proved a Verlinde formula for any modular fusion category. In the twisted setup, $\Gamma$-crossed modular fusion categories have been introduced by V. Turaev \cite{TuraevHQFT}. 
 \subsubsection*{Rigidity of $\Gamma$-graded categories}
 We first prove a rigidity result in the categorical set-up. We refer the reader to Section \ref{sec:drinfeldsquestions} for relevant definitions and a proof (Corollary \ref{cor:rigidity of graded categories}). 
 \begin{theorem}\label{thm:catrigid}
  Let $\Gamma$ be a finite group and $\mathcal{C}=\oplus_{\gamma \in \Gamma}\mathcal C_{\gamma}$ be a $\Gamma$-graded weakly fusion category such that the identity component of $\mathcal{C}_1$ is rigid. Then $\mathcal{C}$ is rigid. 
  \end{theorem}

\subsubsection*{Categorical Verlinde formula}
Motivated by the result of Moore-Seiberg \cite{MS1} and Verlinde \cite{Verlinde}, next we prove a Verlinde formula to compute the fusion rules for $\Gamma$-crossed modular fusion categories introduced by Turaev \cite{TuraevHQFT}. This problem of determining fusion rules of $\Gamma$-extensions of fusion categories and of $\Gamma$-crossed modular categories is also of independent interest and has also been considered in the contemporaneous work of several authors. We refer the reader to Bischoff-Jones \cite{BisJon}.  


In \cite{Desh:17, Desh:18a}, the first coauthor introduced for each $\gamma \in \Gamma$, the notion of a categorical $\gamma$-crossed S-matrix denoted by $S^{\gamma}$ and twisted characters for any $\Gamma$-graded Frobenius $\ast$-algebra arising from a Grothendieck group $K(\mathcal C)$ of a braided $\Gamma$-crossed fusion category $\mathcal C$. We prove a general twisted Verlinde formula  in the setting of $\Gamma$-crossed braided fusion categories which computes fusion coefficients in terms of the crossed S-matrices. This generalizes the work of the first coauthor \cite{Desh:18}.  We refer to Sections \ref{sec:braidedcrossed}, \ref{sec:catverlinde} and Theorem \ref{thm:twisted verlinde} for more details and also to Corollary \ref{cor:highergenus} for a higher genus analog of the following 3-point genus zero version.
\begin{theorem}\label{thm:verlindeforbraided}
Let $\mathcal C=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ be a $\Gamma$-crossed modular fusion category. Let $\gamma_1,\gamma_2\in \Gamma$ and let $A\in \mathcal C_{\gamma_1}, B\in \mathcal C_{\gamma_2}$ and $C\in \mathcal C_{\gamma_1\gamma_2}$ be simple objects. Then the multiplicity $\nu_{A,B}^C$ of $C$ in the tensor product $A\otimes B$ is given by 
$$\nu_{A,B}^C=\sum\limits_{D\in P_1^{\langle\gamma_1,\gamma_2\rangle}}\frac{\overline{S^{\gamma_1}_{A,D}}\cdot\overline{S^{\gamma_2}_{B,D}}\cdot S^{\gamma_1\gamma_2}_{C,D}}{S_{\unit,D}}=\sum\limits_{D\in P_1^{\langle\gamma_1,\gamma_2\rangle}}\frac{{S^{\gamma_1}_{A,D}}\cdot{S^{\gamma_2}_{B,D}}\cdot\overline{S^{\gamma_1\gamma_2}_{C,D}}}{S_{\unit,D}},$$ 
where the summation is over the simple objects $D\in \mathcal C_1$ fixed by both $\gamma_1,\gamma_2$ and where the crossed S-matrices are chosen in a compatible way.
\end{theorem}


\begin{remark}
In general, a $\gamma$-crossed S-matrix depends on certain choices and is only well defined up to rescaling rows by roots of unity. In the above formula, we have assumed that the crossed S-matrices are chosen in a compatible way. In general some cocycles appear in the Verlinde formula Corollary \ref{cor:highergenus}. However, in the set up of $\Gamma$-twisted conformal blocks with $\Gamma$ preserving a Borel, the cocycles are trivial  (see also Remark \ref{rem:cocyleszero}).
\end{remark}


We also study (see Section \ref{sec:twistedfusion}) a categorical twisted fusion ring $K_{\mathbb{C}}(\mathcal C_1, \gamma)$ for every $\gamma \in \Gamma$. We further show that for each $\gamma$, the crossed $S$-matrix $S^{\gamma}$ determines the character table (Theorem \ref{thm:chartableoftwistedfusion}) of the ring $K_{\mathbb{C}}(\mathcal C_1,\gamma)$. The following remark is important:
\begin{remark}
The non-negative integer $\nu_{A,B}^{C}$ is a fusion coefficient in the Grothendieck ring $K(\mathcal C)$ of the $\Gamma$-crossed category and not in the categorical twisted fusion ring $K_{\mathbb{C}}(\mathcal C_1,\gamma)$ where the fusion coefficients may be non-integral in general. 
\end{remark}

\subsection*{Part II}
In Section \ref{sec:deftwistconf}, we give a coordinate free construction of the twisted conformal blocks and discuss the associated descent data coming form {\em propagation of vacua}. We show that like the untwisted case \cite{Fakhruddin:12}, twisted conformal blocks with at least one trivial weight are pull backs (see Proposition \ref{prop:importantprop}) along along forgetful-stabilization morphism  $\overline{\mathcal{M}}{}^{\Gamma}_{g,n+1}({\bf m},1)\rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$. We prove the following: 
\begin{theorem}\label{thm:baby}
Suppose that $\Gamma$ preserves a Borel subalgebra of $\frg$.	Twisted conformal blocks give a $\Gamma$-crossed modular fusion category $\mathcal C(\frg,\Gamma,\ell)=\oplus_{\gamma \in \Gamma} \mathcal C_{\gamma}$ such that the simple objects of each $\mathcal C_\gamma$ are parameterized by the set $P^{\ell}(\frg,\gamma)$ and $$\nu_{\lambda_1,\lambda_2}^{\lambda_3^*}=\dim_{\mathbb{C}}\mathcal{V}_{\lambda_1,\lambda_2,\lambda_3,\Gamma}(\widetilde{C},\mathbb{P}^1, \widetilde{\bf p},{\bf p},\widetilde{z}),$$ where $\lambda_i$ is a simple object of $\mathcal C_{\gamma_i}$,  $\gamma_1.\gamma_2.\gamma_3=1$ and $\widetilde{\bf p}$ lies in the same connected component of $\widetilde{C}$.
\end{theorem}
We refer the reader to Section \ref{sec:threepointmtc} for a more  precise version (Theorem \ref{thm:oneofmain}) of the above result. We give the proof of the above in Part III using the notion of complex analytic $\Gamma$-crossed  modular functors. 

Now given Theorem \ref{thm:baby}, by the categorical Verlinde formula in Theorem \ref{thm:verlindeforbraided}, we get a formula to compute the dimension of the three pointed twisted conformal block with the base curve $\mathbb{P}^1$. However to complete the proof of Theorem \ref{thm:mainminusone}, we still need to determine the crossed S-matrices. 
\subsubsection*{Compute categorical crossed $S$-matrices}
We consider the twisted fusion ring $\mathcal{R}_{\ell}(\frg,\gamma)$ coming from finite order  automorphisms of the Lie algebra $\frg$. This ring was also studied by J. Hong \cite{Hong, Hong1}. In the set up of diagram automorphism, using the same strategy as in \cite{BeauHirz, Faltings:94, Teleman}, Hong gives a complete description of the character table of $\mathcal{R}_{\ell}(\frg,\sigma)$ in terms 
of the characters of the representations rings of the fixed point algebra ${\frg_{\sigma}}$ (see Fuchs-Schweigert \cite{FS}). 






In Section \ref{sec:arbtwistedfusion}, we observe that 
the twisted fusion ring $\mathcal{R}_{\ell}(\frg,\gamma)$ constructed from tracing automorphisms of untwisted conformal blocks only depends on the diagram automorphism class $\sigma$ of $\gamma$. We also observe in Proposition \ref{cor:corofoneofmain}, that for each $\gamma \in\Gamma$, the twisted Kac-Moody fusion ring $\mathcal R_{\ell}(\frg,\gamma)$ and the categorical twisted fusion ring $K_{\mathbb{C}}(\mathcal C(\frg,\ell),\gamma)$ agree. 

 We apply these results along with  Proposition \ref{prop:twistedviaKMtwisted} to compute the categorical $\gamma$-crossed S-matrices that appear in the categorical Verlinde formula for the case of twisted conformal blocks in terms of the character of the ring $\mathcal R_{\ell}(\frg,\gamma)$.  This completes the overview of the steps in the proof of Theorem \ref{conj:main1}. It is important to point out that the coefficient $\nu_{\lambda_1,\lambda_2}^{\lambda_3^*}$ is a fusion coefficient of the ring $K_{\mathbb{C}}(\mathcal C(\frg,\Gamma,\ell))$ and not in the ring $\mathcal R_{\ell}(\frg,\gamma)$. We are now left to discuss the proof of Theorem \ref{thm:baby} and or its more precise version Theorem \ref{thm:oneofmain}. 

\begin{remark}
	The Verlinde formula for conformal blocks for untwisted Lie algebra was 
	proved \cite{Faltings:94, Teleman} by studying the characters of the fusion ring $R_{\ell}(\frg)$ and realizing it as a based commutative Frobenius $\ast$-algebra. The fusion ring has a basis parameterized by $P_{\ell}(\frg)$ and its structure constants are given by dimensions of the untwisted $3$-pointed  conformal blocks of untwisted affine Kac-Moody Lie algebra associated to $\frg$. For any commutative Frobenius $\ast$-algebra (see Section \ref{sec:braidedcrossed}), the structure constants are determined  from the set of characters. 
	Works of G. Faltings and C. Teleman \cite{Faltings:94, Teleman} determine the set of 
	characters of $R_{\ell}(\frg)$ as restrictions of representations of the Grothendieck ring $R(\frg)$ of representations of the lie algebra $\frg$.  This combined with the works of Yi-Zhi. Huang (\cite{Huang:08b}, \cite{Huang:08a}) on rigidity determines the S-matrices in the untwisted setting. We refer the reader to \cite{Donlinngs} for a related discussion in the setting of Vertex algebras. 
\end{remark}

\begin{remark}
	In \cite{Hong1}, it was suggested that the coefficients of the twisted
	fusion rings $\mathcal{R}_{\ell}(\frg,\sigma)$ are non-negative integers and are related to the dimensions of the twisted conformal blocks described in \cite{KH}. This was disproved by Alejandro Ginnory \cite{AG} who showed that these fusion coefficients could be negative. It is important to point out that the statement of Theorem \ref{thm:mainminusone} involves both crossed and uncrossed S-matrices for various elements of $\Gamma$ whereas the Verlinde formula (see also \cite[Thm. 2.12(iii)]{Desh:17}) for the structure constants of $\mathcal{R}_{\ell}(\frg,\sigma)$ involves only the $\sigma$-crossed S-matrix. In the categorical set-up (\cite{Desh:17}) for twisted fusion rings, the fusion coefficient may not be integers
\end{remark}



\subsubsection*{Atiyah algebras of a flat projective connection}The description of the Atiyah algebras will be required in Part  III to define the notions of $\Gamma$-crossed analytic modular functors. 
Following the approach of the Beilinson-Bernstein localization functors in \cite{FBz}, we extend the construction of twisted $\mathcal{D}$-modules in \cite{szcz} to the compactification of the moduli stack $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ as a twisted $\mathcal{D}$-module with logarithmic singularities along the boundary $\Delta^\Gamma_{g,n}$ of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$. This extends the construction of the flat projective connections in \cite{KH, szcz} to a logarithmic connection on the boundary. We determine the Atiyah algebra (Theorem \ref{thm:atiyahalgebra}) of the twisted logarithmic $\mathcal{D}$-module on $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{\bf p},{\bf p})$.
\begin{theorem}\label{thm:atiyahalg}Let $\Lambda$ be the pullback of the Hodge line bundle to $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ and ${\tildeL}_i$'s denote the line bundles corresponding to Psi-classes, then the logarithmic Atiyah algebra
	$$\frac{\ell\dim \frg}{2(\ell+h^{\vee}(\frg))}\mathcal{A}_{\Lambda}(-\log {\Delta}_{g,n,\Gamma})+\sum_{i=1}^{n}N_i\Delta_{\lambda_i}\mathcal{A}_{{\tildeL}_i}(-\log {\Delta}_{g,n,\Gamma})$$ acts on $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf{p}})$. Here $\Delta_{\lambda_i}$ is the eigenvalue of the twisted Virasoro operators $L_{0,{\langle \gamma_i\rangle }}$ and $h^{\vee}(\frg)$ is the dual Coxeter number of $\frg$.
\end{theorem}
The constants $\Delta_{\lambda_i}$ appearing in the statement of Theorem \ref{thm:atiyahalg} are known as {\em trace anomalies} and are explicitly computed in Lemma 3.6 in \cite{Wakimoto}. The Atiyah algebra in Theorem \ref{thm:atiyahalg} appears in our formulation (Section \ref{def:cextenmodularfunctor}) of the axioms of $\mathcal{C}$-extended $\Gamma$-crossed analytic modular functor.

\subsection*{Part III}
In the untwisted set up,  Bakalov-Kirillov \cite{BK:01} introduce the notion of a $2$-dimensional complex analytic modular functor and uses it to construct a weakly ribbon braided tensor category. We also refer the reader to the works of Andersen-Ueno \cite{Andersen-Ueno1, Andersen-Ueno2}.  In \cite{KP:08} Kirillov-Prince define the notion of a topological $\Gamma$-crossed modular functor. Analogously, in Section \ref{sec:crossedmodular}, we define the notion of a $\Gamma$-crossed complex analytic modular functor generalizing the notion due to \cite{BK:01}.   To define this notion we need to work with some operations (see Appendix \ref{ap:modstackofadmcovers}) on the stacks $\barM^\Gamma_{g,n}$, $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}$ of stable $n$-marked admissible $\Gamma$-covers and their various analogs and study actions of logarithmic Atiyah algebras of fixed central charge. We refer the reader to Sections \ref{def:cextenmodularfunctor} and \ref{sec:crossedneutral} for the definition of the notion of a $\Gamma$-crossed modular functor and for a more precise version of the following: 

\begin{theorem}\label{conj:main2}Let $\mathcal C$ be a finite semisimple $\Gamma$-crossed abelian category (see \S\ref{sec:crossedabelian}). A $\mathcal{C}$-extended $\Gamma$-crossed complex analytic modular functor defines the structure of a braided $\Gamma$-crossed weakly ribbon category on the category $\mathcal C$.  Further if the neutral component $\mathcal{C}_1$ is rigid, then the corresponding $\Gamma$-crossed weakly ribbon category $\mathcal C$ is also rigid. 
\end{theorem}
\begin{remark}
	The last part of the above theorem follows by applying Theorem \ref{thm:catrigid} to the first part of Theorem \ref{conj:main2}.
\end{remark}

\subsubsection*{$\Gamma$-crossed modular functor from twisted conformal blocks}
We now address the question of constructing a $\Gamma$-crossed modular fusion category given the action of $\Gamma$ on $\frg$ and a level $\ell$. This is the final step in completing the proof of Theorem \ref{thm:baby}.

 For this firstly we need the underlying finite semisimple $\Gamma$-crossed abelian category $\mathcal C(\frg,\Gamma,\ell)=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$. For $\gamma\in \Gamma$, we take $\mathcal C_\gamma$  to be the finite semisimple category whose simple objects are the irreducible, integrable, highest weight representations of $\widehat{L}(\frg,\gamma)$ of level $\ell$ parameterized by $P^{\ell}(\frg,\gamma)$. This is the underlying $\Gamma$-crossed abelian category (see \S\ref{ss:twistedconfblockcrossedabelian} for details) on which we want to define the structure of a $\Gamma$-crossed modular category. Motivated by results of \cite{BFM,BK:01}, we prove the following (see Theorem \ref{conj:conformalblockismodular}) in Section \ref{sec:proofofconfgammafunc}:

\begin{theorem}\label{conj:main3}Let $\Gamma$ be a finite group acting on the simple Lie algebra $\frg$ and let $\ell\in \mathbb Z_{\geq 1}$. Suppose that $\Gamma$ preserves a Borel in $\frg$. Then the corresponding $\Gamma$-twisted conformal blocks define a $\mathcal{C}$-extended $\Gamma$-crossed  modular functor. 
\end{theorem}

The proof of Theorem \ref{conj:main3} uses the Verdier specialization functor and factorization to define the gluing functor in the definition of $\Gamma$-crossed analytic modular functor. We refer the reader to Section \ref{sec:proofofconfgammafunc} for the details. Now Theorem \ref{conj:main3} and the first part of Theorem \ref{conj:main2}  provides $\mathcal C(\frg,\Gamma,\ell)$ with the structure of a $\Gamma$-crossed weakly ribbon category. However to finish the proof of Theorem \ref{thm:baby}, we  still need to answer the following question: 
\begin{question}
Is the $\Gamma$-crossed weakly ribbon category $\mathcal C(\frg,\Gamma,\ell)$ arising from $\Gamma$-twisted conformal blocks rigid?
 \end{question}
 For the untwisted case, it is well known that conformal blocks form a weakly rigid braided tensor category \cite{BK:01}. Rigidity for these categories has been proved by Y. Huang \cite{Huang:08b, Huang:08a} and also by Finkelberg \cite{Fink2, Fink1}(with some restriction on Lie algebras and levels). As pointed out by Y. Huang (see Introduction in \cite{Huang:08b}), rigidity for the untwisted Kac-Moody case is a very strong property. In fact, both the proofs of Huang and Finkelberg use some variant of the Verlinde formula only as an input. Hence in principle, the same problem persists in the twisted setting.   However in the twisted case, we  circumvent this issue by applying the results of Huang \cite{Huang:08b} which implies $\mathcal C_1$ in $\mathcal C(\frg,\Gamma,\ell)$ is rigid and hence rigidity follows from the second part of  Theorem \ref{conj:main2}.
  	\iffalse
  	proving a general fact that if the underlying untwisted braided tensor category $\mathcal C_1$ is rigid, then the weakly rigid braided $\Gamma$-crossed category $\mathcal C$ must also be rigid. We refer the reader to Section \ref{sec:drinfeldsquestions}, Proposition \ref{prop:rigidity in weakly fusion categories} and Corollary \ref{cor:rigidity of graded categories} for precise statements and proofs. Hence we obtain the following (see Theorem \ref{thm:oneofmain} and Section \ref{sec:proofofoneofmain}):
 \begin{theorem}\label{thm:crucial}
 Let $\Gamma,\frg,\ell$ and the category $\mathcal C=\bigoplus\limits_{\gamma\in\Gamma}\mathcal C_\gamma$ be as in Theorem \ref{conj:main3}. Then $\mathcal C$ has the structure of a $\Gamma$-crossed modular fusion category which we call the $\Gamma$-crossed modular fusion category of level $\ell\in \mathbb Z_{\geq 1}$ associated with $\Gamma\rightarrow \Aut(\frg)$.
 \end{theorem}\fi
\begin{remark}
	In the proof of Theorem \ref{thm:mainminusone}, we have crucially used the full strength of the results of Huang  for the rigidity of the category $\mathcal{C}_1$ (not just the Verlinde formula part). So our result do not give a new proof of rigidity for $\mathcal{C}_1$ or a new proof of the untwisted Verlinde formula.  
\end{remark}

\begin{remark}
It might be possible to directly determine the set of twisted characters for the $\mathcal{R}_{\ell}(\frg)$-module $K(\mathcal C_\gamma)$ using representation theoretic methods. However our approach facilitates a conceptual understanding by building a bridge between $\Gamma$-crossed modular fusion categories,  $\Gamma$-crossed modular functors and twisted conformal blocks as in the untwisted case. 
\end{remark}

\iffalse
Thus to prove Theorem \ref{conj:main1}, we are left to determine  the $\gamma$-crossed S-matrices. We first compare the present situation with the untwisted situation.
 
 
 First, we approach our problem as in the untwisted case.  With the assumptions that $\Gamma$ preserve a Borel subalgebra of $\frg$, it is easy to  directly observe that the twisted conformal blocks give a $\Gamma$-graded Frobenius $\ast$-algebra $R_{\ell,\Gamma}(\frg):=\bigoplus_{\gamma \in \Gamma}R_{\ell,\gamma}(\frg)$, where $R_{\ell,1}(\frg)$ is the untwisted fusion ring $R_{\ell}(\frg)$ and for each $\gamma\in \Gamma$,  $R_{\ell,\gamma}(\frg)$ are modules over the untwisted fusion ring $R_{\ell}(\frg)$. 
 
 
 As a vector space, $R_{\ell,\gamma}(\frg)$ has a basis parameterized by $P^{\ell}(\frg,\gamma)$. Theorems \ref{conj:main2} and \ref{conj:main3} imply that $R_{\ell,\Gamma}(\frg)$ is also the Grothendieck ring of the $\Gamma$-crossed modular fusion category given by twisted conformal blocks. Hence in the twisted set-up, we are reduced to determine the twisted characters  of the $\Gamma$-graded Frobenius  algebra $R_{\ell,\Gamma}(\frg)$, since (see \S\ref{sec:braidedcrossed}) these twisted characters determine the fusion coefficients. The module $R_{\ell,\gamma}(\frg)$ does not  a priori have the structure of a Frobenius $\ast$-algebra. This  presents a significant challenge. To address this issue, in Section \ref{sec:twistedfusion} we consider the twisted 
 fusion ring (see \cite{Desh:17}) $\mathcal{R}_{\ell}(\frg,\gamma)$ associated to a $\Gamma$-crossed rigid braided tensor category and an element $\gamma\in \Gamma$. 
 It was shown in \cite{Desh:17, Desh:18a} that the $\gamma$-crossed S-matrix $S^{\gamma}$ is essentially the  normalized character table of the twisted fusion ring $\mathcal{R}_{\ell}(\frg,\gamma)$. Hence  Theorem \ref{conj:main1} reduces  to the following:
 \begin{question}\label{enu:mainconjsteps}
  Determine the characters of the twisted fusion ring $\mathcal{R}_{\ell}(\frg,\gamma)$. 

 \end{question}



 
\iffalse
We next consider the more general problem of constructing a $\Gamma$-crossed weakly rigid braided tensor category from twisted conformal blocks. We essentially the follows the steps of Bakalov-Kirillov \cite{BK:01} as in the untwisted case.

 2-dimensional modular functors  We formula the notion of $\Gamma$-crossed analytic modular functors and compare it with the notion of a weakly rigid $\Gamma$-crossed braided tensor category \cite{TuraevHQFT}. 
\fi









 
 
 Jiuzu Hong \cite{Hong1, Hong} has studied twisted fusion rings $\mathcal{R}_{\ell}(\frg,\sigma)$ defined using the trace of the action of a diagram automorphism  $\sigma$ of the Lie 
 algebra $\frg$ on untwisted conformal blocks.  Using the same strategy as in \cite{BeauHirz, Faltings:94, Teleman}, Hong gives a complete description of the character table of $\mathcal{R}_{\ell}(\frg,\sigma)$ in terms 
 of the characters of the representations rings of the fixed point algebra ${\frg_{\sigma}}$ \cite{FS}. 
In Section \ref{sec:twistedfusion}, we observe that 
 the twisted fusion ring $\mathcal{R}_{\ell}(\frg,\gamma)$ constructed from rigid $\Gamma$-crossed  braided tensor category for conformal blocks only depends on the diagram automorphism class $\sigma$ of $\gamma$. We also observe that the twisted fusion rings defined in \cite{Desh:17} and \cite{Hong1,Hong} agree. We apply these results to compute the categorical crossed S-matrices that appear in the categorical Verlinde formula (Corollary \ref{cor:highergenus}) in the case of twisted conformal blocks and hence derive the statement of Theorem \ref{conj:main1}. 
We refer to Sections \ref{sec:twistedfusion}, \ref{sec:crossedmatrix} for details.
\fi


\iffalse
We study the twisted fusion rings, their character tables and the crossed S-matrices in Sections \ref{section:crossedS}, \ref{sec:twistedfusion} and \ref{sec:crossedmatrix}. We give an explicit description of all the crossed S-matrices. Also in the cases of the twisted affine Lie algebras $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $E_{6}^{(2)}$ and $D_{4}^{(3)}$, we express the crossed S-matrices as submatrices of certain larger uncrossed S-matrices. We also refer the reader to Section \ref{sec:crossedmatrix} for the relation between the unitary character table of the fusion ring $\mathcal R_{\ell}(\frg,\sigma)$, the categorical crossed S-matrices and the crossed $S$-matrices defined in \cite[Chapter 13]{Kac}.
\fi
 

 
\subsection*{Acknowledgments}We sincerely thank Patrick Brosnan, Najmuddin Fakhruddin, Jochen Heinloth, Shrawan Kumar, Arvind Nair, Christian Pauly, Michael Rapoport and Catharina Stroppel for useful discussions. We acknowledge key communications with Christoph Schweigert regarding \cite{BFS} and with the \texttt{KAC} software. We also thank Vladimir Drinfeld for posing a question to the first named author that lead to Proposition \ref{prop:rigidity in weakly fusion categories}. We acknowledge  support of the Department of Atomic Energy, India, under project no. 12-R\&D-TFR-5.01-0500. The second named author acknowleges support of SERB, India(SRG/2019/000513) and the Max-Planck Institute for Mathematics in Bon
\part{The categorical twisted Verlinde formula}\label{p:catprel}
In this first part of the paper we develop some results about monoidal and fusion categories that we need in the paper. However, the results obtained in this part are also of independent interest from the point of view of the theory of fusion and braided crossed fusion categories. In view of this, we prove some results in a slightly more general set-up than we need for the remainder of this paper. For example we also consider fusion categories which are not endowed with a spherical structure. We begin by recalling the notions of rigidity and weak rigidity in monoidal categories in Section \ref{sec:drinfeldsquestions}. We also recall the notions of fusion and weakly fusion categories. The main result in Section \ref{sec:drinfeldsquestions} is a criterion for rigidity in weakly fusion categories. In Section \ref{sec:grothringfrobalg} we recall various notions related to Grothendieck rings of fusion categories and their different avatars that appear in the literature. In Section \ref{sec:braidedcrossed} we will recall the notion of a braided $\Gamma$-crossed category, where $\Gamma$ is a finite group, and we will recall the definition and properties of the associated categorical crossed S-matrices. In Section \ref{sec:twistedfusion} we recall the notion of the categorical twisted fusion ring and some equivalent ways to construct it. We will also recall that the categorical crossed S-matrices are the character tables of such twisted fusion rings. In Section \ref{sec:catverlinde} we prove the categorical twisted Verlinde formula which computes the fusion coefficients of any $\Gamma$-crossed modular category in terms of the categorical crossed S-matrices. 
\section{Rigidity in weakly fusion categories}\label{sec:drinfeldsquestions}
We begin by reviewing the notions of weak duality and rigidity in monoidal categories and prove a useful criterion for rigidity. We refer the reader to Etingof-Nikshych-Ostrik \cite{ENO:05} for more details on the theory of monoidal categories and fusion categories and to Boyarchenko-Drinfeld \cite{BoDr:13} for more on weak duality and pivotal/ribbon structures in this setting.


\subsection{Monoidal r-categories and weakly fusion categories}\label{sec:monrcatweaklyfusion} We begin by recalling the notion of a monoidal r-category and a weakly fusion category.
\begin{definition}
A monoidal category $(\mathcal C,\otimes,\unit)$ is said to be an r-category if (cf. \cite{BoDr:13}):
\\ (i) For each $X\in \mathcal C$, the functor $\mathcal C\ni Y\mapsto \Hom(\unit, X\otimes Y)$ is representable by an object $X^*$, i.e. we have functorial identifications $\Hom(\unit,X\otimes Y)=\Hom(X^*,Y)$.\\
(ii) The functor $\mathcal C\ni X\mapsto X^*\in \mathcal C^{\operatorname{op}}$ is an equivalence of categories, with the inverse functor being denoted by $X\mapsto { }^*X$.
\end{definition}


Note that the notion of a monoidal r-category that is defined here is dual to the one considered in \cite{BoDr:13}, namely it corresponds to the weak duality for the ``second tensor product'' constructed in {\it op. cit. \S3.1}. 


\begin{remark}
Using both (i) and (ii) from the definition, it follows that we have functorial identifications 
\begin{equation}\label{eq:defrcategory}
\Hom(\unit,X\otimes Y)=\Hom(X^*,Y)=\Hom({ }^*Y,X)
\end{equation}
for any pair of objects $X,Y$ in a monoidal r-category $\mathcal C$.
\end{remark}

\begin{definition}\label{def:weaklyfusion}
We say that a monoidal category $\mathcal C$ is a weakly fusion category  over an algebraically closed field $k$ if $\mathcal C$ is a finite semisimple $k$-linear abelian monoidal r-category such that the unit $\unit$ is a simple object.
\end{definition}


\begin{remark}\label{rk:fusioncoeff}
Let $A,B,C$ be simple objects in a weakly fusion category $(\mathcal C,\otimes,\unit)$. As a first step in understanding the tensor product structure, it is important to consider the multiplicity $\nu^C_{A,B}$ of any simple object $C$ in the tensor product $A\otimes B$. These multiplicities are called the fusion coefficients. Since $\mathcal C$ is weakly fusion, this multiplicity is given by 
\[\nu^C_{A,B}=\dim\Hom(C,A\otimes B)=\dim\Hom(\unit,A\otimes B\otimes C^*)=\dim\Hom(\unit, {}^*C\otimes A\otimes B).\] 
Note that all the $\Hom$-spaces above are canonically identified by the weak duality. Hence the information of all the fusion coefficients is contained in the multiplicity spaces $\Hom(\unit, A_1\otimes\cdots\otimes A_n)$ for simple objects $A_i\in \mathcal C$. We will often call the dimensions of the above spaces as the fusion coefficients.
\end{remark}



Let $\mathcal C$ be any monoidal r-category. By definition, for each object $X\in \mathcal C$, we have $\Hom(\unit,X\otimes X^*)=\Hom(X^*,X^*)$. In particular, we have a canonical coevaluation morphism $\coev_X:\unit\to X\otimes X^*$, which we denote pictorially by $$\coev_X=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, above right =.6 of B1] (Cap) {\Small$X$};
\node[below right =.6  of Cap] (B2) {$X^*$};
\node[above =.4 of Cap] (unit) {$\unit$};
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\end{tikzpicture}=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, above right =.6 of B1] (Cap) {\Small$X$};
\node[below right =.6  of Cap] (B2) {$X^*$};
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\end{tikzpicture},$$ often dropping the unit $\unit$ from the diagram. Using the identification, $\Hom(\unit,X\otimes Y)=\Hom(X^*,Y)=\Hom({ }^*Y,X)$, any morphism $f:\unit \to X\otimes Y$ corresponds to a unique morphism $\wtilde{f}:X^*\to Y$ and ${}^*\wtilde{f}:{ }^*Y\to X$ such that we have the equality of morphisms
$$
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
  \node[draw, text centered, text width=1cm] (f) {$f$};
  \node[below=of f.210] (B1) {$X$};
  \node[below=of f.330] (B2) {$Y$};
	\node[above = .9 of f] (unit) {$\unit$};
  \draw (B1) -- (f.210);
  \draw (B2) -- (f.330);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {};
\node[circle,inner sep = 0.4pt, draw, above right =.6 of B1] (Cap) {\Small$X$};
\node[below right =.2 and .3  of Cap] (B2) {$X^*$};
\node[below =1.2 of B1] (E1) {$X$};
\node at (E1-|B2) (E2) {$Y$};
\node[draw, above = .3 of E2] (f) {\Small$\wtilde{f}$};
\node[above=.2 of Cap] (unit) {$\unit$};
\draw (E1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\draw (B2) -- (f) -- (E2);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {};
\node[circle,inner sep = 0pt, draw, above left =.6 of B1] (Cap) {\Small${}^*Y$};
\node[below left =.2 and .3  of Cap] (B2) {${}^*Y$};
\node[below =1.2 of B1] (E1) {$Y$};
\node at (E1-|B2) (E2) {$X$};
\node[draw, above = .3 of E2] (f) {\Small${}^*\wtilde{f}$};
\node[above=.2 of Cap] (unit) {$\unit$};
\draw (E1) to[out=90,in=0] (Cap);
\draw (B2) to[out=90,in=180] (Cap);
\draw (B2) -- (f) -- (E2);
\end{tikzpicture}.$$
Let us further assume that $\mathcal C$ is weakly fusion over an algebraically closed field $k$. Now by the semisimplicity of $\mathcal C$ and weak duality, it follows that for each simple object $X\in \mathcal C$, the tensor product $X\otimes X^*$ contains $\unit$ as a direct summand with multiplicity one. Hence the map $\coev_X$ has a unique splitting $e_X:X\otimes X^*\to \unit$, which we denote pictorially as $e_X=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, below right =.6 of B1] (Cup) {\Small$X$};
\node[above right =.6 of Cup] (B2) {$X^*$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\end{tikzpicture}$
such that we have
$\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, below right =.6 of B1] (Cup) {\Small$X$};
\node[above right =.6 of Cup] (B2) {$X^*$};
\node[circle, inner sep = 0.4pt, draw, above right =.6 of B1] (Cap) {\Small$X$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\end{tikzpicture}=1.$
\subsection{Rigidity in monoidal r-categories}
Let us now consider the notion of rigid duals. Let us begin by recalling the definition (see \cite{ENO:05} for more):
\begin{definition}
An object $X$ in a monoidal category $\mathcal C$ is said to have a left (rigid) dual $X^*$ if and only if the functor $X^*\otimes (\cdot)$ is left adjoint to the functor $X\otimes (\cdot)$. Equivalently, there should exist two morphisms $\coev_X:\unit \to X\otimes X^*$ and $\ev_X:X^*\otimes X\to \unit$ denoted pictorially as $\coev_X=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, above right =.6 of B1] (Cap) {\Small$X$};
\node[below right =.6  of Cap] (B2) {$X^*$};
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\end{tikzpicture}$ and $\ev_X=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$X^*$};
\node[inner sep = 0.4pt, draw, below right =.6 of B1] (Cup) {\Small$X$};
\node[above right =.6 of Cup] (B2) {$X$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\end{tikzpicture}$ such that we have
\begin{equation}\label{equation:rigidity diagram}
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {$X$};
\node[above=.6of C] (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, above right =.3 and .2 of B1] (Cap) {\Small$X$};
\node[below right =.3 and .2 of Cap] (B2) {$X^*$};
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\node[inner sep = 0.4pt, draw, below right =.3 and .2 of B2] (Cup) {\Small$X$};
\node[above right =.3 and .2 of Cup] (B3) {$X$};
\draw (B2) to[out=-90,in=180] (Cup);
\draw (B3) to[out=-90,in=0] (Cup);
\node[above=.6of B3] (A) {$X$};
\draw (B1)--(C);
\draw (A)--(B3);
\end{tikzpicture}=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A) {$X$};
\node[below=1.7of A] (B){$X$};
\draw (A) -- (B);
\end{tikzpicture}
\mbox{ and }
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {};
\node[above=.6of C] (B1) {$X^*$};
\node[above=.6of B1] (A0) {$X^*$};
\node[inner sep = 0.4pt, draw, below right =.3 and .2 of B1] (Cup) {\Small$X$};
\node[above right =.3 and .2 of Cup] (B2) {$X$};
\draw (B1) to[out=-90,in=-180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\node[circle,inner sep = 0.4pt, draw, above right =.3 and .2 of B2] (Cap) {\Small$X$};
\node[below right =.3 and .2 of Cap] (B3) {$X^*$};
\draw (B2) to[out=90,in=180] (Cap);
\draw (B3) to[out=90,in=0] (Cap);
\node[below=.6of B3] (C0) {$X^*$};
\draw (B3)--(C0);
\draw (A0)--(B1);
\end{tikzpicture}=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A) {$X^*$};
\node[below=1.76of A] (B){$X^*$};
\draw (A) -- (B);
\end{tikzpicture}.
\end{equation}
Similarly, an object $X$ in a monoidal category $\mathcal C$ is said to have a right (rigid) dual ${}^*X$ if and only if the functor ${}^*X\otimes (\cdot)$ is right adjoint to the functor $X\otimes (\cdot)$. A monoidal category is said to be \emph{rigid} if each of its objects has both a left dual and a right dual in the above sense. A \emph{fusion category} is a weakly fusion category which is also rigid.
\end{definition}
We will now see that in a monoidal r-category, the two equations in (\ref{equation:rigidity diagram}) above are in fact equivalent. In other words, to check rigidity of an object in an r-category, it is sufficient to only check one of the above conditions.
\begin{lemma}\label{lemma:rigidity in r-categories}
Let $\mathcal C$ be a monoidal r-category. Let $X\in \mathcal C$ and let $\coev_X:\unit\to X\otimes X^*$ be the canonical coevaluation map. Let $\ev_X:X^*\otimes X\to \unit$ be any morphism. Then the two equations in (\ref{equation:rigidity diagram}) are equivalent to each other.
\end{lemma}
\begin{proof}
Let us assume that the first equality holds and deduce the second equality. We need to verify the equality of two morphisms in $\Hom(X^*,X^*)$. Since $\mathcal C$ is an r-category, this is equivalent to verifying the equality of the corresponding morphisms in $\Hom(\unit,X\otimes X^*)$. The desired equality follows, since using the first equality from (\ref{equation:rigidity diagram}) we obtain:
$$\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {};
\node[above=.6of C] (B1) {};
\node[above=.6of B1] (A0) {$X^*$};
\node[inner sep = 0.4pt, draw, below right =.3 and .2 of B1] (Cup) {\Small$X$};
\node[above right =.3 and .2 of Cup] (B2) {};
\node[circle,inner sep = 0.4pt, draw, above right =.3 and .2 of B2] (Cap) {\Small$X$};
\node[below right =.3 and .2 of Cap] (B3) {};
\draw (Cup) to[out=0, in=180] (Cap);
\node[below=.6of B3] (C0) {$X^*$};
\draw (C0) to[out=90,in=0] (Cap);
\draw (A0) to[out=-90,in=-180] (Cup);
\node[circle,inner sep = 0.4pt, draw, above left = .2 of A0] (Cap') {\Small$X$};
\node[left = 2.6 of C0] (C1) {$X$};
\draw (C1) to[out=90,in=180] (Cap');
\draw (Cap') to[out=0,in=90] (A0);
\end{tikzpicture}=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {};
\node[above=.6of C] (B1) {};
\node[above=.6of B1] (A0) {};
\node[inner sep = 0.4pt, draw, below right =0.4 and .2 of B1] (Cup) {\Small$X$};
\node[above right =.3 and .2 of Cup] (B2) {};
\node[above right =.3 and .2 of B2] (X) {};
\node[circle,inner sep = 0.4pt, draw, above=.7 of X] (Cap) {\Small$X$};
\node[below right =.3 and .2 of X] (B3) {};
\draw (Cup) to[out=0, in=180] (Cap);
\node[below=.6of B3] (C0) {$X^*$};
\draw (C0) to[out=90,in=0] (Cap);
\node[circle,inner sep = 0.4pt, draw, below left = .35 of A0] (Cap') {\Small$X$};
\node[left = 2.6 of C0] (C1) {$X$};
\draw (C1) to[out=90,in=180] (Cap');
\draw (Cap') to[out=0,in=180] (Cup);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node[circle, draw,inner sep=.4pt] (Cap) {\Small$X$};
\node[below right = 1.6 and .4 of Cap] (B2) {$X^*$};
\node[below left = 1.6 and .4 of Cap] (B1) {$X$};
\node[above=.4 of Cap] (X) {};
\draw (B1) to[out=90,in=180] (Cap);
\draw (Cap)to[out=0,in=90] (B2);
\end{tikzpicture}.
$$
The equivalence in the other direction follows from a similar argument.
\end{proof}

Now let us get back to our setting of a weakly fusion category $\mathcal C$ over an algebraically closed field $k$. For each simple object $X$ we have the coevaluation map $\coev_X:\unit\to X\otimes X^*$, but we do not know whether the desired evaluation map necessarily exists. But instead, we  have the previously defined map $e_{^*X}:{ }^*X\otimes X\to \unit$  which splits off the corresponding coevaluation map $\coev_{{}^*X}:\unit\to { }^*X\otimes X$. Hence for each simple object $X\in \mathcal C$ we can construct the following two morphisms in $\mathcal C$:
\begin{equation}\label{equation:weak snakes}
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {};
\node[above=.6of C] (B1) {${}^*X$};
\node[above=.6of B1] (A0) {${}^*X$};
\node[circle, inner sep = 0pt, draw, below right =.3 and .2 of B1] (Cup) {\Small${}^*X$};
\node[above right =.3 and .2 of Cup] (B2) {$X$};
\draw (B1) to[out=-90,in=-180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\node[circle,inner sep = 0.4pt, draw, above right =.3 and .2 of B2] (Cap) {\Small$X$};
\node[below right =.3 and .2 of Cap] (B3) {$X^{*}$};
\draw (B2) to[out=90,in=180] (Cap);
\draw (B3) to[out=90,in=0] (Cap);
\node[below=.6of B3] (C0) {$X^{*}$};
\draw (B3)--(C0);
\draw (A0)--(B1);
\end{tikzpicture}
\mbox{ and }
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {$X$};
\node[above=.6of C] (B1) {$X$};
\node[circle, inner sep = 0.4pt, draw, above right =.3 and .2 of B1] (Cap) {\Small$X$};
\node[below right =.3 and .2 of Cap] (B2) {$X^*$};
\draw (B1) to[out=90,in=-180] (Cap);
\draw (B2) to[out=90,in=0] (Cap);
\node[circle, inner sep = 0pt, draw, below right =.3 and .2 of B2] (Cup) {\Small$X^*$};
\node[above right =.3 and .2 of Cup] (B3) {$X^{**}$};
\draw (B2) to[out=-90,in=180] (Cup);
\draw (B3) to[out=-90,in=0] (Cup);
\node[above=.6of B3] (A) {$X^{**}$};
\draw (B1)--(C);
\draw (A)--(B3);
\end{tikzpicture}.
\end{equation}
\begin{lemma}\label{lemma:rigidity in weakly fusion categories}
Let $X$ be a simple object in a weakly fusion category $\mathcal C$. Then the following statements are equivalent:\\
(i) The object $X$ has a rigid left dual.\\
(ii) The first morphism in (\ref{equation:weak snakes}) is invertible (or equivalently, nonzero).\\
(iii) The second morphism in (\ref{equation:weak snakes}) is invertible (or equivalently, nonzero).\\
\end{lemma}
\begin{proof}
Let us first prove (ii)$\Rightarrow$(i). Suppose that the first morphism in (\ref{equation:weak snakes}) is an  isomorphism with inverse $\delta:X^*\to { }^*X$. Define $\ev_X$ to be the composition $$\ev_X:X^*\otimes X\xrightarrow{\delta\otimes \id_X} { }^*X\otimes X\xrightarrow{e_{{}^*X}}\unit.$$ Hence by construction, the second equation in (\ref{equation:rigidity diagram}) is satisfied. By Lemma \ref{lemma:rigidity in r-categories}, the first condition must also hold and we conclude that $X^*$ must in fact be the rigid left dual of $X$.

To prove (i)$\Rightarrow$(ii), suppose that $X^*$ is a rigid left dual of $X$. Hence we have an evaluation map $$\ev_X:X^*\otimes X\to \unit$$ satisfying (\ref{equation:rigidity diagram}). In particular by semisimplicity, $\unit$ must be a direct summand of $X^*\otimes X$. Hence we must have ${}^*X\cong X^*$. Choosing such an isomorphism we obtain a non-zero morphism $${}^*X\otimes X\to X^*\otimes X\xrightarrow{\ev_X} \unit$$ which differs from $e_{{}^*X}:{}^*X\otimes X\to \unit$ by an element of $k^\times$. Statement (ii) now follows.

\noindent The proof of (i)$\Leftrightarrow$(iii) is similar. 
\end{proof}

\noindent We obtain the following well-known result as a corollary:
\begin{corollary}\label{cor:doubledual}
For any object $X$ in a fusion category $\mathcal C$, its left dual $X^*$ and right dual ${}^*X$ are isomorphic, or equivalently $X\cong X^{**}$.
\end{corollary}

\begin{remark}
It is important to note that the above isomorphisms are not canonical. More precisely, the two monoidal functors $\id_\mathcal C$ and $(\cdot)^{**}:\mathcal C\to \mathcal C$ are non-canonically isomorphic as functors between abelian categories. Moreover such an isomorphism may not be compatible with the monoidal structure of these two functors.  The choice of an isomorphism which is also compatible with the monoidal structures is known as a \emph{pivotal} structure. We refer to \cite[\S2.4.2, \S2.4.3]{DGNO} for more about this. We will also encounter this notion is Section \ref{sec:catcrosssmat} below. Following \cite[\S5]{BoDr:13} we will also define pivotal structures in monoidal r-categories in \ref{sec:weaklyribbon}.
\end{remark}

\subsection{A criterion for rigidity} We prove the following useful criterion that guarantees the existence of rigid duals in a weakly fusion category.
\begin{proposition}\label{prop:rigidity in weakly fusion categories}
Let $\mathcal C$ be a weakly fusion category. Let $M\in \mathcal C$ be a simple object such that $M\otimes { }^*M$ has a rigid left dual. Then $M$ has a rigid left dual.
\end{proposition}
\begin{proof}
Consider the morphism $e_{{}^*M}\otimes \id_{{}^*M}:{}^*M\otimes M \otimes {}^*M\to {}^*M.$ It is non-zero, since the morphism $\coev_{{}^*M}\otimes \id_{{}^*M}:{}^*M\to {}^*M\otimes M \otimes {}^*M$ is its right inverse. Let us rewrite this non-zero morphism diagrammatically as below:
$$\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {${ }^*M$};
\node[circle, inner sep = 0pt, draw, below right =0.8 and .25 of B1] (Cup) {\Small${ }^*M$};
\node[right =.4 of Cup |- B1] (B2) {$M$};
\node[right = .3 of B2] (B3) {${ }^*M$};
\node[below left = 3 and .1 of B2] (E) {${ }^*M$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw (B3) to[out=-90,in=90] (E);
\end{tikzpicture}=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A1) {${ }^*M$};
\node[right=1of A1] (A2) {$M\otimes { }^*M$};
\node[below=.3of A2, draw, minimum width = 1cm] (Id) {\Small$\operatorname{Id}$};
\draw[double] (A2) -- (Id);
\node[below=.3of Id.210] (B1) {$M$};
\node[below=.3of Id.330] (B2) {${ }^*M$};
\draw (Id.210)--(B1);
\draw (Id.330)--(B2);
\node[below right =3 and .8 of A1] (C) {${ }^*M$};
\draw (B2) to[out=-90,in=90] (C);
\node[circle, inner sep =0pt, draw, below left = .25 and .35 of B1] (Cup) {\Small${ }^*M$};
\draw (A1) to[out=-90, in=180] (Cup);
\draw (Cup) to[out=0, in=-90] (B1);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A1) {${ }^*M$};
\node[right=1of A1] (A2) {};
\node[right=1of A2] (A3) {$M\otimes { }^*M$};
\node[below=.8 of A2, draw, minimum width = 1cm] (Id) {\Small$\operatorname{Id}$};
\node[below right =3 and .8 of A1] (C) {${ }^*M$};
\draw (Id.330) to[out=-90,in=90] (C);
\node[circle, inner sep =0pt, draw, below left = 1 and .5 of Id.210] (Cup) {\Small${ }^*M$};
\draw (A1) to[out=-90, in=180] (Cup);
\draw (Cup) to[out=0, in=-90] (Id.210);
\node[above right =.4 and .05 of Id] (CapA) {};
\node[below right = 1.8 and .6 of CapA] (CupA) {};
\draw[double] (Id) to[out=90,in=180] (CapA) to[out=0,in=180] (CupA) to[out=0,in=-90] (A3);
\node[below right =0.1 and -1.4 of Id] (string) {\Small$M$};
\node at (.5,-.25) (R1) {};
\node at (2.8,-2) (R3) {};
\draw[red, dotted, very thick] (R1) rectangle (R3);
\end{tikzpicture}.$$
In the second equality above, we have used the existence of the rigid left dual of the object $M\otimes {}^*M\in \mathcal C$. Let $f:\unit \to M\otimes \left({}^*M\otimes (M\otimes {}^*M)^*\right)$ be the morphism represented by  the red dotted box above. Let $\wtilde{f}: M^*\to {}^*M\otimes (M\otimes {}^*M)^*$ be the morphism corresponding to $f$ using weak duality. Hence the non-zero morphism $e_{{}^*M}\otimes \id_{{}^*M}$ can be expressed as:
$$\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A1) {${ }^*M$};
\node[right=2.5 of A1] (A2) {$M\otimes { }^*M$};
\node[below right =4 and .8 of A1] (C) {${ }^*M$};
\node[circle, inner sep =0pt, draw, below right = 2 and .2 of A1] (Cup) {\Small${ }^*M$};
\node[circle, inner sep=0.4pt, draw, below right =.2 and 1.2 of A1] (Cap) {\Small$M$};
\node[below right=.4 and 0 of Cap, minimum width = 1cm, draw] (f) {\Small$\wtilde{f}$};
\draw (A1) to[out=-90, in=180] (Cup);
\draw (Cup) to[out=0, in=180] (Cap);
\node[below right = 1.8 and 1 of Cap] (CupA) {};
\draw (Cap) to[out=0,in=90] (f);
\draw[double] (f.300) to[out=-90,in=180] (CupA) to[out=0,in=-90] (A2);
\draw (f.230) to[out=-90,in=90] (C);
\node at (.55,-.25) (R1) {};
\node at (3.2,-2.1) (R3) {};
\draw[red, dotted, very thick] (R1) rectangle (R3);
\node[below right=-0.2 and .4 of Cap] (string) {\Small$M^{*}$};
\node[below left=0.5 and .2 of Cap] (str) {\Small$M$};
\end{tikzpicture}
=\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (A1) {${ }^*M$};
\node[right=2.5 of A1] (A2) {$M\otimes { }^*M$};
\node[below right =4 and .8 of A1] (C) {${ }^*M$};
\node[circle, inner sep =0pt, draw, below right = 1.35 and .2 of A1] (Cup) {\Small${ }^*M$};
\node[circle, inner sep=.4pt, draw, below right =.55 and 1.3 of A1] (Cap) {\Small$M$};
\node[below right=1.4 and -.1 of Cap, minimum width = 1cm, draw] (f) {\Small$\wtilde{f}$};
\draw (A1) to[out=-90, in=180] (Cup);
\draw (Cup) to[out=0, in=180] (Cap);
\node[below right = 2.8 and .9 of Cap] (CupA) {};
\draw (Cap) to[out=0,in=90] (f);
\draw[double] (f.300) to[out=-90,in=180] (CupA) to[out=0,in=-90] (A2);
\draw (f.230) to[out=-90,in=90] (C);
\node at (-0.3,-.6) (R1) {};
\node at (4.2,-2.1) (R3) {};
\draw[blue, dotted, very thick] (R1) rectangle (R3);
\node[below right=0.3 and .4 of Cap] (string) {\Small$M^{*}$};
\end{tikzpicture}.
$$
By looking at the blue dotted box above, we conclude that the morphism $\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (C) {};
\node[above=.6of C] (B1) {};
\node[above=.6of B1] (A0) {${}^*M$};
\node[circle, inner sep = -0.1pt, draw, below right =.3 and .2 of B1] (Cup) {\tiny${}^*M$};
\node[above right =.3 and .2 of Cup] (B2) {};
\node[circle,inner sep = 0.4pt, draw, above right =.3 and .2 of B2] (Cap) {\Small$M$};
\node[below right =.3 and .2 of Cap] (B3) {};
\node[below=.6of B3] (C0) {$M^{*}$};
\draw (Cup) to[out=0,in=180] (Cap);
\draw (C0) to[out=90,in=0] (Cap);
\draw (A0)to[out=-90,in=-180] (Cup);
\end{tikzpicture}
$ must be non-zero and hence an isomorphism. From Lemma \ref{lemma:rigidity in weakly fusion categories} we conclude that $M$ has a rigid left dual.
\end{proof}
Finally we deduce the following corollary of the above result:
\begin{corollary}\label{cor:rigidity of graded categories}
Let $\Gamma$ be a finite group and let $\mathcal C=\bigoplus\limits_{\gamma\in\Gamma}\mathcal C_\gamma$ be a $\Gamma$-graded weakly fusion category such that the identity component $\mathcal C_1$ is rigid. Then $\mathcal C$ is rigid and hence a fusion category.
\end{corollary}
\begin{proof}
This follows directly from the proposition above. Let $M$ be a simple object in $\mathcal C$, lying in say $\mathcal C_\gamma$. Then ${}^*M\in \mathcal C_{\gamma^{-1}}$ and $M\otimes {}^*M$ lies in $\mathcal C_1$ which we have assumed is a fusion category. Hence $M\otimes {}^*M$ has a rigid left dual. From the proposition it follows that $M$ has a rigid left dual. Hence $\mathcal C$ is a fusion category.
\end{proof}



\section{On Grothendieck rings and fusion rules}\label{sec:grothringfrobalg}
In this section we recall some notions related to Grothendieck rings of fusion categories, sometimes also called fusion rings and describe the structures on it. We refer to \cite[\S1]{Lus87}, \cite{Desh:17, Desh:18a}, \cite{Arote:18,Fossum:71} for more details on the various notions introduced in this section. We will also relate this to the notion of fusion rules and fusion rings as described in \cite{BeauHirz}. 
\subsection{Properties of Grothendieck group of $(\mathcal C, \otimes, \unit)$}
Let $(\mathcal C,\otimes,\unit)$ be a fusion category. Then its Grothendieck group, which we denote by $K(\mathcal C)$ is a ring with the following important structures:
\begin{itemize}
\item It has a natural $\mathbb Z$-basis given by the classes of its simple objects making it a based ring in the sense of \cite[\S1]{Lus87}. 

\item There is the non-degenerate linear functional $\nu:K(\mathcal C)\to \mathbb Z$ which records the coefficient of the class of the unit $[\unit]$ in any element of $K(\mathcal C)$. Moreover using rigidity it is easy to see (using Corollary \ref{cor:doubledual}) that $\nu$ is symmetric, i.e. $\nu([X\otimes Y])=\nu([Y\otimes X])$. This allows us to identify $K(\mathcal C)^*\cong K(\mathcal C)$ as $K(\mathcal C)$-bimodules and provides $K(\mathcal C)$ with the structure of a symmetric Frobenius algebra (cf. \cite{Fossum:71,Arote:18}).
\item The rigid duality on $\mathcal C$ and Corollary \ref{cor:doubledual} can be used to define an anti-involution \newline $(\cdot)^*:K(\mathcal C)\to K(\mathcal C).$ Note that we have $\nu(a^*)=\nu(a)$ for any $a\in K(\mathcal C)$.
This allows us to define a symmetric inner product $\langle a,b\rangle:=\linfun(ab^*)$ on $K(\mathcal C)$. 
\item The classes of the simple objects of $\mathcal C$ form an orthonormal basis of $\KQab(\mathcal C)$ with respect to the above inner form.
\end{itemize}
It is often necessary and useful to extend scalars to some rings or fields $R$ which are equipped with an involution $\overline{(\cdot)}:R\to R$ and define $K_R(\mathcal C):=K(\mathcal C)\otimes_{\mathbb Z}R$ equipped with the following structures:
\begin{enumerate}
\item We extend $\nu$ $R$-linearly to a symmetric non-degenerate $R$-linear functional $\nu:K_R(\mathcal C)\to R$ making $K_R(\mathcal C)$ a symmetric Frobenius algebra over $R$.
\item We extend $\ast$ $R$-semilinearly to an $R$-semilinear anti-involution $(\cdot)^*:K_R(\mathcal C)\to K_R(\mathcal C)$. We have $\nu(a^*)=\overline{\nu(a)}$ for any $a\in K_R(\mathcal C)$. We also extend the inner product to an $R$-Hermitian inner product $\langle a,b\rangle:=\nu(ab^*)$ on $K_R(\mathcal C)$.
\item The classes of the simple objects continue to be an orthonormal basis of $K_R(\mathcal C)$ with respect to the above Hermitian inner product.
\end{enumerate}
\begin{definition}\label{def:frobstaralgarote}(See  also \cite{Arote:18}.) A Frobenius $\ast$-$R$-algebra is a symmetric Frobenius $R$-algebra $(A,\nu:A\to R)$ equipped with an $R$-semilinear anti-involution $(\cdot)^*:A\to A$ satisfying  $\nu(a^*)=\overline{\nu(a)}$ and which admits an orthonormal basis with respect to the Hermitian inner product $\langle a,b\rangle=\nu(ab^*)$.
\end{definition}	
	 Note that by the definition of the $R$-Hermitian inner product, we have
\begin{equation}\label{eq:frobalginnerprod}
\langle a ,b\rangle = \langle ab^*, 1\rangle=\nu(ab^*)=\overline{\nu((ab^*)^*)}=\overline{\nu(ba^*)}=\overline{\langle b,a\rangle}
\end{equation}
for any two elements $a,b$ of the Frobenius $\ast$-$R$-algebra. We can think of this as a decategorified version of the natural identification (\ref{eq:defrcategory}).  

The $R$ that we will mostly be interested in is $\Qab$, the maximal abelian extension of $\mathbb Q$. By the Kronecker-Weber theorem it is obtained by adjoining all roots of unity to $\mathbb Q$. Hence it has a distinguished involution called `complex conjugation' and denoted $\bar{(\cdot)}$ which maps each root of unity to its inverse. Sometimes we will also consider $R=\mathbb C$ equipped with complex conjugation. Sometimes it is also useful to consider $R=\mathbb Z[\omega]$ with complex conjugation, where $\omega$ is some root of unity. Frobenius $*$-algebras over any of these $R$ (equipped with the `complex conjugation' involution) are necessarily semi-simple $R$-algebras (see \cite{Arote:18}).

We record the above discussion along with an important result of \cite{ENO:05} in the following:
\begin{proposition}
Let $\mathcal C$ be a fusion category.\\
(i) The fusion ring $\KQab(\mathcal C)$ over $\Qab$ has the structure of a Frobenius $\ast$-algebra with the classes of simple objects of $\mathcal C$ forming an orthonormal basis of $\KQab(\mathcal C)$. \\
(ii) The Frobenius $\ast$-algebra $\KQab(\mathcal C)$ is a split semisimple $\Qab$-algebra, i.e. all its irreducible complex representations are already defined over $\Qab$ (see \cite[Cor. 8.53]{ENO:05}).
\end{proposition}

We now relate the above discussion with the notion of (non-degenerate) fusion rules as defined in \cite[\S5]{BeauHirz}. Let $\mathbb N$ denote the set $\mathbb Z_{\geq0}$ of non-negative integers. Let $I$ be a finite set equipped with an involution $\ast$ and let $\mathbb N^I$
denote the free commutative monoidal generated by $I$. Although in \cite{BeauHirz} additive notation is used for this commutative monoid, here we find it more convenient to use multiplicative notation and we denote a typical element of $\mathbb N^I$ by $\prod\limits_{\alpha\in I}\alpha^{n_\alpha}$. 

Now also consider the free abelian group $K$ with basis given by $I$ and extend the involution $\ast$ to an involution of $K$. The goal is to now define the structure of a commutative Frobenius $\ast$-$\mathbb Z$-algebra on $K$ (equipped with the $\ast$ involution) so that $I$ becomes a $\ast$-invariant orthonormal basis containing the unit of the desired ring structure. As is proved in \cite[\S5]{BeauHirz} this structure is equivalent to the axioms of non-degenerate fusion rules. 

Essentially we want to define the product of the basis elements $I$ of $K$, or in other words we would like to expand the products $\prod\limits_{\alpha\in I}\alpha^{n_\alpha}\in \mathbb N^I$ as $\mathbb Z$-linear combinations of $I$. The fusion rule, which we denote by $\nu:\mathbb N^I\to \mathbb Z$ records the coefficient of $1\in I$ in such a product. By (\ref{eq:frobalginnerprod}) this is enough to decompose any product into a linear combination of the basis elements. We refer to {\it loc. cit.} for details.

 



\section{Braided crossed categories and crossed S-matrices}\label{sec:braidedcrossed}
Let $\Gamma$ be a finite group. Since the notion of braided $\Gamma$-crossed monoidal categories plays a central role in this paper, let us begin by recalling the definition. We refer to the paper Drinfeld-Gelaki-Nikshych-Ostrik \cite{DGNO} and the book of  V. Turaev \cite{TuraevHQFT} for a more detailed discussion. From now on we will assume that all our categories are $\mathbb C$-linear.
\begin{definition}\label{d:braidedgammacrossed} A braided $\Gamma$-crossed monoidal category is a monoidal category $\mathcal C$ equipped with the following structures:
\begin{enumerate}
\item a $\Gamma$-grading $\mathcal C=
\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ such that $\mathcal C_{\gamma_1}\otimes \mathcal C_{\gamma_2}\subset \mathcal C_{\gamma_1\gamma_2}$;
\item a monoidal $\Gamma$-action on $\mathcal C$ such that the action of an element $g\in \Gamma$ maps the component $\mathcal C_\gamma$ to $\mathcal C_{g\gamma g^{-1}}$; 
\item isomorphisms (which will be called crossed braiding isomorphisms)
$$\beta_{M,N}:M\otimes N \xrightarrow{\cong} \gamma(N) \otimes M \mbox{ for } \gamma\in\Gamma, M\in \mathcal C_\gamma, N\in \mathcal C$$
which are functorial in $M,N$, are compatible with the $\Gamma$ action, i.e. $g(\beta_{M,N})=\beta_{g(M),g(N)}$ for all $g\in \Gamma$, with $\beta_{\unit,N}=\beta_{N,\unit}=\id_N$ and such that the following diagrams commute for all $g,h\in \Gamma, M\in \mathcal C_g, N\in \mathcal C_h, L\in \mathcal C$:
\[\xymatrix{M\otimes N\otimes L\ar[rr]^-{\beta_{M,N\otimes L}} \ar[d]_{\beta_{M,N}\otimes L} && g(N\otimes L)\otimes M\ar@{=}[d]\\
g(N)\otimes M\otimes L\ar[rr]^-{g(N)\otimes \beta_{M,L}} && g(N)\otimes g(L)\otimes M}\]
\[\xymatrix{M\otimes N\otimes L\ar[rr]^-{\beta_{M\otimes N, L}} \ar[d]_{M\otimes \beta_{N,L}} && gh(L)\otimes M\otimes N\ar@{=}[d]\\
M\otimes h(L)\otimes N\ar[rr]^-{\beta_{M,h(L)}\otimes N} && g(h(L))\otimes M\otimes N.
}\] 
\end{enumerate}
\end{definition}
\begin{remark}
It follows from the above axioms that $\mathcal C_1$ is a braided monoidal category equipped with a braided action of $\Gamma$. The braided $\Gamma$-crossed monoidal category $\mathcal C$ is said to be a braided $\Gamma$-crossed extension of the braided monoidal category $\mathcal C_1$.
\end{remark}


\begin{remark}
In this paper we will only consider braided $\Gamma$-crossed monoidal categories which are also weakly fusion. By Corollary \ref{cor:rigidity of graded categories}, rigidity of such a braided $\Gamma$-crossed weakly fusion category $\mathcal C$ is equivalent to the rigidity of the identity component $\mathcal C_1$.
\end{remark}



\begin{definition}\label{d:equivariantization} (cf. \cite[\S4]{DGNO}.)
Let $\mathcal C$ be a category equipped with an action of a finite group $\Gamma$. Then its $\Gamma$-equivariantization denoted by $\mathcal C^\Gamma$ is the category whose objects are pairs $(C,\psi_{\cdot})$ where $C$ is an object of $\mathcal C$ and $\psi_{\cdot}$ is a family of isomorphisms $\psi_\gamma:\gamma(C)\xrightarrow{\cong} C$ for each $\gamma\in \Gamma$ such that for each $\gamma_1,\gamma_2\in \Gamma$, $\psi_{\gamma_1\gamma_2}$ equals the composition  $\gamma_1\gamma_2(C)\xrightarrow{=}\gamma_1(\gamma_2(C))\xrightarrow{\gamma_1(\psi_{\gamma_2})}\gamma_1(C)\xrightarrow{\psi_{\gamma_1}}C$. The morphisms in $\mathcal C^\Gamma$ are defined to be the morphisms in $\mathcal C$ that commute with the isomorphisms $\psi_\gamma$. If $\mathcal C$ is monoidal with a monoidal action of $\Gamma$, then $\mathcal C^\Gamma$ is also a monoidal category.
\end{definition}

\noindent We recall the following well-known result:
\begin{proposition}\label{prop:equivisbraided}
(cf. {\cite[\S4.4.4]{DGNO}}.)
Let $\mathcal C$ be a braided $\Gamma$-crossed monoidal category. Then $\mathcal C^\Gamma$ has the structure of a braided monoidal category.
\end{proposition}


\subsection{Braided $\Gamma$-crossed fusion categories and their Grothendieck rings} From now on, let us assume that $\mathcal C$ is a braided $\Gamma$-crossed fusion category, i.e. we also assume rigidity and finite semisimpleness of $\mathcal C$ and that the unit $\unit$ is simple. For each $\gamma\in \Gamma$ we let $P_\gamma$ denote the set of (isomorphism classes of) simple objects in the component $\mathcal C_\gamma$. 

As in Section \ref{sec:grothringfrobalg}, let us denote by $\KQab(\mathcal C)$ the $\Qab$-algebra obtained from the Grothendieck ring of $\mathcal C$ by extension of scalars to $\Qab$. Then $$\KQab(\mathcal C)=\bigoplus\limits_{\gamma\in \Gamma}\KQab(\mathcal C_\gamma)$$ is a $\Gamma$-crossed Frobenius $\Qab$-$*$-algebra, or in other words the braided $\Gamma$-crossed structure on $\mathcal C$ provides similar structures on $\KQab(\mathcal C)$. Hence we have the above grading, an action of $\Gamma$ on the algebra $\KQab(\mathcal C)$ coming from Definition \ref{d:braidedgammacrossed}(2) and finally the crossed braiding isomorphisms give us the similar crossed commutation relations in $\KQab(\mathcal C)$ at the level of Grothendieck rings.

As before, the non-degenerate symmetric linear functional $\linfun:\KQab(\mathcal C)\to\Qab$ which records the coefficient of the class of the unit $[\unit]$ in any element of $\KQab(\mathcal C)$ allows us to identify $\KQab(\mathcal C_\gamma)^*\cong \KQab(\mathcal C_{\gamma^{-1}})$ as $\KQab(\mathcal C_1)$-bimodules. 
It also follows from the crossed braiding isomorphisms that the identity component $\KQab(\mathcal C_1)$ is central in $\KQab(\mathcal C)$. 

For $\gamma\in \Gamma$, let $P_\gamma$ denote the finite set of (representatives of isomorphism classes of) simple objects of the semisimple category $\mathcal C_\gamma$. We will also think of $P_\gamma$ as a $\Qab$-basis of $\KQab(\mathcal C_\gamma)$. It is an orthonormal basis with respect to the Hermitian form defined above. Our goal in this section is to describe the fusion coefficients of $\KQab(\mathcal C)$. For $\gamma_1,\gamma_2\in \Gamma, A\in \mathcal C_{\gamma_1}, B\in \mathcal C_{\gamma_2}$ and $C\in \mathcal C_{\gamma_1\gamma_2}$, the fusion coefficient $\nu_{A,B}^C\in \mathbb{Z}_{\geq 0}$ is defined to be the multiplicity of $C$ in the product $A\otimes B$, so that we have the equality $[A]\cdot[B]=\sum\limits_{C\in P_{\gamma_1\gamma_2}}\nu_{A,B}^C\cdot[C]$ in the Grothendieck ring. Equivalently (see also Remark \ref{rk:fusioncoeff}), the fusion coefficient can be thought of as the multiplicity of the unit $\unit$ in $A\otimes B\otimes C^*$, where $C^*\in \mathcal C_{\gamma_2^{-1}\gamma_1^{-1}}$ is the rigid dual of $C$, i.e. $$\nu_{A,B}^C=\linfun([A]\cdot[B]\cdot[C^*])=\dim\Hom(\unit,A\otimes B\otimes C^*).$$


\subsection{Twisted characters}\label{sec:twistedchars}
We will always assume that the grading on $\mathcal C$ is faithful, i.e. $\mathcal C_\gamma$ is non-zero for all $\gamma\in \Gamma$. We will also assume that the identity component $\mathcal C_1$ is non-degenerate as a braided fusion category. We refer to \cite[\S2.8]{DGNO} for the notion of non-degeneracy of braided fusion categories. Consider an element $\gamma\in \Gamma$. Under our assumptions, the component $\mathcal C_\gamma$ becomes an invertible $\mathcal C_1$-bimodule category corresponding (under the equivalence \cite[Thm. 5.2]{ENO:10}) to the braided autoequivalence $\gamma:\mathcal C_1\xrightarrow{\cong} \mathcal C_1$ induced by the $\Gamma$-action on $\mathcal C$. Hence we are in the setting studied in \cite{Desh:17, Desh:18a}. Note that we also have the braided $\langle\gamma\rangle$-crossed category $\mathcal C_{\langle\gamma\rangle}:=\bigoplus\limits_{g\in\langle\gamma\rangle}\mathcal C_g\subseteq \mathcal C$, where $\langle\gamma\rangle\leq \Gamma$ denotes the cyclic subgroup generated by $\Gamma$. Let us recall the notion of twisted characters that can be defined in this setting. We refer to \cite{Arote:18} for more on the notion of twisted characters for general graded Frobenius $\ast$-algebras.

We know from \cite{ENO:05} that the commutative $\Qab$-algebra $\KQab(\mathcal C_1)$ is semisimple and split. Let $\Irr(\KQab(\mathcal C_1))$ be the set of all irreducible representations $\rho:\KQab(\mathcal C)\to \Qab$. The $\Gamma$-action on $\mathcal C$ induces a $\Gamma$-action on the algebra $\KQab(\mathcal C_1)$ and hence on the set $\Irr(\KQab(\mathcal C_1))$. For each $\gamma\in \Gamma$ and $\rho\in \Irr(\KQab(\mathcal C_1))^\gamma$, we have the notion of the associated $\gamma$-twisted character:

\begin{definition}
If $\rho\in \Irr(\KQab(\mathcal C_1))^\gamma$, then we can extend $\rho$ to a 1-dimensional character $\wtilde{\rho}:\KQab(\mathcal C_{\langle\gamma\rangle})\to\Qab$ (see \cite{Desh:18a}, see also the Remark below). The $\gamma$-twisted character 
$${\rho}^\gamma:\KQab(\mathcal C_\gamma)\to\Qab$$ 
is defined to be the restriction of $\wtilde{\rho}$ to $\KQab(\mathcal C_\gamma)\subset \KQab(\mathcal C_{\langle\gamma\rangle})$. Using the identification $\KQab(\mathcal C_\gamma)^*\cong\KQab(\mathcal C_{\gamma^{-1}})$, let ${\alpha}^\gamma_\rho\in \KQab(\mathcal C_{\gamma^{-1}})$ be the element corresponding to $\rho^\gamma$, namely 
$$\alpha^\gamma_\rho:=\sum\limits_{A\in P_\gamma}\wtilde{\rho}([A])\cdot [A^*]\in \KQab(\mathcal C_{\gamma^{-1}}).$$ 
We will call either of $\rho^\gamma$ or $\alpha^\gamma_\rho$ as the $\gamma$-twisted character associated with $\rho\in \Irr(\KQab(\mathcal C_1))^\gamma$. 
\end{definition}
\begin{remark}
Note that $\rho^\gamma$, and hence $\alpha^\gamma_\rho$ are well-defined only up to scaling by $m$-th roots of unity, where $m$ is the order of $\gamma$ in $\Gamma$. This is because the extension $\wtilde{\rho}:\KQab(\mathcal C_{\langle\gamma\rangle})\to\Qab$ is non-unique and there is an ambiguity up to $m$-th roots of unity. We also refer to \cite{Arote:18} for the definition of twisted characters and their orthogonality relations in the setting of graded Frobenius $\ast$-algebras.
\end{remark}
For $\gamma=1$, we have the well-defined element $\alpha_\rho:=\alpha^1_\rho\in \KQab(\mathcal C_1)$ for each $\rho\in \Irr(\KQab(\mathcal C_1))$. The following results about these characters and $\gamma$-twisted characters are proved in \cite{Ost:15, Desh:18a}:

\begin{theorem}\label{thm:twisted characters}
	\begin{enumerate}[label=(\roman*)]
\item Let $\rho,\rho'\in\Irr(\KQab(\mathcal C_1)$. Then $\rho'(\alpha_\rho)=0$ if $\rho'\neq\rho$ and $f_\rho:=\rho(\alpha_\rho)\in\Qab$ is a totally positive cyclotomic integer known as the formal codegree of $\rho$. In other words, $e_\rho:=\frac{\alpha_\rho}{f_\rho}\in \KQab(\mathcal C_1)$ is the minimal idempotent corresponding to $\rho\in\Irr(\KQab(\mathcal C_1))$.
\item  For $\rho,\rho'\in\Irr(\KQab(\mathcal C_1))$, we have orthogonality of characters, i.e. $\langle\alpha_\rho,\alpha_{\rho'}\rangle=\delta_{\rho\rho'}\cdot f_\rho.$
\item Let $\rho\in \Irr(\KQab(\mathcal C_1))^{\gamma}$ and $\alpha^\gamma_{\rho}\in \KQab(\mathcal C_{\gamma^{-1}})$ the corresponding $\gamma$-twisted character. Then for any $\rho'\in\Irr(\KQab(\mathcal C_1))$, we have the following:
$$\alpha_{\rho'}\cdot \alpha^\gamma_\rho = \alpha^\gamma_{\rho}\cdot \alpha_{\rho'}=
\begin{dcases*}
0 & if $\rho'\neq \rho$,\\
f_\rho\cdot \alpha^\gamma_\rho & if $\rho'=\rho$.
\end{dcases*}$$
We have a direct sum decomposition
$$\KQab(\mathcal C_{\gamma^{-1}})=\bigoplus\limits_{\rho\in\Irr(\KQab(\mathcal C_1))^{\gamma}} \Qab\cdot \alpha^\gamma_\rho \mbox{ as a $\KQab(\mathcal C_1)$-module.}$$
\item For $\rho,\rho'\in\Irr(\KQab(\mathcal C_1))^{\gamma}$, we have orthogonality of twisted characters, $\langle\alpha^\gamma_\rho,\alpha^\gamma_{\rho'}\rangle=\delta_{\rho\rho'}\cdot f_\rho$. In other words the $\gamma$-twisted characters $\{\alpha^\gamma_\rho|\rho\in \KQab(\mathcal C_1)^\gamma\}$ form an orthogonal basis of $\KQab(\mathcal C_{\gamma^{-1}})$ made up of eigenvectors for the action of $\KQab(\mathcal C_1)$.
\item  For $\rho\in \Irr(\KQab(\mathcal C_1))^{\gamma}$, let $\wtilde{\rho}:\KQab(\mathcal C_{\langle\gamma\rangle})\to\Qab$ be an extension. Let $n=|\langle\gamma\rangle|$. Then the formal codegree $f_{\wtilde{\rho}}$ equals $n\cdot f_\rho$. Define $e^\gamma_\rho:=\frac{\alpha^\gamma_\rho}{f_\rho}$. Then $(e^\gamma_\rho)^n=e_\rho$.
\item For each $\gamma\in\Gamma$, we have $|P_1^\gamma|=|P_\gamma|=|\Irr(\KQab(\mathcal C_1))^\gamma|$.
\end{enumerate}
\end{theorem}
This result describes the structure of $\KQab(\mathcal C_{\gamma^{-1}})$ as a $\KQab(\mathcal C_1)$-module. Now suppose we have $\gamma_1,\gamma_2\in \Gamma$. Then for $\rho_i\in\Irr(\KQab(\mathcal C_1))^{\gamma_i}$, we now describe the product $\alpha^{\gamma_2}_{\rho_2}\cdot \alpha^{\gamma_1}_{\rho_1}\in \KQab(\mathcal C_{\gamma_2^{-1}\gamma_1^{-1}})$ of the twisted characters. We first consider the case where the $\rho_1,\rho_2$ above are distinct. In this case, the product of the primitive idempotents $e_{\rho_2}\cdot e_{\rho_1}$ equals zero. Hence the product $$\alpha^{\gamma_2}_{\rho_2}\cdot \alpha^{\gamma_1}_{\rho_1}=\alpha^{\gamma_2}_{\rho_2}\cdot e_{\rho_2}\cdot e_{\rho_1}\cdot \alpha^{\gamma_1}_{\rho_1}$$ also equals zero in the case $\rho_1\neq \rho_2$. 


For $\rho\in\Irr(\KQab(\mathcal C_1))$, let $\Gamma_\rho\leq \Gamma$ be the stabilizer of $\rho$ under the action of $\Gamma$ and $e_\rho\in\KQab(\mathcal C_1)$ the associated primitive idempotent. For each $\gamma\in\Gamma_\rho$, we have the $\gamma$-twisted character $\alpha^\gamma_\rho$ and the element $e^\gamma_\rho$ (determined up to scaling by roots of unity). It follows from Theorem \ref{thm:twisted characters} that $$e_\rho\KQab(\mathcal C)=\bigoplus\limits_{\gamma\in \Gamma_\rho}e_\rho\KQab(\mathcal C_{\gamma^{-1}})=\bigoplus\limits_{\gamma\in \Gamma_\rho}\Qab\cdot e^{\gamma}_\rho.$$ From this $\Gamma_\rho$-graded algebra, we obtain a central extension $0\to{\Qab}^\times \to \wtilde{\Gamma}_\rho\to\Gamma_\rho\to 0$. Our choice of the elements $e^\gamma_\rho$ determines a 2-cocycle $\varphi_\rho:\Gamma_\rho\times \Gamma_\rho\to{\Qab}^\times$. Hence we obtain
\begin{corollary}\label{cor:2cocyclerelations}
	\begin{enumerate}[label=(\roman*)]
\item If $\gamma_1,\gamma_2\in\Gamma$, $\rho_1\in\Irr(\KQab(\mathcal C_1))^{\gamma_1}$, $\rho_2\in\Irr(\KQab(\mathcal C_1))^{\gamma_2}$ and $\rho_1\neq \rho_2$, then the product of the corresponding twisted characters $\alpha^{\gamma_2}_{\rho_2}\cdot \alpha^{\gamma_1}_{\rho_1}$ equals $0$.
\item Let $\rho\in\Irr(\KQab(\mathcal C_1))$ and let $\gamma_1,\gamma_2\in\Gamma_\rho$. Then $\alpha^{\gamma_2}_{\rho}\cdot \alpha^{\gamma_1}_{\rho}=\varphi_\rho(\gamma_1,\gamma_2)\cdot f_\rho\cdot\alpha^{\gamma_1\gamma_2}_\rho$ and hence $e^{\gamma_2}_{\rho}\cdot e^{\gamma_1}_{\rho}=\varphi_\rho(\gamma_1,\gamma_2)\cdot e^{\gamma_1\gamma_2}_\rho$, where $\varphi_\rho$ is a 2-cocycle corresponding to the central extension $$0\to{\Qab}^\times \to \wtilde{\Gamma}_\rho\to\Gamma_\rho\to 0.$$ Equivalently, for $r_i\in \KQab(\mathcal C_{\gamma_i})$ we have the relation $$\rho^{\gamma_1}(r_1)\rho^{\gamma_2}(r_2)=\varphi_\rho(\gamma_1,\gamma_2)\rho^{\gamma_1\gamma_2}(r_1r_2).$$
\end{enumerate}
\end{corollary}
\begin{remark}\label{rk:ncocycle}
Let $\rho\in\Irr(\KQab(\mathcal C_1))$. For any $\gamma_1,\cdots,\gamma_n$ in the stabilizer $\Gamma_\rho$ of $\rho$, let $\varphi_\rho(\gamma_1,\cdots,\gamma_n)$ be such that $\rho^{\gamma_1}(r_1)\cdots\rho^{\gamma_n}(r_n)=\varphi_\rho(\gamma_1,\cdots,\gamma_n)\rho^{\gamma_1\cdots\gamma_n}(r_1\cdots r_n)$. These scalars will appear in our twisted categorical Verlinde formula. Furthermore, for each pair $(\rho,\gamma)$ such that $\gamma\in\Gamma_\rho$ we have chosen the elements $e^\gamma_\rho\in \KQab(\mathcal C_{\gamma^{-1}})$ to be such that $(e^\gamma_\rho)^m=1$ where $m$ is the order of $\gamma$. It will be notationally convenient to further assume that we always have $e^\gamma_\rho\cdot e^{\gamma^{-1}}_\rho=1$. It is clear that such a choice can always be made. This ensures the equality $\varphi_\rho(\gamma,\gamma^{-1})=1$.
\end{remark}

\subsection{Categorical crossed S-matrices}\label{sec:catcrosssmat}
Let us now suppose that the braided $\Gamma$-crossed fusion category $\mathcal C$ is also equipped with a ribbon or spherical structure. We refer to \cite[\S2.4.3]{DGNO},\cite[\S4.1]{Desh:17} for details, here we just give a brief sketch. In any fusion category $\mathcal C$, the autoequivalence $\mathcal C\ni C\mapsto C^{**}$ is monoidal. 

A \emph{pivotal structure} is a tensor isomorphism between the identity functor on $\mathcal C$ and the double duality functor defined above. The pivotal structure allows us to define traces of endomorphisms of objects of $\mathcal C$, and in particular we can define the categorical dimensions of objects of $\mathcal C$ as the trace of the identity endomorphism of the object. Moreover, taking categorical dimensions defines a character $\dim:\KQab(\mathcal C)\to \Qab$ and we have $\dim(C^*)=\overline{\dim(C)}\in \Qab$ for any $C\in \mathcal C$. 

A pivotal structure is said to be \emph{spherical} if the categorical dimension of any object and its dual are equal, or equivalently, if the categorical dimension is a totally real cyclotomic number. We recall the definition of a modular fusion category and $\Gamma$-crossed modular fusion category.
\begin{definition}\label{def:crossedmodcat}
A modular fusion category is a non-degenerate braided fusion category equipped with a spherical structure. A $\Gamma$-crossed modular fusion category (often also called $\Gamma$-crossed modular category) is a braided $\Gamma$-crossed fusion category $\mathcal C=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ equipped with a spherical structure such that $\mathcal C_1$ is a non-degenerate braided fusion category and each component $\mathcal C_\gamma$ is non-zero. The multiplicative central charge of a $\Gamma$-crossed modular fusion category is defined to be the multiplicative central charge of the modular category $\mathcal C_1\subset \mathcal C$. 
\end{definition}
\begin{remark}
For the definition of multiplicative central charge of a modular fusion category we refer to \cite[Def. 5.7.9 and Thm. 5.7.11]{BK:01} and \cite[\S6.2]{DGNO} where this is defined using the notion of Gauss sums of modular categories. We will not make any use of these notions in this paper. When we study the notion of modular functors in Part \ref{part:gmodfun} we will see that the multiplicative central charge can be thought of as the ``anomaly'' of the corresponding modular functor.
\end{remark}

Let $\mathcal C$ be a $\Gamma$-crossed modular fusion category. Then $\mathcal C_1$ is a modular fusion category equipped with a modular action of $\Gamma$ and each $\mathcal C_\gamma$ is equipped with a $\mathcal C_1$-module trace. Because of the spherical structure, trace of endomorphisms in $\mathcal C$, and hence categorical dimensions of objects in $\mathcal C$ are now well-defined. In this setting we can define a $P_\gamma\times P_1^\gamma$-matrix $\wtilde{S}^\gamma$ known as the unnormalized $\gamma$-crossed S-matrix as follows. 
\begin{definition}
For each $\gamma$-stable simple object $C\in P_1^\gamma$, let us choose an isomorphism $\psi_C:\gamma(C)\xrightarrow{\cong} C$ as in \cite[\S2.1]{Desh:17}, i.e. such that the induced composition $C=\gamma^m(C)\to \gamma^{m-1}(C)\to\cdots \to \gamma(C)\to C$ is the identity, where $m\in \mathbb Z$ is the order of $\gamma$. Note that this condition on $\psi_C$ determines it up to scaling by $m$-th roots of unity. For simple objects $M\in P_\gamma, C\in P_1^\gamma$, we set 
$$\wtilde{S}^\gamma_{M,C}=\tr(C\otimes M\xrightarrow{\beta_{C,M}}M\otimes C\xrightarrow{\beta_{M,C}}\gamma(C)\otimes M\xrightarrow{\psi_C\otimes\id_M} C\otimes M).$$
\end{definition}
\begin{remark}\label{rk:unitconvention}
We follow the convention from \cite{Desh:17} that in case the simple object $C\in P_1^\gamma$ is the unit $\unit$, we always choose $\psi_{\unit}:\gamma(\unit)=\unit\to \unit$ to be the identity. With this convention we see that 
$$\wtilde{S}^\gamma_{M,\unit}=\tr(\id_M)=\dim (M),$$
the categorical dimension of the object $M\in \mathcal C_\gamma$.
\end{remark}

\begin{remark}\label{rk:diffsofnotations}
The $\gamma$-crossed S-matrix as defined above is the transpose of the crossed S-matrix defined in \cite{Desh:17}. Also in {\it op. cit.} the first author only deals with unnormalized crossed S-matrices as defined above, whereas in the current paper we will mostly work with the normalized unitary crossed S-matrix as defined in Definition \ref{d:normalizedcrossedsmatrix} below. This explains the differences of notation in the categorical Verlinde formula of the two papers.
\end{remark}
In the presence of the spherical structure, we have the unnormalized S-matrix $\wtilde{S}$ of the modular fusion category $\mathcal C_1$. Using this S-matrix, we can identify $P_1\cong \Irr(\KQab(\mathcal C_1))$ as follows: $P_1\ni C\mapsto (\rho_C:[D]\mapsto \frac{\wtilde{S}_{D,C}}{\dim C})$, i.e. the S-matrix is essentially the character table of $\KQab(\mathcal C_1)$. Similarly, the $\gamma$-crossed S-matrix is essentially the table of $\gamma$-twisted characters. More precisely we recall the following results from \cite{Desh:17,Desh:18a}:
\begin{theorem}\label{thm:crossedsmatrixchartable}
(i) For $M\in P_\gamma, C\in P_1^\gamma$ the numbers $\frac{\wtilde{S}^\gamma_{M,C}}{\dim M}=\frac{\wtilde{S}^\gamma_{M,C}}{\wtilde{S}^\gamma_{M,\unit}}$ and $\frac{\wtilde{S}^\gamma_{M,C}}{\dim C}=\frac{\wtilde{S}^\gamma_{M,C}}{\wtilde{S}_{\unit,C}}$ are cyclotomic integers. For $C\in P_1^\gamma$ the linear functional ${\rho}^\gamma_C:\KQab(\mathcal C_{\gamma})\to \Qab, [M]\mapsto \frac{\wtilde{S}^\gamma_{M,C}}{\dim C}$ is the $\gamma$-twisted character associated with $\rho_C\in \Irr(\KQab(\mathcal C_1))^\gamma$.\\
(ii) The categorical dimension $\dim \mathcal C_1$ is a totally positive cyclotomic integer. We have $$\wtilde{S}^\gamma\cdot \overline{\wtilde{S}^\gamma}^T=\overline{\wtilde{S}^\gamma}^T\cdot \wtilde{S}^\gamma=\dim \mathcal C_1\cdot I.$$
\end{theorem}
For $C\in P_1$, the formal codegree $f_C=f_{\rho_C}$ of the corresponding character $\rho_C$ equals the totally positive cyclotomic integer $\frac{\dim \mathcal C_1}{\dim^2 C}$.
\begin{definition}\label{d:normalizedcrossedsmatrix}
We choose a positive square root $\sqrt{\dim \mathcal C_1}$ and define the normalized $\gamma$-crossed S-matrix to be $S^\gamma:=\frac{1}{\sqrt{\dim\mathcal C_1}}\cdot \wtilde{S}^\gamma$. The matrix $S^\gamma$ is a $P_\gamma\times P_1^\gamma$ unitary matrix with entries in $\Qab$. 
\end{definition}

\begin{remark}\label{rk:0column}
By Remark \ref{rk:unitconvention} we see that the $\unit$-th column of the normalized crossed S-matrix is given by 
$$S^\gamma_{M,\unit}=\frac{\dim M}{\sqrt{\dim \mathcal C_1}}.$$
Now the categorical dimensions are all real since they are defined using a spherical structure on $\mathcal C$. Hence all the entries in the $\unit$-th column are real numbers. 
\end{remark}

\section{Categorical twisted fusion rings and their character tables}\label{sec:twistedfusion}
We now recall from \cite[\S2.2,\S2.3]{Desh:17} the definition of categorical twisted fusion rings (also known as twisted Grothendieck rings) associated with a fusion category equipped with an autoequivalence. Let $\mathcal C$ be a finite semisimple $\mathbb C$-linear abelian category equipped with an autoequivalence $\gamma:\mathcal C\to \mathcal C$. Let $P$ denote the finite set of (isomorphism classes of) simple objects of $\mathcal C$. Consider the (non-semisimple) abelian category $\mathcal C^\gamma$ obtained by $\gamma$-equivariantization whose objects are pairs $(C,\psi)$ where $C$ is an object $\mathcal C$ and $\psi:\gamma(C)\xrightarrow\cong C$. 
\begin{definition}\label{def:categoricaltwistedfusion}
In the setting above, the twisted complexified Grothendieck group $K_{\CBbb}(\mathcal C,\gamma)$ is defined as follows:  Consider the complexified Grothendieck group $K_{\CBbb}(\mathcal C^\gamma)$ and then quotient out by the relation $[C,c\psi]=c[C,\psi]$ for each class $[C,\psi]\in K_{\CBbb}(\mathcal C^\gamma)$ and $c\in \mathbb C^\times$. We continue to use the notation $[C,\psi]$ to denote the corresponding class in the quotient $K_{\CBbb}(\mathcal C,\gamma)$.
\end{definition}

\begin{proposition}\label{p:dimoftwistedspace}
	(i) We have $\dimK_{\CBbb}(\mathcal C,\gamma)=|P^\gamma|$, the number of simple objects stabilized by $\gamma$. For each $C\in P^\gamma$, choose an isomorphism $\psi_C:\gamma(C)\to C$. Then the set $\{[C,\psi_C]|C\in P^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C,\gamma)$.\newline
	(ii) If $\mathcal C$ also has a monoidal structure and if $\gamma$ is a monoidal autoequivalence, then $K_{\CBbb}(\mathcal C,\gamma)$ has the structure of a $\mathbb C$-algebra, which we call the (complexified) twisted fusion ring.
\end{proposition}
\begin{proof}
	Note that we can consider $\mathcal C$ as a module category over the monoidal category $\Vec$ of finite dimensional $\mathbb C$-vector spaces. Now the statement (i) follows from the proof of \cite[Prop. 2.4(i)]{Desh:17}. We essentially need to prove that for any $\gamma$-orbit $O\subset P$ of cardinality at least 2, $K_{\CBbb}(\mathcal C_O,\gamma)=0$, where $\mathcal C_O\subset \mathcal C$ is the full subcategory generated by the simple objects in $O$. As in {\it loc. cit.} this can be done by looking at the isomorphism classes of simple objects in $\mathcal C_O^\gamma$ and noting that $1-\zeta\in \mathbb C^\times$ must act by 0 on $K_{\CBbb}(\mathcal C_O,\gamma)$ for each $|O|$-th root of unity $\zeta\in \mathbb C^\times$. Now to prove (ii), it is straightforward to check that the subspace of $K_{\CBbb}(\mathcal C^\gamma)$ that we are quotienting by is an ideal.
\end{proof}

Suppose we have an object $(A,\psi)\in \mathcal C^\gamma$ for an abelian category $\mathcal C$. For each simple object $C$, define the multiplicity vector space $N_A^C:=\Hom(C,A)$. We obtain the isomorphism of vector spaces
$$N_A^C=\Hom(C,A)\cong \Hom(\gamma(C),\gamma(A))\xrightarrow{\psi\circ(\cdot)}\Hom(\gamma(C),A)=N_A^{\gamma(C)}.$$
Now for each simple object in $\mathcal C$ stabilized by $\gamma$ let us choose an isomorphism $\psi_C:\gamma(C)\xrightarrow\cong C.$ These choices give us the linear isomorphisms $N_C^{\gamma(C)}\xrightarrow{}N_A^C$ and hence the linear automorphisms $$\phi_{A,\psi}^{C,\psi_C}:N_A^C\xrightarrow{\cong}N_A^C.$$ Then using the above proposition, we have the following equality in the twisted Grothendieck vector space $K_{\CBbb}(\mathcal C,\gamma)$
\begin{equation}\label{eq:equalityintwistedgrothendieck}
[A,\psi]=\sum\limits_{C\in P^\gamma}\tr(\phi_{A,\psi}^{C,\psi_C})[C,\psi_C].
\end{equation}



\subsection{The twisted fusion ring in terms of traces on multiplicity spaces} Let us now assume that $\mathcal C$ is a weakly fusion category equipped with a monoidal action of a finite group $\Gamma$. Let $\gamma\in \Gamma$ be an element of order $m$. In particular we have an equivalence $\gamma^m\cong \id_{\mathcal C}$ of monoidal functors. Then the $\langle\gamma\rangle\cong \mathbb Z/m\mathbb Z$-equivariantization $\mathcal C^{\langle\gamma\rangle}$ is also a weakly fusion category. We can consider the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ as a quotient of $K_{\CBbb}(\mathcal C^{\langle\gamma\rangle})$ modulo the relations $[C,\zeta\psi]=\zeta[C,\psi]$ for any $m$-th root of unity $\zeta$ (see \cite[\S2.3]{Desh:17} for details). As in {\it loc. cit.} the weak duality on $\mathcal C^{\langle\gamma\rangle}$ induces a $\mathbb C$-semilinear involution $(\cdot)^*$ on $K_{\CBbb}(\mathcal C,\gamma)$ as a vector space.

Consider objects $(C_1,\psi_1),\cdots (C_n,\psi_n)$ in $\mathcal C^{\langle\gamma\rangle}$. Then we have the following composition of natural isomorphisms 
\begin{align*}\phi_{C_1,\psi_1,\cdots,C_n,\psi_n}:&\Hom(\unit,C_1\otimes\cdots \otimes C_n)\xrightarrow{\cong}\Hom(\gamma(\unit),\gamma(C_1\otimes\cdots \otimes C_n))\\
&\quad \xrightarrow{\cong}\Hom(\unit,\gamma(C_1)\otimes\cdots \otimes \gamma(C_n))\xrightarrow\cong\Hom(\unit,C_1\otimes\cdots \otimes C_n).\end{align*}

Now let $A,B,C$ be simple objects of $\mathcal C$. Since we have assumed that $\mathcal C$ is weakly fusion, the multiplicity space $N^C_{A\otimes B}=\Hom(C,A\otimes B)$ is canonically identified with $\Hom(\unit,{ }^*C\otimes A\otimes B)$. 


\begin{proposition}\label{p:tracesonhomspaces}
For each simple object $C\in \mathcal C$ stabilized by $\gamma$, let us fix a $\langle\gamma\rangle$-equivariant structure $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C^{\langle\gamma\rangle}$. Then the set $\{[C,\psi_C]|C\in P^\gamma\}$ is a basis of the $\gamma$-twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ and for each $A,B\in P^\gamma$ we have the following equality in the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$
\begin{equation}\label{eq:equalityintwistedfusionring}
[A,\psi_A]\cdot[B,\psi_B]=\sum\limits_{C\in P^\gamma}\tr(\phi_{{}^*C,{}^*\psi_C,A,\psi_A,B,\psi_B})[C,\psi_C].
\end{equation}
In other words, the fusion coefficients for the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ with respect to the basis $\{[C,\psi_C]|C\in P^\gamma\}$ are obtained by taking the traces of $\gamma$ on the multiplicity spaces  $N^C_{A\otimes B}=\Hom(C,A\otimes B)=\Hom(\unit,{ }^*C\otimes A\otimes B)$.
\end{proposition}
\begin{proof}
The result follows by using (\ref{eq:equalityintwistedgrothendieck}) for the tensor product $(A,\psi_A)\otimes (B,\psi_B)\in \mathcal C^{\langle\gamma\rangle}$.
\end{proof}
\begin{remark}\label{rk:twistedfusionringsagree}
This means that the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ can also be defined by taking the fusion rules (see Section \ref{section:hongfusion} below) obtained by tracing out automorphisms of multiplicity spaces. This approach was used in \cite{Hong1,Hong} to define twisted fusion rings at level $\ell$ associated to a diagram automorphism of a simple Lie algebra $\frg$.
\end{remark}
\subsection{Twisted fusion ring of fusion categories}
Let $\mathcal C$ be a fusion category with a $\Gamma$-action and let $\gamma\in \Gamma$ be an element of order $m$. Then the equivariantization $\mathcal C^{\langle\gamma\rangle}$ is also a fusion category and hence by Section \ref{sec:grothringfrobalg} the extension by scalars of the Grothendieck ring, $K_{\mathbb Z[\omega]}(\mathcal C^{\langle\gamma\rangle})$ is a Frobenius $\ast$-$\mathbb Z[\omega]$-algebra where we take $\omega$ to be a primitive $m$-th root of unity. As in \cite[\S2.3]{Desh:17} we can define the $\gamma$-twisted fusion ring $K_{\mathbb Z[\omega]}(\mathcal C,\gamma)$ to be the quotient of the above Frobenius $\ast$-algebra obtained by identifying $[C,\omega\psi]=\omega[C,\psi]$ for each $(C,\psi)\in \mathcal C^{\langle\gamma\rangle}$. As always, for each $\gamma$-stable simple object $C\in P^\gamma$, let us fix an equivariantization $(C,\psi_C)\in \mathcal C^{\langle\gamma\rangle}$. Then by \cite{Desh:17} we have
\begin{proposition}\label{p:twistedfusionfrobalg}
The $\gamma$-twisted fusion ring $K_{\mathbb Z[\omega]}(\mathcal C,\gamma)$ is a Frobenius $\ast$-$\mathbb Z[\omega]$-algebra with an orthonormal basis given by $\{[C,\psi_C]|C\in P^\gamma\}$ and hence the same is true for the extensions of scalars $\KQab(\mathcal C,\gamma)$ and $K_{\CBbb}(\mathcal C,\gamma)$.
\end{proposition}



\subsection{Character tables of twisted fusion rings of modular categories}
Let us now assume that $\mathcal C=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ is a $\Gamma$-crossed modular category. In particular, we have a modular action of $\Gamma$ on the identity component $\mathcal C_1$ which is a modular category. Hence for each $\gamma\in \Gamma$ we have the twisted fusion ring $K_{\CBbb}(\mathcal C_1,\gamma)$ which in this case is a commutative Frobenius $\ast$-algebra that has been studied in \cite{Desh:17}. We recall that for each $\gamma\in \Gamma$, $P_\gamma$ denotes the set of simple objects of $\mathcal C_\gamma$. For each simple object $C$ of $\mathcal C_1$ stabilized by $\gamma$, we choose an isomorphism $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C_1^{\langle\gamma\rangle}$. The set $\{[C,\psi_C]|C\in P_1^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C_1,\gamma)$. It was proved in \cite[Thm. 2.12(i)]{Desh:17} that the categorical $\gamma$-crossed S-matrix $S^\gamma$ (it is a $P_\gamma\times P_1^\gamma$ matrix, see Definition \ref{d:normalizedcrossedsmatrix}) is essentially the character table of $K_{\CBbb}(\mathcal C_1,\gamma)$:
\begin{theorem}\label{thm:chartableoftwistedfusion}
	Let $M$ be a simple object of $\mathcal C_\gamma$. For each $C\in P_1^\gamma$, define $\chi_M([C,\psi_C])=\frac{S^\gamma_{M,C}}{S^{\gamma}_{M,\unit}}$ and extend linearly. Then $\chi_M:K_{\CBbb}(\mathcal C_1,\gamma)\to \mathbb C$ is a character and the set $\{\chi_M|M\in P_\gamma\}$ is the set of all irreducible characters of $K_{\CBbb}(\mathcal C_1,\gamma)$. 
\end{theorem}


\begin{remark}
In fact the $\gamma$-twisted fusion ring can be defined over $\mathbb Z[\omega]$ and hence over $\Qab$, where $\omega$ is a primitive $m$-th root of unity (see \cite[\S2.2]{Desh:17} for details). Hence $\KQab(\mathcal C_1,\gamma)$ is also well-defined and the above theorem shows that it is split over $\Qab$.
\end{remark}


\begin{remark}
Let us compare Theorems \ref{thm:crossedsmatrixchartable} and  \ref{thm:chartableoftwistedfusion}. On the one hand Theorem \ref{thm:crossedsmatrixchartable} says that the $\gamma$-crossed S-matrix gives the $\gamma$-twisted character table of the untwisted fusion ring $\KQab(\mathcal C_1)$. On the other hand Theorem \ref{thm:chartableoftwistedfusion} says that the $\gamma$-crossed S-matrix also gives the usual character table of the $\gamma$-twisted fusion ring $\KQab(\mathcal C_1,\gamma)$. Both these properties are going to be important for us.
\end{remark}
























\section{A categorical  twisted Verlinde formula}\label{sec:catverlinde}
We will now state and prove a Verlinde formula for braided $\Gamma$-crossed categories. For $\gamma_1,\gamma_2\in \Gamma$, $A\in P_{\gamma_1}, B\in P_{\gamma_2}, C\in P_{\gamma_1\gamma_2}$ we will compute the fusion coefficient $\nu_{A,B}^C$ in terms of the crossed S-matrices, or equivalently, in terms of the twisted character tables. By the rigid duality, it is clear that $$\nu_{A,B}^C=\nu_{B^*,A^*}^{C^*}=\dim\Hom(\unit,A\otimes B\otimes C^*)=\nu([A]\cdot[B]\cdot[C^*]).$$ Note that the fusion product in $\KQab(\mathcal C)$ is given by 
$$[A]\cdot [B]=\sum\limits_{C\in P_{\gamma_1\gamma_2}}\nu^C_{A,B}[C].$$

\begin{remark}
The coefficients $\nu_{A,B}^C$ described above are multiplicities in the Grothendieck ring $\KQab({\mathcal C})$ of the braided $\Gamma$-crossed category and not in the categorical $\gamma$-twisted fusion ring $K_{\Qab}(\mathcal C_1, \gamma)$. In particular the $\nu^C_{A,B}$ are non-negative integers. As we will see, it is these numbers which equal the ranks of bundles conformal blocks where the base curve is $\mathbb P^1$ with 3 points having ramification given by $\gamma_1,\gamma_2$ and $\gamma_2^{-1}\gamma_1^{-1}\in \Gamma$. On the other hand, by Proposition \ref{p:twistedfusionfrobalg}, the fusion coefficients in the twisted fusion ring $\KQab(\mathcal C_1,\gamma)$ lie in the ring $\mathbb Z[\omega]$ where $\omega$ is a primitive $|\gamma|$-th root of unity and need not be non-negative integers in general.
\end{remark}
More generally, let $\gamma_1,\cdots,\gamma_n\in \Gamma$ with $\gamma_1\cdots\gamma_n=1$. We will in fact prove an $n$-pointed twisted Verlinde formula to compute $\dim\Hom(\unit,A_1\otimes\cdots\otimes A_n)=\nu([A_1]\cdots[A_n])$ for $A_i\in P_{\gamma_i}$. We will use the following:
\begin{lemma}\label{lem:unfixedchars}
Let $\gamma_1,\cdots,\gamma_n\in \Gamma$ and let $A_i\in\mathcal C_{\gamma_i}$, so that $A_1\otimes\cdots \otimes A_n\in \mathcal C_{\gamma_1\cdots\gamma_n}$. Let $\rho\in \Irr(\KQab(\mathcal C_1))^{\gamma_1\cdots\gamma_n}$ be such that (the $\gamma_1\cdots\gamma_n$-twisted character) $\rho^{\gamma_1\cdots\gamma_n}([A_1]\cdots[A_n])\neq 0$. Then $\rho\in \Irr(\KQab(\mathcal C_1))^{\langle\gamma_1,\cdots,\gamma_n\rangle}$. 
\end{lemma}
\begin{proof}
Consider any $A\in \mathcal C_1$.. Then by the crossed braiding isomorphisms, for each $i$ we have $A\otimes (A_1\otimes\cdots\otimes A_i)\cong (A_1\otimes\cdots\otimes A_i)\otimes A\cong (\gamma_1\cdots\gamma_i)(A)\otimes (A_1\otimes\cdots\otimes A_i)$. Hence for each $i$
$$A\otimes A_1\otimes\cdots\otimes A_n\cong (\gamma_1\cdots\gamma_i)(A)\otimes A_1\otimes\cdots\otimes A_n\mbox{ as objects of }\mathcal C_{\gamma_1\cdots\gamma_n}.$$ 
Hence $\rho^{\gamma_1\cdots\gamma_n}([A]\cdot[A_1]\cdots[A_n])=\rho^{\gamma_1\cdots\gamma_n}((\gamma_1\cdots\gamma_n)[A]\cdot[A_1]\cdots[A_n])$. Hence $$\rho([A])\cdot\rho^{\gamma_1\cdots\gamma_n}([A_1]\cdots[A_n])=\rho(\gamma_1\cdots\gamma_i[A])\cdot\rho^{\gamma_1\cdots\gamma_n}([A_1]\cdots[A_n]).$$ Since we have assumed that $\rho^{\gamma_1\cdots\gamma_n}([A_1]\cdots[A_n])\neq 0$, we conclude that $$\rho([A])=\rho(\gamma_1\cdots\gamma_i[A])$$ for any $A\in\mathcal C_1$ and $1\leq i\leq n$. Hence $\rho\in \Irr(\KQab(\mathcal C_1))^{\gamma_1\cdots\gamma_i}$ for each $i$. Hence we conclude that $\rho$ is fixed by each $\gamma_i$ as desired.
\end{proof}
\begin{theorem}\label{thm:twisted verlinde} (Categorical twisted Verlinde formula in genus 0.)
Let $\gamma_1,\cdots,\gamma_n\in \Gamma$ with the condition $\gamma_1\cdots\gamma_n=1$. Let $A_i\in \mathcal C_{\gamma_i}$ for $1\leq i \leq n$. Then
\begin{enumerate}[label=(\roman*)]
\item
$$\dim\Hom(\unit,A_1\otimes \cdots \otimes A_n)=\sum\limits_{{{\rho\in\Irr(\KQab(\mathcal C_1))^{\langle\gamma_1,\cdots,\gamma_n\rangle}}}}\frac{{\rho^{\gamma_1}([A_1])}\cdots\rho^{\gamma_n}([A_n])}{f_\rho \cdot\varphi_\rho(\gamma_1,\cdots,\gamma_n)},$$
where $f_\rho$ is the formal codegree and $\varphi_\rho(\gamma_1,\cdots,\gamma_n)$ are the scalars defined in Remark \ref{rk:ncocycle}.
\item Now let $A_i\in P_{\gamma_i}$ be simple objects. If $\mathcal C$ is equipped with a spherical structure, then in terms of the crossed S-matrices we have
$$\dim\Hom(\unit,A_1\otimes\cdots\otimes A_n)=\sum\limits_{D\in P_1^{\langle\gamma_1,\cdots,\gamma_n\rangle}}\frac{{S^{\gamma_1}_{A_1,D}}\cdots{S^{\gamma_n}_{A_n,D}}}{{S_{\unit,D}}^{(n-2)}\cdot \varphi_D(\gamma_1,\cdots,\gamma_n)}.$$
\end{enumerate}
\end{theorem}
\begin{proof}
To prove (i), observe that in the Frobenius $*$-algebra $\KQab(\mathcal C_1)$ the unit $$1=\sum\limits_{\rho\in \Irr(\KQab(\mathcal C_1))}\frac{\alpha_\rho}{f_\rho}$$ is expressed as a sum of the minimal idempotents. Using the fact $\KQab(\mathcal C_1)\cong \KQab(\mathcal C_1)^*$, this translates to the equality $\nu=\sum\limits_{\rho\in \Irr(\KQab(\mathcal C_1))}\frac{\rho}{f_\rho}$ in $\KQab(\mathcal C_1)^*$. Hence
\begin{eqnarray*}
\dim\Hom(\unit,A_1\otimes\cdots\otimes A_n)&=&\nu([A_1]\cdots[A_n]),\\
&=&\sum\limits_{\rho\in \Irr(\KQab(\mathcal C_1))}\frac{\rho([A_1]\cdots[A_n])}{f_\rho},\\
&=&\sum\limits_{\rho\in \Irr(\KQab(\mathcal C_1))^{\langle\gamma_1,\cdots,\gamma_n\rangle}}\frac{\rho([A_1]\cdots[A_n])}{f_\rho}\mbox{ }\mbox{ }\mbox{(by Lemma \ref{lem:unfixedchars})},\\
&=&\sum\limits_{\rho\in \Irr(\KQab(\mathcal C_1))^{\langle\gamma_1,\cdots,\gamma_n\rangle}}\frac{\rho^{\gamma_1}([A_1])\cdots\rho^{\gamma_n}([A_n])}{f_\rho\cdot \varphi_{\rho}(\gamma_1,\cdots,\gamma_n)}.\\
\end{eqnarray*}
The last line follows from Remark \ref{rk:ncocycle}. Now 
to prove (ii), observe that in the spherical setting we have a $\Gamma$-equivariant bijection $P_1\cong\Irr(\KQab(\mathcal C_1))$ denoted by $D\leftrightarrow \rho_D$. By Theorem \ref{thm:crossedsmatrixchartable} and Definition \ref{d:normalizedcrossedsmatrix} for each $D\in P_1^{\langle\gamma_1,\cdots,\gamma_n\rangle}$ we have $\rho_D^{\gamma_i}([A_i])=\frac{S^{\gamma_i}_{A_i,D}}{S_{\unit,D}}$ and the formal codegree $f_D=f_{\rho_D}=\frac{\dim \mathcal C_1}{\dim^2 D}=\frac{1}{(S_{\unit,D})^2}$. Statement (ii) now follows from (i).
\end{proof}
\subsection{A higher genus twisted Verlinde formula}\label{sss:highergenus}
In order to motivate the higher genus Verlinde formula for twisted conformal blocks, let us derive a categorical version of such a formula. Let $a,b\in \Gamma$. For a simple object $A\in P_a$, $b(A^*)$ is a simple object of $\mathcal C_{ba^{-1}b^{-1}}$. We define the object 
\begin{equation}\label{eq:omegaab}
\Omega_{a,b}:=\bigoplus\limits_{A\in P_a}A\otimes b(A^*)\in \mathcal C_{[a,b]}, \mbox{ where }[a,b]=aba^{-1}b^{-1}.
\end{equation}
\begin{lemma}\label{lem:fixedbycommutator}
Let $a,b\in \Gamma$ and let $\rho\in\Irr(\KQab(\mathcal C_1))^{[a,b]}$ be a character fixed by the commutator $[a,b]$. Then 
$$\rho^{[a,b]}([\Omega_{a,b}])=\begin{dcases*}
\frac{f_\rho}{\varphi_\rho(a,b,a^{-1},b^{-1})} & if $\rho\in \Irr(\KQab(\mathcal C_1))^{\langle a,b\rangle}$ (see Remark \ref{rk:ncocycle})\\
0 & else.
\end{dcases*}$$
\end{lemma}
\begin{proof}
We have the following equality $$\rho^{[a,b]}([\Omega_{a,b}])=\rho^{[a,b]}\left(\sum\limits_{A\in P_a}[A]\cdot b[A^*]\right)=\sum\limits_{A\in P_a}\rho^{[a,b]}\left([A]\cdot b[A^*]\right).$$ By Lemma \ref{lem:unfixedchars}, if $\rho^{[a,b]}\left([A]\cdot b[A^*]\right)\neq 0$ for some $A\in P_a$, then we must have $\rho$ as an element in $\Irr(\KQab(\mathcal C_1))^{\langle a, ba^{-1}b^{-1}\rangle}$. Otherwise each individual term in the summation and hence  $\rho^{[a,b]}([\Omega_{a,b}])$ must be zero. Hence let us assume that $\rho\in \Irr(\KQab(\mathcal C_1))^{\langle a, ba^{-1}b^{-1}\rangle}$. In this case we get
\begin{equation}\label{eq:omegaab}
\rho^{[a,b]}([\Omega_{a,b}])=\sum\limits_{A\in P_a}\frac{\rho^{a}([A])\cdot \rho^{ba^{-1}b^{-1}}(b[A^*])}{\varphi_\rho(a,ba^{-1}b^{-1})}=\sum\limits_{A\in P_a}\frac{\rho^{a}([A])\cdot (\rho^{ba^{-1}b^{-1}}\circ b)([A^*])}{\varphi_\rho(a,ba^{-1}b^{-1})}.
\end{equation}
Recall that here $\rho^{ba^{-1}b^{-1}}:\KQab(\mathcal C_{ba^{-1}b^{-1}})\to \Qab$ is the restriction of some choice of character 
$$\wtilde{\rho^{ba^{-1}b^{-1}}}:\KQab(\mathcal C_{\langle ba^{-1}b^{-1}\rangle})\to \Qab\mbox{ extending }\rho:\KQab(\mathcal C_1)\to \Qab.$$ 
Hence $\wtilde{\rho^{ba^{-1}b^{-1}}}\circ b:\KQab(\mathcal C_{\langle a^{-1}\rangle})\to \Qab$ is a character extending $\rho\circ b:\KQab(\mathcal C_1)\to \Qab.$ Hence the composition ${\rho^{ba^{-1}b^{-1}}}\circ b:\KQab(\mathcal C_{a^{-1}})\to \Qab$ differs from the chosen twisted character $(\rho\circ b)^{a^{-1}}$ by some $|\langle{a}\rangle|$-th root of unity. Hence by the orthogonality of twisted characters (Theorem \ref{thm:twisted characters}(iv)) and (\ref{eq:omegaab}), we get that $\rho^{[a,b]}([\Omega_{a,b}])=0$ if $\rho\neq \rho\circ b$. In other words, we have proved that if $\rho^{[a,b]}([\Omega_{a,b}])\neq 0$, then we must have $\rho\in \Irr(\KQab(\mathcal C_1))^{\langle a,b\rangle}$.

Hence now suppose that $a,b\in \Gamma_\rho$. Again by the twisted orthogonality relations we have $\sum\limits_{A\in P_a}\rho^a([A])\cdot \overline{\rho^{a}([A])}=\sum\limits_{A\in P_a}\rho^a([A])\cdot {\rho^{a^{-1}}([A^*])}=f_\rho$. Also using Remark \ref{rk:ncocycle}, we have $\rho^{ba^{-1}b^{-1}}\circ b=\frac{\rho^{a^{-1}}}{\varphi_{\rho}(b,a^{-1},b)}$. Combining with (\ref{eq:omegaab}) we complete the proof of the lemma.
\end{proof}
Finally using Theorem \ref{thm:twisted verlinde} and Lemma \ref{lem:fixedbycommutator} we obtain the following:
\begin{corollary}\label{cor:highergenus} (Categorical twisted Verlinde formula for any genus.)
Let $g,n$ be non-negative integers and let $a_1,\cdots,a_g, b_1,\cdots, b_g, m_1,\cdots , m_n$ be elements in $ \Gamma$ that  satisfy the relation
$[a_1,b_1]\cdots[a_g,b_g]\cdot m_1\cdots m_n=1.$ Let $\Gamma^\circ\leq \Gamma$ be the subgroup generated by $a_j,b_j,m_i$. Let $M_i\in \mathcal C_{m_i}$. Then
\begin{align*}
&\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_g,b_g}\otimes M_1\otimes\cdots\otimes M_n)\\ & \quad = \sum\limits_{\rho\in\Irr(\KQab(\mathcal C_1))^{\Gamma^\circ}}\frac{({f_\rho)}^{g-1}\cdot\rho^{m_1}([M_1])\cdots\rho^{m_n}([M_n])}{\varphi_\rho(a_1,b_1,a_1^{-1},b_1^{-1},\cdots,m_1,\cdots,m_n)}.\end{align*} If $\mathcal C$ is equipped with a spherical structure and if $M_i\in P_{m_i}$ are simple then
\begin{align*}
\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_g,b_g}\otimes M_1\otimes\cdots\otimes M_n)\\ \quad =\sum\limits_{D\in P_1^{\Gamma^\circ}}\frac{\left(\frac{1}{S_{\unit,D}}\right)^{n+2g-2}\cdot S^{m_1}_{M_1,D}\cdots S^{m_n}_{M_n,D}}{\varphi_D(a_1,b_1,a_1^{-1},b_1^{-1},\cdots,m_1,\cdots,m_n)}.\end{align*}
\end{corollary}
\begin{remark}
The fundamental group of a smooth complex genus $g$ curve with $n$ punctures has a presentation $\langle\alpha_1,\beta_1,\cdots,\alpha_g,\beta_g,\gamma_1,\cdots,\gamma_n|[\alpha_1,\beta_1]\cdots[\alpha_g,\beta_g]\gamma_1\cdots\gamma_n=1\rangle$. In other words, the choice of the elements $a_j,b_j,m_i\in \Gamma$ in the above corollary is equivalent to the choice of a group homomorphism from the fundamental group to $\Gamma$ and the subgroup $\Gamma^\circ$ is just the image of this homomorphism.
\end{remark}

\part{Conformal blocks for twisted affine Kac-Moody Lie algebras}\label{part:2}In this part, we recall notations about twisted Kac-Moody algebras and their representation theory. We give a coordinate free description of twisted conformal blocks following \cite{Tsuchimoto} over the moduli space of $n$-pointed admissible $\Gamma$-covers $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$. In Section \ref{sec:propertiesofvacua}, we discuss how the vector bundle of twisted conformal blocks behave under natural maps between the moduli space $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$. For admissible covers of $\mathbb{P}^1\rightarrow \mathbb{P}^1$  ramified at two points, we embedd twisted conformal blocks into the space of invariants of  tensor product of representations  and get natural bounds on the dimensions of these conformal blocks. Section \ref{sec:fusionforaut} is dedicated to defining the twisted fusion rings $\mathcal{R}_{\ell}(\frg,\gamma)$ and their characters. In Section \ref{sec:threepointmtc}, we state one of the main theorems (See Theorem \ref{thm:oneofmain}) of the paper of contructing a $\Gamma$-crossed modular fusion category from twisted conformal blocks. Using Theorem \ref{thm:oneofmain}, we deduce the three point twisted Verlinde formula (Theorem \ref{thm:forkumar}) where the base curve is $\mathbb{P}^1$. We also relate the categorical crossed S-matrices discussed in Part I with characters of the twisted fusion ring. Section  \ref{section:crossedS}  is dedicated to compute the crossed S-matrices as twisted Kac-Moody $S$-matrices and some computations with these matrices. Finally we end Part II, by reconstructing twisted conformal blocks using the Beilinson-Bernstein localization and given a flat projective connection with logarithmic singularities. We also derived a formula for the log Atiyah algebra of the associated projective connection in terms of natural line bundle on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$.


\section{Twisted Kac-Moody Lie algebras and their representations}\label{sec:repofrep} Our goal is to apply the Verlinde formula for braided crossed categories to conformal blocks for twisted affine Lie algebras. We first recall following Kac \cite{Kac} some notations and facts about twisted Kac-Moody Lie algebras and their representations. Our notations and conventions will be similar to \cite{Kac, KH}, with 
key differences at some places. 


\subsection{Twisted affine Lie algebras}\label{sec:affineLiealgtwisted}
Let $\gamma$ be an automorphism of a finite dimensional simple Lie algebra $\frg$ of 
order $|\gamma|$. We
fix a $|\gamma|$-th root of unity $\epsilon:=e^{\frac{2\pi \sqrt{-1}}{|\gamma|}}$ of unity and then we have an eigen-decomposition $\frg=\oplus_{i=0}^{|\gamma|-1}\frg_i$, where $$\frg_i:=\{X\in \frg| \gamma(X)=\epsilon^{i}X\}.$$
In particular $\frg_{0}$ (also denoted by $\frg^{\gamma}$) is the Lie subalgebra of $\frg$ invariant
under $\gamma$.
The automorphism $\gamma$ induces a natural automorphism $\gamma$ of the affine Lie algebra 
$
\frg\otimes \mathbb{C}((t))\oplus \mathbb{C}c$, where $c$ is a central element and the Lie bracket is defined by the formula 
$$[X\otimes f, Y\otimes g]=[X,Y]\otimes fg+ (X,Y)_{\frg}\operatorname{Res}_{t=0}gdf\cdot c,$$ 
where 
$(,)_{\frg}$ is the normalized Killing form on $\frg$ such that $(\theta,\theta)=2$ for any long root $\theta$ of $\frg$. Note that in the above action, we let $\gamma$ act on $\mathbb{C}((t))$ by the formula $\gamma.t:=\epsilon^{-1}t$.  

We define the {\em twisted affine Lie algebra} $\widehat{L}(\frg,\gamma):=(\frg\otimes \mathbb{C}((t))\oplus \mathbb{C}c)^{\gamma}$.
Using the eigen-decomposition of $\frg$, we get 
$$\widehat{L}(\frg,\gamma)=\oplus_{i=0}^{|\gamma|-1}\frg_i\otimes \mathcal{A}_i\oplus \mathbb{C}c,$$ 
where $\mathcal{A}_i=\{f(t)\in \mathbb{C}((t))|\gamma(f(t))=\epsilon^{-i}f(t)\}$. The Lie bracket is defined by the formula:
$$[X\otimes f, Y\otimes g]=[X,Y]\otimes fg+ \frac{1}{|\gamma|}(X,Y)_{\frg}\operatorname{Res}_{t=0}gdf\cdot c,$$ 
where $X\otimes f$ and $Y\otimes g$ are elements of $(\frg\otimes \mathbb{C}((t)))^{\gamma}$. 
The classification \cite[Proposition 8.1]{Kac} of finite order automorphisms  of $\frg$ tells us: 
\begin{proposition}\label{prop:classdia}Let $\gamma$ be an automorphism of $\frg$ of order $|\gamma|$.
	Then there exists
	a Borel subalgebra 
	$\mathfrak{b}$ of $\frg$ containing a Cartan subalgebra $\mathfrak{h}$ such
	that $$\gamma=\sigma\exp(\operatorname{ad}\frac{2\pi{\sqrt{-1}}}{|\gamma|}h),$$ where $\sigma$ is 
	a diagram automorphism of $\frg$, such that we have the following:
	\begin{itemize}
		\item Both $\gamma$ and $\sigma$ preserve $\mathfrak{h}$.
		\item $h$ is a element of the subalgebra of $\mathfrak{h}$ fixed
		by $\sigma$. 
		\item $\sigma$ preserves a set of simple roots $\Pi'=\{\alpha'_1,\dots,\alpha'_{\rank{\frg}}\}$ and $\alpha'_i(h)\in \mathbb{Z}$ for
		each $1\leq i\leq \rank{\frg}$. 
		\item $\sigma$ and $\exp(\operatorname{ad}\frac{{2\pi}{\sqrt{-1}}}{|\gamma|}h)$ 
		commute.
	\end{itemize}
\end{proposition}
We know that diagram automorphisms of finite dimensional simple 
Lie algebras have 
been classified and the order $m$ of $\sigma$ is in the set $\{1,2,3\}$. Now suppose $\gamma$ and $\sigma$ are 
related by Proposition \ref{prop:classdia}, then $m$ divides $|\gamma|$. Consider the following 
natural map 
\begin{equation}
\label{eqn:basicisomor}
\phi_{\sigma,\gamma}:\widehat{L}(\frg,\sigma)\rightarrow 
\widehat{L}(\frg,\gamma), \ X[t^{j}]\rightarrow X[t^{\frac{|\gamma|}{m}j+k}],
\ c\rightarrow c,
\end{equation} where $X$ is an $\epsilon^{\frac{|\gamma|}{m}j}$-eigenvector of $\frg$ and a $k$-eigenvector for $\exp(\operatorname{ad}\frac{{2\pi}{\sqrt{-1}}}{|\gamma|}h)$.  
By Proposition 8.6 in \cite{Kac}, we 
get that the map in Equation \eqref{eqn:basicisomor} is an isomorphism of Lie algebras. Thus 
we are reduced to the case of studying twisted affine Lie algebras when $\gamma$ is a diagram automorphism of $\frg$. 


\subsection{Twisted affine Kac-Moody Lie algebras}\label{sec:twistedaffinekmnew}Let $X_N$ denote a type
of finite dimensional complex Lie algebra of $\rank{N}$ (as in the classification in \cite{Kac})  
and the 
associated Lie algebra is $\frg(X_N)$. Similarly, let $X_N^{(m)}$ be the type of the  affine Kac-Moody
Lie algebra associated to a diagram automorphism $\gamma$ of $\frg(X_N)$ of order $m$. 
The corresponding Lie algebra of type $X_{N}^{(m)}$ 
will be denoted by $\frg(X_N^{(m)})$. Our {\em numbering} of the vertices of the Dynkin 
diagram of $\frg(X_N)$ and $\frg(X_N^{(m)})$ is
the same as in \cite{Kac}.

Let $\mathfrak{H}$ be a
Cartan subalgebra of $\mathfrak{g}(X_N^{(m)})$ and let $\mathfrak{H}^{*}$ denote
its dual. Denote the set of simple roots  $\prod=\{ \alpha_0,\alpha_1,\dots,\alpha_N\}$ and
the simple coroots $\prod^{\vee}=\{\alpha_0^{\vee},\dots, \alpha_N^{\vee}\}$.  Since
we have fixed our numbering on
the set of the vertices of the Dynkin diagram of $X_N^{(m)}$, we let $a_0,\dots, a_N$ be 
the Coxeter labels (see Page 80 in \cite{Kac}) and $a_0^{\vee}, \dots, a_N^{\vee}$ be 
the dual Coxeter labels of the affine Lie algebra $\mathfrak{g}(X_N^{(m)})$.  
The root lattice and coroot lattice of the Kac-Moody Lie algebra
will be denoted by $Q$ and $Q^{\vee}$ respectively. The center 
of the affine Kac-Moody Lie algebra $\mathfrak{g}(X_N^{(m)})$ 
is one dimensional and is generated by the
element $K:=\sum_{i=0}^{N}a_i^{\vee}\alpha_i^{\vee}$.
Similarly consider the following:
\begin{enumerate}\label{enu:notation}
	\item $\delta:=\sum_{i=0}^N a_i\alpha_i \in \mathfrak{H}^*$.
	\item $\theta:=\sum_{i=1}^{N}a_i\alpha_i$.

\end{enumerate}
\iffalse
The following result can be found in \cite[Proposition 6.4]{Kac}
\begin{proposition}
	\label{prop:thetadescription}The element $\theta$ defined above can be explicitly  described as
	\begin{enumerate}
		\item If $m=1$, then the element $\theta$ is the unique longest root of $\mathring{\mathfrak{g}}$ of height $\sum_{i=1}^Na_i$.
		\item If $m=2$ and $X_N=A_{2n}$, the  element $\theta$ is the unique longest root of $\mathring{\mathfrak{g}}$ of height $\sum_{i=1}^Na_i$.
		\item If $m\neq 1$ and $X_N\neq A_{2n}$, then the element $\theta$ is the unique shortest root of maximal height $\sum_{i=0}^{N}a_i-1$. 
	\end{enumerate}
\end{proposition}
\fi
\subsubsection{Normalized Invariant Bilinear form}
We now describe the induced normalized invariant
bilinear form on $\mathfrak{H}$ and  $\mathfrak{H}^*$. First, we fix an element $d \in \mathfrak{H}$ 
which satisfies the conditions $\alpha_i(d)=0$ for $1\leq i \leq N$ and $\alpha_0(d)=1$. Such an element is
defined up to a summand by $K$. The element $\alpha_0^{\vee},\dots,\alpha_N^{\vee},d$ 
form a basis of the Lie algebra  $\mathfrak{H}$. We describe the normalized form  $\kappa_{\mathfrak{g}(X_N^{(m)})}$ 
on $\mathfrak{H}$. We refer the reader to  Page 81 in \cite{Kac}) for an explicit formula.
\iffalse
\begin{enumerate}
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_i^{\vee},\alpha_j^{\vee})=a_{ij}\frac{a_j}{a_j^{\vee}}$, where $a_{ij}$ 
	are the entries of the Cartan matrix of $\mathfrak{g}(X_N^{(m)})$. 
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_i^{\vee},d)=0$, for $1\leq i \leq N$.
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_0^{\vee},d)=a_0$ and $\kappa_{\mathfrak{g}(X_N^{(m)})}(d,d)=0$. 
\end{enumerate}
\fi
The form $\kappa_{\mathfrak{g}(X_N^{(m)})}$ is non-degenerate and it induces an 
isomorphism $\nu_{\mathfrak{g}(X_N^{(m)})}: \mathfrak{H}^*\rightarrow \mathfrak{H}$. We now describe
the induced form on $\mathfrak{H}^*$. Let $\Lambda_0$ be an element in $\mathfrak{H}^*$ 
defined by the equations: 
$$ 	\Lambda_0(\alpha_i^{\vee})=\delta_{i,0} \ \mbox{for}\ 0\leq i \leq N, \mbox{and} \ \Lambda_0(d)=0.$$
Thus once $d$ is fixed, the element $\Lambda_0$ is uniquely determined. 
Now we get a basis of $\mathfrak{H}^*$ given by $\alpha_0,\dots, \alpha_N, \Lambda_0$. 

\begin{proposition}\label{prop:formulaforkg}The invariant normalized bilinear form $\kappa_{\mathfrak{g}(X_N^{(m)})}$ is given by the following:
\begin{enumerate}
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_i,\alpha_j)=a_{ij}\frac{a_i^{\vee}}{a_i}$, where $a_{ij}$ is the $(i,j)$-th entry of the Cartan matrix of $\frg(X_N^{(m)})$. 
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_i,\Lambda_0)=0$ for $\leq i \leq N $. 
	\item $\kappa_{\mathfrak{g}(X_N^{(m)})}(\alpha_0,\Lambda_0)=a_0^{-1}$ and $\kappa_{\frg(X_N^{(m)})}(\Lambda_0,\Lambda_0)=0$. 
\end{enumerate}
\end{proposition}
\iffalse
By the above formula, the roots are the coroots are related by the following:
\begin{enumerate}
	\item $a_i^{\vee}\nu_{\mathfrak{g}}(\alpha_i^{\vee})=a_i\alpha_i$ for $0\leq i \leq N$.
	\item $ \nu_{\mathfrak{g}}(K)=\delta$ and $\nu_{\mathfrak{g}}(d)=a_0\Lambda_0$.
	\item $\Lambda_0(K)=1$.
\end{enumerate}\fi

\subsubsection{Horizontal subalgebra and weight lattice} We denote the finite dimensional Lie algebra 
obtained by deleting the $0$-th 
vertex of the Dynkin diagram of $\frg(X_N^{(m)})$ by $\mathring{\mathfrak{g}}$. Let $\mathring{\mathfrak{h}}$ denote
the Cartan subalgebra of $\mathring{\mathfrak{g}}$. Clearly $\mathring{\mathfrak{h}}$ is generated by
the coroots $\alpha_{1}^{\vee},\dots, \alpha_N^{\vee}$. Let  $Q(\mathring{\mathfrak{g}})$ (resp. ${Q}^{\vee}(\mathring{\mathfrak{g}})$) 
denote the root lattice (resp. coroot lattice) of $\mathring{\mathfrak{g}}$ and $\mathring{\Delta}$
denote the positive simple roots of $\mathring{\mathfrak{g}}$.

For $1\leq i \leq N$, we define the affine
fundamental weights $\Lambda_i$ that satisfies the equation $\Lambda_i(\alpha_j^{\vee})=\delta_{ij}.$ Then we can write $\Lambda_i$ 
in terms of its horizontal projection as follows:
\begin{equation}
\label{eqn:affinefunda}
\Lambda_i:=\overline{\Lambda}_i+a_i^{\vee}\Lambda_0.
\end{equation

Then $\overline{\Lambda}_1,\dots, \overline{\Lambda}_N$ are the fundamental weights of the horizontal subalgebra $\mathring{\mathfrak{g}}$. 
\begin{remark}
	The numbering of the vertices of the Dynkin diagram of $\mathring{\mathfrak{g}}$ as in \cite{Kac} may not extend to a numbering scheme of 
	the Dynkin diagram of $\mathfrak{g}(X_N^{(m)})$. Hence we might need to reorder the set $\overline{\Lambda}_1,\dots, \overline{\Lambda}_N$ to match
	up with the usual conventions for $\mathring{\mathfrak{g}}$.
\end{remark}
\subsubsection{Level $\ell$-weights}
The weight lattice $P$ is the $\mathbb{Z}$-lattice 
generated by $\Lambda_0,\dots,\Lambda_N$.
Similarly let us define the set $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$ of dominant
integral weights of level $\ell$  as follows:
$$P^{\ell}(\mathfrak{g}(X_N^{(m)}))=\{\lambda \in P| \lambda(\alpha^{\vee}_i)\geq 0 \ \mbox{for all $0\leq i \leq N$ and $\lambda(K)=\ell$} \}.$$

The set of irreducible, integrable, highest weight representations at level $\ell$ of the affine 
Kac-Moody Lie algebra $\frg(X_N^{(m)})$ is 
in bijection with the set $P^{\ell}(\frg(X_N^{(m)}))$. If $m=1$, then the set $P^{\ell}(\frg(X_N^{(1)})$
will often be denoted by $P_{\ell}(\frg)$. The following 
Lemma is easy to prove:
\begin{lemma}\label{lem:levelell}
	Let ${P}_{+}(\mathring{\mathfrak{g}})$ denote the set of dominant integral weights of $\mathring{\mathfrak{g}}$, then 
	$$P^{\ell}(\mathfrak{g}(X_N^{(m)}))=\{\lambda \in {P}_+(\mathring{\mathfrak{g}}) | \kappa_{\mathfrak{g}(X_N^{(m)})}(\lambda,\theta)\leq \ell\},$$ where $\kappa_{\frg(X_N^{(m)})}$ is as in Proposition \ref{prop:formulaforkg}.
	
\end{lemma}
\begin{proof}The numbering of the vertices of the Dynkin-diagram of $\frg(X_N^{(m)})$ guarantees 
	that $a_0^{\vee}=1$. If $\lambda=\sum_{i=0}^Nb_i\Lambda_i$, 
	then using the explicit description of the form $\kappa_{\mathfrak{g}(X_N^{(m)})}$, we get 
	$\lambda(K)=a_0^{\vee}b_{0}+\dots+ a_N^{\vee}b_N=\ell.$
	This implies that $P^{\ell}(\frg(X_N^{(m)}))$ is in a natural bijection with the set 
	$$\{\lambda=\sum_{i=1}b_i\overline{\Lambda}_i\in P_{+}(\mathring{\mathfrak{g}})| a_1^{\vee}b_1 +\dots +a_N^{\vee}b_N\leq \ell\}.$$ Now again
	by the  definition of $\theta$ and $\kappa_{\mathfrak{g}(X_N^{(m)})}$, we get $\kappa_{\mathfrak{g}(X_N^{(m)})}(\lambda,\theta)=a_1^{\vee}b_1 +\dots +a_N^{\vee}b_N$. Hence the 
	result follows.
\end{proof}
We refer the reader to Section \ref{section:crossedS} for an explicit description of the set $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$.



\subsection{Twisted affine Lie algebras as Kac-Moody Lie algebras}\label{sec:twistedaffinekm}Let $\gamma$ be a finite order automorphism of $\frg$ and $\sigma$ a diagram automorphism related to $\gamma$ as in Proposition \ref{prop:classdia}. 
The map $\phi_{\sigma,\gamma}$ \eqref{eqn:basicisomor} gives an isomorphism of Lie algebras $\widehat{L}(\frg,\sigma)\simeq \widehat{L}(\frg,\gamma)$.
Now following \cite{Kac}, we relate $\widehat{L}(\frg,\sigma)$ with the 
affine Kac-Moody Lie algebra $\mathfrak{g}(X_N^{(m)})$. Let $d'$ be a derivation on $\widehat{L}(\frg)$ which acts 
on $\frg\otimes \mathbb{C}((t))$ by $t\frac{d}{dt}$ and commutes with $c$. We extend $\widehat{L}(\frg,\sigma)$ by $d'$ and
denote it by $\widehat{L}(\frg,\sigma)\ltimes \mathbb{C}d'$. 


We only restrict to the cases where $\sigma$ is non-trivial.
\begin{table}[htbp]\label{table:orbitLie}
	\begin{center}
		\caption{ }
		\label{tab:table1}
		\begin{tabular}{l|c|c|c|c||r}
			\hline
			Case&$X_{N}$ & $\sigma$ & $m$ & $\mathring{\mathfrak{g}}$ &$\frg^{\sigma}$ \\
			\hline
			\hline
			1&$A_{2n}$, $n\geq 2$ & $i\leftrightarrow 2n-i$&2& $C_n$&$B_n$\\
			2&	$A_{2n-1}$, $n\geq 3$ & $i\leftrightarrow 2n-1-i$&2& $C_n$& $C_n$ \\
			3&	$D_{n+1}$, $n\geq 4$ &$ n \leftrightarrow n-1$& 2&$B_n$& $B_n$\\
			4&	$D_{4}$& $1\rightarrow 4\rightarrow 3 \rightarrow 1$ &3& $G_2$ &$G_2$\\
			5&	$E_6$ & $1\leftrightarrow 5$, $2\leftrightarrow 4$ &2& $F_4$& $F_4$ \\
			\hline
		\end{tabular}
	\end{center}
\end{table}
Let $\varepsilon=0$ when in cases 2-5 and $\varepsilon=N$ in the case 1 from the above table. 
We define the set $I:=\{0,\dots, N\}\backslash \{\varepsilon\}$. In each of the above cases, Kac
\cite[Section 8.3]{Kac} construct elements  $H_i, E_i, F_i$ (indexed by $\{0,\dots, N\}$) in the Lie algebra $\frg(X_N)$ and an  element $\theta_0$ in $\mathfrak{h}$ such that 
\begin{enumerate}
	\item $E_i$, $F_i$ for $i\in I$ are Chevalley generators of $\frg^{\sigma}$. 
	\item Roots $\alpha_i$ for $i\in I$ of the Lie algebra $\frg^{\sigma}$.
	\item An abelian subalgebra $\mathfrak{H}=\mathfrak{h}^{\sigma}\oplus \mathbb{C}c\oplus \mathbb{C}d'$  of $\widehat{L}(\frg,\sigma)\ltimes \mathbb{C}d'$.
\end{enumerate}
The following result can be found in \cite[Proposition 8.3, Theorem 8.3]{Kac}
\begin{proposition}
	\label{prop:kmreal}Let $\Pi=\{\alpha_{\varepsilon}:=\delta-\theta_0,\alpha_i, \mbox{where} \ i \in I\}$,
	where $\delta \in\mathfrak{h}^*$ be such that 
	$\delta(d')=1$ and $ \delta(\mathfrak{h}^{\sigma}\oplus \mathbb{C}c)=0$. Moreover, let 
	$\Pi'=\{\alpha_{\epsilon}^{\vee}:=\frac{m}{a_0}c+H_{\epsilon}, \alpha_i^{\vee}=H_i, \mbox{where}\ i \in I\}$. Then the triple $(\mathfrak{H}, \Pi, \Pi')$ gives a Kac-Moody realization of type $\mathfrak{g}(X_N^{(m)})$. 
\end{proposition}


\subsection{Modules for twisted affine Lie algebras}\label{sec:arbtodia}For any finite order automorphism $\gamma$, let $P^{\ell}(\frg,\gamma)$ be a subset of $P_{+}(\frg^{\gamma})$ parameterizing the set of integrable, irreducible highest weight representations of $\widehat{L}(\frg,\gamma)$. By Proposition \ref{prop:kmreal}, we get a natural bijection 
\begin{equation}\label{eqn:bijfromarbtodia}
P^{\ell}(\frg,\gamma)\leftrightarrow P^{\ell}(\mathfrak{g}(X_N^{(m)})). 
\end{equation}
We also refer the reader to \cite[Section 2]{KH} for an alternate description and construction.
For $\lambda\in P^{\ell}(\frg,\gamma)$, let $V_{\lambda}$ denote the highest weight irreducible module of $\frg^{\gamma}$ 
of highest weight $\lambda$. Similarly, we denote the highest weight irreducible
integrable modules by $\mathcal{H}_{\lambda}(\frg,\gamma)$ (also denoted by $\mathcal{H}_{\lambda}$ if there is no confusion). 
They are characterized by the property:
\begin{enumerate}
	\item $\mathcal{H}_{\vec{\lambda}}(\frg,\gamma)$ are infinite dimensional. 
	\item $V_{\lambda} \subset \mathcal{H}_{\lambda}(\frg,\gamma)$.
	\item The central element $c$ acts on $\mathcal{H}_{\lambda}(\frg,\gamma)$ by 
	multiplication by $\ell$. 
	
	
\end{enumerate}
In Section \ref{sec:atiyahalg}, we give a coordinate free construction of the modules $\mathcal{H}_{\lambda}(\frg,\gamma)$. 




\section{Sheaf of twisted conformal blocks}\label{sec:deftwistconf}In this section, we give a brief {\em coordinate 
	free construction} of the sheaf of twisted conformal blocks (\cite{Fakhruddin:12,FS,KH,TUY:89,Tsuchimoto}).	
\subsection{Family of pointed $\Gamma$-curves}\label{sec:pointedGammacurves}
Let $T$ be a smooth variety and consider a proper, flat family  $\pi:\widetilde{C}\rightarrow T$  of curves with at most nodal singularities. 
Let $\Gamma$ be a finite group that acts on $\widetilde{C}$ such that the map $\pi$ is $\Gamma$ equivariant. 
Let the quotient $\overline{\pi}:C=\widetilde{C}/\Gamma\rightarrow T$ be the induced family of curves over $T$. 
The genus of the fibers of $\pi$ and $\overline{\pi}$ are related by the Hurwitz formula. We further choose mutually disjoint sections ${\bf{p}}=(p_1,\dots,p_n)$ (respectively $\widetilde{\bf{p}}=(\widetilde{p}_1,\dots,\widetilde{p}_n)$)  of $\overline{\pi}$ 
(respectively $\pi$) such that
\begin{enumerate}\label{enu:pointedcurves}
	\item We have $pr(\widetilde{\bf{p}}(t))={\bf{p}}(t)$ for all points $t\in T$,  where $pr: \widetilde{C}\rightarrow C$
	is the canonical quotient map. 
	\item The points ${\bf{p}}(t)$ are all smooth.		
	\item For any $t\in T$, the smooth branching points of the $\Gamma$-cover $\tildeC_t\to C_t$ are contained in $\cup_{i=1}^np_i(t)$. 
	\item For any point $t\in T$, the data $(\widetilde{C}_t,{C}_t,\widetilde{{\bf p}}(t),{\bf{p}}(t))$ is a $n$-pointed 
	admissible $\Gamma$-cover in the sense of Jarvis-Kimura-Kaufmann (See Definition \ref{def:admissiblecovers}) \cite{JKK}.
	\item We assume that $\widetilde{C}\setminus \Gamma\cdot\widetilde{\bf {p}}(T)$ is affine over $T$.
\end{enumerate}
Let ${\bf m}=(m_1,\dots,m_n)\in \Gamma^n$ be the monodromies around the sections $\widetilde{\bf{p}}$, in other words for all $1\leq i\leq n$, $m_i$ is the generator of the stabilizer $\Gamma_i\leq \Gamma$ of $\widetilde{p}_i$  determined by the orientation of the curve.

\subsection{Coordinate free highest weight integrable modules}We start with a family of pointed $\Gamma$-curves satisfying the conditions in Section \ref{sec:pointedGammacurves}. Let $\mathcal{I}_{\widetilde{\bf {p}}}$ 
(respectively $\mathcal{I}_{\widetilde{p}_i})$ be the ideal of the image of $\widetilde{\bf{p}}$ 
(respectively $\widetilde{p}_i$) in $\widetilde{C}$. Let $\widehat{\mathcal{O}}_{\widetilde{C}, \widetilde{p}_i}$ 
be the formal completion of $\mathcal{O}_{\widetilde{C}}$ along the image of $\widetilde{p}_i$ and $\mathcal{K}_{\widetilde{C}, \widetilde{p}_i}$
be the sheaf of formal meromorphic functions along $\widetilde{p}_i$. Observe that if $\Gamma_{i}=\langle m_i\rangle$
denotes the stabilizer in $\Gamma$ of $\widetilde{p}_i$, then $\Gamma_i$ acts on $\mathcal{K}_{\widetilde{C}, \widetilde{p}_i}$.  We define the {\em coordinate free twisted affine $\mathcal O_T$-Lie algebra } as 
\begin{equation}
\widehat{\mathfrak{g}}_{\widetilde{p}_i}:=\big(\frg\otimes \mathcal{K}_{\widetilde{C}, \widetilde{p}_i} \big)^{\Gamma_i}\oplus \mathcal{O}_{{T}}.c, 
\end{equation}Suppose 
$\widehat{\mathfrak{p}}_{\widetilde{p}_i}:=\big(\frg\otimes \widehat{\mathcal{O}}_{\widetilde{C}, \widetilde{p}_i}\big)^{\Gamma_i}\oplus \mathcal{O}_Tc$. For $\lambda_i \in P^{\ell}(\frg,\Gamma_i):=P^{\ell}(\frg,m_i)$, let $V_{\lambda}$ denote the $\frg^{\Gamma_i}$ 
module of highest weight $\lambda$.  
We let $\big(\frg\otimes \widehat{\mathcal{O}}_{\widetilde{C}, \widetilde{p}_i}\big)^{\Gamma_i}$ 
act on $V_{\lambda}$ via evaluation at $\widetilde{p}_i$ and $c$ acts on 
$V_{\lambda}$ by multiplication by $\ell$. 
Thus $\widehat{\mathfrak{p}}_{\widetilde{p}_i}$ act on $V_{\lambda}$. We denote by $M_{\lambda_i,\widetilde{p}_i}:=
\operatorname{Ind}^{\widehat{\mathfrak{g}}_{\widetilde{p}_i}}_{\widehat{\mathfrak{p}}_{\widetilde{p}_i}}V_{\lambda}$. It follows that $M_{\lambda_i,\widetilde{p}_i}$ admits a unique
irreducible quotient which we denote by $\mathbb{H}_{\lambda_i,\widetilde{p}_i}$. 
\begin{remark}
	If $T$
	is a point and we choose formal coordinates around $\widetilde{p}_i$, 
	we get an isomorphism of $\widehat{\mathfrak{g}}_{\widetilde{p}_i}$ with $\widehat{L}(\frg,\Gamma_i)=\widehat{L}(\frg,m_i)$. 
	Under this isomorphism $\mathbb{H}_{{\lambda}_i,\widetilde{p}_i}$ gets identified with $\mathcal{H}_{\lambda}(\frg,\Gamma_i)$. 
\end{remark}

Consider the sheaf of Lie algebras $$\widehat{\mathfrak{g}}_{{ p_i}}:=\left(\frg\otimes \big(\bigoplus\limits_{\wtilde{p}_i'\in pr^{-1}(p_i)}\mathcal{K}_{\widetilde{C}, \widetilde{p}_i'}\big)\right)^{\Gamma} \oplus \mathcal O_T.c.$$ This is canonically identified with $\widehat{\mathfrak{g}}_{\widetilde{p}_i}$. Similarly consider the sheaf of Lie algebras $\widehat{\mathfrak{g}}_{\widetilde{C},{\bf{p}}}:=(\oplus_{i=1}^n\widehat{\frg}_{p_i})/\mathcal{Z}$, where $\mathcal{Z}$ is a subsheaf of $ \oplus_{i=1}^n \mathcal{O}_T.c$ consisting of tuples $(f_1,\dots, f_n)$ such that $f_1+\dots+f_n=0$. 
\subsubsection{Sheaf of twisted  covacua}Let $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)$
be an $n$-tuple 
of weights such 
that each $\lambda_i \in P^{\ell}(\frg,\Gamma_i)$. 
The sheaf $$\mathbb{H}_{\vec{\lambda}}:=\mathbb{H}_{\lambda_1,\widetilde{p}_1}\otimes \dots \otimes \mathbb{H}_{\lambda_n,\widetilde{p}_n}$$ of $\mathcal{O}_T$-modules is also a representation of the sheaf of Lie algebras $\widehat{\mathfrak{g}}_{\widetilde{C},{\bf p}}$. By the residue formula, we have a homomorphism  of sheaves of Lie algebras $(\frg\otimes\mathcal O_{\tildeC}(*\Gamma\cdot\widetilde{\bf{p}}))^\Gamma\to \widehat{\mathfrak{g}}_{\widetilde{C},{\bf p}}$. We define the {\em sheaf of twisted covacua} to be
$$\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf{p}}):=\mathbb{H}_{\vec{\lambda}}/(\frg\otimes \mathcal{O}_{\widetilde{C}}(*\Gamma\cdot\widetilde{\bf{p}}))^{\Gamma}\mathbb{H}_{\vec{\lambda}},$$ where $\Gamma\cdot\widetilde{\bf{p}}$ denotes the union of the $\Gamma$ orbits of $\widetilde{p}_i$ for $1\leq i\leq N$. Similarly we define the the {sheaf of vacua} as 
$$\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf{p}}):=\{\langle \Psi| \in \mathbb{H}_{\vec{\lambda}}^{*}| \langle \Psi|X[f]=0, \ \mbox{for all} \ X \otimes f \in (\frg\otimes \mathcal{O}_{\widetilde{C}}(*\Gamma\cdot\widetilde{\bf{p}}))^{\Gamma}\}.$$
We now recall some basic properties of the sheaf $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}, {\bf p})$. 
\subsubsection{Gauge Symmetry}
If $(\widetilde{C}, C,\widetilde{\bf p}, {\bf p})$ is an admissible curve, the equation $$\langle \Psi| X[f]=\sum_{j=1}\langle \Psi | \rho_j(X\otimes f)=0,$$ where $\rho_j$ is the $j$-th component of the map $(\frg\otimes H^0(\widetilde{C},\mathcal{O}_{\widetilde{C}}(*\Gamma \cdot \widetilde{\bf p}))^{\Gamma}$ to $\widehat{\frg}_{\widetilde{C},\widetilde{\bf p}}$ will be referred to as the {\em Gauge Symmetry} or the {\em Gauge condition}.
\subsection{Properties of twisted vacua}\label{sec:propertiesofvacua}We record some important properties of twisted Vacua that we will use. 

\begin{proposition}
The sheaves  $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ and $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ are coherent $\mathcal{O}_T$-modules \cite{KH}, (\cite[Lemma 2.5.2]{Sorger} in the untwisted set up) which are compatible with base change.
Moreover, like
in the untwisted case, Hong-Kumar \cite{KH} (under the assumption that $\Gamma$ preserves a Borel subalgebra of $\frg$) show
that the sheaf $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ is locally free and $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ and $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ are dual to each 
other. 
\end{proposition}

We also refer the reader to \cite{szcz}, for a more general statement on the interior $\mathcal{M}_{g,n}^{\Gamma}$ of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ in the setting of orbifold vertex algebras. 

Let ${\bf{q}}=(q_1,\dots, q_m)$ be $m$ disjoint sections of 
$\overline{\pi}: C\rightarrow T$ (also disjoint from $\bf{p}$) marking \'etale points of the $\Gamma$-cover $\tildeC\to C$ and let  $\widetilde{\bf{q}}$ be a choice of lifts to $\widetilde{C}$. This data endows the family $\widetilde{C}\rightarrow T$ as a $n+m$-pointed $\Gamma$-cover with monodromy data ${\bf{m}'}=({\bf{m}},1,\dots,1)$. 
Then we have the following \cite{Dam17,KH, TUY:89} which is often referred to as {\em Propagation of Vacua}:
\begin{proposition}\label{prop:propavacua}
	Let $\vec{0}=(0,\dots ,0)\in P_{\ell}(\frg)^n$ and assume that $\Gamma$ preserve a Borel subalgebra of $\frg$. Then there is a natural isomorphism between $\mathcal{O}_T$-modules $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})\simeq \mathbb{V}_{\vec{\lambda}\sqcup\vec{0},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}\sqcup\widetilde{\bf{q}},{\bf{p}}\sqcup{\bf{q}})$. Moreover, these isomorphisms are compatible with each other for different choices of the \'etale points chosen. 
\end{proposition}
\begin{remark}
	We only need ``Propagation of Vacua" along the \'etale points, since by assumption all the ramifications points are already marked. In Hong-Kumar\cite{KH}, Proposition \ref{prop:propavacua} is proved when the extra points ${\bf q}$ are not necessarily \'etale which is a stronger version than the one stated above. However it must be pointed out that $0$ may not be a weight in $P^{\ell}(\frg,\gamma)$ for all $\ell$. 
\end{remark}
\iffalse
\begin{remark}We do not need the assumption that ``$\Gamma$ preserve a Borel subalgebra of $\frg$" for Proposition \ref{prop:propavacua} since we are only considering the statement for \'etale points. In this case, the proof of propagation of vacua in \cite{TUY:89} generalizes verbatim to the twisted situation. 
\end{remark}
\fi
\subsubsection{Descent data}\label{sec:descentdata} Following the discussion in \cite{Fakhruddin:12}, we use Proposition \ref{prop:propavacua} to  drop the condition that $\widetilde{C}\setminus \Gamma\cdot\widetilde{\bf{p}}(T)$ is affine. Let $\widetilde{C}\rightarrow T$ be a family satisfying conditions 1-4 in Section \ref{enu:pointedcurves}. 
We can find an \'etale cover $T'$  of $T$ and $m$-sections marking \'etale 
points $\widetilde{\bf{q}}$ (respectively $\bf{q}$) of the induced family $\widetilde{C}'$ such that it 
satisfies all the conditions in Section \ref{enu:pointedcurves}. Thus we can associate a sheaf
$\mathbb{V}_{\vec{\lambda}\sqcup\vec{0},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}\sqcup\widetilde{\bf{q}},{\bf{p}}\sqcup{\bf{q}})$ on $T'$. 
We can define $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ to be the natural descent of $\mathbb{V}_{\vec{\lambda}\sqcup\vec{0},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}\sqcup\widetilde{\bf{q}},{\bf{p}}\sqcup{\bf{q}})$ given by Proposition \ref{prop:propavacua}. The same discussion (see Proposition 2.1) in \cite{Fakhruddin:12}, tells us that the $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},{\bf{p}})$ is independent of the choice of the \'etale cover of $T'$ of $T$. Thus, we get a well defined sheaf of covacua $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf p}, {\bf p})$ on the moduli stack $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf{m}})$ of $n$-pointed admissible covers defined in \cite{JKK} (see Appendix \ref{ap:modstackofadmcovers} for the definition of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$). 
\subsubsection{Factorization}

Let $\widetilde{C}\rightarrow C\rightarrow T$ be a family of stable $n+2$ pointed stable covers with group $\Gamma$. Let $\widetilde{\bf{p}}'=(\widetilde{\bf{p}},\tildeq_1,\tildeq_2)$ be  the $n+2$ sections such that the monodromies around the sections $\tildeq_1$ and $\tildeq_2$ are inverse to each other, say $\gamma$ and $\gamma^{-1}$ respectively. Then identifying the family $\widetilde{C}$ along the sections $\tildeq_1$ and $\tildeq_2$, we get a new family  of stable $n$-pointed cover of curves $\widetilde{D}\rightarrow T$ with group $\Gamma$ along with  $n$-sections $\widetilde{\bf{p}}$. Assume that ``$\Gamma$ preserves a Borel subalgebra of $\frg$". Then by the factorization theorem in \cite{KH}, we have the following isomorphisms of locally free sheaves on $T$.
\begin{proposition}\label{prop:factorizationofhongkumar}
	$$\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{D},D, \widetilde{\bf{p}},{\bf{p}})\simeq \bigoplus_{\mu \in P^{\ell}(\frg,\gamma)}\mathbb{V}_{\vec{\lambda}\sqcup\{{\mu},{\mu^{*}}\},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}',{\bf{p}'}).$$
	
\end{proposition}
\subsubsection{Global Properties} We continue to assume that the group $\Gamma$ preserves a Borel subalgebra of $\frg$. The bundles of twisted covacua are compatible with natural morphisms on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf{m}})$ which we state below. 

\begin{proposition}\label{prop:importantprop}Let $\vec{\lambda}$ be an $n$-tuple
	of weights corresponding to $\mathbf{m}$ and let $\mathbb{V}_{\vec{\lambda},\Gamma}$ denote the sheaf of twisted covacua on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf{m}})$, where ${\bf{m}}=(m_1,\dots,m_n)\in \Gamma^n$. Then the following holds: 
	\begin{enumerate}
		\item Assume that for some $i$, we have  $m_i=1$, $\lambda_i=0$ and that $(g,n-1)$ is a stable pair, i.e. $2g-2+(n-1)>0$.
		Consider the natural forgetful stabilization map $f_i: \overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf{m}})\rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n-1}({\bf{m}'})$
		obtained by
		forgetting the point $\widetilde{p}_i$ (and contracting any unstable component), then
		there is a natural isomorphism
		$$\mathbb{V}_{\vec{\lambda},\Gamma}\simeq f_i^*\mathbb{V}_{\vec{\lambda}',\Gamma},$$ where $\vec{\lambda}'$ (respectively ${\bf{m}'}$) 
		is obtained by 
		deleting $\lambda_i=0$ 
		(respectively $m_i=1$) from $\vec{\lambda}$ (respectively ${\bf{m}}$).
		\item Let $\xi_{1,2,\gamma}: \overline{\mathcal{M}}{}^{\Gamma}_{g_1,n_1+1}({\bf{m}}_1,\gamma) \times \overline{\mathcal{M}}{}^{\Gamma}_{g_2,n_2+1}({\bf{m}}_2,\gamma^{-1})\rightarrow  \overline{\mathcal{M}}{}^{\Gamma}_{g_1+g_2,n_1+n_2}({\bf{m_1}},{\bf{m}_2})$ be 
		the morphism obtained by gluing two curves of genus $g_1$ and $g_2$ along the last marked point with monodromy $\gamma$ and $\gamma^{-1}$, then there is a natural isomorphism
		$$\xi_{1,2,\gamma}^*\mathbb{V}_{\vec{\lambda},\Gamma}\simeq \bigoplus_{\mu\in P^{\ell}(\frg,\gamma)}
		\mathbb{V}_{\vec{\lambda}',\Gamma}
		\boxtimes \mathbb{V}_{\vec{\lambda}'',\Gamma}
		,$$
		where $\vec{\lambda}'=(\lambda_1,\dots,\lambda_{n_1},\mu)$ and $\vec{\lambda}''=(\lambda_{n_1+1},\dots,\lambda_{n_2},\mu^{*})$.
		
		\item Let $\xi_{\gamma}: \overline{\mathcal{M}}{}^{\Gamma}_{g-1,n+2}({\bf{m}},\gamma,\gamma^{-1})
		\rightarrow\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf{m}})$ be the morphism obtained by gluing a curve along two points with opposite monodromies. Then there is a canonical isomorphism
		$$\xi_{\gamma}^*\mathbb{V}_{\vec{\lambda},\Gamma}\simeq \bigoplus_{\mu\in P^{\ell}(\frg,\gamma)}	\mathbb{V}_{\vec{\lambda}\sqcup \{\mu,\mu^*\},\Gamma}.$$
	\end{enumerate}
	Moreover, these isomorphisms induced by $\xi_{1,2,\gamma}$, $f_i$ and $\xi_{\gamma}$ are compatible with each other.
\end{proposition}
\begin{proof}The second and third part of the proposition follows directly from Proposition \ref{prop:factorizationofhongkumar}. We now discuss the proof of the first part which is similar to the discussion in Section 2.2 of \cite{Fakhruddin:12}. 
	
	Let $\widetilde{C}\rightarrow T$ be a family of stable $n+1$-pointed covers with group $\Gamma$ and $\widetilde{\bf{p}}$ are the sections. Assume that the points in the fibers of $\widetilde{C}\rightarrow T$ marked by the  $n+1$-th section in $\widetilde{\bf{p}}$ are always \'etale.  Let $\vec{\lambda}=(\lambda_1,\dots,\lambda_{n+1})$ be such that $\lambda_{n+1}=0$ in $P_{\ell}(\frg)$. Then forgetting the $n+1$-th section, gives a family of $n$-pointed $\Gamma$ covers which may not be stable. To make the new family stable, we have to contract unstable components to a point. Hence two situations can occur. 
	
	First we can contract a rational curve that has two marked points  and $p_{n}$ and $p_{n+1}$ and meets the other component $E$ at a nodal point $q$. In the case after stabilization we obtain the curve $E$ is smooth at $q$ and we declare $q$ to be the $n$-th marked point $p_n$. 
	Secondly, we can contract a rational component which has one marked point $p_{n+1}$ and meets the other components $E_1$ and $E_2$ at two distinct nodal points $q_1$ and $q_2$. In this case, after stabilization we get a curve obtained by joining $E_1$ and $E_2$ by identifying $q_1$  with $q_2$. We refer the reader to Section 2 in \cite{JKK} for more details on these stabilization morphisms. Now in both these cases, part (1) of Proposition \ref{prop:importantprop} follows from Proposition \ref{prop:factorizationofhongkumar} and Lemma \ref{lem:linebundlecase}.
\end{proof}

\begin{lemma}\label{lem:linebundlecase}Let ${\bf m}=(\gamma,\gamma^{-1},1)\in \Gamma^{3}$ 
	and $\vec{\lambda}=(\lambda,\lambda^*,0)$, where $\lambda \in P^{\ell}(\frg,\gamma)$. Assume that the marked points $\widetilde{\bf{p}}$ are in the same connected component of $\widetilde{C}$. Then the fibers of the vector bundle $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},\mathbb{P}^1,\widetilde{{\bf p}},{\bf p})$ restricted to such points are one dimensional. 
\end{lemma}
\begin{proof}From the assumption it suffices to assume  that $\widetilde{C}=\mathbb{P}^1$ and $\Gamma=\langle \gamma \rangle$. Let ${\mathbb{P}^1}\rightarrow \mathbb{P}^1$ be a $\Gamma$-cover with $n$-marked points. Assume that $n-2$ of the marked points are \'etale. In this set up, by Proposition \ref{prop:embeddingintopone} , the fibers of $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\mathbb{P}^1, \mathbb{P}^1, \widetilde{{\bf p}}, {\bf p})$ of the twisted conformal bundle embeds in  $\operatorname{Hom}_{\frg^{\Gamma}}(V_{\lambda_1}\otimes\dots \otimes  V_{\lambda_n}, \mathbb{C})$ where $V_{\lambda}$ is the irreducible $\frg^{m_i}$-module  of highest weight $\lambda$ and  $m_i$ is the monodromy around the point $\widetilde{p}_i$. 
	
	Since $\operatorname{Hom}_{\frg^{\gamma}}(V_{\lambda}\otimes V_{\lambda^*})$ is one dimensional,  this applied to the situation of the lemma give us that the rank of $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},\mathbb{P}^1,\widetilde{{\bf p}},{\bf p})$ is at most one dimensional. 
	Now the result follows from the fact the one dimensional space of $\frg^{\gamma}$-invariants of $V_{\lambda}\otimes V_{\lambda^*}$ extends (Equation \eqref{eqn:bilform}) the bilinear form $(\ |\ )_{\lambda}$ on $\mathcal{H}_{\lambda}(\frg,\gamma)\otimes \mathcal{H}_{\lambda^*}(\frg,\gamma^{-1})$ as an element (Equation \eqref{eqn:bilo}) of the twisted conformal block
\end{proof}
Let $z$ be a global coordinate on $\mathbb{C}$ and assume that $\mathbb{P}^1=\mathbb{C}\cup \{\infty\}$. Observe that $w=1/z$ is a local coordinate at the point $\infty$ and $\xi(\widetilde{q})=z-\widetilde{q}$ is a local coordinate at any other point $\widetilde{q}\in \mathbb{C}\{0\}$. The proof of the following proposition is analogous to Proposition 6.1 in \cite{U}. We include a proof for completeness 
\begin{proposition}\label{prop:embeddingintopone}Let $\Gamma=\langle \gamma\rangle$ be a cyclic group of order $N$ and $\mathbb{P}^1\rightarrow \mathbb{P}^1$ be an admissible cover with Galois group $\Gamma$ and two ramification points $0$ and $\infty$ of order $N$ and monodromy $\gamma$ and $\gamma^{-1}$ respectively. Moreover assume that $\widetilde{q}_1,\dots, \widetilde{q}_n$ are distinct \'etale points on $\mathbb{C}^{\times}$ with non-intersecting $\Gamma$-orbits, then the twisted conformal blocks at any level injects into the space of $\frg^{\gamma}$ invariants:
	$$\mathcal{V}_{\vec\lambda,\mu_1,\mu_2,\Gamma}(\mathbb{P}^1,\mathbb{P}^1, \widetilde{\bf p}, {\bf p})\hookrightarrow \operatorname{Hom}_{\frg^{\gamma}}(V_{\vec{\lambda}}\otimes V_{\mu_1}\otimes V_{\mu_2},\mathbb{C}),$$
where $\widetilde{\bf p}=(\widetilde{q_1},\dots, \widetilde{q_n},0,\infty)$ and $V_{\vec{\lambda}}=V_{\lambda_1}\otimes \dots \otimes V_{\lambda_n}$. 
	\end{proposition}
\begin{proof}Let $\langle \Psi|$ be an element of the twisted conformal blocks i.e. in-particular it is a function on the tensor product of integrable representations 
	$$\mathcal{H}_{\vec{\lambda},\mu_1,\mu_2}:=\mathcal{H}_{\lambda_1}(\frg)\otimes \mathcal{H}_{\lambda_n}(\frg)\otimes \mathcal{H}_{\mu_1}(\frg,\gamma)\otimes \mathcal{H}_{\mu_2}(\frg,\gamma^{-1}).$$
	The tensor product $V_{\vec{\lambda}}\otimes V_{\mu_1}\otimes V_{\mu_2}$ naturally embeds into $\mathcal{H}_{\vec{\lambda},\mu_1,\mu_2}$,  hence by restriction of $\langle \Psi|$ we get a map
	$$\iota: \mathcal{V}_{\vec\lambda,\mu_1,\mu_2,\Gamma}(\mathbb{P}^1,\mathbb{P}^1, \widetilde{\bf p}, {\bf p})\rightarrow \operatorname{Hom}(V_{\vec{\lambda}}\otimes V_{\mu_1}\otimes V_{\mu_2},\mathbb{C}),$$
	Now, let $X\in \frg^{\gamma}$ and $1$ be the identity function on $\mathbb{P}^1$. By the ``Gauge Condition", we get for any vector $\vec{v} \in V_{\vec{\lambda}}\otimes V_{\mu_1}\otimes V_{\mu_2}$:
	$$\langle \Psi\cdot (X\otimes 1)|\vec{v}\rangle =\sum_{j=1}^{n+2}\langle \Psi|\rho_j(X\otimes 1) \vec{v}\rangle=0,$$ where $\rho_j$ denotes the action of $X\otimes 1$ on the $j$-th component of $\vec{v}$. 
	Thus, we conclude that the image of $\iota$ in indeed in the space $\operatorname{Hom}_{\frg^{\gamma}}(V_{\vec{\lambda}}\otimes V_{\mu_1}\otimes V_{\mu_2},\mathbb{C})$.
	
	 We now show that the map $\iota$ is indeed injective. 	Assume $\iota(\langle \Psi|)=0$. By induction on the natural filtration $F_{p} \mathcal{H}_{\vec{\lambda},\mu_1,\mu_2}$, we prove that $\langle \Psi|$ restricted to $F_{p}\mathcal{H}_{\vec{\lambda},\mu_1,\mu_2}$ is zero. For $p=0$, this is true by the assumption. Assume that $\langle \Psi|_{|F_p\mathcal{H}_{\vec{\lambda},\mu_1,\mu_2}}=0$.
	 
	 Now any element of $F_{p+1}\mathcal{H}_{\lambda,\mu_1,\mu_2}$ is of the form $\rho_j(X(-M))|\Phi\rangle $, for some $1\leq j\leq n+2$ and  a positive integer $M$, where  $|\Phi\rangle \in F_{p}\mathcal{H}_{\lambda,\mu_1,\mu_2}$. Moreover  either $X(-M)$ is an element of $\widehat{L}(\frg)$ for $1\leq j \leq n$ or $X(-M)\in \widehat{L}(\frg,\gamma)$ and $\widehat{L}(\frg,\gamma^{-1})$ for $j=n+1$, $j= n+2$ respectively. We split up the rest into two cases
	 
	 First we consider the case $j$ is $n+1$. The case $j$ is $n+2$ is similar. Further we can assume that $X(-M)$ is in the space $\frg_i\otimes \mathcal{A}_i$ in $\widehat{L}(\frg,\gamma)$, where $-i=M\mod |\gamma|$. 
	 
	 The  function $f(z)=z^{-M}$ has a pole of order $M$ only at zero and is holomorphic else where. Moreover $X\otimes f$ is an element of $\Gamma$-invariant $\frg$ valued functions on $\mathbb{P}^1\backslash \Gamma \cdot\widetilde{\bf p}$. Thus again by ``Gauge Symmetry", we get 
	 \begin{eqnarray*}
	 	\langle \Psi| \rho_{n+1}(X(-M))\Phi\rangle &=& \langle \Psi| \rho_{n+1}(X\otimes f)\Phi\rangle, \\
	 	&=&-\sum_{j\neq n+1}\langle \Psi| \rho_j(X\otimes f)\Phi \rangle,\\
	 	&=&0
	 	\end{eqnarray*}
 	Since $f$ is holomorphic outside of zero, it follows that $\rho_j(X\otimes f)|\Phi \rangle \in  F_{p}\mathcal{H}_{\lambda,\mu_1,\mu_2}$. 
	 
	 Next consider the case $1\leq j\leq n$. Without loss of generality assume that $j=1$. Since the action of $\gamma$ fixes $0$ and $\infty$, it follows that the action of $\gamma$ on $z$ by via multiplication of $\epsilon^{-1}$, where $\epsilon$ is a chosen $|\gamma|$-th root of unity, for every $0\leq k< |\gamma|$, we can produce a  meromorphic function $f_k$ on $\mathbb{P}^1$ with the following property:
	 \begin{itemize}
\item $f_k$	 has poles only along the $\Gamma$-orbit of $\widetilde{q}_1$ of order  exactly $M$ and holomorphic elsewhere.
\item $\gamma. f_k(z)=\epsilon^{-k}f_k(z)$, where $z$ is the global coordinate on $\mathbb{C}$. 
\end{itemize}
For example the function satisfy the above conditions and has no poles at $\infty$ since $|\gamma|>k$. $$f_k(z)=\frac{z^{k}}{(z^{|\gamma|}-\widetilde{q}_1^{|\gamma|})^M}.$$ 
Now by projecting into the eigenspaces $\frg_k$ of the $\gamma$ action on $\frg$, we can assume without loss of generality that $X$ is of the form $X_k \in \frg_k$. Now by construction $X_k\otimes f_k$ is an element of $\Gamma$ invariant $\frg$-valued functions on $\mathbb{P}^1\backslash \Gamma\cdot \widetilde{q}_1$.  We conclude via ``Gauge Symmetry" as follows:
 \begin{eqnarray*}
	\langle \Psi| \rho_{1}(X_k(-M)\Phi\rangle &=& \langle \Psi| \rho_{1}(X_k\otimes f_k)\Phi\rangle, \\
	&=&-\sum_{j\neq 1}\langle \Psi| \rho_j(X_k\otimes f_k)\Phi \rangle,\\
	&=&0  \mbox{ (again by induction hypothesis)}.	
\end{eqnarray*}
	\end{proof}
\begin{remark}In the untwisted case, Fakhruddin \cite{Fakhruddin:12} showed  that the bundles of sheaf of covacua is globally generated by generalizing Proposition 6.1 in \cite{U} to the nodal case. Similar results also holds for twisted conformal blocks of arithmetic genus zero. We will study this further in a future paper where we compute Chern classes of $\Gamma$-twisted conformal blocks.
	\iffalse
	We observe that if $\widetilde{C}\rightarrow {C}$ be a $\Gamma$ cover with $n$-marked points and $\widetilde{C}$ is of arithmetic genus zero. Then the fiber $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{{\bf p}}, {\bf p})$ embeds into $\operatorname{Hom}_{\frg^{\Gamma}}(V_{\lambda_1}\otimes\dots \otimes  V_{\lambda_n},\mathbb{C})$.  
	\fi
\end{remark}
\subsubsection{Equivariance with respect to permutations and conjugation}\label{subsubsec:equivariance}
As before let $\mathbf{m}=(m_1,\cdots,m_n)\in \Gamma^n$ and consider the moduli stack $\barM^\Gamma_{g,n}(\mathbf{m})$. Let $\sigma\in S_n$ be a permutation. Then permutation of the marked points induces an isomorphism $\xi_\sigma:\barM^\Gamma_{g,n}(\mathbf{m})\rar{\cong} \barM^\Gamma_{g,n}(\mathbf{m}_\sigma)$, where $\mathbf{m}_\sigma:=(m_{\sigma(1)},\cdots,m_{\sigma(n)})$. If $\vec{\lambda}=(\lambda_1,\cdots,\lambda_n)$ is an $n$-tuple of weights with $\lambda_i\in P^{\ell}(\frg,m_i)$, we set $\vec{\lambda}_\sigma$ to be the permuted weights. Then we have a natural isomorphism between the sheaves of covacua
\begin{equation}
\mathbb{V}_{\vec{\lambda},\Gamma}\simeq \xi_\sigma^*\mathbb{V}_{\vec{\lambda}_\sigma,\Gamma}.
\end{equation}
Now let $\pmb\gamma=(\gamma_1,\cdots,\gamma_n)\in \Gamma^n$. Let ${}^{\pmb{\gamma}}\mathbf{m}=({}^{\gamma_1}m_1,\cdots,{}^{\gamma_n}m_n)$ be the conjugated $n$-tuple, where ${}^{\gamma_{i}}m_i:=\gamma_im_i\gamma_i^{-1}$. Then acting on the marked points $\wtilde{\mathbf{p}}$ in $\tildeC$ by $\pmb\gamma$ induces an isomorphism $\xi_{\pmb\gamma}:\barM^\Gamma_{g,n}(\mathbf{m})\rar{\cong}\barM^\Gamma_{g,n}({}^{\pmb\gamma}\mathbf{m})$. If $\vec{\lambda}=(\lambda_1,\cdots,\lambda_n)$ is an $n$-tuple of weights as before, then we obtain the weights $\pmb\gamma\cdot \vec{\lambda}$ with $\gamma_i\cdot \lambda_i\in P^{\ell}(\frg,{}^{\gamma_i}m_i)$ (see also Section \ref{subsubsec:gammaaction}). Then we have a natural isomorphism between the sheaves of covacua
\begin{equation}\label{eqn:conjugation}
\mathbb{V}_{\vec{\lambda},\Gamma}\simeq \xi_{\pmb\gamma}^*\mathbb{V}_{\pmb\gamma\cdot\vec{\lambda},\Gamma}.
\end{equation}
Combining the two above equations, we see that the sheaves of covacua are equivariant for the action of the wreath product $S_n\ltimes \Gamma^n$ on the moduli stacks of pointed admissible $\Gamma$-covers.


\section{Twisted fusion rings associated to automorphisms of $\frg$}\label{sec:fusionforaut
	Let $\mathfrak{g}$ be a 
	finite dimensional Lie algebra which is simply laced. 
	Let $D(\frg)$ be the Dynkin 
	diagram of $\frg$. A diagram automorphism 
	$\sigma$ of $\frg$ is a graph automorphism 
	of the Dynkin diagram $D(\frg)$. Let $N$ be
	the order of $\sigma$. It is well known that $N\in \{1,2,3\}$. We
	can extend $\sigma$ to an automorphism of the Lie algebra $\frg$. 



	To this data, one can (see \cite{FSS})
	attach a new Lie algebra 
	$\frg_{\sigma}$ known as the orbit Lie algebra. 

	We enumerate the vertices $I$ of $D(\frg)$ as
	in \cite{Kac} by integers. 
	\iffalse
	One defines
	a new matrix $|\check{I}|\times |\check{I}|$-matrix $\check{A}$ by taking sums of rows related by 
	the automorphism $\sigma$ by the following formula: 
	\begin{equation}
	\label{eqn:foldingmatrix}
	\check{A}_{ij}:=s_i\frac{N_i}{N}\sum_{a=0}^{N-1}A_{\sigma^{a}i,j}, \mbox{where} \ s_i=1-\sum_{a=1}^{N_i-1}A_{\sigma^{a}i,i}.
	\end{equation}
	By the above formula, we get that $\check{A}$ is an indecomposable Cartan matrix of finite type and the associate simple Lie algebra is denote by $\frg_{\sigma}$.
	\fi



	Further  denote by $\frg^{\sigma}$ 
	the Lie algebra of $\frg$ fixed by $\sigma$.  The Lie algebras
	$\frg_{\sigma}$ 
	and 
	$\frg^{\sigma}$ are Langlands dual to each other. The following list is from \cite{FSS}: 
	
	\iffalse
	We briefly recall the construction from Section 2 in \cite{FSS} for completeness. 
	
	Let $A$ denote the Cartan matrix of $\frg$ and let $I$ be the set of the
	vertices of the Dynkin diagram. 
	\fi
	
	
	\begin{table}[htbp]\label{table:orbitLie1}
		\begin{center}
		
			\label{tab:table1a}
			\begin{tabular}{l|c|c|r}
				\hline
				Case&			$\mathfrak{g}$  & $\frg_{\sigma}$ &$\frg^{\sigma}$ \\
				\hline
				\hline
				1&		$A_{2n}$, $n\geq 2$ & $C_n$&$B_n$\\
				2&	$A_{2n-1}$, $n\geq 3$& $B_n$& $C_n$ \\
				3&	$D_{n+1}$, $n\geq 4$ & $C_n$& $B_n$\\
				4&	$D_{4}$ & $G_2$ &$G_2$\\
				5&	$E_6$ & $F_4$& $F_4$ \\
				\hline
			\end{tabular}
		\end{center}
	\end{table}
	
	\iffalse
	\begin{itemize}
		\item If $\frg=A_{2n}$, then $\frg_{\sigma}=C_n$.
		\item If $\frg=A_{2n-1}$,then  $\frg_{\sigma}=B_n$.
		\item If $\frg=D_{n+1}$, then  $\frg_{\sigma}=C_n$. 
		\item If $\frg=D_4$, then  $\frg_{\sigma}=G_2$. 
		\item If $\frg=E_6$, then  $\frg_{\sigma}=F_4$. 
	\end{itemize}
	\fi
	We fix an enumeration the orbit representatives such
	that it is the smallest in the orbit. More precisely 
	$$\check{I}=\{i \in I | i \leq \sigma^{a}(i), \ \mbox{and}\  0\leq a \leq N-1\}.$$Let $N_i$ 
	denote the
	order of the orbit at $i\in I$. 
	Let $P(\frg)^{\sigma}$ denote the set of integral weights which are invariant 
	under $\sigma$ and consider the fundamental weights $\omega_1,\dots, \omega_{\operatorname{rank}{\frg}}$ of $\frg$.  The following is an easy observation:
	\begin{lemma}\label{lem:bijecofweights}
		There is a natural bijection $\iota:P(\frg)^{\sigma}\rightarrow P(\frg_{\sigma})$ which 
		has 
		the following properties:
		\begin{enumerate}
			\item For $i\in \check{I}$, we get $\sum_{a=0}^{N_i}\iota(\omega_{\sigma^{a}i})=\omega_{i}$
			\item $\iota(\overline{\rho})=\overline{\rho}_{\sigma}$, where $\overline{\rho}$ and $\overline{\rho}_{\sigma}$ are 
			sums of the fundamental weights of $\frg$ and $\frg_{\sigma}$ respectively. 
		\end{enumerate}
	\end{lemma}
	
	
	
	
	
	
	\iffalse
	
	\begin{notation}Recall that $\mathring{\mathfrak{g}}$ denote the finite dimensional algebra whose Cartan matrix is obtained by deleting the $0$-th row and column of $X_N^{(m)}$.  Throughout Sections \ref{sec:comp1}-\ref{sec:comp4}, $\mathring{Q}$ will denote
		the root lattice $Q(\mathring{\mathfrak{g}})$; $\Lambda_i$'s  will denote the affine fundamental weights of $\frg(X_N^{(m)})$ and $\overline{\Lambda}_i$ will denote their orthogonal horizontal projects with respect to invariant bilinear form $\frg(X_N^{(m)})$; $\omega_1,\dots. \omega_{\operatorname{rank \mathring{\mathfrak{g}}}}$ will denote the fundamental weights of $\mathring{\mathfrak{g}}$; and the weight $\omega_0$ of the trivial representation of $\mathring{\mathfrak{g}}$ will be considered as the zero-th fundamental weight. Moreover $M^*$ denotes the dual lattice of $\mathring{Q}$ with respect to the Killing form $\kappa_{\mathfrak{g}}$ (Proposition \ref{prop:formulaforkg})
	\end{notation}
	\subsection{Integrable Highest weight representations of $A_{2n-1}^{(2)}$}\label{sec:comp1}
	\iffalse
	In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=B_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n-1}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the orthogonal projection to $C_n$ under the normalized invariant bilinear form on $\mathfrak{g}(A_{2n-1}^{(2)})$  denoted by $\kappa_{\mathfrak{g}}$. For notational conveniences, we let $\omega_0$ to be weights corresponding to the trivial representation of $C_n$ and regard it as the $0$-th fundamental weights.
	\fi
	In this case $\mathring{\mathfrak{g}}=C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
	The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$ can be rewritten as follows:
	\begin{equation}\label{eqn:levellweightforA2n-12}
	P^{\ell}(\mathfrak{g}(A_{2n-1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(C_{n})| b_1+2(b_2+\dots+b_n)\leq \ell \}.
	\end{equation}
	
	\subsection{Integrable Highest weight representations of $D_{n+1}^{(2)}$}\label{sec:comp2}In this case ${\mathring{\mathfrak{g}}}=B_n$. As in the previous case, it turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$  are  can be rewritten as follows:
	\begin{equation}\label{eqn:levellweightforDn+12}
	P^{\ell}(\mathfrak{g}(D_{n+1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(B_n)| 2(b_1+\dots+b_{n-1})+b_n\leq \ell \}.
	\end{equation}
	
	\subsection{Integrable Highest weight representations of $D_{4}^{(3)}$}\label{sec:comp3} In this case, $\mathring{\mathfrak{g}}=\mathfrak{g}_2$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}$ is also $\mathfrak{g}_2$.  Then $\overline{\Lambda}_1=\omega_2$ and $\overline{\Lambda}_2=\omega_1$, where $\omega_1$ and $\omega_2$ are the fundamental weights of the Lie algebra $\mathfrak{g}_2$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
	\begin{equation}\label{eqn:levellweigtforD43}
	P^{\ell}(\mathfrak{g}(D_4^{(3)}))=\{b_1\omega_1+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.
	\end{equation}
	
	\subsection{Integrable Highest weight representations of $E_{6}^{(2)}$}\label{sec:comp5}In this case $\mathring{\mathfrak{g}}=\mathfrak{f}_4$ Then $\overline{\Lambda}_1=\omega_4$ and $\overline{\Lambda}_2=\omega_3$, $\overline{\Lambda}_3=\omega_2$ and $\overline{\Lambda}_4=\omega_1$, where $\omega_1,\dots,\omega_4$ are the fundamental weights of the Lie algebra $\mathfrak{f}_4$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
	\begin{equation}\label{eqn:levellweigtforE62}
	P^{\ell}(\mathfrak{g}(E_6^{(2)}))=\{b_1\omega_1+\dots+ b_4\omega_4\in P_{+}(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.
	\end{equation}
	
	\subsection{S-matrix for $A_{2n-1}^{(2)}$}\label{sec:comp6}Let $P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n-1}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n-i}$ of the vertices of the Dynkin diagram of $A_{2n-1}$. It can be described explicitly as. 
	$$P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n-1}b_{i}(\omega_i+\omega_{2n-i})+b_n\omega_n\in P_{+}(A_{2n-1})| 2(b_1+\dots+b_{n-1})+b_n\leq \ell\}.$$
	Since the fixed point orbit Lie algebra of $A_{2n-1}$ under the action of the involution $\sigma$ is $B_n$, there is a natural bijection between $\iota:P(A_{2n-1})^{\sigma}\rightarrow P(B_n).$ Thus under the map $\iota$ restricts to a bijection:
	\begin{equation}
	\label{eqn:idf1}
	\iota:P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_{n+1}^{(2)})) 
	\end{equation}
	and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $B_n$ and $C_n$ following Section 13.9 in \cite{Kac}
	$$\tau_{\kappa}:\mathfrak{h}(B_n)\rightarrow \mathfrak{h}(C_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i, \ \mbox{for $1\leq i\leq n$},$$ and where $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively dual Coxeter) label of the Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$. 
	
	The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n-1}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n-1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{n+1}^{(2)}))$. We recall the following formula \cite{Kac} for the crossed $S$-matrix ${S}^{(\ell)}(A_{2n-1}^{(2)})$ whose $(\lambda,\mu)$-th entry is given by the formula:
	\begin{align}
	\label{{eqn:SmatrixforA2n-12}}{S}_{\lambda,\mu}^{(\ell)}(A_{2n-1}^{(2)})=
	i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
	\end{align}
	where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)
	
	
	\subsection{S-matrix for $D_{n+1}^{(2)}$}\label{sec:comp7}Let $P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{n+1}^{(1)})$ which are fixed by the involution which exchanges the $n$ and $n+1$-th vertices of the Dynkin diagram of $D_{n+1}$. It can be described explicitly as. 
	$$P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}b_{i}\omega_i+b_n(\omega_n+\omega_{n+1})\in P_{+}(D_{n+1})| b_1+2(b_1+\dots+b_{n})\leq \ell\}.$$
	Since the fixed point orbit Lie algebra of $D_{n+1}$ under the action of the involution $\sigma$ is $C_n$, there is a natural isomorphism between $\iota:P(D_{n+1})^{\sigma}\rightarrow P(C_n)$. Moreover, the map $\iota$ restricts to a bijection of
	\begin{equation}\label{eqn:idff4}
	\iota:P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(A_{2n-1}^{(2)}))
	\end{equation}and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $C_n$ and $B_n$ following Section 13.9 in \cite{Kac}
	$$\tau_{\kappa}:\mathfrak{h}(C_n)\rightarrow \mathfrak{h}(B_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i,$$ where $1\leq i \leq n$ and $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{n+1}^{(2)})$. 
	
	The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{n+1}^{(2)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{n+1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(A_{2n-1}^{(2)}))$. The $(\lambda,\mu)$-th entry of the crossed $S$-matrix ${S}_{\lambda,\mu}^{(\ell)}(D_{n+1}^{(2)})$ is
	\begin{equation}\label{{eqn:SmatrixforDn+12}}
	{S}^{(\ell)}_{\lambda,\mu}(D_{n+1}^{(2)})=
	i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
	\end{equation}
	where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)
	
	
	
	\subsection{S-matrix for $D_{4}^{(3)}$}\label{sec:comp8}Let $P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{4}^{(1)})$ which are fixed by rotation $\sigma$ that rotates the $1\rightarrow 3\rightarrow4\rightarrow 1$-th vertices of the Dynkin diagram of $D_{4}$. It can be described explicitly as. 
	$$P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_3+\omega_4)+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.$$
	Since the fixed point orbit Lie algebra of $D_{4}$ under the action of the involution $\sigma$ is $\mathfrak{g}_2$, there is a natural isomorphism between $\iota:P(D_{4})^{\sigma}\rightarrow P(\mathfrak{g}_2)$. Moreover, the map $\iota$ restricts to a bijection of
	\begin{equation}\label{idf2}
	\iota:P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_4^{(3)}))
	\end{equation}
	and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{g}_2$ following Section 13.9 in \cite{Kac}
	$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{g}_2)\rightarrow \mathfrak{h}(\mathfrak{g}_2), \  \omega_2 \rightarrow \frac{a_2}{a_2^{\vee}}\omega_1, \ \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_2,$$ where $1\leq i \leq 2$ and $a_{1},a_{2}$ (respectively $a_1^{\vee},a_2^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{4}^{(3)})$. 
	
	The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{4}^{(3)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{4}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{4}^{(3)}))$. We recall the following formula \cite{Kac}:
	\begin{equation}	\label{{eqn:SmatrixforD43}}
	{S}^{(\ell)}_{\lambda,\mu}(D_{4}^{(3)})=
	i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{3}}{|M^*/(\ell+6)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+6}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}))\bigg), 
	\end{equation}
	where $\overline{\rho}$ denotes the sum of the fundamental weights of $\mathfrak{g}_2$
	
	
	\subsection{S-matrix for $E_{6}^{(2)}$}\label{sec:comp4}Let $P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(E_{6}^{(1)})$ which are fixed by rotation $\sigma$ that interchanges $1$-st with $5$-th;$2$-th with $4$-th and fixes the $3rd$ and $6$-th vertices of the Dynkin diagram of $E_{6}$. It can be described explicitly as. 
	$$P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_5)+b_2(\omega_2+\omega_4)+ b_3\omega_3+ b_4\omega_6\in P_+(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.$$
	Since the orbit Lie algebra of $E_{6}$ under the action of the involution $\sigma$ is $\mathfrak{f}_4$, there is a natural bijection between $\iota:P(E_{6})^{\sigma}\rightarrow P(\mathfrak{f}_4)$. Moreover, the map $\iota$ restricts to a bijection of
	\begin{equation}
	\label{eqn:idf2}
	\iota:P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(E_6^{(2)})) 
	\end{equation}
	and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{f}_4$ following Section 13.9 in \cite{Kac}
	$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{f}_4)\rightarrow \mathfrak{h}(\mathfrak{f}_4), \  \omega_4 \rightarrow \frac{a_4}{a_4^{\vee}}\omega_1, \ \omega_3\rightarrow \frac{a_3}{a_3^{\vee}}\omega_2, \ \omega_2\rightarrow \frac{a_2}{a_2^{\vee}}\omega_3, \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_4,$$ where  $a_{1},a_{2},a_3, a_4$ (respectively $a_1^{\vee},a_2^{\vee},a_3^{\vee},a_4^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(E_{6}^{(2)})$. 
	
	The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({E_{6}^{(2)}}))$ and $ P^{\ell}(\frg(E^{(1)}_{6}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(E_{6}^{(2)}))$. We recall the following formula from \cite{Kac}
	\begin{align}
	\label{{eqn:SmatrixforE62}}
	{S}^{(\ell)}_{\lambda,\mu}(E_{6}^{(2)})=
	\sqrt{2}i^{|\mathring{\Delta}_{+}|}|M^*/(\ell+12)\mathring{Q}|^{-\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+12}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho})\bigg), 
	\end{align}
	where $\overline{\rho}$  denotes the sum of the fundamental weights of $\mathfrak{f}_4$
	
	
	
	
	
	
	
	\subsection{S-matrix for $A_{2n}^{(2)}$}In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=C_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the projection to $C_n$ under the normalized invariant bilinear form on  denoted by $\kappa_{\mathfrak{g}}$. Now let $\omega_0,\omega_1,\dots,\omega_n$ denote the fundamental weights of $C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
	The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n}^{(2)})$ can be rewritten as follows:
	\begin{equation}\label{eqn:levellweightforA2n2}
	P^{\ell}(\mathfrak{g}(A_{2n}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_{+}(C_n)| 2(b_1+b_2+\dots+b_n)\leq \ell \}.
	\end{equation}
	
	
	\begin{remark}\label{rem:altdef}
		With the convention of the numbering of the vertices of the affine Dynkin diagram in the case $A_{2n}^{(2)}$, we get the fixed point Lie algebra is of type $B_n$ whereas $\mathring{\mathfrak{g}}=C_n$. However it is sometimes convenient to choose a different ordering of the vertices of the Dynkin diagram such that the new horizontal subalgebra is same as the fixed point algebra $B_n$. This can be done if we renumber the vertices  by reflecting about the $n$-th vertex of the affine Dynkin diagram. Under the new numbering system we get an alternate description
		\begin{equation}\label{eqn:a2n}
		P^{\ell}(\frg(A_{2n}^{(2)}))=\{\sum_{i=1}^n{\widetilde{b}_i}\omega_i\in P_{+}(B_n)| \widetilde{b}_1+\dots+\widetilde{b}_{n-1}+\frac{\widetilde{b}_{n}}{2}\leq \frac{\ell}{2}, \ \ell-\widetilde{b}_n \ \mbox{is even}\},
		\end{equation}
		where $\widetilde{\omega}_1,\dots,\widetilde{\omega}_n$ are fundamental weights of the Lie algebra of type $B_n$. In particular, we observe that $P^{1}(\frg,\sigma)=\{\omega_n\}$. 
		We refer the reader to compare it with the description of $P^{\ell}(\frg,\gamma)$ in \cite{KH}.
	\end{remark}
	
	Let $P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n+1-i}$. It can be described explicitly as. 
	$$P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}a_{i}(\omega_i+\omega_{2n-i})\in P_+(A_{2n})| 2(b_1+\dots+b_n)\leq \ell\}.$$ Under the map $\iota: P(A_{2n})^{\sigma}\rightarrow P(C_n)$, there is a natural bijection between $\iota: P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}\rightarrow P^{\ell}(\frg({A_{2n}^{(2)})})$. Hence we will identify the two using the map $\iota$.
	The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}$ respectively. We recall the following Theorem 13.8 \cite{Kac}
	\begin{equation}
	\label{{eqn:SmatrixforA2n2}}
	{S}^{(\ell)}_{\lambda,\mu}(A_{2n}^{(2)})=i^{|\mathring{\Delta}_{+}|}(\ell+2n+1)^{-\frac{1}{2}}\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n+1}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \mu+\overline{\rho})\bigg), 
	\end{equation}where $\overline{\rho}$ denotes the sum of the fundamental weights of $C_n$. Moreover, the matrix ${S}^{(\ell)}(A_{2n}^{(2)})$ has the following properties \cite{Kac}.
	\begin{proposition}\label{prop:propertiesofSmatrixA2n2}
		\label{prop:unitarityforSmatrixA2n2}The matrix $\big({S}^{(\ell)}(A_{2n}^{(2)})\big)_{\lambda,\mu}={S}^{(\ell)}_{\lambda,\mu}({A_{2n}^{(2)}})$  is symmetric and unitary. 
	\end{proposition}
	\iffalse
	\subsubsection{Crossed $S$-matrices associated to arbitrary automorphisms}\label{sec:croosedarbitrary}
	Let $\gamma$ be an arbitrary automorphism of a simple Lie algebra $\frg$ and let $\widehat{L}(\frg,\gamma)$ denote the twisted Kac-Moody Lie algebra as defined in Section \ref{sec:affineLiealgtwisted}. Recall there is a natural isomorphism of $\widehat{L}(\frg,\gamma)$ with an twisted affine Kac-Moody Lie algebra of type $X_N^{(m)}$, where the Lie algebra $\frg$ is of type $X_N$ and $X_N^{(m)}$ is determined by the diagram automorphism  $\sigma$ arising from $\gamma$.
	Thus there are  natural bijections $$\beta_1: P_{\ell}(\frg)^{\gamma}\simeq P_{\ell}(\frg)^{\sigma}, \ \mbox{and} \ \beta_2:P^{\ell}(\frg,\langle \gamma \rangle )\simeq P^{\ell}(\frg(X_N^{(m)})).$$
	Let for any element $(\lambda,\mu)\in P^{\ell}(\frg,\gamma)\times P_{\ell}(\frg)^{\gamma}$, consider the number \begin{equation}\label{eqn:crossedsgeneral}
	S^{\gamma}_{\lambda,\mu}:=S^{(\ell)}_{\beta_1(\lambda),\beta_2(\mu)}(X_N^{(m)}),
	\end{equation}
	where $S^{(\ell)}(X_N^{(m)})$ is the crossed S-matrix at level $\ell$  given by equations \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}}, \ref{{eqn:SmatrixforD43}}, \ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}.
	\begin{definition}
		We define the {\em crossed S-matrix} $S^{\gamma}$ at level $\ell$ associated to $\gamma$ to be a matrix whose rows  and columns are parameterized by $P^{\ell}(\frg,\langle \gamma \rangle)$ and $P_{\ell}(\frg)^{\gamma}$ and whose $(\lambda, \mu)$-th entry $S_{\lambda,\mu}^{\gamma}$ is given by Equation \eqref{eqn:crossedsgeneral}.
	\end{definition}
	\fi
	\subsection{Relation with untwisted S-matrices}\label{sec:comparision}This section is motivated by the two observations. First, the equivariantization of a $\Gamma$-crossed modular functor is a modular functor, hence crossed $S$-matrices must be submatrices of an uncrossed $S$-matrix. Secondly, in the {\tt KAC} software, the uncrossed $S$-matrices and the crossed $S$-matrices of type $A_{2n}^{(2)}$ are available for computational purposes.   One can compute all crossed $S$-matrices in the remaining types using {\tt KAC} as follows:
	
	
	
	Let $A$ be a Cartan matrix of either of the following types $$A: A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_6^{(2)}, D_4^{(3)}.$$
	We consider the Cartan matrix $A^{t}$ obtained by taking transpose of the matrix $A$. In these cases,  observe that the affine Lie algebra associated to $A^t$ is of untwisted type. They are given as: $$A^t: B_n^{(1)}, C_n^{(1)}, F_4^{(1)}, G_2^{(1)}.$$ If $\mathring{A}$ and $\mathring{A}^t$ denote the Cartan matrix obtained by deleting the $0$-th row and column, then we get $\frg(\mathring{A})$ and $\frg(\mathring{A}^t)$ are Langlands dual. 
	Define  the map $\tau:\mathfrak{h}(A)\rightarrow {\mathfrak{h}}(A^t)$ by the following:
	\begin{equation}\label{eqn:transposemap}
	\Lambda_i \rightarrow\frac{a_i^{\vee}}{a_i}\Lambda_i^{t}, \ \delta \rightarrow \delta^t, 
	\end{equation}
	where $\Lambda_0,\dots,\Lambda_n$ (respectively $\Lambda_0^{t},\dots,\Lambda_n^{t}$) are affine fundamental weights for the affine Lie algebra associated to $A$ (respectively $A^t$) and $\delta$ (respectively $\delta^t$) as in Section \ref{sec:twistedaffinekmnew}. We now consider the map $\mathring{\tau}: P^{\ell}(\mathfrak{g}(A))\hookrightarrow P^{\ell+h^{\vee}-h}(\mathfrak{g}(A^{t}))$ given by the formula 
	\begin{equation}\label{weirdshift}
	\mathring{\tau}(\lambda):=\tau(\lambda+\overline{\rho})-\overline{\rho}^t,
	\end{equation}
	where $\overline{\rho}$(respectively $\overline{\rho}^t$) are sum of the fundamental weights of the horizontal subalgebra of $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. 
	
	The affine Lie algebras of type $A^{t}$ are all untwisted affine Kac-Moody Lie algebra, hence denote by $S_{\lambda,\mu}^{(\ell)}(A^t)$-the $(\lambda,\mu)$-th entry of the  $S$-matrix of type $A^t$ at level $\ell$. We refer the reader to Chapter 13 in \cite{Kac} for more details. The following proposition is well known  and can be checked directly. We also refer the reader to Proposition 3.2 in \cite{AG}.
	
	\begin{proposition}\label{prop:crossedvsuncrossed}
		Let $\mathfrak{g}(A)$ be a twisted affine Kac-Moody Lie algebra associated to the Cartan matrix $A$ of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, D_4^{(3)}, E_6^{(2)}$, then the crossed $S$ matrices are related to the $S$ matrices of $\mathfrak{g}(A^t)$ by the following formula
		$${S}_{\lambda,\mu}^{(\ell)}(A)=|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|^{\frac{1}{2}}S_{\mathring{\tau}(\lambda),{\tau}\circ\tau_{\kappa}(\mu)}^{(\ell+h^{\vee}-h)}(A^t),$$ where $h^{\vee}$ and $h$ are the dual Coxeter numbers of the Lie algebra $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. Moreover, $|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|$ is two when $A$ is either $A^{(2)}_{2n-1}$, $D^{(2)}_{n+1}$ and $E^{(2)}_6$ and is three when $A$ is of type $D_4^{(3)}$.
	\end{proposition}
	\subsubsection{Some computations}\label{sec:usefulcomputations}
	We list the following facts which are very useful in computing the crossed S-matrices. Using proposition \ref{prop:crossedvsuncrossed}, we can use \texttt{KAC} to compute the crossed $S$ matrices. 
	\begin{itemize}
		\item The case $A_{2n-1}^{(2)}$:
		\begin{itemize}
			\item $\tau\circ\tau_{\kappa}$ is identity.
			\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
			\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
		\end{itemize}
		\item The case $D_{n+1}^{(2)}$:
		\begin{itemize}
			\item $\tau\circ\tau_{\kappa}$ is identity.
			\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
			\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
		\end{itemize}
		\item The case $D_4^{(3)}$:
		\begin{itemize}
			\item $\tau(\omega_1)=3\omega_2^t$ and $\tau(\omega_2)=\omega_1^t$.
			\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i^{t}$ for $1\leq i\le 2$.
			\item $\mathring{\tau}(\omega_0)=2\omega_2^t$.
		\end{itemize}
		\item The case $E_6^{(2)}$: 
		\begin{itemize}
			\item $\tau(\omega_1)=2\omega_4^t$, $\tau(\omega_2)=2\omega_3^t$, $\tau(\omega_3)=\omega_2^t$, $\tau(\omega_4)=\omega_1^t$. 
			\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i$ for $1\leq i\leq 4$.
			\item $\mathring{\tau}(\omega_0)=\omega_3^{t}+\omega_4^t$.
		\end{itemize}
	\end{itemize}
	\fi
	\iffalse
	
	\section{Twisted Fusion Rings}\label{sec:twistedfusion}




	%














	%










	%

	%




















	%

	\subsection{Categorical twisted Grothendieck rings and fusion rings}
	In this section we recall the definition of categorical twisted fusion rings from \cite[\S2.2,\S2.3]{Desh:17}. Let $\mathcal C$ be a finite semisimple $\mathbb C$-linear abelian category equipped with an autoequivalence $\gamma:\mathcal C\to \mathcal C$. Let $P$ denote the finite set of (isomorphism classes of) simple objects of $\mathcal C$. Consider the (non-semisimple) abelian category $\mathcal C^\gamma$ obtained by $\gamma$-equivariantization whose objects are pairs $(C,\psi)$ where $C$ is an object $\mathcal C$ and $\psi:\gamma(C)\xrightarrow\cong C$. We now define the twisted complexified Grothendieck group $K_{\CBbb}(\mathcal C,\gamma)$ as follows:  Consider the complexified Grothendieck group $K_{\CBbb}(\mathcal C^\gamma)$ and then quotient out by the relation $[C,c\psi]=c[C,\psi]$ for each class $[C,\psi]\in K_{\CBbb}(\mathcal C^\gamma)$ and $c\in \mathbb C^\times$. We continue to use the notation $[C,\psi]$ to denote the corresponding class in $K_{\CBbb}(\mathcal C,\gamma)$.
	\begin{proposition}\label{p:dimoftwistedspace}
		(i) We have $\dimK_{\CBbb}(\mathcal C,\gamma)=|P^\gamma|$, the number of simple objects stabilized by $\gamma$. For each $C\in P^\gamma$, choose an isomorphism $\psi_C:\gamma(C)\to C$. Then the set $\{[C,\psi_C]|C\in P^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C,\gamma)$.\newline
		(ii) If $\mathcal C$ also has a monoidal structure and if $\gamma$ is a monoidal autoequivalence, then $K_{\CBbb}(\mathcal C,\gamma)$ has the structure of a $\mathbb C$-algebra, which we call the (complexified) twisted fusion ring.
	\end{proposition}
	\begin{proof}
		Note that we can consider $\mathcal C$ as a module category over the monoidal category $\Vec$ of finite dimensional $\mathbb C$-vector spaces. Now the statement (i) follows from the proof of \cite[Prop. 2.4(i)]{Desh:17}. We essentially need to prove that for any $\gamma$-orbit $O\subset P$ of cardinality at least 2, $K_{\CBbb}(\mathcal C_O,\gamma)=0$, where $\mathcal C_O\subset \mathcal C$ is the full subcategory generated by the simple objects in $O$. As in {\it loc. cit.} this can be done by looking at the isomorphism classes of simple objects in $\mathcal C_O^\gamma$ and noting that $1-\zeta\in \mathbb C^\times$ must act by 0 on $K_{\CBbb}(\mathcal C_O,\gamma)$ for each $|O|$-th root of unity $\zeta\in \mathbb C^\times$. Now to prove (ii), it is straightforward to check that the subspace of $K_{\CBbb}(\mathcal C^\gamma)$ that we are quotienting by is an ideal.
	\end{proof}
	
	Suppose we have an object $(A,\psi)\in \mathcal C^\gamma$ for an abelian category $\mathcal C$. For each simple object $C$, define the multiplicity vector space $N_A^C:=\Hom(C,A)$. We obtain the isomorphism of vector spaces
	$$N_A^C=\Hom(C,A)\cong \Hom(\gamma(C),\gamma(A))\xrightarrow{\psi\circ(\cdot)}\Hom(\gamma(C),A)=N_A^{\gamma(C)}.$$
	Now for each simple object in $\mathcal C$ stabilized by $\gamma$ let us choose an isomorphism $\psi_C:\gamma(C)\xrightarrow\cong C$. These choices give us the linear isomorphisms $N_C^{\gamma(C)}\xrightarrow{}N_A^C$ and hence the linear automorphisms $\phi_{A,\psi}^{C,\psi_C}:N_A^C\xrightarrow{\cong}N_A^C$. Then using the above proposition, we have the following equality in the twisted Grothendieck vector space $K_{\CBbb}(\mathcal C,\gamma)$
	\begin{equation}\label{eq:equalityintwistedgrothendieck}
	[A,\psi]=\sum\limits_{C\in P^\gamma}\tr(\phi_{A,\psi}^{C,\psi_C})[C,\psi_C].
	\end{equation}
	
	
	
	\subsubsection{The twisted fusion ring in terms of traces on multiplicity spaces} Let us now assume that $\mathcal C$ is a weakly fusion category equipped with a monoidal action of a finite group $\Gamma$. Let $\gamma\in \Gamma$ be an element of order $m$. In particular we have an equivalence $\gamma^m\cong \id_{\mathcal C}$ of monoidal functors. Then the $\langle\gamma\rangle\cong \mathbb Z/m\mathbb Z$-equivariantization $\mathcal C^{\langle\gamma\rangle}$ is also a weakly fusion category. We can consider the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ as a quotient of $K_{\CBbb}(\mathcal C^{\langle\gamma\rangle})$ modulo the relations $[C,\zeta\psi]=\zeta[C,\psi]$ for any $m$-th root of unity $\zeta$ (see \cite[\S2.3]{Desh:17} for details). As in {\it loc. cit.} the weak duality on $\mathcal C^{\langle\gamma\rangle}$ induces a $\mathbb C$-semilinear involution $(\cdot)^*$ on $K_{\CBbb}(\mathcal C,\gamma)$ as a vector space.
	
	Consider objects $(C_1,\psi_1),\cdots (C_n,\psi_n)$ in $\mathcal C^{\langle\gamma\rangle}$. Then we have the following composition of natural isomorphisms 
	$$\phi_{C_1,\psi_1,\cdots,C_n,\psi_n}:\Hom(\unit,C_1\otimes\cdots \otimes C_n)\xrightarrow{\cong}\Hom(\gamma(\unit),\gamma(C_1\otimes\cdots \otimes C_n))$$
	$$\xrightarrow{\cong}\Hom(\unit,\gamma(C_1)\otimes\cdots \otimes \gamma(C_n))\xrightarrow\cong\Hom(\unit,C_1\otimes\cdots \otimes C_n).$$
	
	Now let $A,B,C$ be simple objects of $\mathcal C$. Since we have assumed that $\mathcal C$ is weakly fusion, the multiplicity space $N^C_{A\otimes B}=\Hom(C,A\otimes B)$ is canonically identified with $\Hom(\unit,{ }^*C\otimes A\otimes B)$. 
	
	Now as before, for each simple object $C\in \mathcal C$ stabilized by $\gamma$, let us choose a $\langle\gamma\rangle$-equivariant structure $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C^{\langle\gamma\rangle}$. Using (\ref{eq:equalityintwistedgrothendieck}) for each $A,B\in P^\gamma$ we obtain the following equality in the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$
	\begin{equation}\label{eq:equalityintwistedfusionring}
	[A,\psi_A]\cdot[B,\psi_B]=\sum\limits_{C\in P^\gamma}\tr(\phi_{{}^*C,{}^*\psi_C,A,\psi_A,B,\psi_B})[C,\psi_C].
	\end{equation}
	\begin{remark}\label{rk:twistedfusionringsagree}
		In other words, this means that the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ can also be defined by taking the fusion rules (see Section \ref{section:hongfusion} below) obtained by tracing out automorphisms of multiplicity spaces. This approach was used in \cite{Hong1,Hong} to define twisted fusion rings at level $\ell$ associated to a diagram automorphism of a simple Lie algebra $\frg$.
	\end{remark}
	\subsubsection{Character table of twisted fusion rings of modular categories}
	Let us now assume that $\mathcal C=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ is a $\Gamma$-crossed modular category. In particular, we have a modular action of $\Gamma$ on the identity component $\mathcal C_1$ which is a modular category. Hence for each $\gamma\in \Gamma$ we have the twisted fusion ring $K_{\CBbb}(\mathcal C_1,\gamma)$ which in this case is a commutative Frobenius $\ast$-algebra that has been studied in \cite{Desh:17}. We recall that for each $\gamma\in \Gamma$, $P_\gamma$ denotes the set of simple objects of $\mathcal C_\gamma$. For each simple object $C$ of $\mathcal C_1$ stabilized by $\gamma$, we choose an isomorphism $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C_1^{\langle\gamma\rangle}$. The set $\{[C,\psi_C]|C\in P_1^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C_1,\gamma)$. It was proved in \cite[Thm. 2.12(i)]{Desh:17} that the categorical $\gamma$-crossed S-matrix $S^\gamma$ (it is a $P_\gamma\times P_1^\gamma$ matrix, see Definition \ref{d:normalizedcrossedsmatrix}) is essentially the character table of $K_{\CBbb}(\mathcal C_1,\gamma)$:
	\begin{proposition}\label{p:chartableoftwistedfusion}
		Let $M$ be a simple object of $\mathcal C_\gamma$. For each $C\in P_1^\gamma$, define $\chi_M([C,\psi_C])=\frac{S^\gamma_{M,C}}{S^{\gamma}_{M,\unit}}$ and extend linearly. Then $\chi_M:K_{\CBbb}(\mathcal C_1,\gamma)\to \mathbb C$ is a character and the set $\{\chi_M|M\in P_\gamma\}$ is the set of all irreducible characters of $K_{\CBbb}(\mathcal C_1,\gamma)$. 
	\end{proposition}
	\fi
	
\subsection{Fusion rules associated to automorphisms}\label{section:hongfusion}

Let $\frg$ be any simple  Lie algebra. For any $n$-tuple $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)$, consider the dual conformal block 
$\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1, \vec{z})$ at level $\ell$. 
Now given any diagram automorphism $\sigma: \mathfrak{g} \rightarrow \mathfrak{g}$, we get an 
automorphism of $\sigma^*: P_{\ell}(\frg)\rightarrow P_{\ell}(\frg)$. 
This induces a map 
of the dual conformal blocks 
$$\sigma: \mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})\rightarrow \mathcal{V}_{\sigma^*({\vec{\lambda}})}(\mathbb{P}^1,\vec{z}),$$ 
where $\sigma^*({\vec{\lambda}})=(\sigma^*\lambda_1,\dots, \sigma^*\lambda_n)$.  Let $P_{\ell}(\mathfrak{g})^{\sigma}$ 
denote the set of level $\ell$ weights fixed by $\sigma$. Thus, 
if $\vec{\lambda} \in (P_{\ell}(\mathfrak{g})^{\sigma})^n$, then we get 
an element $\sigma$ in $\operatorname{End}(\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$. 
In \cite{Hong}, Jiuzu Hong defines a fusion rule associated to $\sigma$. 
\subsubsection{Twisted fusion rules for diagram automorphisms}\label{{section:hongfusion}}Now we restrict to 
the case when $\mathfrak{g}$ is simply laced and $\sigma$ is diagram automorphism 
of the Lie algebra $\mathfrak{g}$.  The following proposition can be found in  \cite{Hong}:
\begin{proposition} \label{pro:twistedfusionrule}
	The map $N_{\sigma}: \mathbb{N}^{P_{\ell}^{\sigma}(\mathfrak{g})}\rightarrow \mathbb{C}$ 
	given by 
	$N_{\sigma}(\sum_i \lambda_i ):=\operatorname{Tr}(\sigma| \mathcal{V}_{\vec{\lambda}}( \mathbb{P}^1, \vec{z}))$ satisfies 
	the hypothesis of  fusion rules (see \cite{BeauHirz}).
\end{proposition}
\begin{definition}
	The  ring given by Proposition \ref{pro:twistedfusionrule} will be denoted by $\mathcal{R}_{\ell}(\frg,\sigma)$ and will be called the twisted (Kac-Moody) fusion ring.  
\end{definition}

The set of characters of the fusion ring $\mathcal{R}_{{\ell}}(\frg,\sigma)$ has been described in \cite{Hong}. We recall the details below. \iffalse
Let $S_{\sigma}$ be the set of characters
of the fusion ring $\mathcal{R}_{{\sigma}}$ 
associated to the fusion rule $N_{\sigma}$. We 
now recall an explicit description the set $S_{\sigma}$ and
in particular of the matrix $\Sigma$ whose entries
are $(\chi(\lambda))_{S_{\sigma}\times P_{\ell}^{\sigma}(\mathfrak{g})}$. Consider the element $\omega=\sum_{\lambda \in P_{\ell}^{\sigma}(\frg)}\lambda\lambda^*$ 
and the diagonal
matrix $D_{\omega}$ whose entries are $|\chi(\lambda)|^{2}$ for $\chi \in S_{\sigma}$. 
\fi
\iffalse Let $\mathfrak{g}$ be a simply laced Lie algebras and $\sigma$ be a
diagram automorphism of the Lie algebra $\mathfrak{g}$. Associated to
the pair $(\mathfrak{g},\sigma)$, one considers the orbit Lie algebra $\mathfrak{g}_{\sigma}$ introduced in \cite{FSS}. 
We only recall a few basic notations and 
we refer the reader to Section 2.2 in \cite{FSS} for full details.  
Let $I$ be the set of vertices of the Dynkin diagram of $\mathfrak{g}$ and $\sigma$ i
s a graph 
automorphism of the Dynkin diagram. Now $I_{\sigma}$ denote
the set of orbits in $I$ under the automorphism $\sigma$. The vertices of
the Dynkin diagram of $\mathfrak{g}_{\sigma}$ has vertices index by $I_{\sigma}$. 
Now it is easy to observe that the lattice $P_{\ell}^{\sigma}(\mathfrak{g})$ 
has generators indexed by the elements in $I_{\sigma}$ with generators
of the $\sum{\omega_a}$, where $\omega_a$'s are all in the same orbit. Clearly
there is a bijection 
$$\iota : P^{\sigma}\simeq P_{\sigma}$$ 
\fi
Let $G_{\sigma}$ be the simply connected group associated to the
Lie algebra $\mathfrak{g}_{\sigma}$ and $T_{\sigma}$ be a maximal
torus in $G_{\sigma}$. Let $Q(\frg)$ be the root lattice of $\frg$ and let $Q(\frg)^{\sigma}$ be elements in the
root lattice of $\mathfrak{g}$ which are fixed by the automorphism
$\sigma$. Then under the transformation $\iota:P(\frg)^{\sigma}\rightarrow P(\frg_{\sigma})$, we get 
\begin{equation}\label{lemma:iotamagic}
\iota (Q(\mathfrak{g})^{\sigma})= \left\{
\begin{array}{ll}
Q(\mathfrak{g}_{\sigma}) & \mathfrak{g}\neq A_{2n}, \\
P(\mathfrak{g}_{\sigma})=\frac{1}{2}Q(\frg_{\sigma}) & \mathfrak{g}=A_{2n}. \\
\end{array} 
\right.
\end{equation}

Consider the following subset $T_{\sigma,\ell}$ of $T_{\sigma}$ given by 
$$T_{\sigma,\ell}:=\{t \in T_{\sigma}|e^{\alpha}(t)=1 \  \mbox{for} \ \alpha \in (\ell+h^{\vee})\iota(Q^{\sigma}(\mathfrak{g}))\}.$$ An element $t$ of $T_{\sigma,\ell}$ is called {\em regular} if the Weyl group $W_{\sigma}$ of $\frg_{\sigma}$ acts freely on $t$ and let $T^{\operatorname{reg}}_{\sigma,\ell}$ is set of regular elements in $T_{\sigma,\ell}$.  
\iffalse
Then by the Weyl character formula, we get:
\begin{equation}
\label{eqn:weylcharc}
\operatorname{Tr}_{V_{\iota({\lambda})}}(t)= \frac{\sum_{w\in W_{\sigma}}\ep(w)\exp((w(\iota(\lambda)+\overline{\rho}_{\sigma})(t))}{\sum_{w\in W_{\sigma}}\ep(w)\exp((w(\overline{\rho}_{\sigma})(t))},
\end{equation}
where $\overline{\rho}_{\sigma}$ is 
the half sum of positive roots in $\mathfrak{g}_{\sigma}$ and $t\in T^{\operatorname{reg}}_{\sigma,\ell}$.
\fi
Now the main result in \cite{Hong} is the following:
\begin{proposition}\label{prop:mainhong1}For $t \in T^{\reg}_{\sigma,\ell}/W_{\sigma}$,  
	the set $\operatorname{Tr}_{*}(t)$ gives the characters of 
	the fusion ring $\mathcal{R}_{{\ell}}(\frg,\sigma)$.  
\end{proposition}
Thus to study the character table of the fusion ring $\mathcal{R}_{{\ell}}(\frg,\sigma)$, we need to give an  explicit description of the set $T_{\sigma,\ell}^{\reg}/W_{\sigma}$ in terms of weights of the level $\ell$-representations of the twisted affine Lie algebra $\mathfrak{g}(X_N^{(m)})$ associated to $\sigma$. 
\begin{remark}
	In the case of fusion ring $\mathcal{F}_N$ associated to untwisted conformal blocks, there is a natural bijection \cite{BeauHirz} between $P_{\ell}(\frg)$ and $T^{\operatorname{reg}}_{\ell}/W$, where $W$ is the Weyl group of $\frg$. However, in the case of twisted fusion ring $\mathcal{R}_{{\ell}}(\frg,\sigma)$, there
	is no such natural bijection. 
\end{remark}

The following proposition should be considered as a generalization of Proposition 6.3 in \cite{BeauHirz} to the case of all affine Kac-Moody Lie algebras.
\begin{proposition}\label{prop:vitalbijectionthathongsshouldhavewrittenproperly}
	There is a natural bijection between $T_{\sigma,\ell}^{\operatorname{reg}}/W_{\sigma}$ with $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$.
\end{proposition}
\begin{proof}We divide our proof in the two major cases. First, we consider the case when the twisted affine Kac-Moody Lie algebra is of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_{6}^{(2)}$ or $D_{4}^{(3)}$. In \cite{Hong}, Hong introduces the following subset set of coweights $\check{P}(\frg_{\sigma})$ 
	$$\check{P}_{\sigma,\ell}:=\{\check{\mu}\in \check{P}(\frg_{\sigma})|\theta_{\sigma}(\check{\mu})\leq \ell\}.$$ Now Lemma 5.20 in \cite{Hong}, shows that there is a natural bijection between $\check{P}_{\sigma,\ell}$ and $T_{\sigma,\ell}^{\operatorname{reg}}/W_{\sigma}$. Thus we will be done if we can show that $P^{\ell}(\frg,\sigma)$ is in a natural bijection with $\check{P}_{\sigma,\ell}$. This set can be precisely described as 
	\begin{enumerate}\label{enu:hongpain1}
		\item If $\frg=A_{2n-1}$, then $\check{P}_{\sigma,\ell}=\{\sum_{i=1}^ne_i\check{\omega}_i| e_1+2(e_2+\dots+e_n)\leq \ell\}$.
		\item If $\frg=D_{n+1}$, then $\check{P}_{\sigma,\ell}:=\{\sum_{i=1}^ne_i\check{\omega}_i | 2(e_1+\dots+e_{n-1})+e_n\leq \ell\}$.
		\item If $\frg=D_{4}$, then $\check{P}_{\sigma,\ell}:=\{e_1\check{\omega}_1+e_2\check{\omega}_2|3e_1+2e_2\leq \ell\}$.
		\item If $\frg=E_{6}$, then $\check{P}_{\sigma,\ell}:=\{\sum_{i=1}^4e_i\check{\omega}_i| 2e_1+4b_2+3b_3+2e_4\leq \ell\}$.
	\end{enumerate}Here $\check{\omega}_i$'s are the fundamental coweights of the Lie algebra $\frg_{\sigma}$ and $e_i$'s are non-negative integers. 	By the explicit description of the set $P^{\ell}(\frg(X_N^{(m)}))$ by equations \eqref{eqn:levellweightforA2n-12}, \eqref{eqn:levellweightforDn+12},\eqref{eqn:levellweigtforD43} and \eqref{eqn:levellweigtforE62}, it follows that there is a natural bijection between $P^{\ell}(\frg,\sigma)$ and $\check{P}_{\sigma,\ell}$. 
	
	Now we consider the remaining case when $A=A_{2n}^{(2)}$. In this case, the horizontal subalgebra $\mathring{\mathfrak{g}}$ is same as $\frg_{\sigma}$. We define the map $\beta:P^{\ell}(\frg(A))\rightarrow T_{\sigma,\ell}$ given by the formula $\beta(\lambda)=\exp\big(\frac{2\pi i}{\ell+h^{\vee}}\nu_{\frg(A)}(\lambda+\overline{\rho})\big)$, where $\nu_{\frg(A)}$ is the isomorphism between $\mathfrak{H}^{*}(A) \rightarrow \mathfrak{H}(A)$ induced by the normalized Cartan-Killing form $\kappa_{\frg(A)}$ on $\frg(A)$ and $\overline{\rho}$ is the sum of the fundamental weights of the horizontal subalgebra $\mathring{\mathfrak{g}}$. Now the rest of the proof follows as in Proposition 9.3 in \cite{BeauHirz}.
	
\end{proof}
\iffalse
\begin{proof}We only need to consider the case $\mathfrak{g}(X_N^{(m)})$. In this case $\mathfrak{g}(X_N)_{\sigma}=\mathring{\mathfrak{g}}$. Hence $\mathring{W}=W_{\sigma}$ and $\widetilde{M}=M$.
	First we justify that it is enough to show that $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ is naturally isomorphic to $\mathring{P}/(\ell+h^{\vee})M$. Once we can show this,  then the $\mathring{W}$-orbits of $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ will be same as the $\mathring{W}$-orbits of $\mathring{P}/(\ell+h^{\vee})M$. Now by Proposition \ref{prop:fundamentalalcove}, this corresponds to points in the fundamental alcove $P^{+}(\mathfrak{g}(X_N^{(m)}))\cap C_{af, \ell+h^{\vee}}$ which by Corollary \ref{cor:interiorlevelell} is just $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$. Now the proof there is a natural isomorphism of $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ onto $\mathring{P}/(\ell+h^{\vee})M$ follows exactly as in Lemma 9.3 in \cite{BeauHirz}. 
\end{proof}
\fi

\subsubsection{Fusion rings associated to arbitrary automorphisms}\label{sec:arbtwistedfusion} In the previous section, we discussed how one can associate fusion rings to diagram automorphism. 
Let $\gamma:\frg \rightarrow \frg$ be an arbitrary finite order automorphism and $\sigma$ be the diagram automorphism of $\frg$ related to $\gamma$ by Proposition \ref{prop:classdia}. Then $\gamma $ 
and $\sigma$ differ by an inner 
automorphism of $\frg$ and hence we get  a bijection between $P(\frg)^{\gamma}$ and $P(\frg)^{\sigma}$. Now since $\gamma$ and $\sigma$ both preserve a normalized Cartan Killing 
form it follows that there exists a bijection between $P_{\ell}(\frg)^{\gamma}$ and $P_{\ell}(\frg)^{\sigma}$. 

If $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)\in (P_{\ell}(\frg)^{\sigma})^n$, then as in Section \ref{section:hongfusion}, we get an element in $\operatorname{End}(\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$. Since the untwisted conformal block $\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})$ is constructed as coinvariants of representation of the Lie algebra $\frg\otimes \mathcal{O}_{\mathbb{P}^1}(*\vec{z})$, it follows \cite[Section 5.3]{FS} that inner automorphism of $\frg$ acts trivially on the untwisted conformal block $\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})$. The above discussion can be summarized as follows:
\begin{proposition}
	Let $\vec{\lambda}\in (P_{\ell}(\frg)^{\sigma})^n$, we get $\operatorname{Tr}(\gamma|\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))=\operatorname{Tr}(\sigma|\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$.
\end{proposition}
Hence the twisted Kac-Moody fusion ring $\mathcal R_{\ell}(\frg,\gamma)$ associated to an arbitrary automorphism $\gamma$ just depends on the class of the diagram automorphism $\sigma$. 

\section{The $\Gamma$-crossed modular fusion category associated with twisted conformal blocks} \label{sec:threepointmtc}We now state one of the main theorems in this paper. We prove this theorem in the later sections (Section \ref{sec:proofofoneofmain}) using the formalism of $\Gamma$-crossed modular functors that will be developed in Part \ref{part:gmodfun} of the paper. We use this theorem to connect the fusion ring studied by J. Hong \cite{Hong} as a categorical twisted fusion ring as in Section \ref{sec:twistedfusion}. We have the following set up:

Let $m_1,m_2,m_3$ be elements of $\Gamma$ such that $m_1\cdot m_2\cdot m_3=1$. Consider the $3$-pointed marked curve $(\mathbb{P}^1, \mu_3)$, where the three marked points are the 3-rd roots of unity $\mu_{3}\subset \mathbb{C}\subset \mathbb{P}^1$, the associated tangent vector is again $\omega$ considered as a tangent vector at $\omega$. Consider $0$ as the basepoint on $\mathbb P^1\setminus \mu_3$. Consider paths $C_j$ in $\mathbb P^1\setminus \mu_3$ based at 0 and obtained by going in a straight line from $p_0$ to $p_j$ and encircling the point $e^{\frac{2\pi\sqrt{-1}j}{3}}$ counterclockwise. Then we obtain a presentation of the fundamental group  $\pi_1(\mathbb P^1\setminus \mu_3,0)=\langle C_1,C_2,C_3 | C_1.C_2.C_3=1\rangle.$ Hence if $m_1.m_2. m_3=1$, then $C_j\mapsto m_j$ defines a group homomorphism $\phi:\pi_1(\mathbb P^1\setminus \mu_3,0)\to \Gamma$. Then the discussion in \ref{sec:distinguishedsubstack}  determines an $3$-marked admissible $\Gamma$-cover $(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}})$. Moreover the admissible cover $(\widetilde{C}\rightarrow \mathbb{P}^1, \widetilde{p})$ is in the distinguished component $\xi_{0,3}(m_1,m_2,m_3)$ of $\overline{\mathcal{M}}{}^{\Gamma}_{0,3}(m_1,m_2,m_3)$ (see Section \ref{sec:distinguishedsubstack}). 
\iffalse
Then we want to define a tensor product on $\mathcal C$ which satisfies: 
\begin{equation}\label{eq:homspaces}
\Hom(\unit,M_1\otimes\cdots \otimes M_n)=\mathcal V_{\mathbf{M}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}}), &\.\end{equation}
\fi
\begin{theorem}\label{thm:oneofmain}
Assume that $\Gamma$ preserves a Borel subgroup of $\frg$.	The $\Gamma$-twisted conformal blocks for a simple Lie algebra $\frg$ at level $\ell$ define a $\Gamma$-crossed modular fusion category
	$\mathcal{C}(\frg,\Gamma,\ell)=\bigoplus_{\gamma \in\Gamma}\mathcal{C}_{\gamma},$ with fusion product denoted by $\dot{\otimes}$ such that 
	\begin{enumerate}
		\item The identity component $\mathcal C_1$ is the modular fusion category defined by untwisted conformal blocks for $\frg$ at level $\ell$.
		\item The simple objects of $\mathcal{C}_{\gamma}$ are parameterized by the set $P^{\ell}(\frg,\gamma)$.
		\item The monoidal structure $\dot{\otimes}$ is defined by the following $\operatorname{Hom}$-spaces:\\
		For simple objects $\lambda_i \in \mathcal{C}_{m_i}$
		\begin{equation}\label{eq:threepointhomspaces}
		\Hom(\unit,\lambda_1\dot{\otimes}\lambda_2\dot{\otimes} \lambda_3)=
		\begin{cases}
		\mathcal V_{\vec{\lambda},\Gamma}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_3,\wtilde{\mathbf{v}}), & \text{if $m_1\cdot m_2\cdot m_3=1$}\\%\ \mbox{if $m_1.m_2.m_3=1.}\\
		0 & \text{otherwise}.
		\end{cases}
		\end{equation}
	\end{enumerate}
\end{theorem}
\subsection{The relationship with categorical twisted fusion rings}
Let us go back to the untwisted situation, i.e. when the group $\Gamma$ is trivial. In this setting Huang \cite{Huang:08a}, \cite{Huang:08b} has proved Theorem \ref{thm:oneofmain}, namely that untwisted conformal blocks (see Theorem \ref{thm:oldconf}) define a modular fusion category $\mathcal C(\frg,\ell)$. If $\gamma$ is a finite order automorphism of $\frg$, then we have the induced autoequivalence of the modular fusion category $\mathcal C(\frg,\ell)$ which comes from the action of $\gamma$ on the spaces of conformal blocks described in Section \ref{sec:arbtwistedfusion}. Note that the classical untwisted version of Equation (\ref{eq:threepointhomspaces}) says that
$$\Hom(\unit,\lambda_1\dot{\otimes}\lambda_2\dot{\otimes} \lambda_3)=\mathcal V_{{\lambda_1,\lambda_2,\lambda_3}}(\mathbb P^1,\vec{z})$$ and hence tracing out automorphisms on the $\Hom$-spaces that appear on the left is same as tracing out automorphisms on conformal blocks that appear on the right. Recall that the categorical twisted fusion ring $K_{\CBbb}(\mathcal C(\frg,\ell),\gamma)$ (see Definition \ref{def:categoricaltwistedfusion}) is described using the former operation (by Proposition \ref{p:tracesonhomspaces}), whereas the twisted Kac-Moody fusion ring $\mathcal R_{\ell}(\frg,\gamma)$ has been defined using the latter operation. Hence we obtain:
\begin{proposition}\label{cor:corofoneofmain}For any finite order automorphism $\gamma$ of $\frg$, the categorical $\gamma$-twisted fusion ring $K_{\CBbb}(\mathcal C(\frg,\ell),\gamma)$ is isomorphic to $R_{\ell}(\frg,\gamma)$. 
	\end{proposition}

Note that if $\gamma$ is an automorphism of order $m$ we get an action of a finite cyclic group $\langle\gamma\rangle$ on $\frg$ which preserves a Borel subalgebra. Hence by Theorem \ref{thm:oneofmain} we get a $\langle\gamma\rangle$-crossed modular fusion category $\mathcal C(\frg,\langle\gamma\rangle,\ell)=\mathcal C_1\oplus\mathcal C_{\gamma}\oplus\cdots\oplus\mathcal C_{\gamma^{m-1}}$. By \cite{ENO:10} we know that we have a correspondence between modular autoequivalences of $\mathcal C_1$ and invertible $\mathcal C_1$-module categories. By the same work we also know that the invertible $\mathcal C_1$-module category $\mathcal C_\gamma$ is precisely the one corresponding to the modular autoequivalence $\gamma$ of $\mathcal C_1=\mathcal C(\frg,\ell)$.

\subsection{Twisted conformal blocks and categorical crossed S-matrices}\label{sec:crossedmatrix} 
In this section, we describe how to  relate  the normalized character table  for the fusion ring $\mathcal{R}_{\ell}(\frg,\sigma)\cong \mathcal R_{\ell}(\frg,\gamma)$ associated to diagram automorphisms $\sigma$ (resp. automorphism $\gamma$ in the diagram automorphism class of $\sigma$) at level $\ell$ as discussed in Section \ref{section:hongfusion} to compute the categorical crossed S-matrix using Theorem \ref{thm:oneofmain}. 



Let $\mathcal{F}$ be a fusion ring coming from fusion rules with basis $I$ and let $S$ be the set of characters. Consider a matrix $\Sigma$ whose rows are parameterized by $S$ and columns are parameterized by $I$. For $(\chi,\lambda)\in S\times I$, we set $$\Sigma_{\chi,\lambda}=\chi(\lambda).$$

 Consider the element $\omega=\sum_{\lambda \in I}\lambda\lambda^*$ 
and the diagonal
matrix $D_{\omega}$ whose entries are $\sum_{I}|\chi(\lambda)|^{2}$ for $\chi \in S$.  Now we get $\Sigma \cdot \overline{\Sigma}^{t}=D_{\omega}.$ 
\begin{definition}\label{def:normalizedcharactertablefortwistedfusionofconf}We define the normalized character table $\Sigma'$  of the ring $\mathcal{R}_{\ell}(\frg,\sigma)$  to be the matrix $D_{\omega}^{-\frac{1}{2}}\Sigma$. 
\end{definition}

A formula for $D_{\omega}$ will be discussed later as a Weyl denominator. Recall by Proposition \ref{prop:mainhong1}, the rows of the matrix $\Sigma'$ are parameterized by the set $T^{reg}_{\sigma,\ell}/W_{\sigma}$, where 
$$T_{\sigma,\ell}:=\{t \in T_{\sigma}|e^{\alpha}(t)=1 \  \mbox{for} \ \alpha \in (\ell+h^{\vee})\iota(Q^{\sigma}(\mathfrak{g}))\},$$ where $T_{\sigma}$ is a maximal torus of the orbit Lie algebra $\mathfrak{g}_{\sigma}$ and $\iota(Q^{\sigma})$ be as in equation \ref{lemma:iotamagic}. 

Let $\beta :P^\ell(\frg,\gamma)\cong P^{\ell}(\mathfrak{g}(A))\rightarrow T^{reg}_{\sigma,\ell}/W_{\sigma}$ be the natural bijection given by Proposition \ref{prop:vitalbijectionthathongsshouldhavewrittenproperly} and Equation \ref{eqn:bijfromarbtodia} in Section \ref{sec:arbtodia}, where $A$ is the Cartan matrix type associated to the Lie algebra $\frg$ and the diagram automorphism $\sigma$. The columns of the matrix $\Sigma'$ are parameterized by the set $P_{\ell}(\frg)^{\sigma}$. 
\begin{remark}
	Note that by Proposition \ref{prop:mainhong1}, the column of $\Sigma'$ corresponding to the unit in $I$ is real positive.
\end{remark}

The following Proposition relates the categorical crossed S-matrices with the character table. 
\begin{proposition}\label{prop:twistedviaKMtwisted}For any $\gamma \in \Gamma$, the categorical $\gamma$-crossed $S$-matrix $S^{\gamma}$ of the $\Gamma$-crossed modular fusion category given by Theorem \ref{thm:oneofmain} and the normalized character table of the ring $\mathcal R_{\ell}(\frg,\sigma)$ (where $\sigma$ is the diagram automorphism associated to $\gamma$) are related by the formula 
	\begin{equation}\label{eq:categoricalsmatrixequalskacmoody}
	S^\gamma_{\lambda,\mu}=\pm\Sigma'_{\beta(\lambda),\mu},
	\end{equation} where the sign $\pm$ only depends on $\gamma$  as in Lemma \ref{lem:sign}. Here we have used the natural bijection (see Section \ref{sec:arbtwistedfusion}) between $P_{\ell}(\frg)^{\gamma}\cong P_{\ell}(\frg)^{\sigma}$ to identify the columns of both matrices.
	\end{proposition}
\begin{proof}By Proposition  \ref{cor:corofoneofmain}, for $\gamma\in \Gamma$ the categorical crossed fusion ring of $\mathcal{C}(\frg,\Gamma,\ell)$ is isomorphic to $R_{\ell}(\frg,\gamma)$. Now by construction  the categorical $\gamma$-crossed S-matrix $S^\gamma$ at level $\ell$ is the normalized character table of the categorical twisted fusion ring (Theorem \ref{thm:chartableoftwistedfusion}) constructed for each $\gamma \in \Gamma$ for the category $\mathcal{C}(\frg,\Gamma,\ell)$. 
	
On the other hand the ring $\mathcal{R}_{\ell}(\frg,\gamma)$ and $\mathcal{R}_{\ell}(\frg,\sigma)$ are isomorphic and hence $\Sigma'$ is also the normalized character table of $\mathcal R_{\ell}(\frg,\gamma)$. 


By Remark \ref{rk:0column}, the 0-th column of the categorical crossed S-matrix is real since the entries are the categorical dimensions of the simple objects (divided by the positive real constant $\sqrt{\dim \mathcal C_1}$) of $\mathcal C_\gamma$. Moreover, by Huang's \cite[Proof of Theorem 4.5]{Huang:08b} computations of the pivotal trace along with Equation 13.8.10 and Remark 13.8 in \cite{Kac}, we know that in the untwisted part $\mathcal C_1$ all categorical dimensions are positive, i.e. the spherical structure on the untwisted modular fusion category $\mathcal C_1$ is positive. 

Now the spherical structure on $\mathcal C_\gamma$ induces a compatible and normalized $\mathcal C_1$-module trace on $\mathcal C_\gamma$ (see \cite[\S1.3]{Desh:17}). As observed in \cite[\S1.3]{Desh:17} there are exactly two such possible module traces and these two traces differ by a sign. Since $\mathcal C_1$ is positive spherical, $\mathcal C_\gamma$ has the canonical positive Frobenius-Perron trace. And hence the $\mathcal C_1$-module trace on $\mathcal C_\gamma$ coming from the spherical structure must be either this one, or its negative. Hence in $\mathcal C_\gamma$ it follows that all dimensions must be either all positive or all negative. 

Now both $S^{\gamma}$ and $\Sigma'$ are normalized character table of the same fusion ring with the same basis and set of characters, the matrix $\Sigma'$ has the column corresponding to $0\in P_\ell(\frg)^\gamma$ positive real, while in the matrix $S^\gamma$ the 0-th column is either all positive or all negative. Hence $S^{\gamma}$ and $\Sigma'$ must agree up to a sign which only depends on $\gamma$.
\end{proof}
\begin{lemma}\label{lem:sign}
The sign in the above proposition defines a group homomorphism $\operatorname{sign}:\Gamma\to \{\pm 1\}$.
\end{lemma}
\begin{proof}
Since the categorical dimensions of all objects in the untwisted part $\mathcal C_1$ are positive, the dimensions of objects in $\mathcal C_\gamma$ have the same sign which we denote $\operatorname{sign}{(\gamma)}$. Now given an object $A_1\in \mathcal C_{\gamma_1}, A_2\in \mathcal C_{\gamma_2}$ we have $\dim(A_1)\cdot\dim(A_2)=\dim(A_1\dot{\otimes} A_2)$. Hence we conclude that $\operatorname{sign}:\Gamma\to {\pm 1}$ is a group homomorphism.
\end{proof}

\begin{corollary}\label{cor:signinverlinde}
In the Verlinde formula Theorem \ref{conj:main1} we could take the matrices defined by the $\Sigma'$ above in place of the categorical crossed S-matrices. In particular, for our purposes, we can ignore the sign in Proposition \ref{prop:twistedviaKMtwisted}.
\end{corollary}
\begin{proof}
Note that the elements $m_1,\cdots ,m_n\in \Gamma$ that appear in the Verlinde formula satisfy a relationship of the form
$$[a_1,b_1]\cdots[a_g,b_g]m_1\cdots m_n=1.$$
Applying the $\operatorname{sign}$ homomorphism to the above relationship we obtain that $\operatorname{sign}(m_1)\cdots \operatorname{sign}(m_n)=1$. In other words if we change all the crossed S-matrices $S^{m_i}$ by a sign, all the signs will cancel and we will get the same answer.
\end{proof}

We conclude our discussion in this section by a three pointed genus zero formula for twisted conformal blocks.
\begin{theorem}\label{thm:forkumar}Let $(\widetilde{C}\rightarrow \mathbb{P}^1,\widetilde{\bf p}) \in \overline{\mathcal{M}}{}^{\Gamma}_{0,3}(m_1,m_2,m_3)$ be a three pointed admissible cover such that the points $\widetilde{\bf p}$ lies in the same component of $\widetilde{C}$, then  
	$$\dim_{\mathbb{C}}\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},\mathbb{P}^1, \widetilde{\bf p})=\sum_{\mu \in P_{\ell}(\frg)^{\langle m_1, m_2, m_3\rangle}}\frac{S^{m_1}_{\lambda_1,\mu}S^{m_2}_{\lambda_2,\mu}S^{m_3}_{\lambda_3,\mu}}{S_{0,\mu}},$$ where the $m_i$-crossed $S$ matrices are determined by Equation \eqref{eq:categoricalsmatrixequalskacmoody}. 
\end{theorem}
\begin{proof}By Proposition \ref{prop:distinguisher} Section \ref{sec:distinguishedsubstack}, the $(\widetilde{C}\rightarrow \mathbb{P}^1,\widetilde{\bf p})$ lies in the distinguished component $\xi_{0,3}(m_1,m_2,m_3)$. Since twisted conformal blocks are locally free and $\xi_{0,3}(m_1,m_2,m_3)$ is connected, it is enough to determine the dimension of $\operatorname{Hom}(\unit, \lambda_1\dot{\otimes} \lambda_2\dot{\otimes} \lambda_3)$ in $\mathcal C(\frg,\Gamma,\ell)$ given by  Equation  \eqref{eq:threepointhomspaces} and Theorem \ref{thm:oneofmain}.
	
	  The theorem then follows by applying Equation \eqref{eq:categoricalsmatrixequalskacmoody} and the categorical twisted Verlinde formula (Theorem \ref{thm:twisted verlinde}) along with the observation that the cocyles appearing in the categorical twisted Verlinde formula are trivial (see Remark \ref{rem:cocyleszero}) for twisted conformal blocks in case $\Gamma$ preserves a Borel subalgebra.
	 
	\end{proof}
\begin{remark}\label{rem:reducingtoconnectedpiece}
	Let $(\widetilde{C}\rightarrow \mathbb{P}^1; \widetilde{\bf p})$ be any admissible $\Gamma$ cover, then we can we can find a triple $(\gamma_1,\gamma_2,\gamma_3)\in \Gamma^3$ which acts on $\overline{\mathcal{M}}{}^{\Gamma}_{0,3}$ such that the image of $(\widetilde{C}\rightarrow \mathbb{P}^1; \widetilde{\bf p})$ has the property that all marked points are in the same connected components. Hence one can apply the isomorphism in Equation \eqref{eqn:conjugation} and Theorem  \ref{thm:forkumar} to determine the dimension of the twisted conformal blocks. 
\end{remark}

\begin{example}\label{ex:prenoncheckable}	Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$ with ramification given by $1\in \mathbb Z/3\mathbb Z=\{0,1,2\}$ at each marked point. We consider the triple $\vec{0}=(0,0,0)$ of weights in $P^{\ell}(D_4^{(3)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. By Theorem \ref{thm:oneofmain}, twisted conformal blocks in this case define a $\mathbb Z/3\mathbb Z$-crossed modular fusion category $\mathcal C(D_4, \mathbb{Z}/3,\ell)=\mathcal C_0\oplus\mathcal C_1\oplus\mathcal C_2$. 
	
	Since we are looking at a $\mathbb Z/3\mathbb Z$-cover with ramification $1\in \mathbb Z/3\mathbb Z$ at each marked point, the weight $0\in P^{\ell}(D_4^{(3)})$ corresponds to a simple object say $A$ in the component $\mathcal C_1$. Note that the object $A\dot{\otimes} A\dot{\otimes} A$ (where $\dot{\otimes}$ denotes the fusion product in the above $\mathbb Z/3\mathbb Z$-crossed modular fusion category $\mathcal C(D_4,\mathbb{Z}/3,\ell)$ lies in the identity component $\mathcal C_0$. Hence by Theorem \ref{thm:oneofmain}(3), the rank of the bundle of twisted conformal blocks with weights $\vec0$ as above equals the fusion coefficient $$\dim\Hom(\unit,A\otimes A\otimes A)=\dim\Hom(A^*, A\otimes A)=\nu_{A,A}^{A^*}$$ 
	in the Grothendieck ring $K(\mathcal C(D_4,\mathbb Z/3\mathbb Z,\ell))$ of the $\mathbb Z/3\mathbb Z$-crossed modular fusion category and {\em not in the twisted fusion ring $\mathcal{R}_{\ell}(D_4,1)$}.
	Here $\unit\in \mathcal C_0$ is the unit object corresponding to the weight 0 of the {\em untwisted $D_4$ at level $\ell$} i.e. an element of $P_{\ell}(D_4)$.  
\end{example}
\section{Twisted Kac-Moody S-matrices and $\Sigma'$}\label{section:crossedS}
Following \cite{Kac}, we now recall the notion twisted S-matrices in the setting of twisted affine Lie algebras and connect them to the characters of the fusion ring in Section \ref{section:hongfusion}. We call these matrices twisted Kac-Moody S-matrices to differentiate between the crossed S-matrices discussed earlier. As observed in \cite{Kac}, these twisted Kac-Moody S-matrices (except for $A_{2n}^{(2)}$) are not matrices for the modular transformation of the characters with respect to the group $\operatorname{SL}_2(\mathbb{Z})$.
We follow the ordering and labeling of the roots and weights as in \cite{Kac}. 
\begin{notation}Recall that $\mathring{\mathfrak{g}}$ denote the finite dimensional algebra whose Cartan matrix is obtained by deleting the $0$-th row and column of $X_N^{(m)}$.  Throughout Sections \ref{sec:comp1}-\ref{sec:comp4}, $\mathring{Q}$ will denote
	the root lattice $Q(\mathring{\mathfrak{g}})$; $\Lambda_i$'s  will denote the affine fundamental weights of $\frg(X_N^{(m)})$ and $\overline{\Lambda}_i$ will denote their orthogonal horizontal projects with respect to invariant bilinear form $\frg(X_N^{(m)})$; $\omega_1,\dots, \omega_{\operatorname{rank \mathring{\mathfrak{g}}}}$ will denote the fundamental weights of $\mathring{\mathfrak{g}}$; and the weight $\omega_0$ of the trivial representation of $\mathring{\mathfrak{g}}$ will be considered as the zero-th fundamental weight. Moreover $M^*$ denotes the dual lattice of $\mathring{Q}$ with respect to the Killing form $\kappa_{\mathfrak{g}}$ (Proposition \ref{prop:formulaforkg})
\end{notation}
\subsection{Integrable Highest weight representations of $A_{2n-1}^{(2)}$}\label{sec:comp1}
\iffalse
In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=B_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n-1}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the orthogonal projection to $C_n$ under the normalized invariant bilinear form on $\mathfrak{g}(A_{2n-1}^{(2)})$  denoted by $\kappa_{\mathfrak{g}}$. For notational conveniences, we let $\omega_0$ to be weights corresponding to the trivial representation of $C_n$ and regard it as the $0$-th fundamental weights.
\fi
In this case $\mathring{\mathfrak{g}}=C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n-12}
P^{\ell}(\mathfrak{g}(A_{2n-1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(C_{n})| b_1+2(b_2+\dots+b_n)\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{n+1}^{(2)}$}\label{sec:comp2}In this case ${\mathring{\mathfrak{g}}}=B_n$. As in the previous case, it turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$  are  can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforDn+12}
P^{\ell}(\mathfrak{g}(D_{n+1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(B_n)| 2(b_1+\dots+b_{n-1})+b_n\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{4}^{(3)}$}\label{sec:comp3} In this case, $\mathring{\mathfrak{g}}=\mathfrak{g}_2$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}$ is also $\mathfrak{g}_2$.  Then $\overline{\Lambda}_1=\omega_2$ and $\overline{\Lambda}_2=\omega_1$, where $\omega_1$ and $\omega_2$ are the fundamental weights of the Lie algebra $\mathfrak{g}_2$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforD43}
P^{\ell}(\mathfrak{g}(D_4^{(3)}))=\{b_1\omega_1+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.
\end{equation}

\subsection{Integrable Highest weight representations of $E_{6}^{(2)}$}\label{sec:comp5}In this case $\mathring{\mathfrak{g}}=\mathfrak{f}_4$ Then $\overline{\Lambda}_1=\omega_4$ and $\overline{\Lambda}_2=\omega_3$, $\overline{\Lambda}_3=\omega_2$ and $\overline{\Lambda}_4=\omega_1$, where $\omega_1,\dots,\omega_4$ are the fundamental weights of the Lie algebra $\mathfrak{f}_4$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforE62}
P^{\ell}(\mathfrak{g}(E_6^{(2)}))=\{b_1\omega_1+\dots+ b_4\omega_4\in P_{+}(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.
\end{equation}

\subsection{Twisted Kac-Moody S-matrix for $A_{2n-1}^{(2)}$}\label{sec:comp6}Let $P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n-1}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n-i}$ of the vertices of the Dynkin diagram of $A_{2n-1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n-1}b_{i}(\omega_i+\omega_{2n-i})+b_n\omega_n\in P_{+}(A_{2n-1})| 2(b_1+\dots+b_{n-1})+b_n\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $A_{2n-1}$ under the action of the involution $\sigma$ is $B_n$, there is a natural bijection between $\iota:P(A_{2n-1})^{\sigma}\rightarrow P(B_n).$ Thus under the map $\iota$ restricts to a bijection:
\begin{equation}
\label{eqn:idf1}
\iota:P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_{n+1}^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $B_n$ and $C_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(B_n)\rightarrow \mathfrak{h}(C_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i, \ \mbox{for $1\leq i\leq n$},$$ and where $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively dual Coxeter) label of the Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$. 

The rows and columns of the twisted Kac-Moody S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n-1}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n-1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{n+1}^{(2)}))$. We recall the following formula \cite{Kac} for the twisted Kac-Moody $S$-matrix ${\mathscr{S}}^{(\ell)}(A_{2n-1}^{(2)})$ whose $(\lambda,\mu)$-th entry is given by the formula:
\begin{align}
\label{{eqn:SmatrixforA2n-12}}{\mathscr{S}}_{\lambda,\mu}^{(\ell)}(A_{2n-1}^{(2)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{align}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)


\subsection{Twisted Kac-Moody S-matrix for $D_{n+1}^{(2)}$}\label{sec:comp7}Let $P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{n+1}^{(1)})$ which are fixed by the involution which exchanges the $n$ and $n+1$-th vertices of the Dynkin diagram of $D_{n+1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}b_{i}\omega_i+b_n(\omega_n+\omega_{n+1})\in P_{+}(D_{n+1})| b_1+2(b_1+\dots+b_{n})\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{n+1}$ under the action of the involution $\sigma$ is $C_n$, there is a natural isomorphism between $\iota:P(D_{n+1})^{\sigma}\rightarrow P(C_n)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{eqn:idff4}
\iota:P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(A_{2n-1}^{(2)}))
\end{equation}and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $C_n$ and $B_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(C_n)\rightarrow \mathfrak{h}(B_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i,$$ where $1\leq i \leq n$ and $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{n+1}^{(2)})$. 

The rows and columns of the twisted Kac-Moody S-matrix are parameterized by the set $P^{\ell}(\frg({D_{n+1}^{(2)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{n+1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(A_{2n-1}^{(2)}))$. The $(\lambda,\mu)$-th entry of the twisted Kac-Moody $S$-matrix ${\mathscr{S}}_{\lambda,\mu}^{(\ell)}(D_{n+1}^{(2)})$ is
\begin{equation}\label{{eqn:SmatrixforDn+12}}
{\mathscr{S}}^{(\ell)}_{\lambda,\mu}(D_{n+1}^{(2)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{equation}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)



\subsection{Twisted Kac-Moody S-matrix for $D_{4}^{(3)}$}\label{sec:comp8}Let $P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{4}^{(1)})$ which are fixed by rotation $\sigma$ that rotates the $1\rightarrow 3\rightarrow4\rightarrow 1$-th vertices of the Dynkin diagram of $D_{4}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_3+\omega_4)+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{4}$ under the action of the involution $\sigma$ is $\mathfrak{g}_2$, there is a natural isomorphism between $\iota:P(D_{4})^{\sigma}\rightarrow P(\mathfrak{g}_2)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{idf2}
\iota:P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_4^{(3)}))
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{g}_2$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{g}_2)\rightarrow \mathfrak{h}(\mathfrak{g}_2), \  \omega_2 \rightarrow \frac{a_2}{a_2^{\vee}}\omega_1, \ \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_2,$$ where $1\leq i \leq 2$ and $a_{1},a_{2}$ (respectively $a_1^{\vee},a_2^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{4}^{(3)})$. 

The rows and columns of the twisted Kac-Moody S-matrix are parameterized by the set $P^{\ell}(\frg({D_{4}^{(3)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{4}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{4}^{(3)}))$. We recall the following formula \cite{Kac}:
\begin{equation}	\label{{eqn:SmatrixforD43}}
{\mathscr{S}}^{(\ell)}_{\lambda,\mu}(D_{4}^{(3)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{3}}{|M^*/(\ell+6)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+6}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}))\bigg), 
\end{equation}
where $\overline{\rho}$ denotes the sum of the fundamental weights of $\mathfrak{g}_2$


\subsection{Twisted Kac-Moody  S-matrix for $E_{6}^{(2)}$}\label{sec:comp4}Let $P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(E_{6}^{(1)})$ which are fixed by rotation $\sigma$ that interchanges $1$-st with $5$-th;$2$-th with $4$-th and fixes the $3rd$ and $6$-th vertices of the Dynkin diagram of $E_{6}$. It can be described explicitly as. 
$$P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_5)+b_2(\omega_2+\omega_4)+ b_3\omega_3+ b_4\omega_6\in P_+(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.$$
Since the orbit Lie algebra of $E_{6}$ under the action of the involution $\sigma$ is $\mathfrak{f}_4$, there is a natural bijection between $\iota:P(E_{6})^{\sigma}\rightarrow P(\mathfrak{f}_4)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}
\label{eqn:idf2}
\iota:P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(E_6^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{f}_4$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{f}_4)\rightarrow \mathfrak{h}(\mathfrak{f}_4), \  \omega_4 \rightarrow \frac{a_4}{a_4^{\vee}}\omega_1, \ \omega_3\rightarrow \frac{a_3}{a_3^{\vee}}\omega_2, \ \omega_2\rightarrow \frac{a_2}{a_2^{\vee}}\omega_3, \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_4,$$ where  $a_{1},a_{2},a_3, a_4$ (respectively $a_1^{\vee},a_2^{\vee},a_3^{\vee},a_4^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(E_{6}^{(2)})$. 

The rows and columns of the twisted Kac-Moody S-matrix are parameterized by the set $P^{\ell}(\frg({E_{6}^{(2)}}))$ and $ P^{\ell}(\frg(E^{(1)}_{6}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(E_{6}^{(2)}))$. We recall the following formula from \cite{Kac}
\begin{align}
\label{{eqn:SmatrixforE62}}
{\mathscr{S}}^{(\ell)}_{\lambda,\mu}(E_{6}^{(2)})=
\sqrt{2}i^{|\mathring{\Delta}_{+}|}|M^*/(\ell+12)\mathring{Q}|^{-\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+12}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho})\bigg), 
\end{align}
where $\overline{\rho}$  denotes the sum of the fundamental weights of $\mathfrak{f}_4$







\subsection{Twisted Kac-Moody S-matrix for $A_{2n}^{(2)}$}In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=C_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the projection to $C_n$ under the normalized invariant bilinear form on  denoted by $\kappa_{\mathfrak{g}}$. Now let $\omega_0,\omega_1,\dots,\omega_n$ denote the fundamental weights of $C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n2}
P^{\ell}(\mathfrak{g}(A_{2n}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_{+}(C_n)| 2(b_1+b_2+\dots+b_n)\leq \ell \}.
\end{equation}


\begin{remark}\label{rem:altdef}
	With the convention of the numbering of the vertices of the affine Dynkin diagram in the case $A_{2n}^{(2)}$, we get the fixed point Lie algebra is of type $B_n$ whereas $\mathring{\mathfrak{g}}=C_n$. However it is sometimes convenient to choose a different ordering of the vertices of the Dynkin diagram such that the new horizontal subalgebra is same as the fixed point algebra $B_n$. This can be done if we renumber the vertices  by reflecting about the $n$-th vertex of the affine Dynkin diagram. Under the new numbering system we get an alternate description
	\begin{equation}\label{eqn:a2n}
	P^{\ell}(\frg(A_{2n}^{(2)}))=\{\sum_{i=1}^n{\widetilde{b}_i}\omega_i\in P_{+}(B_n)| \widetilde{b}_1+\dots+\widetilde{b}_{n-1}+\frac{\widetilde{b}_{n}}{2}\leq \frac{\ell}{2}, \ \ell-\widetilde{b}_n \ \mbox{is even}\},
	\end{equation}
	where $\widetilde{\omega}_1,\dots,\widetilde{\omega}_n$ are fundamental weights of the Lie algebra of type $B_n$. In particular, we observe that $P^{1}(\frg,\sigma)=\{\omega_n\}$. 
	We refer the reader to compare it with the description of $P^{\ell}(\frg,\gamma)$ in \cite{KH}.
\end{remark}

Let $P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n+1-i}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}a_{i}(\omega_i+\omega_{2n-i})\in P_+(A_{2n})| 2(b_1+\dots+b_n)\leq \ell\}.$$ Under the map $\iota: P(A_{2n})^{\sigma}\rightarrow P(C_n)$, there is a natural bijection between $\iota: P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}\rightarrow P^{\ell}(\frg({A_{2n}^{(2)})})$. Hence we will identify the two using the map $\iota$.
The rows and columns of the twisted Kac-Moody  S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}$ respectively. We recall the following Theorem 13.8 \cite{Kac}
\begin{equation}
\label{{eqn:SmatrixforA2n2}}
{\mathscr{S}}^{(\ell)}_{\lambda,\mu}(A_{2n}^{(2)})=i^{|\mathring{\Delta}_{+}|}(\ell+2n+1)^{-\frac{1}{2}}\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n+1}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \mu+\overline{\rho})\bigg), 
\end{equation}where $\overline{\rho}$ denotes the sum of the fundamental weights of $C_n$. Moreover, the matrix ${\mathscr{S}}^{(\ell)}(A_{2n}^{(2)})$ has the following properties \cite{Kac}.
\begin{proposition}\label{prop:propertiesofSmatrixA2n2}
	\label{prop:unitarityforSmatrixA2n2}The matrix $\big({\mathscr{S}}^{(\ell)}(A_{2n}^{(2)})\big)_{\lambda,\mu}={\mathscr{S}}^{(\ell)}_{\lambda,\mu}({A_{2n}^{(2)}})$  is symmetric and unitary. 
\end{proposition}
\iffalse
\subsubsection{Crossed $S$-matrices associated to arbitrary automorphisms}\label{sec:croosedarbitrary}
Let $\gamma$ be an arbitrary automorphism of a simple Lie algebra $\frg$ and let $\widehat{L}(\frg,\gamma)$ denote the twisted Kac-Moody Lie algebra as defined in Section \ref{sec:affineLiealgtwisted}. Recall there is a natural isomorphism of $\widehat{L}(\frg,\gamma)$ with an twisted affine Kac-Moody Lie algebra of type $X_N^{(m)}$, where the Lie algebra $\frg$ is of type $X_N$ and $X_N^{(m)}$ is determined by the diagram automorphism  $\sigma$ arising from $\gamma$.
Thus there are  natural bijections $$\beta_1: P_{\ell}(\frg)^{\gamma}\simeq P_{\ell}(\frg)^{\sigma}, \ \mbox{and} \ \beta_2:P^{\ell}(\frg,\langle \gamma \rangle )\simeq P^{\ell}(\frg(X_N^{(m)})).$$
Let for any element $(\lambda,\mu)\in P^{\ell}(\frg,\gamma)\times P_{\ell}(\frg)^{\gamma}$, consider the number \begin{equation}\label{eqn:crossedsgeneral}
S^{\gamma}_{\lambda,\mu}:=S^{(\ell)}_{\beta_1(\lambda),\beta_2(\mu)}(X_N^{(m)}),
\end{equation}
where $S^{(\ell)}(X_N^{(m)})$ is the crossed S-matrix at level $\ell$  given by equations \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}}, \ref{{eqn:SmatrixforD43}}, \ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}.
\begin{definition}
	We define the {\em crossed S-matrix} $S^{\gamma}$ at level $\ell$ associated to $\gamma$ to be a matrix whose rows  and columns are parameterized by $P^{\ell}(\frg,\langle \gamma \rangle)$ and $P_{\ell}(\frg)^{\gamma}$ and whose $(\lambda, \mu)$-th entry $S_{\lambda,\mu}^{\gamma}$ is given by Equation \eqref{eqn:crossedsgeneral}.
\end{definition}
\fi
\subsection{Relation with untwisted Kac-Moody S-matrices}\label{sec:comparision}This section is motivated by the following two observations. First, the equivariantization of a $\Gamma$-crossed modular functor is a modular functor, hence crossed $S$-matrices must be submatrices of an uncrossed $S$-matrix. Secondly, in the {\tt KAC} software, the Kac-Moody $S$-matrices and the twisted Kac-Moody $S$-matrices of type $A_{2n}^{(2)}$ are available for computational purposes.   One can compute all crossed $S$-matrices in the remaining types using {\tt KAC} as follows:



Let $A$ be a Cartan matrix of either of the following types $$A: A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_6^{(2)}, D_4^{(3)}.$$
We consider the Cartan matrix $A^{t}$ obtained by taking transpose of the matrix $A$. In these cases,  observe that the affine Lie algebra associated to $A^t$ is of untwisted type. They are given as: $$A^t: B_n^{(1)}, C_n^{(1)}, F_4^{(1)}, G_2^{(1)}.$$ If $\mathring{A}$ and $\mathring{A}^t$ denote the Cartan matrix obtained by deleting the $0$-th row and column, then we get $\frg(\mathring{A})$ and $\frg(\mathring{A}^t)$ are Langlands dual. 
Define  the map $\tau:\mathfrak{h}(A)\rightarrow {\mathfrak{h}}(A^t)$ by the following:
\begin{equation}\label{eqn:transposemap}
\Lambda_i \rightarrow\frac{a_i^{\vee}}{a_i}\Lambda_i^{t}, \ \delta \rightarrow \delta^t, 
\end{equation}
where $\Lambda_0,\dots,\Lambda_n$ (respectively $\Lambda_0^{t},\dots,\Lambda_n^{t}$) are affine fundamental weights for the affine Lie algebra associated to $A$ (respectively $A^t$) and $\delta$ (respectively $\delta^t$) as in Section \ref{sec:twistedaffinekmnew}. We now consider the map $\mathring{\tau}: P^{\ell}(\mathfrak{g}(A))\hookrightarrow P^{\ell+h^{\vee}-h}(\mathfrak{g}(A^{t}))$ given by the formula 
\begin{equation}\label{weirdshift}
\mathring{\tau}(\lambda):=\tau(\lambda+\overline{\rho})-\overline{\rho}^t,
\end{equation}
where $\overline{\rho}$(respectively $\overline{\rho}^t$) are sum of the fundamental weights of the horizontal subalgebra of $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. 

The affine Lie algebras of type $A^{t}$ are all untwisted affine Kac-Moody Lie algebra, hence denote by $\mathscr{S}_{\lambda,\mu}^{(\ell)}(A^t)$-the $(\lambda,\mu)$-th entry of the Kac-Moody  $S$-matrix of type $A^t$ at level $\ell$. We refer the reader to Chapter 13 in \cite{Kac} for more details. The following proposition is well known  and can be checked directly. We also refer the reader to Proposition 3.2 in \cite{AG}.

\begin{proposition}\label{prop:crossedvsuncrossed}
	Let $\mathfrak{g}(A)$ be a twisted affine Kac-Moody Lie algebra associated to the Cartan matrix $A$ of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, D_4^{(3)}, E_6^{(2)}$, then the twisted Kac-Moody $S$ matrices are related to the $S$ matrices of $\mathfrak{g}(A^t)$ by the following formula
	$${\mathscr{S}}_{\lambda,\mu}^{(\ell)}(A)=|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|^{\frac{1}{2}}\mathscr{S}_{\mathring{\tau}(\lambda),{\tau}\circ\tau_{\kappa}(\mu)}^{(\ell+h^{\vee}-h)}(A^t),$$ where $h^{\vee}$ and $h$ are the dual Coxeter numbers of the Lie algebra $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. Moreover, $|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|$ is two when $A$ is either $A^{(2)}_{2n-1}$, $D^{(2)}_{n+1}$ and $E^{(2)}_6$ and is three when $A$ is of type $D_4^{(3)}$.
\end{proposition}
\subsubsection{Some computations}\label{sec:usefulcomputations}
We list the following facts which are very useful in computing the twisted Kac-Moody S-matrices. Using proposition \ref{prop:crossedvsuncrossed}, we can use \texttt{KAC} to compute the twisted Kac-Moody $S$ matrices. 
\begin{itemize}
	\item The case $A_{2n-1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_{n+1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_4^{(3)}$:
	\begin{itemize}
		\item $\tau(\omega_1)=3\omega_2^t$ and $\tau(\omega_2)=\omega_1^t$.
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i^{t}$ for $1\leq i\le 2$.
		\item $\mathring{\tau}(\omega_0)=2\omega_2^t$.
	\end{itemize}
	\item The case $E_6^{(2)}$: 
	\begin{itemize}
		\item $\tau(\omega_1)=2\omega_4^t$, $\tau(\omega_2)=2\omega_3^t$, $\tau(\omega_3)=\omega_2^t$, $\tau(\omega_4)=\omega_1^t$. 
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i$ for $1\leq i\leq 4$.
		\item $\mathring{\tau}(\omega_0)=\omega_3^{t}+\omega_4^t$.
	\end{itemize}
\end{itemize}
\subsection{Explicit description of $\Sigma'$}Recall that $\Sigma'$ is the normalized character table of the fusion ring $\mathcal{R}_{\ell}(\frg,\sigma)$ whose rows are parameterized (Proposition \ref{prop:mainhong1}) by $T^{reg}_{\sigma,\ell}/W_{\sigma}$ and columns by $P_{\ell}(\frg)^{\sigma}$, where $\sigma$ is a diagram automorphism of $\frg$ and $\frg(A)$ is the twisted affine Kac-Moody Lie algebra associated to $(\frg,\sigma)$. 


The Weyl character formula and the proof of Lemma 9.7 in \cite{BeauHirz} and \cite{Hong}, we get
\begin{equation}
\label{eqn:J}
D_{\omega}(t)={|T_{\sigma,\ell}|}\bigg(\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t))\bigg)^{-2}, 
\end{equation} where $D_{\omega}$ as in Section \ref{sec:crossedmatrix}.

By the definition of $\Sigma'$ and  the Weyl character formula, we get the following: 
\begin{equation}
\label{eqn:normalizedcharacter}
\Sigma'_{t, \mu}={|T_{\sigma,\ell}|}^{-\frac{1}{2}}\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t)|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t))}\bigg(\sum_{w\in W_{\sigma}}\epsilon(w)e^{(w(\iota(\mu)+\overline{\rho}_{\sigma}))}(t)\bigg),
\end{equation}
where $\overline{\rho}_{\sigma}$ is the sum of the fundamental weights of $\frg_{\sigma}$ and $W_{\sigma}$ is the Weyl group of $\frg_{\sigma}$. 
Recall that by Proposition \ref{prop:vitalbijectionthathongsshouldhavewrittenproperly} there is a natural bijection $\beta :P^{\ell}(\mathfrak{g}(A))\rightarrow T^{reg}_{\sigma,\ell}/W_{\sigma}$, where $\frg(A)$ is a twisted affine Kac-Moody Lie algebra. 
\begin{proposition
	\label{prop:charactertableviaSmatrix}Let $\gamma$ be a finite order automorphism of $\frg$ and $\sigma$ be the associated diagram automorphism. Let  $\Delta_{\sigma}$ denote the set of roots of the Lie algebra $\frg_{\sigma}$. Then the relations between the matrix $\Sigma'$ and the twisted Kac-Moody $S$-matrices are given by the following:
	$$\operatorname{sign}(\gamma)S^{\gamma}_{\lambda,\mu}=\Sigma'_{\beta(\lambda),\mu}=i^{|\mathring{\Delta}_{+}|}\bigg(\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda))|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda)))}\bigg)\overline{{\mathscr{S}}_{\lambda,\iota(\mu)}^{(\ell)}},$$ where $\iota$ is the natural bijection between $P_\ell(\frg)^{\sigma}  $ and $P_\ell(\frg_{\sigma})$ and ${\mathscr{S}}^{(\ell)}_{\lambda,\iota(\mu)}$ denote the twisted Kac-Moody $S$-matrices given in Equations  \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}},\ref{{eqn:SmatrixforD43}},\ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}, and $\operatorname{sign}(\gamma)$ is the sign from Lemma \ref{lem:sign}. 
\end{proposition}
\begin{proof}The first equality is Proposition \ref{prop:twistedviaKMtwisted} and Lemma \ref{lem:sign}. We split up the rest of the proof of the proposition to case by case for the untwisted affine Lie algebras.
	\subsection{The case $A=A_{2n}^{(2)}$}In this case $\mathring{\frg}=\mathfrak{g}_{\sigma}$. Hence we get $W_{\sigma}=\mathring{W}$ and $\overline{\rho}_{\sigma}=\overline{\rho}$. Let $J_{\iota(\mu)}(\beta(\lambda))=\sum_{w\in W_{\sigma}}\epsilon(w)e^{(w(\iota(\mu)+\overline{\rho}_{\sigma}))}(\beta(\lambda))$. In this case, the bijection $\beta$ is given by the following $\beta(\lambda)=\exp(\frac{2\pi i} {\ell+h^{\vee}}(\nu_{\frg(A)}(\lambda+\overline{\rho})))$, where $h^{\vee}$ is the dual Coxeter number. Hence we get 
	\begin{eqnarray}
	\label{eqnarray:mainfuldeduction1}
	J_{\iota(\mu)}(\beta(\lambda))&=&\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(\kappa_{\mathfrak{g}(A)}(w(\iota(\mu)+\overline{\rho}),\lambda+\overline{\rho})\bigg),\\
	&=&i^{|\mathring{\Delta}_{+}|}(\ell+2n)^{\frac{1}{2}}{\overline{{\mathscr{S}}^{(\ell)}_{\lambda,\iota({\mu})}}(A_{2n}^{(2)})}.
	\end{eqnarray}Hence we get the following 
	\begin{equation}
	\label{equation:characterfora2n2n}
	\Sigma'_{\beta(\lambda),\mu}(\ell)=i^{|\mathring{\Delta}_{+}|}\bigg(\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda))|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda)))}\bigg)\overline{{\mathscr{S}}^{(\ell)}_{\lambda,\iota({\mu})}}(A_{2n}^{(2)}).
	\end{equation}
	This completes the proof in the case $A=A_{2n}^{(2)}$. 
\end{proof}


\subsection {The case $A$ is either $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $D_{4}^{(3)}$, $E_6^{(2)}$}In these cases the Lie algebras $\mathring{\frg}$ and the $\mathfrak{g}_{\sigma}$ are Langlands dual. In particular, $\mathring{W}=W_{\sigma}$ and $\mathring{Q}^{\vee}$ is equal to $Q(\mathfrak{g}_{\sigma})$ and vice versa. As before, let $\beta: P^{\ell}(\frg(A))\rightarrow T^{reg}_{\sigma,\ell}$ be the natural bijection. Then define a function $J_{A}$ from the set $T^{reg}_{\sigma,\ell}\times P^{\ell}(\mathfrak{g})^{\sigma}$ given by the formula 
$$ J_{A}(\beta(\lambda), \mu)=\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg((w(\iota(\mu)+\overline{\rho}))(\beta(\lambda))\bigg).$$
Let $\check{P}_{\ell}(A)=\{\check{\lambda}\in \check{P}(\mathring{\frg})|\theta(\check{\lambda})\leq \ell\}$, where $\theta$ is the highest root of $\mathring{\frg}$. There is a natural bijection $\eta: P^{\ell}(\frg)^{\sigma}\rightarrow \check{P}_{\ell}(A)$. Similarly define another function $J'_A$ on $P^{\ell}(\frg(A))\times \check{P}_{\ell}(A)$ by the formula:
$$ J'_{A}(\tilde{\lambda}, \tilde{\mu})=\sum_{w\in {W}_{\sigma}}\epsilon(w)\exp\frac{2\pi i }{\ell+h^{\vee}}\bigg((w(\lambda+\overline{\rho}))(\tilde{\mu}+\check{\overline{\rho}})\bigg),$$ where $\overline{\rho}$ and $\check{\rho}$ are the sum of the fundamental weights (respectively coweights) of the Lie algebra $\mathring{\frg}$. By a direct calculation, we can check that 
$J_A(\beta(\lambda),\mu)=J'_A(\lambda,\eta(\mu)).$

To a Cartan matrix $A$ of types $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $E_6^{(2)}$, V. Kac \cite{Kac} associates another Cartan matrix $A'$ of type $D_{n+1}^{(2)},A_{2n-1}^{(2)}$, $E_6^{(2)}$ respectively. Since $\frg_{\sigma}$ and $\mathring{\frg}$ are Langlands dual, we observe by the calculations in Section \ref{section:crossedS} that there is a natural  bijection $\eta': \check{P}_{\ell}(A)\rightarrow P^{\ell}(\frg(A'))$. In particular:
\begin{equation}
\label{eqn:complicatedcalculationthattookwednesday}J_{A}(\beta(\lambda),\mu)=i^{|\mathring{\Delta}_{+}|}|T_{\sigma,\ell}|^{\frac{1}{2}}\overline{{\mathscr{S}}^{(\ell)}_{\lambda,\eta'\circ\eta({\mu})}}(A).
\end{equation}Substituting Equation \eqref{eqn:complicatedcalculationthattookwednesday} in Equation \eqref{eqn:normalizedcharacter},  we get the required result by observing that $\iota=\eta'\circ\eta$.

\subsection{Dimensions using the formula}\label{sec:dimensioncrosscheck1}In this subsection, we use the Verlinde formula \eqref{conj:main1} stated in the introduction to compute dimensions of some twisted conformal blocks.  We also discuss in specific cases, how to cross check our calculations. We start with examples of \'etale cases.
\begin{example}\label{ex:etale}
	Let $\Gamma=\langle \gamma \rangle$ be a cyclic group of order $m$ and $\frg$ is either of type $A_{n\geq 2}, D_{n\geq 4}, E_6$. Let $\widetilde{C}\rightarrow C$ is an \'etale cover with Galois group $\Gamma$, then the dimension of the twisted conformal block at level one
	\begin{equation}\label{eqn:arbitrarygenusverlindeexampleetale1}
	\dim_{\mathbb{C}}\mathbb{V}_{\Gamma}^{\dagger}(\widetilde{C},C)=|P_1(\frg)^{\gamma}|(S_{0,0})^{2-2g},
	\end{equation} where $S_{0,0}$ is $\frac{1}{\sqrt{n+1}}$, $\frac{1}{2}$,$\frac{1}{\sqrt{3}}$ for $\frg=A_n,D_n, E_6$ respectively. 
	
	Consider an elliptic curve $\widetilde{C}$ with rotation of order $m$. Then $C$ is also an elliptic curve and the map $\widetilde{C}\rightarrow C$ is an \'etale cyclic cover of order $m$. We can degenerate $C$ to a nodal elliptic curve and $\widetilde{C}$ to a cycle of $\mathbb{P}^1$'s with $m$ components. In this case, by factorization, we can cross check our answer by reducing it to the case of trivial \'etale cover $\widetilde{C}$ of $\mathbb{P}^1$ along with two marked points. Since we are in the \'etale case, no crossed $S$-matrices are involved and  we can apply the untwisted Verlinde formula after using the group action to bring all the marked points $\widetilde{\bf{p}}$ in $\widetilde{C}$ in the same component.
	
\end{example}
\begin{remark}
	Example \ref{ex:etale} is a priori neither covered by the untwisted Verlinde formula nor by the conjectural Verlinde formula in \cite{BFS}. 
\end{remark}
\begin{remark}
	G. Faltings \cite{Faltingsnew}  has shown that in the untwisted case that  conformal blocks for a simply laced Lie $\frg$ algebra has dimension $|Z_{G}|^{g}$, where $Z_{G}$ is the center of the simply connected group with Lie algebra $\frg$.  This can also be seen from the Verlinde formula. The formula in Equation \eqref{eqn:arbitrarygenusverlindeexampleetale1} can be thought of a generalization of the result to the twisted case. 
\end{remark}

We end the section with some examples of ramified cases.
\begin{example}\label{ex:double}Let $\frg=A_{2r-1}^{(2)}$ and consider a double cover $\widetilde{C}\rightarrow C$ ramified at $2n$ points $\widetilde{p}$ and let $g$ be the genus of $C$. The level one weights of $A^{(2)}_{2r-1}$ are $\{0,\dot{\omega}_1\}$. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted level one conformal block is
	$$\dim_{\mathbb{C}}\mathbb{V}_{\vec{0},\mathbb{Z}/2\mathbb{Z}}^{\dagger}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p})=2^{g}r^{g+n-1}.$$ 
\end{example}
The computations in Section \ref{sec:usefulcomputations}, tell us that the crossed $S$-matrix or equivalently the character table is given by the following $2\times 2$ matrix.
$$\Sigma'=\sqrt{2} \cdot \begin{pmatrix} 
\frac{1}{{2}}& \frac{1}{{2}} \\
\frac{1}{{2}} & -\frac{1}{{2}}
\end{pmatrix}.$$

If $C=\mathbb{P}^1$ and $\widetilde{C}$ is a genus $n-1$  curve which is double cover of $\mathbb{P}^1$ ramified at $2n$ points. We now discuss how to cross check the answer above using factorization theorem and invariants of representations.

In this case, we can degenerate $\widetilde{C} \rightarrow {C}$ to a double cover $\widetilde{D}\rightarrow D$, where $\widetilde{D}$ is a chain of $n-1$ elliptic curves where the end components have three ramification points and all the other components have two ramfication points. Moreover the nodes of $\widetilde{D}$ are ramification points. By the factorization theorem, we can reduce to check  the following for double covers $\widetilde{C}\rightarrow \mathbb{P}^1$ ramified at four points:

\begin{enumerate}
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,0,\mathbb{Z}/2\mathbb{Z}}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,\dot{\omega}_1,\dot{\omega}_1,\mathbb{Z}/2\mathbb{Z}}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,\dot{\omega}_1,\mathbb{Z}/2\mathbb{Z}}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$. 
\end{enumerate}

We can now degenerate the double cover  $\widetilde{C}$ of  $\mathbb{P}^1$ with four ramification points by degenerating the $\mathbb{P}^1$ to a reducible $\mathbb{P}^1$ with two components meeting at one point, which is \'etale. Moreover each component has two ramification points. Then normalizing we get two disjoint copies of $\mathbb{P}^1$ with a double cover ramified at two points. Hence by factorization, we are reduced to check the following
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,0,\omega_i,\mathbb{Z}/2\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is even }\\
0 & \mbox{otherwise},
\end{cases}
\]where  $\omega_i$ is the $i$-th fundamental weight of $A_{2r-1}$ attached to an \'etale point and also 
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,\dot{\omega}_1,\omega_i,\mathbb{Z}/2\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is odd}\\
0 & \mbox{otherwise}.
\end{cases}
\
This can be verified directly from the fact that these conformal blocks are isomorphic to the space of invariant $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$ (respectively $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\mathbb{C}^{2r}\otimes \Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$) which has dimensions one or zero depending on the parity of $i$. Further the dimension calculation for the ramified double cover $\mathbb{P}^1\rightarrow \mathbb{P}^1$ obtained above also agrees with the computations from the twisted Verlinde formula. The general case where genus of $C$ is positive can be approached similarly. 
\begin{example}\label{ex:a2r}
	Consider the Lie algebra $A^{(2)}_{2r}$. The level one weights of $A^{(2)}_{2r}$ is just the $r$-th fundamental weight $\dot{\omega}_r$ of the Lie algebra of type $B_r$. Consider $\mathbb{P}^1$ as a ramified double cover of $\mathbb{P}^1$. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted conformal blocks at level one. 
	\begin{equation}
	\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i,\mathbb{Z}/2\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=1.
	\end{equation}
	Here $\omega_i$ is the $i$-th fundamental weight of $A_{2r}$ attached to an \'etale point. If $i=0$, Example \ref{ex:a2r} can be crossed checked by Lemma \ref{lem:linebundlecase}. For all $i$'s,  this example can be crossed checked similarly as in Example \ref{ex:double} by embedding into the space of invariants.
\end{example}

\begin{example}(Continuation of Example \ref{ex:prenoncheckable})\label{ex:noncheckable}
	Recall that we had a connected ramified cover $\widetilde{C}\rightarrow \mathbb{P}^1$  of order three with three ramifications ${\widetilde{\bf p}}$ given by $1\in \mathbb{Z}/3\mathbb{Z}=\{0,1,2\}$ at each marked point. The fusion coefficients in the ring $\mathcal{R}_{\ell, \mathbb{Z}/3\mathbb{Z}}(D_4)$ is determined by Theorem \ref{thm:forkumar} and Proposition \ref{prop:charactertableviaSmatrix}:
	
	

	\begin{itemize}
		\item Let $\ell=1$. The Verlinde formula \ref{thm:forkumar}, gives that the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is two dimensional. We use the fact that $0$ is the only fixed point of $P^1(D_{4}^{(1)})$ under the diagram automorphism and $S_{0,0}=\frac{1}{2}$. 
		\item Let $\ell=2$. By Proposition \ref{prop:crossedvsuncrossed}, Section \ref{sec:usefulcomputations} and using \texttt{KAC} software, we get the crossed $S$-matrix
		$$S^{\gamma}=\sqrt{3}\cdot \begin{pmatrix}
		\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}}  \\
		\frac{1}{\sqrt{6}} & -\frac{1}{\sqrt{6}} 
		\end{pmatrix}.$$
		The fixed points of $P^2(D_{4}^{(1)})$ under the diagram automorphism are $\{0,\omega_2\}$ and from the uncrossed $S$-matrix we get $S_{0,0}=\frac{1}{4\sqrt{2}}$ and $S_{0,\omega_2}=\frac{1}{2\sqrt{2}}$. Now the Verlinde formula \ref{conj:main1} implies that 
		$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=3.$
	\end{itemize}
	
\end{example}
\begin{remark}
	Since the curve $\widetilde{C}$ has genus one, the twisted conformal blocks $\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ do not embed in the space of invariants of tensor product representations. Hence the dimension of invariants do not give any natural upper bounds in these cases. This is in stark contrast with the situation for untwisted conformal blocks. Also since the moduli space of $\Gamma$-covers of $\mathbb{P}^1$ with three marked points have genus zero, we do not have a way to degenerate to simpler cases using factorization. 	Hence unlike the other example considered in this section, we do not have any other way to cross check the calculations in Example \ref{ex:noncheckable}.
\end{remark}

We now discuss an example of with $|\Gamma|=3$ with two ramification points on $\mathbb{P}^1$. 
\begin{example}\label{ex:checkablenontrivial}Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$. Here assume that the first two marked points are ramified and the third point is \'etale. Hence $\widetilde{C}$ is again $\mathbb{P}^1$. We consider the triple $\vec{0}=(\dot{0},\dot{0},0)$ of weights in $(P^{\ell}(D_4^{(3)}))^2\times P^{\ell}(D_4^{(1)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. 
	\begin{itemize}
		\item Let $\ell=1$. The Verlinde formula \ref{conj:main1}, gives that the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is one dimensional.
		\item Let $\ell=2$. The calculation of the crossed $S$-matrix in Example \ref{ex:noncheckable} and the Verlinde formula \ref{conj:main1} implies that 
		$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0},\mathbb{Z}/3\mathbb{Z}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=1.$
	\end{itemize}
	These numbers agree with the dimensions coming from Lemma \ref{lem:linebundlecase} and hence cross checks the Verlinde formula. 
\end{example}
\begin{remark}
	Example \ref{ex:checkablenontrivial} provides a non-trivial example of the Verlinde formula for twisted conformal blocks that is not covered by the conjectural Verlinde formula in \cite{BFS}. Recall that the conjecture in \cite{BFS} concerns with diagram automorphisms of order two. 
\end{remark}

\iffalse
\section{Dimensions of the conformal blocks using the Verlinde formula}\label{sec:dimensioncrosscheck}In this subsection, we use the Verlinde formula \ref{conj:main1} stated in the introduction to compute dimensions of some twisted conformal blocks. In various checks, we cross check our answer by obtaining the same result by using different methods like factorizations etc.
\subsection{\'Etale Cases}Let $\Gamma=\langle \gamma \rangle$ be a cyclic group of order $m$ acting on $\frg$ and consider an \'etale-Galois cover $\widetilde{C}\rightarrow C$ with Galois group $\Gamma$. We assume that $\frg$ is either of type $A_{n\geq 2}, D_{n\geq 4}, E_6$. We consider the following cases. 
\subsubsection{Genus zero case}Assume that $C=\mathbb{P}^1$, then $\widetilde{C}=\sqcup_{i=0}^{m-1}\mathbb{P}^1$ where $\gamma$ sends the $i$-th component to the $i+1$-th component.  Further assume that we have three marked points $\widetilde{q}$, $\widetilde{p}_1$ and $\widetilde{p}_2$ on $\widetilde{C}$ and an integer $i$ such that $\gamma^{i} \cdot \widetilde{p}_2$, $\widetilde{q}$ and $\widetilde{p}_1$ are in the same component of $\widetilde{C}$. Let ${\bf p}$ be the image of the tuple $(\widetilde{p}_1,\widetilde{p}_2,\widetilde{q})$ in $\mathbb{P}^1$.

Let $\lambda \in P_{1}(\frg)$. We consider the following tuples $(\widetilde{C}, \mathbb{P}^1,\widetilde{p}_1, \widetilde{p_2}, \widetilde{q},\lambda, \lambda^*,0)$ and $(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2}, \widetilde{q}, \lambda, \gamma^{i}\cdot\lambda^*,0)$ and the corresponding twisted  conformal blocks $\mathbb{V}^{\dagger}_{\lambda,\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1,\widetilde{p}_1, \widetilde{p_2},\widetilde{q},{\bf p})$ and $\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2},\widetilde{q},{\bf p})$ attached to the data. By construction (Section \ref{subsubsec:equivariance}), both conformal blocks have the same dimension and moreover since $(\widetilde{p}_1, \gamma^{i}\widetilde{p}_2, \widetilde{q})$ are in the same component of $\widetilde{C}$, we get the following by construction: 
\begin{proposition}
	\label{prop:genuszerofirstexample}$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2},\widetilde{q},{\bf p})=\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0}(\mathbb{P}^1, {\bf p})$, where 
	\[\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0}(\mathbb{P}^1, {\bf p})=
	\begin{cases}
	1 & \gamma^i\cdot\lambda^*=\lambda^*, \\	
	0 & \mbox{otherwise}
	\end{cases}
	\]
\end{proposition}The dimension equality of 
Proposition \ref{prop:genuszerofirstexample} can be seen directly from the Verlinde formula in Theorem \ref{conj:main1} taking into account that the untwisted $S$-matrices are unitary and $\Gamma^\circ$ is trivial. Hence this verifies Theorem \ref{conj:main1} independently in this case. 

\subsubsection{Genus one case}\label{sec:positivegenusone}Assume that $C$ is an elliptic curve and $\widetilde{C}$ is another elliptic curve and $\widetilde{C}\rightarrow C$ is an \'etale Galois cover with Galois group $\Gamma$. The cover $\widetilde{C}\rightarrow C$ can be degenerated to a curve $\widetilde{D}\rightarrow D$, where $\widetilde{D}$ is a nodal curve with $m$-copies of $\mathbb{P}^1$ forming regular $m$-polygon and $D$ is an elliptic curve with one cycle pinched. Let ${\widetilde{p}}$ be any marked point of $\widetilde{C}$ and $p$ be its image in $C$. Note that it is an unramified point. We consider the twisted conformal block $\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)\cong \mathbb{V}^{\dagger}_{0,\Gamma}(\widetilde{C},C,\widetilde{p},p)$ (by Propagation of vacua). By factorization (Proposition \ref{prop:factorizationofhongkumar}), we get 
$$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=\sum_{\lambda \in P_{1}(\frg)}\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \gamma\cdot \lambda^*}(\mathbb{P}^1,{q,q'} ).$$ By applying Proposition \ref{prop:genuszerofirstexample}, we get 
$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=|P_{1}(\frg)^{\gamma}|.$
On the other hand if we apply the condition that $n=0$ and $g=1$ in the Verlinde formula in Theorem \ref{conj:main1}, we also get $|P_{1}(\frg)^{\gamma}|$.
\subsubsection{Genus one case with one marked point}\label{sec:genusonenontrivialmarkedpoint}Let $\frg=A_{N}$ and $\gamma$ is the diagram automorphism of $A_{N}$. We denote the fundamental weights by $\omega_i$ for $0\leq i\leq N-1$. Then $|P_{1}(A_N)^\gamma|$ is two if $N$ is odd and one if $N$ is even. We have the following proposition to supplement the  Theorem \ref{conj:main1}.
\begin{proposition}Let $\widetilde{C}$ and $C$ be as above and $\widetilde{{p}}$ be a marked point in $\widetilde{C}$ and ${p}$ be denote the image of $\widetilde{{p}}$ in $C$. 
	\begin{enumerate}
		\item Let $\frg={A_{2r-1}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=
		2 $  if $i$ is even and $0$  otherwise.	 
		\item Let $\frg=A_{2r}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=1$, for all $i$. 
	\end{enumerate}
\end{proposition}
\begin{proof}
	We degenerate the cover $\widetilde{C}\rightarrow C$ to $\widetilde{D}\rightarrow D$ as in the Section \ref{sec:positivegenusone}. We apply the factorization theorem and get 
	$$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=\sum_{\lambda \in P_{1}(\frg)}\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \gamma\cdot \lambda^*,\omega_i}(\mathbb{P}^1,{\bf{p}'} ).$$
	It is well known \cite{Fakhruddin:12} that if $\frg=A_{r}$, then the dimension of level one conformal blocks with three marked points $\dim_{\mathbb{C}}\mathbb{V}_{\omega_i,\omega_j,\omega_k}(\mathbb{P}^1,{\bf{p}}')$ is one if and only $(r+1)| (i+j+k)$ and is zero otherwise. Using this we have the following:
	\begin{itemize}
		\item Let $\frg=A_{2r-1}$. If $i$ is odd and $\lambda=\omega_m$, we get $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \lambda,\omega_i}(\mathbb{P}^1,{\bf{p}'} )=0$. This follows from the fact that by choice $2m+i$ is odd and hence $2\lambda+ \omega_i$ is not in the root lattice of $A_{2r-1}$. 
		\item Let $\frg=A_{2r-1}$. If $i=2a$ is even, $a\leq r-1$ and $\lambda=\omega_m$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\lambda,\omega_{2a}}(\mathbb{P}^1,{\bf p}')$ is one dimensional if and only if $2m+2a$ is divisible by $2r$. In the range $0\leq m<2r$, then $m=r-a$ or $(2r-a)$ are the two solutions. 
		\item Let $\frg=A_{2r}$. For any $\lambda=\omega_m$, we get the condition $2m+i$ is divisible by $2r+1$ and $0\leq m \leq 2r$ has exactly one solution.   
	\end{itemize}
	Thus the result follows.
\end{proof}

This can also be checked by using the Verlinde formula  \ref{conj:main1}.

\subsubsection{\'Etale double cover of a genus two curve}\label{sec:etalegenustwo} Let $\widetilde{C}$ be a genus $3$ curve and $C$ be a genus two curve such that $\widetilde{C}\rightarrow C$ is an \'etale Galois cover of degree $2$. Let $\frg=A_N$ and consider the conformal blocks $ \mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)$. We can degenerate the cover such that it normalization is a disjoint union of \'etale double covers of elliptic curves. By the computation in Section \ref{sec:genusonenontrivialmarkedpoint}, we get the following:
\begin{enumerate}
	\item Let $\frg={A_{2r-1}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=
	4r. $
	\item Let $\frg={A_{2r}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=
	2r+1.$
\end{enumerate}
\subsubsection{Arbitrary genus case}Let $\mu$ be any element  in $P_{1}(\frg)$ and $S$ be the uncrossed $S$-matrix for $\widehat{L}({\frg})$ at level one.  We observe the following:
\begin{enumerate}
	\item If $\frg=A_{n}$,  then $S_{0,\mu}=\frac{1}{\sqrt{n+1}}$.
	\item If $\frg=D_n$, then $S_{0,\mu}=\frac{1}{2}$.
	\item If $\frg=E_6$, then $S_{0,\mu}=\frac{1}{\sqrt{3}}$. 
\end{enumerate}Let $\gamma$ be an automorphism of order $m$ acting on $\frg$ and let $\widetilde{C}\rightarrow C$ be an \'etale  cyclic Galois cover of order $m$. Let $g$ be the genus of $C$. Then by the Verlinde formula \ref{conj:main1}, we get 
\begin{equation}
\label{eqn:arbitrarygenusverlindeexampleetale}
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=|P_{1}(\frg)^{\gamma}|({S_{0,0}})^{2-2g}.
\end{equation}
The above can be checked directly using the degenerations and the genus zero computations in Sections \ref{sec:genusonenontrivialmarkedpoint}, \ref{sec:etalegenustwo} for the group $\frg=A_N$ and $\gamma$ being the diagram automorphism of $A_{N}$ directly using the degenerations and the genus zero computations in Sections \ref{sec:genusonenontrivialmarkedpoint}, \ref{sec:etalegenustwo} for the group $\frg=A_N$ and $\gamma$ is the diagram automorphism of $A_{N}$.

\subsection{Ramified Cases with diagram automorphisms of order two}We use compute some dimensions of twisted covers of conformal blocks associated diagram automorphism and ramified cover of curves.
\subsubsection{Twisted affine Lie algebra: $A^{(2)}_{2r-1}$ at level one}\label{sec:twistedfirst}Consider the diagram automorphism of $A_{2r-1}$. The level one weights of $A^{(2)}_{2r-1}$ are $\{0,\dot{\omega}_1\}$. By Proposition \ref{prop:crossedvsuncrossed} and the computations in Section \ref{sec:usefulcomputations}, tell us that the crossed $S$-matrix is given by the following $2\times 2$ matrix.
$$S^{\gamma}=\sqrt{2} \cdot \begin{pmatrix} 
\frac{1}{{2}}& \frac{1}{{2}} \\
\frac{1}{{2}} & -\frac{1}{{2}}
\end{pmatrix}.$$
Consider the Galois two cover  $\mathbb{P}^1\rightarrow \mathbb{P}^1$ ramified at two points $\widetilde{p}_1$ and $\widetilde{p}_2$ and let $\widetilde{p}_3$ be any \'etale point on $\mathbb{P}^1$. Then using the Verlinde formula \ref{conj:main1} and the \texttt{KAC} software, we get the dimension of the level one twisted conformal block
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,0,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is even }\\
0 & \mbox{otherwise},
\end{cases}
\]where  $\omega_i$ is the $i$-th fundamental weight of $A_{2r-1}$. Similarly, we can also check that 
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,\dot{\omega}_1,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is odd}\\
0 & \mbox{otherwise}.
\end{cases}
\
This can be verified directly from the fact that these conformal blocks are isomorphic to the space of invariant $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$ (respectively $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\mathbb{C}^{2r}\otimes \Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$) which has dimensions one or zero depending on the parity of $i$. 
\subsubsection{$A_{2n-1}^{(2)}$ and four ramification points at level one}\label{sec:4ram}Consider the degree two Galois cover of $\mathbb{P}^1$ ramified at four points ${\widetilde{\bf p}}$. Then $\widetilde{C}$ is an elliptic curve. By the crossed $S$-matrix in Section \ref{sec:twistedfirst} and the Verlinde formula \ref{conj:main1}, we get the following: 
\begin{enumerate}
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,0}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,\dot{\omega}_1,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$. 
\end{enumerate}

We can now degenerate the double cover of  $\mathbb{P}^1$ with four marked points to a reducible $\mathbb{P}^1$ with two components meeting at one point, which is \'etale. Then normalizing we get two disjoint copies of $\mathbb{P}^1$ with a double cover ramified at two points.  By factorization and the calculations in Section \ref{sec:twistedfirst} we get back the above numbers. 
\subsubsection{$A_{2r-1}^{(2)}$ and arbitrary genus at level one}Let $C$ be a smooth curve of genus $g$ and consider a double cover ${\widetilde{C}}$ of $C$ which is ramified at $2n$ points $\widetilde{\bf p}$. Assume that $\widetilde{C}$ is connected and hence is of genus $2g+n-1$.  Consider the $2n$-tuple of  weights $\vec{0}=(0,\dots, 0)$. Then by the Verlinde formula  \ref{conj:main1}, we get 
$$\dim_{\mathbb{C}}\mathbb{V}_{\vec{0}}^{\dagger}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p})=2^{g}r^{g+n-1}.$$ 
If we assume that $g=0$, then $\widetilde{C}$ is a curve of genus $n-1$. We can degenerate the cover $\widetilde{C}\rightarrow \mathbb{P}^1$ to cover $\widetilde{D}'\rightarrow D$, where $\widetilde{D}'$ has $n-1$-components consists of a chain of elliptic curves such that the two extreme components has three ramification points and all others have two ramification points. Moreover, all the nodes are also ramification points. We can applying the factorization theorem and apply the calculations in Section \ref{sec:4ram} to get the dimension of the twisted conformal block is $r^{n-1}$. This also verifies the Verlinde formula \ref{conj:main1} in this case. 
\subsubsection{Twisted affine Lie algebra: $A^{(2)}_{2r}$ in genus zero}Consider the diagram automorphism of $A^{(2)}_{2r}$. The level one weights of $A^{(2)}_{2r}$ is just the $r$-th fundamental weight $\dot{\omega}_r$ of the Lie algebra of type $B_r$. Consider the same data of the curve and marked points as in Section \ref{sec:twistedfirst}. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted conformal blocks at level one. 
\begin{equation}
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=1.
\end{equation}
Again this can be verified directly by the fact that $\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})$ is isomorphic to the space $\operatorname{Hom}_{\mathfrak{so}(2r+1)}(V_{\dot{\omega}_r}\otimes  V_{\dot{\omega}_r}\otimes \wedge^{i}\mathbb{C}^{2r+1},\mathbb{C})$, where $V_{\dot{\omega}_r}$ are irreducible representations of $\mathfrak{so}(2r+1)$ with highest weight $\dot{\omega}_r$. This space of invariants is always one dimensional by \cite{KempfNess:88}.

\subsection{The twisted affine Lie algebra $D_4^{(3)}$}Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$. By the Riemann-Hurwitz formula, we get that $\widetilde{C}$ is an elliptic curve. We consider the triple $\vec{0}=(0,0,0)$ of weights in $P^{\ell}(D_4^{(3)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. 
\begin{remark}
	Since the curve $\widetilde{C}$ has genus one, like in the untwisted case,  the twisted conformal blocks $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ do not embed in the space of invariants of tensor product representations. Hence the dimension of invariants do not give any natural upper bounds. This will be clear in the next two examples. 
\end{remark}
\subsubsection{The case $\ell=1$}In this case, the set $P^{1}(D_4^{(3)})$ and it follows that the crossed $S$-matrix is has integer $1$. Now by the uncrossed $S$-matrix for $D_4^{1}$ at level one has $S_{0,0}=\frac{1}{2}$. Hence by the Verlinde formula \ref{conj:main1}, it follows that $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is two dimensional.
\subsubsection{The case $\ell=2$} The set $P^{2}(D_{4}^{(3)})=\{0, \dot{\omega}_2\}$. By Proposition \ref{prop:crossedvsuncrossed}, Section \ref{sec:usefulcomputations} and using \texttt{KAC} software, we get the crossed $S$-matrix: 
$$S^{\gamma}=\sqrt{3}\cdot \begin{pmatrix}
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}}  \\
\frac{1}{\sqrt{6}} & -\frac{1}{\sqrt{6}} 
\end{pmatrix}.$$
The fixed points of $P^1(D_{4}^{(1)})$ under the diagram automorphism are $\{0,\omega_2\}$ and from the uncrossed $S$-matrix we get $S_{0,0}=\frac{1}{2\sqrt{8}}$ and $S_{0,\omega_2}=\frac{1}{\sqrt{8}}$. Now the Verlinde formula \ref{conj:main1} implies that 
$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=3.$
\fi



\section{Atiyah algebra of the twisted WZW connection on $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$}\label{sec:atiyahmitcoordinates}
In this section, we extend the twisted WZW connection on $\mathbb{V}_{\vec{\lambda},\Gamma}$ on the compact moduli $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ to a projective connection with logarithmic singularities. We also compute the Atiyah algebra \cite{BS, Tsuchimoto} of the connection. The corresponding result in the untwisted case is due to Tsuchimoto \cite{Tsuchimoto}.

Let $\pi: \widetilde{C}\rightarrow C $ be a $\Gamma$-cover of
nodal curves and let ${\bf{p}}=(p_1,\dots,p_n)$ be a sequence of $n$-distinct points of $C$ and $\widetilde{\bf{p}}$ be a lift of $\bf{p}$ to
$\widetilde{C}$.  Let $\widetilde{p}_i$ be a lift of $p_i$ with stabilizer $\Gamma_i=\langle m_i\rangle$ of order $N_i$. We have the following definition:
\begin{definition}\label{def:specialformal}
A formal coordinate of $\widetilde{p}_i$ is called { special} if $m_i. \widetilde{z}_i=\exp(2\pi{\sqrt{-1}/N_i})\widetilde{z}_i$. 
\end{definition}

Let ${\widetilde{\bf{z}}}=(\widetilde{z}_1,\dots,\widetilde{z}_n)$ be an $n$-tuple of formal special coordinates of $\widetilde{\bf{p}}$ and ${\bf{z}}=(z_1,\dots,z_n)$ denote an $n$-tuple of formal coordinates of ${\bf{p}}$. The local coordinates $\wtilde{\mathbf{z}}$ and ${\bf{z}}$ are related by
the formula $z_i=\widetilde{z}_i^{N_i},$ where $N_i$ is the order of the stabilizer of $\Gamma_i$ at the points $\widetilde{p}_i$.

 More precisely, the functor  $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ along with a choice of formal special coordinates will be denoted by $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$. Similarly, we denote 
 the functor $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ along with a choice of one-jets along the marked points by $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$. We refer the reader to Appendix \ref{sec:localcoord} for the definitions and the associated morphisms. 
 
 
 Let ${\bf m}=(m_1,\dots,m_n)$ be an $n$-tuple of elements of $\Gamma^n$. The coherent sheaf of twisted conformal blocks on $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ along with choice of formal coordinates will 
be denoted by $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf{ p}}, \widetilde{{\bf{z}}})$. We refer the reader to \cite{ KH, szcz, WangShen} for more details. 

In this section, we give another construction of $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}\widetilde{C},C, \widetilde{\bf{p}}, {\bf{ p}}, \widetilde{{\bf{z}}})$ via the Beilinson-Bernstein localization principal following \cite{szcz}. 
By taking invariant push-forward, we also show that the coherent sheaf $\mathcal{V}_{\vec{\lambda},\Gamma}^{\dagger}(\widetilde{C},C,\widetilde{\bf{p}},\mathbf{p}, \widetilde{{\bf z}})$ descends to a coherent sheaf on $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ which 
we denote by $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}, {\bf{p}},\widetilde{\bf{v}})$.

\iffalse


\subsection{Atiyah Algebras}In this section, we recall the basic notion of Atiyah algebras from \cite{ BFM, BS,Tsuchimoto}. 
Let ${E}$ be a vector bundle of rank $r$ on a smooth projective variety $X$. We denote by $\mathcal{D}^{\leq 1}(E)$ to be the  sheaf of differential operators of $E$ of order at most $1

\begin{definition}
	The Atiyah algebra $\mathcal{A}_{{E}}$ of ${E}$ is the subsheaf of Lie algebras of $\mathcal{D}^{\leq 1}(E)$ such that the symbol map restricted to $\mathcal{A}_{E}$ surjects on to $ \Theta_X \otimes \operatorname{id},$ where $\Theta_X$ is the tangent sheaf of $X$. The Atiyah algebra $\mathcal{A}_{E}$ can be put in an short exact sequence of sheaves of Lie algebras of $\mathcal{O}_X$-modules:
$$0\rightarrow \mathcal{E}nd_{\mathcal{O}_X}(E) \rightarrow \mathcal{A}_{E}\rightarrow \Theta_X\otimes \id_{E}\rightarrow 0.$$
\end{definition}

\begin{definition}
Let $R$ be a sheaf of associative $\mathcal{O}_X$-algebras endowed with the obvious non-trivial Lie bracket. An $R$-Atiyah algebra consists of the following data:
\begin{itemize}


	\item A Lie algebra extension $\mathcal{A}$ of the tangent sheaf $\Theta_X$ by $\mathcal{O}_X$-module $R$, also known as the fundamental exact sequence:
	$	0\rightarrow R \rightarrow \mathcal{A} \xrightarrow{\epsilon} \Theta_X\rightarrow 0.$

	
	\item A left $\mathcal{O}_X$-module structure on $\mathcal{A}$ compatible with the $\mathcal{O}_X$ module 
	structures on $R$ and $\Theta_X$. 
	For these structures the following identities must hold: 
	\begin{itemize}
		\item $[\alpha, ab]=[\alpha,a]b + a[\alpha,b],$
		\item $[\alpha, f]=\epsilon(\alpha)(f)$,
		where $\alpha \in \mathcal{A}$, $f\in \mathcal{O}_X$ and $a,b \in R$. 
	\end{itemize}
\end{itemize}
\end{definition}
It was observed in \cite{BS} that $R$-Atiyah algebras form a category where the objects are Atiyah algebras and morphisms are maps of Lie algebra extensions. 
\subsubsection{Operations on Atiyah algebras}\label{section:operationsonatiyah}We will be focusing on Atiyah algebras 
where $R=\mathcal{O}_X$. The operations \cite{BS} pullback, sum, multiplication by a scalar exists in the category of $\mathcal{O}_X$-Atiyah algebras. The existence of flat projective connection on a vector can be reformulated using the language of Atiyah algebras. We recall this below:

\begin{enumerate}
\iffalse
\item (Functoriality) Let $\mathcal{A}$ be an $R$-Atiyah algebra on $Y$. If $X \rightarrow Y$ be a map of smooth varieties, then  $f^*(R)=f^{-1}R\otimes_{f^{-1}\mathcal{O}_Y}\mathcal{O}_Y$.
We define the pullback of $\mathcal{A}$ by $f^{\bullet}(\mathcal{A}):=\Theta_X\times_{f^*{\Theta_Y}}f^*(\mathcal{A})$.

\item($\mathcal{O}_X$-Atiyah algebras)\label{sec:OXatiyahalgebras}
We set $R=\mathcal{O}_X$ and we consider the following:
\begin{enumerate}
	\item Let $\mathcal{A}_1$ and $\mathcal{A}_2$ be two Atiyah algebras, we define the sum 
	$$\mathcal{A}_1 + \mathcal{A}_2={(\mathcal{A}_1\times_{\Theta_X}\mathcal{A}_2 )}/\{(f,-f) | f \in \mathcal{O}_X\}.$$ 

	\item For $\lambda \in \mathbb{C}$, we define 
	$\lambda \mathcal{A}=(\mathcal{O}_X\oplus \mathcal{A})/(\lambda,1 )\mathcal{O}_X.$ 
	The fundamental exact sequence of the Atiyah algebra $\lambda \mathcal{A}$ is the following:
	$0 \rightarrow \mathcal{O}_X \xrightarrow{\lambda^{-1}} \mathcal{A} \xrightarrow{\epsilon} \Theta_X \rightarrow 0.$
\end{enumerate} 

\fi


\item{(Action on coherent sheaf)} Let $E$ be a coherent sheaf on $X$ and $\mathcal{A}$ be an $\mathcal{O}_X$-Atiyah algebra. 
We say that we have an action of $\mathcal{A}$ on ${E}$ if the following are satisfied:
\begin{enumerate}
	\item Each section of $\mathcal{A}$ acts on ${E}$ as a first order differential operator.
	\item The principal symbol of $\alpha$ consider as a first order differential operator coincided with $\epsilon(\alpha)\otimes \operatorname{id}_{E}$.
	\item Let $f \in \mathcal{O}_X$, then the action of $\mathcal{A}$ restricts to multiplication by $f$. 
	
	
\end{enumerate}
\item Let $\mathcal{A}$ be an Atiyah algebra acting on a coherent sheaf $E$ on $X$, then the following holds:
\begin{enumerate}
	\item $E$ is locally free coherent sheaf. 
	\item The Atiyah algebra $\mathcal{A}$ is canonically isomorphic to $\frac{1}{rk(E)}\mathcal{A}_{\det E}$, where $\rk(E)$ is the rank of 
	the locally free sheaf $E$. 
	\end{enumerate}
\end{enumerate}
\iffalse
The above can be represented as a Lie algebra homomorphism between $\mathcal{A}$ and $\mathcal{A}_E$ such that: 
\begin{equation}\label{eqn:actiononvector}
\xymatrix{
	0\ar[r] & \mathcal{E}nd_{\mathcal{O}_X}(E)\ar[r] &\mathcal{A}_E\ar[r]& \Theta_X\otimes \id_E \ar[r]& 0\\
	0\ar[r] &\mathcal{O}_X\ar[r]\ar[u]^{\id_{E}}& \mathcal{A}\ar[r]\ar[u]	& \Theta_X \ar[r]\ar[u]^{\id\otimes \id_{E}}& 0.
}
\end{equation}

\begin{proposition}\label{prop:actiononvb}The following are equivalent:
	\begin{enumerate}
		\item An action of $\mathcal{A}$ on $E$ for some Atiyah algebra $\mathcal{A}$. 
		\item There is a projective connection on $E$, i.e. an action of ${\Theta}_X$ on $\mathbb{P}(E)$. 

	\end{enumerate}
\end{proposition}
\fi

\subsection{Atiyah Algebras with Logarithmic singularities}
Let $X$ be a smooth variety and $D$ be a normal crossing divisor. Let $\Theta_{X,D}$ be the subsheaf  of vector 
fields that 
preserve the divisor $D$, i.e 
$$\Theta_{X,D}(U):=\{s\in \Theta_X(U)| s(\mathcal{I}_D(u))\subseteq \mathcal{I}_D(u)\},$$ where $\mathcal{I}_D$ is 
the ideal sheaf 
of the divisor $D$, $U$ is an open set of $X$. 
 If $\mathcal{A}$ is a 
Atiyah algebra over $X$, we define a log $D$-Atiyah algebra  $\mathcal{A}(-\operatorname{log D}):=\epsilon^{-1}(\Theta_{X,D})\subset \mathcal{A}$.  

If $(\mathcal{A},R )$ and $(\mathcal{B}, S)$ 
are two Atiyah algebras, then we can call a morphism with logarithmic singularities at $D$, or simply a $\operatorname{log}D$-morphism 
between $\mathcal{A}$ and $\mathcal{B}$ to be an $\mathcal{O}_X$-linear  Lie algebra map $f:\mathcal{A}(\operatorname{-log D})\rightarrow \mathcal{B}(\operatorname{-log D})$ 
such that $f(R)\subset S$ is an algebra map and the induced map $\mathcal{A}/R \rightarrow \mathcal{B}/S$ is an identity on $\Theta_{X,D}$. 

Let $\mathcal{A}$ be an $\mathcal{O}_X$-Atiyah algebra and $\mathcal{B}=\mathcal{A}_{{E}}$, where ${E}$ is a 
vector bundles on $X$. A $\operatorname{log} D$-morphism 
is the same as an integrable connection on ${E}$ with logarithmic singularities at D.
\iffalse
\begin{proposition}
	\label{prop:atiyahalgebralog}
	\fi
	Let $\mathcal{A}$ be any $\mathcal{O}_X$-Atiyah algebra and $E$ be a vector bundle on $X$, then the following are 
	equivalent:
	\begin{itemize}
		\item A $\log D$ morphism between $\mathcal{A}( \log D) \rightarrow \mathcal{A}_{E}(\log D)$ 
		\item A flat log-projective connection on the projective bundle $E$. 
	
	
	\end{itemize}
\begin{remark}
	The operations on Atiyah algebras described in Section \ref{section:operationsonatiyah} can be easily generalized to the case 
	of log-$D$ Atiyah algebras.
\end{remark}
\iffalse
\begin{definition}\label{def:residueofaconnection}Let $E$ be a vector bundle on $X$ and $\mathcal{A}(\log D)$ acts on $E$. 
	Consider an open cover $\{U_{\alpha}\}_{\alpha}$ be a cover of $X$ such that the fundamental exact sequence of the Atiyah 
	algebra is split on each $U_{\alpha}$. In other words over $U_{\alpha}$, 
	we have a local $\log$-connection
	$$\widetilde{\nabla}_{\alpha} : E_{|U_{\alpha}} \rightarrow E\otimes\Omega_{U_{\alpha}}(\log D)$$ and let $\operatorname{Res}\widetilde{\nabla}_{\alpha}$ 
	denote the residue of the connection $\widetilde{\nabla}_{\alpha}$.
\end{definition} The following Lemma is easy to prove:
\begin{lemma}
	The local residues of a projective connection and  defines a morphism $\oplus_{i=1}^sA_i \in \operatorname{Hom}(E, E_{|\tilde{D}})$, 
	where $\tilde{D}$ is the normalization of $D=\cup_{i=1}^s D_i$ and let $A_i$ is the residue of the projective connection 
	on $E$ along $D_i$. 
\end{lemma}
We can use the residues of the flat logarithmic connection to compute the first Chern class of the vector bundle. 
The following result is due to Esnault-Verdier and can be found in \cite{EV}.
\begin{proposition}
	\label{prop:esnaultverdier}
	Let $X$ be a smooth  connected projective variety and $D=\cup_{i=1}^sD_i$ be a simple normal crossing divisor. 
	Let $E$ be a vector bundle of finite 
	rank on $X$ with a flat projective connection on $X\backslash D$. Let $\mathcal{L}$ be a line bundle on $X$ 
	and $\mathcal{A}_{\mathcal{L}}(\log D)$ be the logarithmic Atiyah 
	algebra of the projective connection. Then 
	$$c_1(E)=\operatorname{rk} (E).c_1(\mathcal{L}) -\sum_{i=1}^{s}\operatorname{Tr}(A_i). [D_i],$$ 
	where $A_i$'s are as in Definition \ref{def:residueofaconnection}.
\end{proposition}
\fi
\fi

\subsection{Localization of twisted $\mathcal{D}$-modules} In this section, we briefly recall the definition of Harish-Chandra
pairs and the Beilinson-Bernstein localization functors \cite{BD3} to produce twisted $\mathcal{D}$-modules. We mostly follow the book of Frenkel and Ben-Zvi \cite{FBz}, however we discuss the adaptation to the logarithmic settings. We refer the reader to \cite[Sections 17.1-17.2]{FBz} for  the definition of a {\em Harish-Chandra pair} $(\mathfrak{s},K)$.
\iffalse
for completeness of the description:
\fi
It satisfies the condition:
	\begin{enumerate}
		\item An embedding of the Lie algebra $\mathfrak{k}$ of a Lie group $K$ into a Lie algebra $\mathfrak{s}$.
		\item An action $\operatorname{Ad}$ of $K$ on $\mathfrak{s}$ which is compatible with the adjoint action of $K$ on $\mathfrak{k}$. 
	\end{enumerate} 


Let $Z$ be a smooth variety and let $\Theta_Z$ be the tangent sheaf of $Z$. Let $\Delta_Z$ be a normal crossing divisor in $Z$ and let $\Theta_{Z,\Delta_Z}$ be the sheaf of tangent vector fields preserving the divisor $\Delta_Z$. 
\begin{definition}	\label{def:harishchandrapari}
A {\em log $(\mathfrak{s},K)$-action} on  $Z$ is  an action of $K$ on $Z$ that preserves $\Delta_{Z}$  along with a  Lie algebra map $\alpha : \mathfrak{s}\otimes \mathcal{O}_Z\rightarrow \Theta_{Z,\Delta_Z}$, that satisfies the following:
\begin{enumerate}
	\item The differential of the map $K\times Z\rightarrow Z$ is the restriction of $\alpha$ to $\mathfrak{k}$. 
	\item The action intertwines the representation of $K$ on $\mathfrak{s}$ with the action of $K$ on $\Theta_{Z,\Delta_Z}$. 
\end{enumerate} Motivated by the setting in \cite{FBz}, we say that the $(\mathfrak{s},K)$-action on $(Z,\Delta_Z)$ is {\em log-transitive} if
$\alpha$ is surjective.  
\end{definition}
Let $\widehat{\mathfrak{s}}$ be a central extension of $\mathfrak{s}$ and consider the short exact sequence  of sheaves over $Z$
\iffalse
\subsubsection{Localization functor}
Suppose $Z$ is a principal $K$-bundle over a variety $S$ and  we denote the fiber over a point $s\in S $ by $Z_s$. 
We further assume that $Z$ carries a transitive $(\mathfrak{s},K)$-action. Let $\mathfrak{l}$ be a Lie algebra 
that contains $\mathfrak{s}$ and admits a compatible adjoint $K$-action. Consider a $\mathfrak{l}$-module $V$ 
which is also $(\mathfrak{s},K)$-module where the action of $\mathfrak{s}$ comes from the 
restriction of the action of $\mathfrak{l}$ on $V$. Suppose $\widetilde{\mathfrak{l}}$ be a Lie 
subalgebroid of $\mathfrak{l}\otimes \mathcal{O}_Z$ which satisfy the following:
\begin{enumerate}\label{enu:property}
	\item It is preserved by the action of $K$. 
	\item It is preserved by the action of $\mathfrak{s}\otimes \mathcal{O}_Z$.
	\item It contains $\operatorname{Ker}(\alpha)$.
\end{enumerate}

Then the {\em localization functor} (see \cite{FBz}) takes a $(\mathfrak{s},K)$-module $V$  and first converts it to a $\mathcal{D}_Z$-module $(V\otimes \mathcal{O}_Z)/\widetilde{\mathfrak{l}}(V\otimes \mathcal{O}_Z)$. From the $\mathcal{D}_Z$-module it then produces a $\mathcal{D}_{S}$-module $\mathcal{BB}(V)$ whose fiber at a point $s\in S$ is
given by $\mathcal{V}_s/\widetilde{l}_s\mathcal{V}_s$, where $\widetilde{l}_s$ is the 
descent of the fibers of the $K$-equivariant Lie algebra $\widetilde{\mathfrak{l}}$ to $S$ and $\mathcal{V}_s$
is the vector space $Z_s\times_K V$.

\subsubsection{Twisted localization functor}\label{sec:twistedlocinvalid} We assume 
that the Lie algebra $\mathfrak{s}$ has a central extension $\widehat{\mathfrak{s}}$ with the following 
properties:
\begin{enumerate}\label{enu:extension}
	\item The extension $\widehat{\mathfrak{s}}$ splits over $\mathfrak{k}$.
	\item The extension $\widehat{\mathfrak{s}}\otimes \mathcal{O}_Z$ splits over $\operatorname{Ker}(\alpha)$. 
\end{enumerate}
With the above assumption, we get an Atiyah algebra $\mathcal{A}_Z=\widehat{\mathfrak{s}}\otimes \mathcal{O}_Z/\operatorname{Ker}(\alpha)$ on the variety $Z$. 
By the assumptions on the action of $K$, we get that the Atiyah algebra $\mathcal{A}_Z$ is $K$-equivariant and 
hence it induces an Atiyah algebra $\mathcal{A}_S$ on $S$. 

Similarly as in the untwisted
case, let $\widehat{\mathfrak{l}}$ be a Lie algebra that contains $\widehat{\frg}$ and admits an 
admissible $K$-action. Let $V$ be a $\widehat{\mathfrak{l}}$-module which is also 
a module for the Harish-Chandra pair $(\mathfrak{s}, K)$.  Let $\widetilde{l}$ be a Lie 
subalgebroid of $\widehat{\mathfrak{l}}\otimes \mathcal{O}_Z$ satisfying Conditions \ref{enu:property}. 
The {\em twisted localization functor} (see Section 17.2 in \cite{FBz})  takes a $(\widehat{\mathfrak{s}},K)$-module
$V$ arising as a representation of $\widehat{\mathfrak{l}}$ and 
produces first a $\mathcal{A}_Z$-module and then descends it to a $\mathcal{A}_S$-module $\widehat{\mathcal{BB}}(V)$ whose fibers have an identical description as 
in the untwisted case. 

\fi%
\iffalse
Let $Z$ be a $K$-torsor over $S$ and let $\Delta_S$ be 
a  normal 
crossing divisor in $S$ and let $\Delta_Z$ denote its inverse image in $Z$. Let $(\mathfrak{s},K)$ be 
a Harish-Chandra pair and assume that $(\mathfrak{s},K)$ acts on $Z$ such that 
\begin{enumerate}
	\item The action of $K$ preserves $\Delta_Z$.
	\item There is a Lie algberoid map 
	$\alpha : \mathfrak{s}\otimes \mathcal{O}_Z \rightarrow \Theta_{Z,\Delta_Z},$ where $\Theta_{Z,\Delta_Z}$ is the 
	sheaf of tangent vector field preserving the i
	deal sheaf $\mathcal{I}_{\Delta_Z}$ of $\Delta_Z$.
	\item The actions are compatible with respect to the Harish-Chandra 
	pair $(\mathfrak{s},K).$
\end{enumerate}
\begin{definition}
	\label{def:logtransitive}We say that the action $(\mathfrak{s},K)$ is 
	log-transitive 
	if the morphism 
	$\alpha: \mathfrak{s}\otimes \mathcal{O}_Z \rightarrow \Theta_{Z,\Delta_Z}$ is surjective.
\end{definition}
\fi
\begin{equation}\label{eqn:centralexct}
0\rightarrow \mathcal{O}_Z\rightarrow \widehat{\mathfrak{s}}\otimes \mathcal{O}_Z\rightarrow \mathfrak{s}\otimes \mathcal{O}_Z \rightarrow 0. 
\end{equation}
\subsubsection{Assumption of the central extension}
We assume the following: 
\begin{enumerate}\label{enu:hc1}
	\item\label{assum1} The exact sequence \eqref{eqn:centralexct} splits over $\operatorname{Ker}\alpha$. 
	\item\label{assum2} The central extension defining $\widehat{\mathfrak{s}}$ splits over $\mathfrak{k}$ making the pair $(\widehat{\mathfrak{s}},K)$ a new Harish-Chandra pair. 
\end{enumerate}
The above assumptions on the central extension $\widehat{\mathfrak{s}}$ imply that the quotient of $\widehat{\mathfrak{s}}\otimes \mathcal{O}_Z$ by $\operatorname{Ker}\alpha$ is a logarithmic Atiyah algebra $\mathcal{A}(-\log \Delta_{Z})$ on $Z$ i.e an exact sequence of sheaves of Lie algebras
$$0\rightarrow \mathcal{O}_Z \rightarrow \mathcal{A}(-\log \Delta_{Z}) \rightarrow^{\alpha} \Theta_{Z,\Delta_Z}\rightarrow 0.$$
The map $\alpha$ is called the anchor map and the above exact sequence is known as {the fundamental exact sequence} of the Atiyah algebra.

\subsubsection{Beilinson-Bernstein functor-First Step}
Let $\widehat{\mathfrak{l}}$ be any Lie algebra containing $\widehat{\mathfrak{s}}$ and carrying a compatible adjoint $K$ action and suppose $\widetilde{\mathfrak{l}}$ is a subsheaf of $\widehat{\mathfrak{l}}\otimes \mathcal{O}_Z$ that satisfies the following:
\begin{enumerate}
	\item it is preserved by $\widehat{\mathfrak{s}}\otimes \mathcal{O}_Z$;
	\item it is preserved by the action of $K$;
	\item it contains $\operatorname{Ker}\alpha$, where $\alpha: \mathfrak{s}\otimes \mathcal O_Z\rightarrow \Theta_{Z,\Delta_Z}$. 
\end{enumerate}
The Beilinson-Bernstein formalism  first takes a $\widehat{\mathfrak{l}}$-module $V$ which further has the structure of a $(\widehat{\mathfrak{s}},K)$-module and considers the following sheaf of $\mathcal{O}_Z$-modules $$V\otimes \mathcal{O}_Z/\widetilde{\mathfrak{l}}.(V\otimes \mathcal{O}_Z).$$ 

Then the assumptions on $\widetilde{\mathfrak{l}}$ guarantee that the sheaf $V\otimes \mathcal{O}_Z/\widetilde{\mathfrak{l}}\cdot(V\otimes \mathcal{O}_Z)$  is also a $\mathcal{A}(-\log \Delta_{Z})$-module.

\subsubsection{Twisted log-localization functor}\label{sec:twistedloc}We recall following Section 17.2.5 in \cite{FBz} how to descend the above twisted $\mathcal{A}(-\log \Delta_{Z})$ module to a free group quotient $T$ of $Z$ by $K$.



Let $Z$ be a principal $K$-bundle over a variety $T$ and let $\Delta_{T}$ be a normal crossing divisor whose inverse image in $Z$ is $\Delta_{Z}$. 

We say a pair $(T, \Delta_T)$ has a log-$(\mathfrak{s},K)$ structure if the Harish-Chandra pair $(\mathfrak{s},K)$ acts log-transitively on $Z$ extending the action of $K$ on the fibers of the map $\pi:Z\rightarrow T$. 

In this set up, the anchor map $\alpha$ gives a surjective map 
$$ \overline{\alpha}:\overline{\mathfrak{s}}\rightarrow \Theta_{T,\Delta_T}, \ \ \mbox{where $\overline{\mathfrak{s}}=(\mathfrak{s}/\mathfrak{k}\otimes \mathcal{O}_Z)^{K}$}.$$ We denote the corresponding log-Atiyah algebra by $\mathcal{A}(-\log \Delta_T)$. 
\iffalse
\begin{remark}
	Unlike in \cite{FBz}, we do not require the action of $\mathfrak{s}$ to have trivial stabilizers. 
\end{remark}

\fi


 Further let $\widehat{\mathfrak{s}}$, $\widehat{\mathfrak{l}}$, $\widetilde{\mathfrak{l}}$ and $V$ be as above. Observe that the $\mathcal{A}(-\log \Delta_Z)$-module $V\otimes \mathcal{O}_Z/\widetilde{\mathfrak{l}}\cdot (V\otimes \mathcal{O}_Z)$ is $K$-equivariant. 
 
 Now since $Z$ is a $K$-torsor over $T$, it follows that $(V\otimes \mathcal{O}_Z)/\widetilde{\mathfrak{l}}\cdot(V\otimes \mathcal{O}_Z)$ descends as a $\mathcal{O}_T$-module on $T$ which we denote by $\widehat{BB}(V)$. Moreover, $\widehat{BB}(V)$ is also a $\mathcal{A}(-\log\Delta_T)$-module. 
 \subsubsection{Fibers of $\widehat{BB}(V)$} 
 We now describe the fibers of the module $\widehat{BB}(V)$ at a point $t\in T$. Consider the set $Z_t=\pi^{-1}(t)$. The group $K$ acts freely transitively on $Z_t$ and we consider the vector space $\mathcal{V}_t:=Z_{t}\times_{K} V$. Similarly for every $t\in T$, set $\widehat{\mathfrak{l}}_t:=Z_{t}\times_{K}\widehat{\mathfrak{l}}$. Since $\widetilde{\mathfrak{l}}$ is preserved by the $K$-action, we also a get a Lie subalgebra $\widetilde{\mathfrak{l}}_t$ of $\widehat{\mathfrak{l}}_t$. The fibers of $\widehat{BB}(V)$ at a point $t\in T$ are the coinvariants 
 $\mathcal{V}_t/\widetilde{\mathfrak{l}}_t\cdot \mathcal{V}_t$.

We will apply the Beilinson-Bernstein localization formalism in the situation $$Z=\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m })\rightarrow \widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf{m}})=T.$$ as torsors for a natural group scheme.
We now describe these torsors. 
\subsection{Coordinate Torsors}In this section, we recall (following \cite{FBz}, \cite{FrenkelSzcz}) natural coordinate torsors arising out of 
ramified cover of disks.  First, 
we discuss the absolute situation without covers. 
\subsubsection{Formal coordinate on disks} Let $R$ be a ring, then following Section 4.1 in \cite{szcz}, we let $\mathcal{O}_R$
(respectively $\mathcal{K}_R$) denote the rings $R[[z]]$ (respectively $R((z))$). Then $\operatorname{Aut}\mathcal{O}_{R}$ 
(respectively $\operatorname{Aut}\mathcal{K}_R$) can be identified with space of formal $R$-power series
(respectively formal $R$-Laurent series) of the form 
$$f(z)=\sum_{n\geq 1}c_nz^n \mbox{ }(\mbox{resp. } f(z)=\sum_{n\geq k}c_nz^n),$$ where 
$c_n \in R$ (respectively $c_n$ is nilpotent if $n\leq 0$) and $c_1$ is an unit. The group scheme (resp. ind-group scheme) representing the functor $R\mapsto \operatorname{Aut} \mathcal{O}_R$ 
(respectively $R\mapsto \operatorname{Aut} \mathcal{K}_R$) will 
be denoted by $\operatorname{Aut}\mathcal{O}$ 
(respectively $\operatorname{Aut}\mathcal{K}$). 


Let $\operatorname{Der}^{(0)}\mathcal{O}$ denote the Lie algebra of $\operatorname{Aut}\mathcal{O}$ 
(respectively $\operatorname{Der}\mathcal{K}$ of $\Aut \mathcal K$) which is topologically generated by elements of the form $z^{k}\partial_z$ for $k\geq 1$(respectively $k\in \mathbb{Z}$). 

Similarly, we denote by $\operatorname{Aut}_{+}\mathcal{O}$ the subgroup scheme of $\operatorname{Aut}\mathcal{O}$ such that for 
any ring $R$, we have $\operatorname{Aut}_{+}\mathcal{O}_R$ consists of $R$-power series of the form 
$$f(z)=\sum_{n\geq 1}c_nz^{n}, \ c_1=1 \ \mbox{and} \ c_n\in R.$$ We denote the Lie algebra of $\operatorname{Aut}_{+}\mathcal{O}$ by $\operatorname{Der}_{+}\mathcal{O}$.  
\iffalse

The following elementary lemma can be found in \cite[Lemma 5.1.1]{FBz}. 
\begin{lemma}\label{lem:exponfbz}With the above notation 
	\begin{enumerate}
	\item $\operatorname{Aut}\mathcal{O}$ is a semidirect product of $\mathbb{G}_m$ and $\operatorname{Aut}_{+}\mathcal{O}$. 
	\item The group $\operatorname{Aut}_{+}\mathcal{O}$ is a prounipotent, proalgebraic group. Moreover, the exponential map from $\operatorname{Der}_{+}\mathcal{O}$ to  $\operatorname{Aut}_{+}\mathcal{O}$ is an isomorphism.
	\end{enumerate}
	\end{lemma}
\fi
\subsubsection{Formal coordinates on disks with ramification}Consider the automorphism of the ramified
covering ${R}[[z^{\frac{1}{N}}]]\rightarrow {R}[[z^{\frac{1}{N}}]]$ given
by sending $z^{\frac{1}{N}} \rightarrow \varepsilon z^{\frac{1}{N}}$, where $\varepsilon$ is
an $N$-th root of unity.  Let as before $\operatorname{Aut}R[[z^{\frac{1}{N}}]]$ denote the 
automorphisms of $R[[z^{\frac{1}{N}}]]$ preserving the ideal $(z^{\frac{1}{N}})$. Let $\operatorname{Aut}_N\mathcal{O}_R$ denote 
the subgroup of $\operatorname{Aut}(R[[z^{\frac{1}{N}}]])$ preserving the subalgebra $R[[z]]$. Then there is an exact sequence 
\begin{equation}
\label{eqn:exactseqence}
0\rightarrow \mathbb{Z}/N\mathbb{Z}\rightarrow \operatorname{Aut}_N \mathcal{O}_R \rightarrow \operatorname{Aut}\mathcal{O}_R \rightarrow 0.
\end{equation}
As in Szczesny \cite{szcz},  we consider the group scheme (ind group-scheme) $\operatorname{Aut}_N \mathcal{O}$ (respectively $\operatorname{Aut}_N\mathcal{K}$) 
and its Lie algebra $\operatorname{Der}^{(0)}_N \mathcal{O}$ (respectively $\operatorname{Der}_N\mathcal{K}$). We have the following explicit descriptions:
\begin{equation}\label{eqn:ecplicitderivations}
\operatorname{Der}_N^{(0)}\mathbb{C}[[z^{\frac{1}{N}}]]=z^{\frac{1}{N}}\mathbb{C}[[z]]\partial_{z^{\frac{1}{N}}}, \ 
\operatorname{Der}_N\mathbb{C}((z^{\frac{1}{N}}))=z^{\frac{1}{N}}\mathbb{C}((z))\partial_{z^{\frac{1}{N}}}.
\end{equation}	


There are natural homomorphisms between the corresponding groups (respectively ind-groups) 
$\mu: \operatorname{Aut}_N\mathcal{O} \rightarrow \operatorname{Aut}\mathcal{O}$ (respectively  $\operatorname{Aut}_N\mathcal{K} \rightarrow \operatorname{Aut}\mathcal{K}$). 
By the exact sequence \eqref{eqn:exactseqence}, $\mu$ is an isogeny whose derivative $$z^{\frac{1}{N}+k}\partial_{z^{\frac{1}{N}}}\rightarrow Nz^{k+1}\partial_z$$
gives an isomorphism of the following Lie algebras:
\begin{equation}
\label{eqn:liealgebraiso}
d\mu: \operatorname{Der}_N^{(0)}\mathcal{O} \rightarrow \operatorname{Der}^{(0)}\mathcal{O}, \ d\mu: \operatorname{Der}_N\mathcal{K} \rightarrow \operatorname{Der} \mathcal{K}.
\end{equation}



Let $\overline{D}_R=\operatorname{Spec} R[[z]]$ be a formal $R$-disk and let $x$ be a $R$-point of $\overline{D}_R$
and  let $\mathcal{A}ut (\overline{D}_{R,x})$
denote the set of formal coordinates on $\overline{D}_R$. 
Clearly it is an $\operatorname{Aut}\mathcal{O}_R$-torsor.  

Similarly let $D_{R}=\operatorname{Spec}R((z^{\frac{1}{N}}))$ and let $\sigma: D_{R}\rightarrow D_{R}$ be an automorphism of
order $N$ that fixes a $R$-valued point $x$ in $D_R$. Up to a change of coordinates, we can assume that $\sigma$ takes
the form $z^{\frac{1}{N}}\rightarrow \varepsilon z^{\frac{1}{N}}$ where $\varepsilon$ is a $N$-th order root of unity. 
Now  since $R[[z^{\frac{1}{N}}]]^{\mathbb{Z}/N}=R[[z]]$, we get that the natural map 
$D_R\rightarrow \overline{D}_R$ can be considered as a cover of $\mathbb{Z}/N\mathbb{Z}$ ramified at the point $x$ in $D_R$ with order of ramification $N$.


Let $\mathcal{A}ut_N (D_{R,x})$ denote the set of special formal coordinates (see Definition \ref{def:specialformal})  of $D_R$ which are transformed by the rule $t \rightarrow \varepsilon t$, 
where $\varepsilon $ is an $N$-th root of unity. As before this is an $\operatorname{Aut}_N\mathcal{O}_R$-torsor. Similarly we define $\operatorname{Aut}_{N,+}\mathcal{O}$ and $\operatorname{Der}_{N,+}\mathcal{O}$. 
Moreover, there is a natural isomorphism between $\operatorname{Der}_{N,+}\mathcal{O}$ and $\operatorname{Der}_{+}\mathcal{O}$.
\subsubsection{Global Situation }Let $R$ be a $\mathbb{C}$-algebra and consider a family $(\widetilde{C} \rightarrow C,\wtilde{\mathbf{p}},\mathbf{p})$ of $n$-pointed admissible $\Gamma$-covers 
over $\operatorname{Spec}R$ in $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$ with $\widetilde{\bf{p}}=(\widetilde{p}_1,\dots,\widetilde{p}_n)$ being the $n$ marked sections of $\widetilde{C}$, in particular we have $\Gamma\cdot \wtilde{p}_i\cap \Gamma\cdot \wtilde{p}_j=\emptyset$ for $i\neq j$, and the monodromies around the marked sections being $\mathbf{m}=(m_1,\cdots,m_n)$. The stabilizer $\Gamma_{\widetilde{p}_i}$ of $\widetilde{p}_i$  is the cyclic subgroup of $\Gamma$ of order say $N_i$ generated by $m_i$.
Let $\mathcal{A}ut_{N_i}(D_{R,\widetilde{p}_i})$ be the set of special formal coordinates of the ring $\operatorname{Spec}\widehat{\mathcal{O}}_{\widetilde{p}_i}$ at 
the point $\widetilde{p}_i$ of the curve $\widetilde{C}$. 
We define the following:
\begin{eqnarray}\label{eqn:torsor}
&\operatorname{Aut}(\widetilde{C}/C, \mathcal{O}_R):=\operatorname{Aut}_{N_1}(\mathcal{O}_R)\times \dots \times \operatorname{Aut}_{N_n}(\mathcal{O}_R).\\
&\ \ \operatorname{Aut}_+(\widetilde{C}/C, \mathcal{O}_R):=\operatorname{Aut}_{N_1,+}(\mathcal{O}_R)\times \dots \times \operatorname{Aut}_{N_n,+}(\mathcal{O}_R).\\
&\operatorname{Aut}(\widetilde{C}/C,\mathcal{K}_R):=\operatorname{Aut}_{N_1}\mathcal{K_R} \times \dots \times \operatorname{Aut}_{N_n}(\mathcal{K}_R). 
\end{eqnarray}The corresponding group schemes are denoted by  $\operatorname{Aut}(\widetilde{C}/C,\mathcal{O})$, $\operatorname{Aut}_{+}(\widetilde{C}/C,\mathcal{O})$ 
and $\operatorname{Aut}(\widetilde{C}/C, \mathcal{K})$ respectively. We further denote their Lie algebras by $\operatorname{Der}(\widetilde{C}/C,\mathcal{O})$, $\operatorname{Der}_{+}(\widetilde{C}/C,\mathcal{O})$ and $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$.  The various  versions of the moduli stacks of pointed admissible $\Gamma$-covers are related by the following proposition:
\begin{proposition}\label{prop:torsorrealization}
	The moduli stacks $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$, $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ and $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ are related as follows:\
	\begin{enumerate}
		\item $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ is a $\operatorname{Aut}(\widetilde{C}/C,\mathcal{O})$-torsor over $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$. 
		\item $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ is a $\operatorname{Aut}_{+}(\widetilde{C}/C,\mathcal{O})$-torsor over $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$.
		\item $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ is a $\mathbb{G}_{\operatorname{m}}^{n}$-torsor over $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$. 
	\end{enumerate}
\end{proposition}


Let us define $\operatorname{Der}(\widetilde{C}/C, \mathcal{K})$ 
to be the Lie algebra of 
the ind-scheme $\operatorname{Aut}(\widetilde{C}/C, \mathcal{K})$. Now
 let $\operatorname{Aut}(C,\mathcal{O})$ (respectively $\operatorname{Aut}(C,\mathcal{K})$) 
denote the group scheme associated to 
the functor $$R\rightarrow \operatorname{Aut}(\mathcal{O}_R)\times \dots\times \operatorname{Aut}(\mathcal{O}_R)$$ (respectively $R\rightarrow \operatorname{Aut}(\mathcal{K}_R)\times \dots\times \operatorname{Aut}(\mathcal{K}_R))$  and $\operatorname{Der}^{(0)}(C,\mathcal{O})$ 
(respectively $\operatorname{Der}(C,\mathcal{K})$) denote their Lie algebras.  
Similarly define the Lie algebra $\operatorname{Der}_{+}(C,\mathcal{O})$. 
The isogeny $\mu$ in \eqref{eqn:liealgebraiso} gives 
the following isomorphisms between the Lie algebras:
\begin{eqnarray}
\operatorname{Der}^{(0)}(\widetilde{C}/C,\mathcal{O})\simeq\operatorname{Der}^{(0)}(C,\mathcal{O}), \\ \operatorname{Der}(\widetilde{C}/C,\mathcal{K})\simeq \operatorname{Der}(C,\mathcal{K}),\\
\operatorname{Der}_{+}(\widetilde{C}/C,\mathcal{O})\simeq \operatorname{Der}_{+}(C,\mathcal{O}).
\end{eqnarray}

\subsection{Equivariant Virasoro uniformization}

Let us recall the following result on  $\Gamma$-equivariant Virasoro uniformization due to M. Szczesny \cite[Theorem 7.1]{szcz}.
\begin{theorem}\label{thm:virasorouniformization}
The stack $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ carries a log-transitive action of   $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$ extending the action of $\operatorname{Aut}(\widetilde{C}/C,\mathcal{O})$ 
	along the fibers of the natural map $\widehat{\pi}: \widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})\rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$ and preserving the boundary divisor $\widehat{\Delta}_{g,n,\Gamma}=\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}(\mathbf{m})\backslash {\hatM}^\Gamma_{g,n}({\bf m})$.
\end{theorem}
\subsubsection{Comments on the proof}
Strictly speaking Szczesny's result \cite{szcz} is on the interior $\hatM^\Gamma_{g,n}(\mathbf{m})$. Also his strategy is to reduce to the untwisted case.  However the arguments can be easily extended to the boundary following the untwisted case as in Section 4.2 in \cite{U}. Namely the action of $\operatorname{Aut}(\widetilde{C}/C,\mathcal{O})$ extends to the boundary since we are only modifying the smooth points. It particular it also preserves the singularities. 

 Now log-transitivity follows from extending the argument of transitivity in Frenkel and Ben-Zvi \cite{FBz} in the untwisted case along with the result  (see \cite{ACV},\cite{ACG:11}) on deformations of nodal admissible $\Gamma$ covers $\widetilde{C}\rightarrow C$ preserving the singularities. These are exactly controlled by deformations of the pointed curve obtained by normalization of $C$ and the new marked points coming from the nodes of $C$.  Using these facts, we can argue as in \cite{FBz}.
 If $\Gamma$ is trivial, the result of the extension to the boundary  can be also found in \cite{Tsuchimoto}. 


The following is an obvious variant of the above theorem where we replace $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$ by $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$. 
\begin{corollary}\label{cor:virasorojetspaces}The same results in Theorem \ref{thm:virasorouniformization} hold if 
	we consider the natural action of the group $\operatorname{Aut}_{+}(\widetilde{C}/C,\mathcal{O})$ and along the fibers of the 
	natural map $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m}) \rightarrow \widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$.
\end{corollary}

\subsubsection{Virasoro Uniformization and the Hodge bundle}

Let $\widetilde{C}\rightarrow Z$ be a versal family in $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ parameterized by a smooth scheme $Z$ (or one may work in the setting of Looijenga \cite{Looijenga}).
We let $\widetilde{\bf{z}}$ (respectively ${\bf{z}}$) be the corresponding choice of special local formal coordinates along the sections $\widetilde{\bf p}$ (respectively ${\bf{p}}$). 

Let $\Delta_Z$ be the normal crossing divisor of nodal curves and as before $\Theta_{Z,\Delta_Z}$ be the
subsheaf of tangent vector fields on $Z$ preserving the divisor $\Delta_Z$. Finally, let $\Sigma$ be the critical locus of $\widetilde{C}\rightarrow Z$ and the image of $\Sigma$ is $\Delta_{Z}$. The codimension of $\Sigma$ in $\widetilde{C}$ is at least two. 


By Theorem \ref{thm:virasorouniformization}, the 
Lie algebra $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$ acts log-transitively (see Definition \ref{def:harishchandrapari} and the discussion afterward) on $Z$. In particular, we have a surjective 
Lie algebra map:
\begin{equation}
\label{eqn:surjectivityofanchormap}
\alpha :\operatorname{Der}(\widetilde{C}/C,\mathcal{K})\otimes \mathcal{O}_Z\twoheadrightarrow \Theta_{Z,\Delta_Z}.
\end{equation}


Following the notation in \cite{szcz}, let $vec^{\Gamma}(\widetilde{C}\backslash \Gamma.\widetilde{\bf{p}})$ be 
the kernel of the map $\alpha$. This is the locally free sheaf given by the $\Gamma$-invariant part of the push-forward of the locally free sheaf $\mathcal{H}om(\omega_{\widetilde{C}/Z},\mathcal{O}_{\widetilde{C}})$ to $Z$, where $\omega_{\widetilde{C}/Z}$ is the relative dualizing sheaf. We refer the reader to Section 4.2 in \cite{U} for the case when $\Gamma$ is trivial. 

Alternatively $vec^{\Gamma}(\widetilde{C}\backslash \widetilde{\bf p})$ can be realized as follows:  Restrict the versal family to $Z\backslash \Delta_Z$. By \cite{szcz}, we get that 
the fiber of $vec^{\Gamma}(\widetilde{C}\backslash \Gamma.\widetilde{\bf {p}})$ 
at a point $(\pi: \widetilde{C}_0\rightarrow C_0, \widetilde{\bf{p}},{\bf p}, \widetilde{{\bf z}})$ 
is given by the Lie algebra of $\Gamma$-invariant vector fields
on $\widetilde{C}_0\backslash \cup_{i=1}^{n}\Gamma \cdot \widetilde{p}_i$. 

Since 
by assumption, $\widetilde{C}_0$ is smooth, the cover $\widetilde{C}_0\rightarrow C_0$ is \'etale 
restricted to $\widetilde{C}_0\backslash \Gamma.\widetilde{\bf{p}}$. Hence, it follows that a $\Gamma$-invariant vector field on  $\widetilde{C}_0\backslash \Gamma.\widetilde{\bf{p}}$ 
descends to a 
vector field on $C_0\backslash {\bf p}$. Thus we get that $vec^{\Gamma}(\widetilde{C}\backslash \Gamma.\widetilde{\bf p})$ is canonically isomorphic to the push forward of the locally free sheaf $vec(C\backslash {\bf p}):=\operatorname{\mathcal{H}om}(\omega_{C/Z},\mathcal{O}_C)$ to $Z$.
\iffalse

The above discussion can be 
summarized as follows: 
\begin{lemma}
	\label{lem:explicittangentspace}
	Let $(\widetilde{C},C, \widetilde{\bf p}, {\bf p})$ (respectively 
	$(\widetilde{C},C, \widetilde{\bf p}, {\bf p},\widetilde{\bf v})$) be a point of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$( respectively
	$\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$),then the following holds:
	\begin{enumerate}
		\item The tangent vector fields at $(\widetilde{C},C, \widetilde{\bf p}, {\bf p})$ 
		preserving $\widehat{\Delta}_{g,n,\Gamma}$ of $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ is isomorphic to 
		$$vec^{\Gamma}(\widetilde{C}\backslash O(\widetilde{\bf{p}}))\backslash\operatorname{Der}(\widetilde{C}/C, \mathcal{K})(\mathbb{C})/ \operatorname{Der}^{(0)}(\widetilde{C}/C,\mathcal{O})(\mathbb{C}).$$
		\item Let $\tilde{\pi}: \widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}\rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ be the obvious forgetful map. 
		Then the tangent vector fields at $(\widetilde{C},C, \widetilde{\bf p}, {\bf p},\widetilde{\bf v})$ 
		preserving the divisor $\tilde{\pi}^{-1}(\widehat{\Delta}_{g,n,\Gamma})$ of $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$ is
		 isomorphic to 
		$$vec^{\Gamma}(\widetilde{C}\backslash O(\widetilde{\bf{p}}))\backslash\operatorname{Der}(\widetilde{C}/C, \mathcal{K})(\mathbb{C})/ \operatorname{Der}^{(0)}(\widetilde{C}/C,\mathcal{O})(\mathbb{C}).$$
	
	\end{enumerate}
\end{lemma}

\fi
\subsubsection{Uniformization and the associated Atiyah algebra} Recall the natural forgetful maps 
$$\widehat{\pi}: \widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n} \rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n} \ \mbox{and}  \ \widetilde{\pi}: \widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n} \rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n}.$$
The action of 
  $\operatorname{Aut}(\widetilde{C}/C,\mathcal{K})$ on $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ \cite[Theorem 17.3.2]{FBz}, \cite{szcz}
  preserves the divisor $\widehat{\Delta}_{g,n,\Gamma}$. The twisted Sugawara construction \cite{Wakimoto} gives an 
action of $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$ on $\mathcal{H}_{\vec{\lambda}}$.

 Let $\widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K})$ 
be the central 
extension of $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$ 
obtained as Beaer sum of the Virasoro cocycles  for the individual factors. 
We get a short exact sequence 
\begin{equation}
\label{eqn:centralexten}
0\rightarrow \mathcal{O}_{\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})}. c 
\rightarrow \widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K})\rightarrow 
\operatorname{Der}(\widetilde{C}/C,\mathcal{K})\rightarrow 0.
\end{equation}

Moreover, the short exact sequence splits when restricted to $vec^{\Gamma}(\widetilde{C}\backslash \Gamma\cdot\widetilde{\bf{p}})$ and the Lie algebra $\operatorname{Der}_{+}(\widetilde{C}/C,\mathcal{O})$. Taking 
quotients and using surjectivity of the short exact sequence in Equation \eqref{eqn:surjectivityofanchormap}, we  get a logarithmic Atiyah algebra 
with the following 
fundamental exact sequence. 
\begin{equation}\label{eqn:fundaty}
0\rightarrow \mathcal{O}_{\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})}\cdot c\rightarrow 
\widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K}) /vec{^{\Gamma}}(\widetilde{C}\backslash \Gamma\cdot (\widetilde{\bf{p}}))\rightarrow \Theta_{\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m}),\Delta_{g,n,\Gamma}}\rightarrow 0.
\end{equation}


We denote the log-Atiyah algebra 
$$\hat{\mathcal{A}}(\widetilde{C}/C)(-\log \hat{\pi}^{-1}(\Delta_{g,n,\Gamma})):=
\widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K}) /vec{^{\Gamma}}(\widetilde{C}\backslash \Gamma \cdot (\widetilde{\bf{p}})).$$
Since $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ is an $\operatorname{Aut}_{+}(\widetilde{C}/C,\mathcal{O})$-torsor
over $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$, the sheaf $\hat{\mathcal{A}}(\widetilde{C}/C)(-\log \widehat{\pi}^{-1}(\Delta_{g,n,\Gamma}))$ 
descends via invariant push-forward to a log-Atiyah algebra on the stack $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ which we denote by $\tilde{\mathcal{A}}(\widetilde{C}/C)(-\log \tilde{\pi}^{-1}(\Delta_{g,n,\Gamma}))$. 

\subsubsection{Virasoro Uniformization of the Hurwitz-Hodge bundle}In this 
section, we give a more explicit description of the Atiyah algebra $\tilde{\mathcal{A}}(\widetilde{C}/C)(-\log\tilde{\pi}^{-1}(\Delta_{g,n,\Gamma}))$.  
In the untwisted case (i.e $\Gamma$ is trivial), the corresponding results can be found in  \cite{ACH, BS, Kon, Tsuchimoto, TUY:89}. 
Consider 
the natural map $$q:\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})\rightarrow \overline{\mathcal{M}}_{g,n}$$
and let $\Lambda$ be the pullback of the Hodge line bundle on $\overline{\mathcal{M}}_{g,n}$  to $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ via $q$. 
Then we have  the following proposition
\begin{proposition}Let $\mathcal{A}_{\Lambda}(-\log \Delta_{g,n,\Gamma})$ denote the log-Atiyah algebra
	associated 
	to the line bundle $\Lambda$ on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$, then there is a natural identification  $\hat{\mathcal{A}}(\widetilde{C}/C)(-\log \hat{\pi}^{-1}(\Delta_{g,n,\Gamma}))$ with $\frac{1}{2}\mathcal{A}_{\hat{\pi}^{*}\Lambda}(-\log \Delta_{g,n,\Gamma})$. 
	\label{prop:virasoroandatiyahalgebra}
	
	
\end{proposition}
\begin{proof}
	First, we consider the case when $\Gamma$ is trivial. 
	In this case results in \cite{ACH, BS, Kon, Tsuchimoto, TUY:89} show that there is a natural isomorphism of $$\widehat{\operatorname{Der}}(C,\mathcal{K})/vec(C\backslash {\bf p})\cong\frac{1}{2}\mathcal{A}_{\pi^{*}\Lambda}(-\log \Delta_{g,n}),$$
	where $\Delta_{g,n}$ is the boundary divisor of $\overline{\mathcal{M}}_{g,n}$ 
	and $\hat{\underline{\pi}}: \widehat{\overline{\mathcal{M}}}_{g,n}\rightarrow \overline{\mathcal{M}}_{g,n}$ is the 
	forgetful map. Now consider the following commutative diagram: 
	$$\xymatrix{
		\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})\ar[r]^{\hat{\pi}}\ar[d]^{\pi}&\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m}) \ar[d]^{q}\\
		\widehat{\overline{\mathcal{M}}}_{g,n}\ar[r]^{\hat{\underline{\pi}}}&\overline{\mathcal{M}}_{g,n}.}
	$$
	Since the map $\pi$ is flat \cite{JKK}, we get an exact sequence  $$0\rightarrow \pi^*(vec(C\backslash {\bf p})) \rightarrow \pi^{*}\operatorname{Der}(C,\mathcal{K})\rightarrow \pi^*\Theta_{\widehat{\overline{\mathcal{M}}}_{g,n},\Delta_{g,n}}\rightarrow 0.$
	We  now have the following commutative diagram of sheaves of Lie algebras.
	$$\xymatrix{
{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K}) \ar[r]^{\alpha}\ar[d] &\Theta_{\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf{m}}),\Delta_{g,n,\Gamma}}\ar[d]\ar[r] &0\\
	\pi^*({\operatorname{Der}}(C,\mathcal{K})) \ar[r] & \pi^*\Theta_{\widehat{\overline{\mathcal{M}}}_{g,n},\Delta_{g,n}}\ar[r] &0.
}
	$$ Since by the discussion following Equation \eqref{eqn:surjectivityofanchormap}, we get the kernel of the horizontal maps are isomorphic. Hence it suffices to show that  the vertical map on the left is an isomorphism between $\pi^{*}( {\operatorname{Der}}(C,\mathcal{K}))$ is
	${\operatorname{Der}}(\widetilde{C}/C,\mathcal{K})$. 
	This follows from the isomorphism \eqref{eqn:liealgebraiso} of $\operatorname{Der}_{N}\mathcal{K}$
	with $\operatorname{Der}\mathcal{K}$.
\end{proof}
\subsection{Twisted log-D module}\label{sec:twistedconnectiontwistedKZ}In this section, we recall the 
construction of the twisted WZW-connection following \cite{szcz} using the 
formalism of the {\em twisted localization functor } recalled in Section \ref{sec:twistedloc}. 
\begin{remark}\label{rem:diffwithsz}
	We want to address a small but important difference from \cite{szcz}. The 
	twisted vertex algebra arising from Kac-Moody algebras are not 
	conformal 
	and hence the coherent sheaf $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}},\bf{p},\widetilde{{\bf{z}}})$
	do not descend to a coherent logarithmic $\mathcal{D}$ module  on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$ under the natural $\mathbb{G}_m^{n}$-action. 
\end{remark}
 Let ${\bf m}=(m_1,\dots,m_n)\in \Gamma^n$ be a monodromy vector. 
For each $1 \leq i \leq n$,
let $N_i$ be the order the $m_i$ and $\mathcal{H}_{\lambda_i}$ is an irreducible 
highest weight integrable module for $m_i$-twisted Kac-Moody 
Lie algebra $L(\widehat{\frg}, m_i)$ of 
highest weight $\lambda_i$ at level $\ell$. As in Sections \ref{sec:deftwistconf}, \ref{sec:descentdata} and \cite[Remark 3.4.6]{BFM}, without loss of generality assume that we have a family of $(\widetilde{C}\rightarrow Z, {\widetilde{\bf{p}}},{\bf p},\widetilde{\bf{z}})$ in $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ such that $\widetilde{C}\backslash \widetilde{\bf{p}}(Z)$ is affine and let $\Delta_{Z}$ be the divisor in $Z$ corresponding to singular curves. Following Looijenga \cite[Section 5]{Looijenga}, we put the assumption that vector fields on $Z$ tangent to $\Delta_Z$ are locally liftable to $\widetilde{C}$ (We could have also worked with the set-up of versal family as before).

Similarly, we denote the corresponding family $(\widetilde{C}\rightarrow T, {\widetilde{\bf{p}}},{\bf p},\widetilde{\bf{v}})$ in $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$. The smooth scheme $Z$ is a $\operatorname{Aut}_{+}(\widetilde{C}/C,\mathcal{O})$-torsor over $T$.
\iffalse
 We have the following diagram 
$$	\xymatrix{ \Delta_Z \ar[d]\ar[r]&Z \ar[d]\ar[r]&  \widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n} \ar[d]\\
{ \Delta_T} \ar[r]  & T\ar[r]&\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}.
$$

\fi
For
a fixed $n$-tuple of monodromies ${\bf{m}}$ and integrable highest weights $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)$, we 
consider the vector space $\mathcal{H}_{\vec{\lambda}}=\mathcal{H}_{\lambda_1}\otimes \dots\otimes \mathcal{H}_{\lambda_n}$ 
and the quasi-coherent sheaf on $Z$.
$$\underline{\mathcal{H}}_{\vec{\lambda}}:=\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_{Z}.$$ 

The Lie algebra $\operatorname{Der}_N(\mathcal{O}_R)$ acts on $\mathcal{H}_{\lambda}$ by 
the twisted Sugawara action under the 
homomorphism 
\begin{equation}\label{eqn:viractionimp}\operatorname{Der}_{N}(\mathcal{O}_R)\rightarrow \operatorname{Vir}_{\Gamma_{\widetilde{p}}}, \ \  z^{k+\frac{1}{N}}\partial_{z^{\frac{1}{N}}}\rightarrow -NL_{k,{\Gamma_{\widetilde{p}}}},
\end{equation} where $\operatorname{Vir}_{\Gamma_{\widetilde{p}}}$ is the Virasoro algebra with generated by $L_{k,\Gamma_{\widetilde{p}}}$ which acts on the $L(\widehat{\frg}, \Gamma_{\widetilde{p}})$-module $\mathcal{H}_{\lambda}$ via the twisted Sugawara action \cite[Section 3]{Wakimoto}. The Sugawara construction  gives an action 
of $\widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K})$ 
on $\underline{\mathcal{H}}_{\vec{\lambda}}$ and one naturally 
gets an action of the log-Atiyah algebra $\hat{\mathcal{A}}(\widetilde{C}/C)(-\log \Delta_{Z})$ on the sheaf of conformal 
blocks $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf p}, {\bf p}, \widetilde{\bf z})$ on $Z$.


Now following the construction in Section7.2 of \cite{szcz}), we apply the formalism of {\em twisted log-localization} as described 
with Section \ref{sec:twistedloc} with the following:
\begin{itemize} \item  $\widehat{\mathfrak{s}}=\widehat{\operatorname{Der}}(\widetilde{C}/C,\mathcal{K})$,
\item $K=\operatorname{Aut}_{+}\mathcal{O}$, 
\item $V=\mathcal{H}_{\lambda_1}\otimes \dots\otimes \mathcal{H}_{\lambda_n}$and \item $\widetilde{\mathfrak{l}}$ be the $\operatorname{Aut}(\widetilde{C}/C,\mathcal{O})$-equivariant sheaf of Lie algebras whose fibers 
	at a point $(\widetilde{C}, C, {\widetilde{\bf{p}}}, {\bf p},{\widetilde{\bf v}})$ in
	 $T$ is given by $\big(\frg\otimes H^0(\widetilde{C},\mathcal{O}_{\widetilde{C}}(\ast \Gamma.\widetilde{\bf{p}})\big)^{\Gamma}$.
	 \end{itemize}
	Hence the twisted log-localization gives the sheaf of conformal
	 blocks $\mathcal{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},{C}, \widetilde{\bf{p}}, {\bf{p}},\widetilde{{\bf{v}}})$ on $T$ along with 
	 an action of the log-Atiyah algebra $\tilde{\mathcal{A}}(\widetilde{C}/C)(-\log \Delta_T)$. A direct corollary of the Proposition \ref{prop:virasoroandatiyahalgebra} is the 
following:
\begin{corollary}
	\label{cor:Atiyahalg}
	The log-Atiyah algebra $\frac{\ell\dim\frg}{2(\ell+h^{\vee})}\mathcal{A}_{\tilde{\pi}^{*}\Lambda}(-\log\widetilde{\Delta}_{g,n,\Gamma})$ 
	acts on the dual twisted conformal block bundle or the sheaf of twisted covacua $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf p},{\bf p}, \widetilde{\bf v})$.
\end{corollary}
\iffalse






\begin{proof}Let $\mathcal{A}_{\mathbb{H}}$ be the Atiyah algebra of the line bundle $\mathbb{H}$ on $\overline{\mathcal{M}}_{g,n}$. 
	Clearly the pullback (\ref{section:operationsonatiyah}), of $\mathcal{A}_{\mathbb{H}}$ to $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ is $\mathcal{A}_{\Lambda}$. Let $\Delta$ 
	denote the boundary divisor in $\overline{\mathcal{M}}_{g,n}$. Now by \cite{Kon, ACH, TUY:89, Tsuchimoto}, 
	it can be shown that $\mathcal{A}(C)\simeq \frac{1}{2}\mathcal{A}_{\mathbb{H}}(-\log \Delta)$. Since $\Delta_{\Gamma}=\pi^{-1}\Delta$, 
	we see that $\mathcal{A}_{\Lambda}(\Delta_{\Gamma})=\pi^{*}\mathcal{A}_{\mathbb{H}}(\Delta)$. Thus we will be done 
	if we can show that $\mathcal{A}(\widetilde{C}/C)\simeq \pi^{*}\mathcal{A}(C)$. 
	This directly follows from the fact the group homomorphism $\mu$ (see \eqref{eqn:liealgebraiso}) induces an isomorphism of $\operatorname{Der}(\widetilde{C}/C,\mathcal{K})$ with $\operatorname{Der}(\widetilde{C},\mathcal{K})$ and 
	the fact that $vec^{\Gamma}(\widetilde{C}\backslash O(\widetilde{\bf {p}}))$ isomorphic to the Lie algebra of vector fields on the affine 
	curve $C\backslash O({\bf p})$. 
\end{proof}
\fi


\subsection{Atiyah algebra for the twisted WZW connection on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$}\label{sec:atiyahalg}Let ${\bf m} \in \Gamma^n$ be a monodromy vector and for an $n$-tuple of integral weights $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)$ at level $\ell$, we denote the vector bundle of conformal blocks on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}({\bf m})$ by $\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{{\bf p}}, {\bf p})$. Let $\Gamma$ be a finite group acting on $\frg$. For each $\gamma\in\Gamma$ let $L(\widehat{\frg},\gamma)$ be
the $\gamma$-twisted affine Kac-Moody Lie algebra.

As before, let $\widetilde{C}\rightarrow C$ be a ramified Galois cover of nodal curves and let $\widetilde{p}$ be a smooth ramification point of $\widetilde{C}$ 
whose image in $C$ is denoted by $p$. Let  $\Gamma_{\widetilde{p}}$ be the stabilizer at the point $\widetilde{p}$ and
we further, assume that $N$ be the order of $\Gamma_{\widetilde{p}}$.  Let $\mathcal{K}_{\widetilde{p}}$ 
be the residue field of the completed local ring at $\widetilde{p}$ and let $\mathcal{K}_p$ denoted 
the corresponding residue field at $p$. The subfield of elements of $\mathcal{K}_{\widetilde{p}}$ 
under $\Gamma_{\widetilde{p}}$ is $\mathcal{K}_p$. Let  $z^{\frac{1}{N}}$ is a special coordinate at the point $\widetilde{p}$, then there is an
isomorphism of $\mathcal{K}_{\widetilde{p}}\simeq \mathbb{C}((z^{\frac{1}{N}}))$ 
and similarly $\mathcal{K}_{p}\simeq \mathbb{C}((z))$. 
\iffalse
\subsection{Coordinate free Kac-Moody algebra}
The twisted  Kac-Moody Lie algebra $L(\widehat{\frg},\Gamma)$ can be defined without 
the choice of coordinates as follows: 
$$\widehat{\frg}_{\widetilde{p},\Gamma}:=(\mathfrak{g}\otimes \mathcal{K}_{\widetilde{p}})^{\Gamma}\oplus \mathbb{C}c$$
By following the construction in \cite{FBz,FrenkelSzcz}, we now define a coordinate independent highest weight module 
$\mathcal{H}_{\lambda,\widetilde{p}}$ of $\widehat{\frg}_{\widetilde{p}}$ 
which can be identified with $\mathcal{H}_{\lambda}$ upon the choice of a special coordinate at $\widetilde{p}$. 
\fi

Let $R=\mathbb{C}[[z^{\frac{1}{N}}]]$. Recall that $\mathcal{A}ut_{N}(D_{R,\widetilde{p}})$ (respectively $\mathcal{A}ut_{N,+}(D_{R,\widetilde{p}})$) denote the set of special coordinates (respectively one-jets)
of the point $\widetilde{p}$ which 
is an  $\operatorname{Aut}_N(\mathcal{O}_{R})$ (respectively $\operatorname{Aut}_{N,+}(\mathcal{O}_R)$)-torsor. The following lemma is due to \cite{FBz}:
\begin{lemma}
	\label{lemma:coordinatefree} 
	Let $V$ be  a $\operatorname{Der}_{N}(\mathcal{O}_{R})$-module  such that  
	\begin{enumerate}
		\item the action $z^{\frac{1}{{N}}}\partial_{z^{\frac{1}{{N}}}}$ has integral eigenvalues on $V$. 
		\item $z^{k+\frac{1}{N}}\partial_{z^{k+\frac{1}{{N}}}}$ is locally nilpotent for all $k\geq 1$. 
	\end{enumerate}
	Then the action of $\operatorname{Der}_{N}(\mathcal{O}_{R})$ can be exponentiated to an action of ${\operatorname{Aut}_N(\mathcal{O}_{R})}$. Hence 
	then the vector space $V_{\widetilde{p}}={\mathcal{A}ut_N(D_{R,\widetilde{p}})}\times_ {\operatorname{Aut}_N(\mathcal{O}_{R})} V$ is
	independent of the choice of 
	special coordinates at the point $\widetilde{p}$. \\Similarly the vector
	 space $\widetilde{V}_{\widetilde{p}}=\mathcal{A}ut_{N,+}(D_{R,\widetilde{p}})\times_{\operatorname{Aut}_{N,+}(\mathcal{O}_R)}V$ is independent of the formal jets at the points $\widetilde{p}$. 
\end{lemma}

Since the $L_{0,\Gamma_{\widetilde{p}}}$-eigen values of the module $\mathcal{H}_{\lambda}$ are bounded from below, it from the construction of the Sugawara action on irreducible, integrable, highest weight modules
that condition (2) in Lemma \ref{lemma:coordinatefree} is satisfied.  

Thus, we get that  the following vector space is independent of the formal jets at the point $\widetilde{p}$:
$$\widetilde{\mathcal{H}}_{\lambda,\widetilde{p}}=\mathcal{A}ut_{N,+}(D_{R,\widetilde{p}})\times_{\operatorname{Aut}_{N,+}(\mathcal{O}_R)}\mathcal{H}_{\lambda}.$$  
However, it turns out that the eigenvalues (\cite[Lemma 3.6]{Wakimoto}) of the {\em zero-th twisted Virasoro operators}
$L_{0,\Gamma_{\widetilde{p}}}$ on $\mathcal{H}_{\lambda}$ are not in $\frac{1}{N}\mathbb{Z}$. In particular by Equation \eqref{eqn:viractionimp}, the eigenvalues of $z^{\frac{1}{N}}\partial_{z^{\frac{1}{N}}}$
are non integers. We refer the reader to \cite{mukho4} for similar issue when $\Gamma$ is trivial. 


As in the untwisted case, let $\Delta_{\lambda}$ denote the eigenvalues of $L_{0,\Gamma_{\widetilde{p}}} $ on 
the degree zero part of $\mathcal{H}_{\lambda}$. We consider the vector space $\mathcal{H}_{\lambda}\otimes \mathbb{C}{dz}^{\Delta_{\lambda}}$. 

By Equation \eqref{eqn:viractionimp} of the Sugawara 
action, the eigenvalues of $z^{\frac{1}{{N}}}\partial_{z^{\frac{1}{{N}}}}$ on $\mathcal{H}_{\lambda}$ are of the form $-N\Delta_{\lambda}+ \mathbb{Z}$, where $\Delta_{\lambda}$ is 
a rational number (Lemma 3.6 in \cite{Wakimoto}). The Lie algebra $\operatorname{Der}_N(\mathcal{O}_R)$ acts on $dz^{\Delta_{\lambda}}$ via Lie derivatives and  in particular $z^{\frac{1}{N}}\partial_{z^{\frac{1}{N}}}$ acts with eigenvalue $N\Delta_\lambda$. 

This implies that the action of $\operatorname{Der}_N(\mathcal{O}_R)$ on $\mathcal{H}_{\lambda}\otimes \mathbb{C}dz^{\Delta_{\lambda}}$ satisfy the 
conditions of Lemma \ref{lemma:coordinatefree}. Hence the group $\operatorname{Aut}_N(\mathcal{O}_R)$ acts on 
$\mathcal{H}_{\lambda}\otimes \mathbb{C}dz^{\Delta_{\lambda}}$. 

Thus the coordinate free 
highest weight irreducible integrable $\widehat{\frg}_{\widetilde{p}}$-module $\mathbb{H}_{\lambda}$ (see Section \ref{sec:deftwistconf} for notation)of highest weight $\lambda$ can be redefined as 
\begin{equation}\label{eqn:coordinatefreemodule}
\mathcal{H}_{\lambda,\widetilde{p}}:=\mathcal{A}ut_N(D_{R,\widetilde{p}})\times_{\operatorname{Aut}_N(\mathcal{O}_R)}(\mathcal{H}_{\lambda}\otimes \mathbb{C}dz^{\Delta_{\lambda}}).
\end{equation}
We have the following result which summarizes the discussions in this section:

\begin{theorem}
	\label{thm:atiyahalgebra}
	Let $\Delta_{\lambda_i}$ be the eigenvalues of the zeroth
	Virasoro operator $L_{0,\Gamma_{\widetilde{p}_i}}$ on the degree zero part of the highest weight $L(\widehat{\frg}, \Gamma_{p_i})$-module  
	with highest weight $\lambda_i$ via 
	the twisted Sugawara action. Then the Atiyah algebra 
	$$\frac{\ell\dim \frg}{2(h^{\vee}(\frg)+\ell)}\mathcal{A}_{\Lambda}(-\log {\Delta}_{g,n,\Gamma})+\sum_{i=1}^{n}N_i\Delta_{\lambda_i}\mathcal{A}_{{\tildeL}_i}(-\log {\Delta}_{g,n,\Gamma})$$ acts on $\mathbb{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf{p}})$, where ${\tildeL}_i $;s are 
	tautological line bundles corresponding to the $i$-th psi classes and $N_i$'s are the orders of the cyclic groups $\Gamma_{p_i}$. 
\end{theorem}
\begin{proof}First of all we observe that the $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$ is a substack of the total stack of the $\mathbb{G}_m^{n}$-torsor on $\overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ given by the line bundles ${\tildeL}_1,\dots,{\tildeL}_n$. 
	Hence the pullback of each ${\tildeL}_i$ to $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}$ is trivial. Let $\tilde{\pi}:\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}\rightarrow \overline{\mathcal{M}}{}^{\Gamma}_{g,n}$ be the forgetful map and consider  the Atiyah algebra
	\begin{equation}\label{eqn:almostrightanswer}
	\mathcal{A}:=\frac{\ell\dim{\frg}}{2(\ell+h^{\vee}(\frg))}\tilde{\pi}^{*}\mathcal{A}_{\Lambda}(-\log\tilde{\pi}^{-1}\Delta_{g,n,\Gamma})+\sum_{i=1}^n N_i\Delta_{\lambda_i}\tilde{\pi}^{*}\mathcal{A}_{{\tildeL}_i}(-\log\tilde{\pi}^{-1}\Delta_{g,n,\Gamma}),
	\end{equation}
	Then by Proposition \ref{prop:virasoroandatiyahalgebra}, Corollary \ref{cor:Atiyahalg} and the coordinate free construction (see \eqref{eqn:coordinatefreemodule}) tell us that the log-Atiyah algebra given by Equation \eqref{eqn:almostrightanswer} acts on $\mathbb{V}:=\tilde{\pi}^{*}(\mathbb{V}^{\dagger}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf{p}}, {\bf p})).$ i.e a Lie algebra homomorphism $\nabla: \mathcal{A}\rightarrow \mathcal{A}_{\mathbb{V}}$
	which is also equivariant under the $\mathbb{G}_m^n$-torsor. Hence the result follows.
	

	\end{proof}


\part{Crossed modular functors}\label{part:gmodfun}
In Part \ref{part:2} we constructed vector bundles of twisted conformal blocks and certain logarithmic projective connections on them. In this part of the paper we develop the formalism of a $\Gamma$-crossed modular functor that will allow us to use these bundles of twisted conformal blocks to construct $\Gamma$-crossed modular fusion categories. In Section \ref{sec:crossedmodular} we define the notion of complex analytic $\Gamma$-crossed modular functors in both genus 0 and arbitrary genus. In this section we state Theorem \ref{thm:modfunmodcat} which allows us to construct $\Gamma$-crossed weakly ribbon categories from a $\Gamma$-crossed modular functor in genus 0. We then derive some important consequences of this, for example the twisted Verlinde formula (Corollary \ref{cor:verlindeforcrossedmodfun}) in the set-up of $\Gamma$-crossed modular functors. In Section \ref{sec:CATGamma} we give the proof of Theorem \ref{thm:modfunmodcat} by proving that the complex analytic notion of $\Gamma$-crossed modular functors is equivalent to the topological notion studied in Kirillov-Prince \cite{KP:08} and T. Prince \cite{Prince}. The rest of the paper is dedicated to the proof that twisted conformal blocks defines a complex analytic $\Gamma$-crossed modular functor (Theorem \ref{conj:conformalblockismodular}). Using \ref{cor:verlindeforcrossedmodfun} and the computations of the crossed $S$ matrices in Part II gives the proof of Theorem \ref{conj:main1}. The proof of Theorem \ref{conj:conformalblockismodular} uses Verdier specialization functors  and factorization of conformal blocks using the sewing procedure. We refer the reader to Section \ref{sec:proofofconfgammafunc}.


\section{$\Gamma$-crossed modular functors} \label{sec:crossedmodular}
Let $\Gamma$ be a finite group. In this section, we define the notion of a complex analytic $\Gamma$-crossed modular functor. Topological $\Gamma$-crossed modular functors have been defined and studied in \cite{KP:08, Prince}. We prove  that the complex analytic and topological notion are both equivalent to the notion of a weakly rigid $\Gamma$-crossed modular category.
In this section, all abelian categories that we consider are supposed to be finite semisimple $\mathbb C$-linear, even though we may not mention this explicitly and all additive functors considered are supposed to be $\mathbb C$-linear.
\subsection{$\Gamma$-crossed abelian categories}\label{sec:crossedabelian}
Let $\mathcal C$ be a finite semisimple $\mathbb C$-linear abelian category equipped with a linear action of a finite group $\Gamma$. For an object $M\in \mathcal C$ let $\wtilde{\Gamma}_M:=\{(g,\psi)|g\in \Gamma, \psi:g(M)\xrightarrow{\cong} M\}$. We can define a group structure on $\wtilde{\Gamma}_M$ in the evident way and we obtain a central extension
\begin{equation}
1\to \Aut(M)\to \wtilde{\Gamma}_M\to \Gamma_M\to 1,
\end{equation}
where $\Gamma_M\leq \Gamma$ is the stabilizer of the isomorphism class of the object $M$. 
\begin{remark}\label{rk:invobj}
We say that an object $M\in \mathcal C$ is $\Gamma$-invariant if $\Gamma_M=\Gamma$ and if the central extension above is split. Any $\Gamma$-invariant object in $\mathcal C$ can be naturally lifted to an object of the $\Gamma$-equivariantization $\mathcal C^\Gamma$, namely the object in the equivariantization corresponding to the $\Gamma$-invariant object $M$ and the trivial representation of $\Gamma$.
\end{remark}

Now for each $n\in \mathbb Z_{\geq 0}$, the tensor power $\mathcal C^{\boxtimes n}$ is also a finite semisimple $\mathbb C$-linear abelian category equipped with an action of the wreath product $S_n\ltimes \Gamma^n$, where $S_n$ is the symmetric group on $n$-letters acting on $\Gamma^n$ by permutation of factors. Note that we have the diagonal subgroup $\Delta\Gamma\subset \Gamma^n$ or in other words, the fixed point subgroup in $\Gamma^n$ for the $S_n$-action. The direct product $S_n\times \Delta\Gamma$ is a subgroup of the wreath product $S_n\ltimes \Gamma^n$ and hence it acts linearly on the abelian category $\mathcal C^{\boxtimes n}$.
\begin{remark}\label{rk:syminvobj}
By a symmetric $\Gamma$-invariant object in $\mathcal C^{\boxtimes n}$, we simply mean an $S_n\times \Delta\Gamma$-invariant object of $\mathcal C^{\boxtimes n}$.
\end{remark}

\begin{definition}
An involutive duality on a finite semisimple $\mathbb C$-linear category is a $\mathbb C$-linear equivalence $(\cdot)^*:\mathcal C\xrightarrow{\cong}\mathcal C^{\operatorname{op}}$ along with a natural isomorphism between the functors $\id_\mathcal C\xrightarrow{\cong}(\cdot)^{**}$.
\end{definition}

\begin{definition}\label{def:crossedabeliancategory}
By a  finite semisimple $\mathbb C$-linear $\Gamma$-crossed abelian category we mean a finite semisimple $\mathbb C$-linear abelian category $\mathcal C$ along with 
\begin{itemize}
\item a $\Gamma$-grading of abelian categories $\mathcal C=\bigoplus\limits_{m\in\Gamma}{\mathcal C_m}$, 
\item an involutive duality $(\cdot)^*:\mathcal C\to \mathcal C^{\operatorname{op}}$, which takes each component $\mathcal C_m$ to $\mathcal C^{\operatorname{op}}_{m^{-1}}$,
\item a linear action of $\Gamma$ on $\mathcal C$ such that $\gamma(\mathcal C_m)\subset \mathcal C_{\gamma m \gamma^{-1}}$ for all $\gamma, m \in \Gamma$, which is compatible with the involutive duality and
\item a simple $\Gamma$-invariant object (see Remark \ref{rk:invobj}) $\unit\in \mathcal C_1$ which is self-dual, $\unit\cong\unit^*$.  
\end{itemize}
\end{definition}


\begin{remark}
If $\mathcal C$ is a $\Gamma$-crossed abelian category as above, then we have a $\Gamma^n$-grading of $\mathcal C^{\boxtimes n}$ 
$$\mathcal C^{\boxtimes n}=\bigoplus\limits_{\mathbf{m}\in \Gamma^n}\mathcal C^{\boxtimes n}_{\mathbf{m}}, \mbox{ where } \mathcal C^{\boxtimes n}_{\mathbf{m}}:=\mathcal C_{m_1}\boxtimes\cdots \boxtimes \mathcal C_{m_n} \subset \mathcal C^{\boxtimes n}\mbox{ for } \mathbf{m}=(m_1,\cdots,m_n).$$
\end{remark}


\begin{definition}
For each $m\in \Gamma$, let $P_m$ denote the set of simple objects of $\mathcal C_m$. Define $R_m:=\bigoplus\limits_{M\in P_m}M\boxtimes M^*\in \mathcal C^{\boxtimes 2}_{m,m^{-1}}$ and define $R=\bigoplus\limits_{m\in \Gamma} R_m\in \mathcal C^{\boxtimes 2}$. Note that $R$ is a symmetric $\Gamma$-invariant self dual object of $\mathcal C^{\boxtimes 2}$.
\end{definition}

\begin{remark}
By a slight abuse of notation, we will often denote a $\Gamma$-crossed abelian category by the triple $(\mathcal C,\unit,R)$, but it should be remembered that there are other structures present which are not reflected in this notation.

\end{remark}

\begin{remark}
A grading $\mathcal C=\bigoplus\limits_{m\in\Gamma}{\mathcal C_m}$ is said to be faithful if each component $\mathcal C_m$ is non-zero. We will always assume that our $\Gamma$-crossed abelian categories are faithfully graded.
\end{remark}






\subsection{Motivation for the definition of crossed modular functors}\label{sec:motivationcomplan}
Let $(\mathcal C,\unit,R)$ be a finite semisimple faithfully graded $\Gamma$-crossed abelian category. Let us describe the motivation behind the notion of a $\mathcal C$-extended $\Gamma$-crossed modular functor. The main goal is to define a tensor product structure on $\mathcal C$ which equips it with the structure of a braided $\Gamma$-crossed weakly fusion category  (see Definitions \ref{d:braidedgammacrossed} and \ref{def:weaklyfusion}) with unit $\unit$ such that the $\Gamma$-action, grading, and weak duality agree with the structures that are already present on $\mathcal C$. 


The idea is to describe the desired tensor product of objects $M_1,\cdots,M_n\in \mathcal C$ by describing instead the $\Hom$-spaces $\Hom(M,M_1\otimes\cdots\otimes M_n)=\Hom(\unit,M_1\otimes\cdots\otimes M_n\otimes M^*)$ and the relations that these spaces need to satisfy in order to define the desired tensor product structure.

Let us consider objects $M_i\in \mathcal C_{m_i}\subset \mathcal C$ for $1\leq i\leq n$. Consider this $n$-tuple of objects as an object $$\mathbf{M}:=M_1\boxtimes\cdots\boxtimes M_n\in \mathcal C_{m_1}\boxtimes\cdots \boxtimes \mathcal C_{m_n}=\mathcal C^{\boxtimes n}_{\mathbf{m}} \subset \mathcal C^{\boxtimes n},\mbox{ where } \mathbf{m}=(m_1,\cdots,m_n).$$  Let us also consider an $n$-marked admissible $\Gamma$-cover $(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$ with ramification data given by $\mathbf{m}\in \Gamma^n$ as in Definition \ref{def:nmarkedcovers}. 

Informally, a $\mathcal C$-extended $\Gamma$-crossed modular functor $\mathcal V$ (in genus 0) is a gadget which takes in the data of an object $\mathbf{M}\in \mathcal C_{\mathbf{m}}^{\boxtimes n}$ and an $n$-marked  $\Gamma$-cover $(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$  as above, and spits out a finite dimensional vector space $\mathcal V_{\mathbf{M}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$. These finite dimensional vector spaces are supposed to be identified with the $\Hom$-spaces that we need to define the desired tensor product structure on $\mathcal C$. A modular functor $\mathcal V$ in arbitrary genus can accept as an input any $n$-marked admissible $\Gamma$-cover $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$ without any restriction on the genus of $C$.

This assignment needs to satisfy certain axioms in order to get the desired properties for the tensor product. These axioms are stated precisely in Section \ref{def:cextenmodularfunctor}. Here we give the informal idea.

Firstly, as the cover $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$ varies in its moduli space $\tildeM^\Gamma_{g,n}(\mathbf{m})$ (see Definition \ref{def:nmarkedcovers}) the corresponding vector spaces should define a  vector bundle with a flat projective connection on this moduli space. Secondly, these moduli spaces $\tildeM^\Gamma_{g,n}(\mathbf{m})$ and their closures $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$ have various gluing maps, as well as forgetting of marked-points maps between them. The vector bundles that are given by the $\Gamma$-crossed modular functor $\mathcal V$ need to be compatible with all such maps. This is what is usually called `factorization rules' and `propagation of vacua'. In addition we also need certain other functoriality conditions.

\subsubsection{On the category of stable $\Gamma$-graphs} In order to package all the axioms we need in a compact way, we introduce the category  $\mathcal X^\Gamma$ of stable $\Gamma$-graphs in Appendix \ref{ap:groupmarkedgraphs}. This category keeps track of the combinatorial structure underlying the gluing and forgetting marked points maps between the moduli stacks of $n$-marked admissible $\Gamma$-covers.

We refer to Appendix \ref{ap:groupmarkedgraphs} (see also \cite{GK:98}, \cite[\S3.3]{P:13}) for the formal definitions, but we present here an informal account. We think of a graph as a `usual graph' with vertices and edges, but we allow some legs (which we think of as one half of an edge) attached to vertices. We think of an edge as being made up of two half-edges joined together. 

Moreover each vertex of our graph is assigned a weight, that will be related to the genus of the base curve in a $\Gamma$-cover $\tildeC\to C$. It is then possible to define the genus and the notion of stability of a weighted-legged-graph as above.

In addition to the above data, a stable $\Gamma$-graph has the following data:
\begin{itemize}
\item An element $\mathbf{m}(h)\in \Gamma$ attached to each half-edge including the legs. (This corresponds to the monodromy data of the marked cover.)
\item An element $\mathbf{b}(h)$ (called edge conjugation data) attached to the half-edges which are part of an edge $\{h,h'\}$ such that ${ }^{\mathbf{b}(h)}\mathbf{m}(h)\cdot\mathbf{m}(h')=1,\mbox{ and} \ \mathbf{b}(h)\cdot\mathbf{b}(h')=1$.
\end{itemize}

A stable $\Gamma$-corolla is a stable $\Gamma$-graph with only one vertex, no edges and possibly having some legs, for example below is a 6-legged $\Gamma$-corolla of genus $g$:
$$\begin{tikzpicture}[baseline={([yshift=-.3ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 2pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =.6 of Cup] (B2) {$m_3$};
\node[below right =.6 of Cup] (B4) {$m_4$};
\node[below left =.6 of Cup] (B5) {$m_6$};
\node[above =.5 of Cup] (Dots) {$m_2$};
\node[below=.5 of Cup] (Dots1) {$m_5$};
\draw (B1) to[out=-90,in=160] (Cup);
\draw (Dots) to[out=-90,in=90] (Cup);
\draw (Dots1) to[out=90,in=-90] (Cup);
\draw (B2) to[out=-90,in=20] (Cup);
\draw (B5) to[out=90,in=-160] (Cup);
\draw (B4) to[out=90,in=-20] (Cup);
\end{tikzpicture}$$

If a corolla has weight $g$ and $n$ legs, then by definition, it is stable if and only if $2g-2+n>1$. We may sometimes denote a $\Gamma$-corolla in shorthand notation $(g,\mathbf{m})$ with $\mathbf{m}\in\Gamma^n$. By this we mean a corolla of genus $g$ with $n$ legs labelled by $\mathbf{m}$. We will think of any stable $\Gamma$-graph as being built up from stable $\Gamma$-corollas. In particular, given any stable $\Gamma$-graph, we can cut it up at the midpoints of all its edges and obtain a bunch of stable $\Gamma$-corollas, one for each vertex of the original $\Gamma$-graph. (See also Remark \ref{rk:corolla}.) We refer to Definition \ref{d:XGammagA} for the description of the morphisms in $\mathcal X^\Gamma$. We see 4 important examples below along with some diagrams for special cases:
\begin{example}\label{ex:groupaction} (Group action.)
Let $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ with set of half-edges (including legs) denoted by $H$. Let $\pmb\gamma:H\to \Gamma$. Then we get a new stable $\Gamma$-graph $(X,{}^{\pmb\gamma}\mathbf{m},{}^{\pmb\gamma}\mathbf{b})$ where we have just conjugated all the group elements marking the half-edges. This gives us an isomorphism $(\id_X,\pmb\gamma):(X,\mathbf{m},\mathbf{b})\xrightarrow{\cong}(X,{}^{\pmb\gamma}\mathbf{m},{}^{\pmb\gamma}\mathbf{b})$. This is related to the axiom of $\Gamma$-equivariance of the modular functors. 
$$
\begin{tikzpicture}[baseline={([yshift=-1ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =0.6 of Cup] (B2) {$m_n$};
\node[below right=1 of Cup](V3){};
\node[below left=1 of Cup](V4){};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw[dashed](V3)to (Cup);
\draw[dashed](V4)to (Cup);
\node[below =.5 of Cup] (Dots1) {$\cdots$};
\end{tikzpicture}\xrightarrow{(\id,\pmb\gamma)} \begin{tikzpicture}[baseline={([yshift=-0.5ex]current bounding box.center)}]
\node (B1) {$\gamma_1 m_1\gamma_1^{-1}$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[above right =.6 of Cup] (B2) {$\gamma_n m_n\gamma_n^{-1}$};
\draw (B1) to[out=-90,in=180] (Cup);
\node[below =.7 of Cup] (invisible) {};
\draw (B2) to[out=-90,in=0] (Cup);
\node[below right=1 of Cup](V3){};
\node[below left=1 of Cup](V4){};
\draw[dashed](V3)to (Cup);
\draw[dashed](V4)to (Cup);
\node[below =.5 of Cup] (Dots1) {$\cdots$};
\end{tikzpicture}.
$$
\end{example}
\begin{example}\label{ex:edgecontraction} (Edge contraction.)
Let $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ and let $\{h,h'\}$ be an edge in $X$. Note that it could also be a loop. Then let $(X',\mathbf{m}',\mathbf{b}')$ be the stable $\Gamma$-graph obtained after contracting the edge $\{h,h'\}$. (The vertices of the edge get merged into one vertex and a suitable weight is attached to it.) This is the edge contraction morphism $(X,\mathbf{m},\mathbf{b})\to (X',\mathbf{m}',\mathbf{b}')\in \mathcal X^\Gamma$. This morphism is related to gluing of $\Gamma$-covers and is related to the axiom of `Factorization'. 
$$
\begin{tikzpicture}[baseline={([yshift=0ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4pt, draw, below right =.6 of B1] (Cup) {\Small$g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\draw (B1) to[out=-90,in=180] (Cup);
\node[below =.7 of Cup] (invisible) {};
\draw (B2) to[out=-90,in=0] (Cup);
\node[circle, inner sep = 3pt, draw, below=1.2 of Cup] (Cup1) {\Small$g'$};
\draw(Cup1)to(Cup);
\node[below=.5 of Cup1] (Dots) {$\cdots$};
\node[below  right= 0  of Cup](B6){$(a^{-1}),am^{-1}a^{-1}$}; 
\node[above left= 0  of Cup1](B7){$(a), m$}; 
\node[below right =.6 of Cup1] (B4) {$m'_n$};
\node[below left =.6 of Cup1] (B5) {$m'_1$};
\draw (B5) to[out=90,in=180] (Cup1);
\draw (B4) to[out=90,in=0] (Cup1);
\end{tikzpicture}\longrightarrow\begin{tikzpicture}[baseline={([yshift=-.3ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 1pt, draw, below right =.6 of B1] (Cup) {\Small$g+g'$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[below right =.6 of Cup] (B4) {$m'_n$};
\node[below left =.6 of Cup] (B5) {$m'_1$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[below=.5 of Cup] (Dots) {$\cdots$};
\draw (B1) to[out=-90,in=160] (Cup);
\draw (B2) to[out=-90,in=20] (Cup);
\draw (B5) to[out=90,in=-160] (Cup);
\draw (B4) to[out=90,in=-20] (Cup);
\end{tikzpicture} .$$

\end{example}
\begin{example}\label{ex:legdeletion} (1-marked leg deletion.)
Let $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ and let $l$ be a leg in $X$ such that $\mathbf{m}(l)=1$. Also suppose that the graph obtained by deleting the leg $l$ is stable. Let $(X',\mathbf{m}',\mathbf{b})$ be the stable $\Gamma$-graph obtained by deleting the leg. This is leg deletion morphism $(X,\mathbf{m},\mathbf{b})\to (X',\mathbf{m}',\mathbf{b})\in \mathcal X^\Gamma$. In other words we are allowed to forget a leg marked by $1\in \Gamma$, as long as the graph does not become unstable. This morphism is related to the axiom of `Propagation of vacua'.

$$\begin{tikzpicture}[baseline={([yshift=0ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[below =.5 of Cup] (leg) {$1$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw(leg)to(Cup);
\end{tikzpicture}\longrightarrow \begin{tikzpicture}[baseline={([yshift=-1.2ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\end{tikzpicture}\hspace{1cm}
\begin{tikzpicture}[baseline={([yshift=0ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4pt, draw, below right =.6 of B1] (Cup) {\Small$g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\draw (B1) to[out=-90,in=180] (Cup);
\node[below =.7 of Cup] (invisible) {};
\draw (B2) to[out=-90,in=0] (Cup);
\node[circle, inner sep = 3pt, draw, below=1.2 of Cup] (Cup1) {\Small$0$};
\draw(Cup1)to(Cup);
\node[below  right=-0.1  of Cup](B6){$(1), m^{-1}$}; 
\node[above left=-0.1  of Cup1](B7){$(1),m$}; 
\node[below right =.6 of Cup1] (B4) {$\gamma$};
\node[below left =.6 of Cup1] (B5) {$1$};
\draw (B5) to[out=90,in=180] (Cup1);
\draw (B4) to[out=90,in=0] (Cup1);
\end{tikzpicture}\longrightarrow\begin{tikzpicture}[baseline={([yshift=-.3ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 3pt, draw, below right =.6 of B1] (Cup) {\Small$g$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[below right =.6 of Cup] (B4) {$\gamma$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\draw (B1) to[out=-90,in=160] (Cup);
\draw (B2) to[out=-90,in=20] (Cup);
\draw (B4) to[out=90,in=-20] (Cup);
\end{tikzpicture} .$$
\end{example}

\begin{example} (Crossed braiding.)\label{ex:crossedbraiding}
Consider a stable $\Gamma$-corolla with $n$ legs $l_1,l_2,\cdots,l_n$ marked by the group elements $m_1,m_2,\cdots,m_n\in \Gamma$. The crossed braiding isomorphism $(\sigma_{l_1,l_2},(1,m_1,1\cdots,1))$, denoted in short by $\beta_{l_1,l_2}$ in $\mathcal X^\Gamma$ is a morphism from the $\Gamma$-corolla $(g;m_1,m_2,\cdots,m_n)$ to the $\Gamma$-corolla $(g;m_1m_2m_1^{-1}, m_1, m_3,\cdots,m_n)$ which flips the two legs $l_1,l_2$ and conjugates the second label $m_2$ by $m_1$. We refer to Definition \ref{d:XGammagA} to refer to all that data that is involved in a morphism in $\mathcal X^\Gamma$.
$$\begin{tikzpicture}[baseline={([yshift=-.3ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 2pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =.6 of Cup] (B2) {$m_3$};
\node[below right =.6 of Cup] (B4) {$m_4$};
\node[below left =.6 of Cup] (B5) {$m_6$};
\node[above =.5 of Cup] (Dots) {$m_2$};
\node[below=.5 of Cup] (Dots1) {$m_5$};
\draw[blue] (B1) to[out=-90,in=160] (Cup);
\draw[red] (Dots) to[out=-90,in=90] (Cup);
\draw (Dots1) to[out=90,in=-90] (Cup);
\draw (B2) to[out=-90,in=20] (Cup);
\draw (B5) to[out=90,in=-160] (Cup);
\draw (B4) to[out=90,in=-20] (Cup);
\end{tikzpicture}\xrightarrow{\beta_{l_1,l_2}}\begin{tikzpicture}[baseline={([yshift=-.3ex]current bounding box.center)}]
\node (B1) {$m_1m_2m_1^{-1}$};
\node[circle, inner sep = 2pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above right =.6 of Cup] (B2) {$m_3$};
\node[below right =.6 of Cup] (B4) {$m_4$};
\node[below left =.6 of Cup] (B5) {$m_6$};
\node[above =.5 of Cup] (Dots) {$m_1$};
\node[below=.5 of Cup] (Dots1) {$m_5$};
\draw[red] (B1) to[out=-90,in=160] (Cup);
\draw[blue] (Dots) to[out=-90,in=90] (Cup);
\draw (Dots1) to[out=90,in=-90] (Cup);
\draw (B2) to[out=-90,in=20] (Cup);
\draw (B5) to[out=90,in=-160] (Cup);
\draw (B4) to[out=90,in=-20] (Cup);
\end{tikzpicture}$$

\end{example}
Note that since the category $\mathcal X^\Gamma$ has all 4 types of morphisms as above, we do not need to formulate $\Gamma$-equivariance, permutation equivariance, Factorization rules and Propagation of vacua separately in Definition \ref{d:gammacrossedmodfun}.



\subsection{Factorization and propagation of vacua functors}
Let $(\mathcal C,\unit,R)$ be a faithfully graded $\Gamma$-crossed abelian category. We refer to the informal discussion above and Appendix \ref{ap:groupmarkedgraphs} for the definition of the category $\mathcal X^\Gamma$ of stable $\Gamma$-graphs. Let $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ be a stable $\Gamma$-graph (see Definition \ref{d:XGammagA}). With such a graph we associate the abelian category $\mathcal C^{\boxtimes H(X)}_{\mathbf{m}}$, where $H(X)$ denotes the set of half-edges of the graph. 

Now consider a morphism (see Definition \ref{d:XGammagA}) $(X,\mathbf{m}_X,\mathbf{b}_X)\xrightarrow{(f,\pmb{\gamma})} (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ in $\mathcal X^\Gamma$ which only involves contracting edges. We have the associated functor 
\begin{equation}\label{eq:crossedabeliangraphmaps}
\mathcal R_{f,\pmb\gamma}:\mathcal C^{\boxtimes H(Y)}_{\mathbf{m}_Y}\rar{}\mathcal C^{\boxtimes H(X)}_{\mathbf{m}_X} \mbox{ defined as} 
\end{equation}
$$\left(\bigboxtimes\limits_{h\in H(Y)}M_{h}\right)\mapsto \left(\bigboxtimes\limits_{f^*h\in f^*H(Y)}\pmb\gamma(h)^{-1}(M_h)\right)\boxtimes\left(\bigboxtimes\limits_{\{h_1,h_2\}\in E(X)\setminus f^*E(Y)}(1,\mathbf{b}_x(h_1))\cdot R_{\mathbf{m}_X({h_1})}\right).$$
Here we are just inserting the suitable translate of a graded component (to be more precise, the object $(1,\mathbf{b}_x(h_1))\cdot R_{\mathbf{m}_X({h_1})}\in \mathcal C_{\mathbf{m}_X(h_1)}\boxtimes \mathcal C_{\mathbf{m}_X(h_2)}$) of the symmetric $\Gamma$-invariant object $R\in \mathcal C^{\boxtimes 2}$ at the edges of $X$ which have been contracted by $f:X\to Y$. The reader can have a look at Example \ref{ex:contractingloop} below where a simple prototypical example is considered.

Now suppose that the morphism $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\xrightarrow{} (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ only deletes some 1-marked legs. We define the functor 
\begin{equation}
\mathcal R_{f,\pmb\gamma}: \mathcal C^{\boxtimes H(Y)}_{\mathbf{m}_Y}\rar{} \mathcal C^{\boxtimes H(X)}_{\mathbf{m}_X}
\end{equation}
$$\left(\bigboxtimes\limits_{h\in H(Y)}M_h\right)\mapsto \left(\bigboxtimes\limits_{f^*h\in f^*H(Y)}\pmb\gamma(h)^{-1}(M_h)\right)\boxtimes \left(\bigboxtimes\limits_{H(X)\setminus f^*H(Y)}\unit\right),$$
i.e. we insert the $\Gamma$-invariant object $\unit$ at all the 1-marked legs which have been deleted.

Hence we can define the functor $\mathcal R_{f,\pmb\gamma}$ as above for any morphism in $\mathcal X^\Gamma$ (see also discussion in Appendix \ref{ap:clutchingalongmaps}). It is clear that if we have two morphisms
$$(X,\mathbf{m}_X,\mathbf{b}_X)\xrightarrow{f_1,\pmb{\gamma_1}}(Y,\mathbf{m}_Y,\mathbf{b}_Y)\xrightarrow{f_2,\pmb{\gamma_2}}(Z,\mathbf{m}_Z,\mathbf{b}_Z)$$ then we have a natural isomorphism between the two functors
\begin{equation}
\mathcal R_{(f_2,\pmb{\gamma_2})\circ (f_1,\pmb{\gamma_1})} \cong \mathcal R_{f_1,\pmb{\gamma_1}}\circ \mathcal R_{f_2,\pmb{\gamma_2}}:\mathcal C^{\boxtimes H(Z)}_{\mathbf{m}_Z}\rar{}\mathcal C^{\boxtimes H(X)}_{\mathbf{m}_X}.
\end{equation}

\subsection{$\mathcal C$-extended $\Gamma$-crossed modular functors} \label{def:cextenmodularfunctor}
Let $\mathcal C$ be a faithfully graded $\Gamma$-crossed abelian category. We will now define the notion of a $\mathcal C$-extended $\Gamma$-crossed modular functor extending the notion of a modular functor as defined in \cite[Ch. 6]{BK:01}. We refer the reader to Appendix \ref{ap:groupmarkedgraphs}, \ref{ap:clutchingalongmaps}, \ref{ap:specialization} for the definitions of the stacks, the categories of twisted logarithmic $D$-modules on them and the specialization functors that appear in the definition below.

\begin{definition}\label{d:gammacrossedmodfun}
Let $\mathcal C$ be a (faithfully graded) $\Gamma$-crossed abelian category with $\Gamma$-invariant object $\unit\in \mathcal C$ and the involutive duality $(\cdot)^*$. Let $c\in \mathbb C$. A $\mathcal C$-extended modular functor of (additive) central charge $c$ consists of the following data satisfying the following conditions:
\begin{itemize}
\item[1.] For each stable pair $(g,A)$ (i.e. $2g-2+|A|>0$) and $\mathbf{m}\in \Gamma^A$ a conformal blocks functor
$$\mathcal V_{g,A,\mathbf{m}}:\mathcal C^{\boxtimes A}_\mathbf{m}\rar{}\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{g,A}(\mathbf{m})).$$
Once we have functors as above, we can canonically extend them to obtain functors
$$\mathcal V_{X,\mathbf{m},\mathbf{b}}:\mathcal C^{\boxtimes H(X)}_\mathbf{m}\rar{}\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m},\mathbf{b}})$$
for each $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$. We will often abuse notation and denote the functors $\mathcal V_{X,\mathbf{m},\mathbf{b}}$ as just $\mathcal V$.
\item[2.](Gluing Functor) For each morphism $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ in $\mathcal X^\Gamma$ a natural isomorphism $G_{f,\pmb\gamma}$ as below between the two functors from $\mathcal C^{\boxtimes H(Y)}_{\mathbf{m}_Y}$ to $\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})$:
\begin{equation}\label{eq:gluingaxiom}
G_{f,\pmb\gamma}:\mathcal V_{X,\mathbf{m}_X,\mathbf{b}_X}\circ\mathcal R_{f,\pmb\gamma}\rar{\cong}\mathsf{Sp}_{f,\pmb\gamma}\circ \mathcal V_{Y,\mathbf{m}_Y,\mathbf{b}_Y}
\end{equation}
compatible with compositions of morphisms in $\mathcal X^\Gamma$.
\item[3.] A normalization $\mathcal V_{0,3,\pmb{1}}(\unit\boxtimes\unit\boxtimes\unit)(\mathbb P^1\times\Gamma\to \mathbb P^1,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}})\cong \mathbb C$, where the 3 marked points $\wtilde{\mathbf{p}}$ in $\mathbb P^1\times \{1\}\subset \mathbb P^1\times\Gamma$ are the 3 roots of unity in $\mathbb C$ and with tangent vectors being the outward pointing unit vectors.
\item[4.] (Non-degeneracy.) Let $\gamma\in \Gamma$ and let $X\in \mathcal C_{\gamma}$ be a non-zero object. Then the vector bundle $\mathcal V_{0,3,(\gamma,\gamma^{-1},1)}(X\boxtimes X^*\boxtimes\unit)$ is non-zero.
\end{itemize}
We will often abuse notation and denote all functors $\mathcal V_{X,\mathbf{m},\mathbf{b}}$ simply by $\mathcal V$. Also if $(\tildeD\to D,\wtilde{\mathbf{q}},\mathbf{q},\wtilde{\mathbf{w}})\in \widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m},\mathbf{b}}$ and $\mathbf{M}\in \mathcal C^{\boxtimes H(X)}_{\mathbf{m}}$, the vector space $\mathcal V_{\mathbf{M}}(\tildeD\to D,\wtilde{\mathbf{q}},\mathbf{q},\wtilde{\mathbf{w}})$ is defined as the fiber of the twisted $\mathcal{D}$-module $\mathcal V_{X,\mathbf{m},\mathbf{b}}(\mathbf{M})$ at the point $(\tildeD\to D,\wtilde{\mathbf{q}},\mathbf{q},\wtilde{\mathbf{w}})$.
\end{definition}
\begin{remark}
Since morphisms in $\mathcal X^\Gamma$ involve contracting edges as well as forgetting $1$-marked legs, the condition 2 above gives the factorization isomorphisms, the propagation of vacua isomorphisms as well as all the compatibilities mentioned in \cite[\S6.7]{BK:01}. When $\Gamma$ is the trivial group, it is clear that the above definition agrees with the one in {\it loc. cit.}, except that we include non-degeneracy as part of the definition. See the example below to derive `factorization rules' from the above axioms.
\end{remark}

\begin{example}\label{ex:contractingloop} (An example of factorization.) Let $(g,n)$ be a stable pair, i.e. $2g-2+n>0$, and let $a,b,m_1,\cdots,m_n\in \Gamma$. Consider the following morphism in $\mathcal X^\Gamma$ obtained by contracting the loop below whose two half-edges have monodromy data $a , ba^{-1}b^{-1}$ and edge conjugation data $(b,b^{-1})$:
$$f_g:\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 0.4pt, draw, below right =.6 of B1] (Cup) {\Small$g-1$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[below right =.3 of Cup] (B) {$ba^{-1}b^{-1}$};
\node[below left =.3 of Cup] (B') {$a$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[below =.9 of Cup] (invisible) {};
\node[below =1 of Cup] (A) {$(b,b^{-1})$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw (Cup) to[out=-135,in=150] (invisible) to[out=-30,in=-45] (Cup);
\end{tikzpicture}\longrightarrow \begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\draw (B1) to[out=-90,in=180] (Cup);
\node[below =.7 of Cup] (invisible) {};
\draw (B2) to[out=-90,in=0] (Cup);
\end{tikzpicture}.$$
Then we have the gluing map from Equation (\ref{eq:gluingcovers}) (see also the beginning of Appendix \ref{ap:clutchingalongmaps}):
$$
\xi_{f_g}: \barM{}^\Gamma_{g-1,n+2}(a,ba^{-1}b^{-1},\mathbf{m}) \rar{} \barM{}^\Gamma_{g,n}(\mathbf{m}).
$$ The map $\xi_{f_g}$ naturally  factors through the gluing map $\barM{}^\Gamma_{g-1,n+2}(bab^{-1},ba^{-1}b^{-1},\mathbf{m}) \rar{} \barM{}^\Gamma_{g,n}(\mathbf{m})$ as defined in \cite[\S2.2]{JKK} via action by the element $(b,1,\mathbf{1})\in \Gamma^{n+2}$. Note that the above morphism $f_g$ also factors through the corresponding graph in $\mathcal X^\Gamma$.


 Recall the specialization functor from Equation (\ref{eq:specalonggraphmaps})
$$\mathsf{Sp}_{f_g}:\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}{}^\Gamma_{g,n}(\mathbf{m})) \rar{} \mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}{}^\Gamma_{g-1,n+2}(a,ba^{-1}b^{-1},\mathbf{m}))$$
and the functor from Equation \ref{eq:crossedabeliangraphmaps}
$$\mathcal R_{f_g}: \mathcal C^{\boxtimes n}_{\mathbf{m}}\rar{} \mathcal C^{\boxtimes n+2}_{a,ba^{-1}b^{-1},\mathbf{m}},$$ 
defined as $$\mathcal C^{\boxtimes n}_\mathbf{m}\ni\mathbf{M}\mapsto (1,b)\cdot(R_a)\boxtimes \mathbf{M}=\bigoplus\limits_{A\in P_a}A\boxtimes b(A^*)\boxtimes \mathbf{M}.$$ 
In this case the Gluing axiom (Equation \ref{eq:gluingaxiom}) gives a natural isomorphism between two functors
$$
G_{f_g}:\mathcal V_{g-1,n+2,(a,ba^{-1}b^{-1},\mathbf{m})}\circ\mathcal R_{f_g}\rar{\cong}\mathsf{Sp}_{f_g}\circ \mathcal V_{g,n,\mathbf{m}}$$
i.e. for each $\mathbf{M}\in \mathcal C^{\boxtimes n}_{m}$ we have an isomorphism of vector bundles with connections
\begin{equation}\label{eq:inductionstep} 
\bigoplus\limits_{P_a}\mathcal V_{g-1,n+2,(a,ba^{-1}b^{-1},\mathbf{m})}(A\boxtimes b(A^*)\boxtimes \mathbf{M})\rar{\cong}\mathsf{Sp}_{f,\pmb\gamma} (\mathcal V_{g,n,\mathbf{m}}(\mathbf{M})).\end{equation} We will use the above isomorphism later to prove Theorem \ref{thm:modfunmodcatarbgenus} by induction on the genus.
\end{example}


\begin{example}\label{ex:braidinggluing}
Let us consider another example of a morphism in $\mathcal X^\Gamma$, namely the crossed braiding $\beta_{l_1,l_2}:(g;m_1,m_2,\cdots,m_n)\to (g;m_1m_2m_1^{-1},m_1,\cdots,m_n)$ from Example \ref{ex:crossedbraiding} above. As a shorthand notation, let us set $\mathbf{m}'=(m_1m_2m_1^{-1},m_1,\cdots,m_n)$ and similarly for the other data where the first two pieces of data are swapped. The above braiding isomorphism in $\mathcal X^\Gamma$ gives rise to the isomorphism of the stacks $$\xi_{\beta_{l_1,l_2}}:\widetilde{\overline{\Mcal}}{}^\Gamma_{g,n}(\mathbf{m})\to \widetilde{\overline{\Mcal}}{}^\Gamma_{g,n}(\mathbf{m}'), (\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})\mapsto (\tildeC\to C;m_1(\wtilde{p}_2),\wtilde{p}_1,\wtilde{p}_3,\cdots,\wtilde{p}_n,,\wtilde{\mathbf{v}}')$$ 
In this case  the specialization functor from Equation (\ref{eq:specalonggraphmaps}) is just the pullback along the above isomorphism:
$$\mathsf{Sp}_{\beta_{l_1,l_2}}=\xi^*_{\beta_{l_1,l_2}}:\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}{}^\Gamma_{g,n}(\mathbf{m}')) \rar{} \mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}{}^\Gamma_{g,n}(\mathbf{m}))$$
Also in this case the inverse of the functor from Equation \ref{eq:crossedabeliangraphmaps}
$$\mathcal R^{-1}_{\beta_{l_1,l_2}}: \mathcal C^{\boxtimes n}_{\mathbf{m}}\rar{} \mathcal C^{\boxtimes n}_{\mathbf{m}'},$$ 
is defined by $$\mathcal C^{\boxtimes n}_\mathbf{m}\ni M_1\boxtimes\cdots\boxtimes M_n \mapsto m_1(M_2)\boxtimes M_1\boxtimes M_3\cdots\boxtimes M_n.$$ 
Applying Gluing axiom (Equation \ref{eq:gluingaxiom}) gives a natural isomorphism between two functors
$$
\mathcal V_{g;m_1,m_2,\cdots,m_n}\rar{\cong}\xi^*_{\beta_{l_1,l_2}}\circ \mathcal V_{g;m_1m_2m_1^{-1},m_1,\cdots,m_n}\circ\mathcal R_{\beta_{l_1,l_2}}^{-1}$$
i.e. natural isomorphisms between the vector spaces
$$\mathcal V_{M_1\boxtimes\cdots\boxtimes M_n}(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})\xrightarrow{\cong} \mathcal V_{ m_1(M_2)\boxtimes M_1\cdots\boxtimes M_n}(\tildeC\to C;m_1(\wtilde{p}_2),\wtilde{p}_1,\cdots,\wtilde{p}_n,,\wtilde{\mathbf{v}'}).$$
\end{example}


\noindent Next let us define a $\mathcal C$-extended $\Gamma$-crossed modular functor in genus 0.
\begin{definition}\label{d:gammacrossedmodfun0}
Let $\mathcal X^\Gamma_0\subset \mathcal X^\Gamma$ denote the full subcategory formed by graphs of genus 0, i.e. those graphs which are forests and all of whose vertices have weight 0. The notion of a $\mathcal C$-extended $\Gamma$-crossed modular functor in genus 0 is obtained by replacing the category $\mathcal X^\Gamma$ with the full subcategory $\mathcal X^\Gamma_0$ in Definition \ref{d:gammacrossedmodfun}.
\end{definition}
\begin{remark}
Note that in genus 0, the Hodge line bundles on $\overline{\mathcal{M}}_{0,A}$ are trivial and hence their pull back to $\widetilde{\overline{\Mcal}}^\Gamma_{0,A}$ are all trivial and hence we do not need to consider the central charge and each $\mathcal V(\mathbf{M})$ is a $D$-module on $\widetilde{\overline{\Mcal}}^\Gamma_{0,A}$ with log-singularities at the boundary.
\end{remark}


\subsection{Pivotal and ribbon structures on weakly fusion categories}\label{sec:weaklyribbon}
Before proceeding further, let us recall the notions of pivotal and ribbon structures in the setting of monoidal r-categories and weakly fusion categories. We refer back to Section \ref{sec:monrcatweaklyfusion} where these notions were defined. 

Unlike rigid categories, in monoidal r-categories, the weak duality functor $X\mapsto X^*$ is not necessarily monoidal. However, by \cite{BoDr:13} the double duality functor $(\cdot)^{**}$ is indeed monoidal and also braided in case the original category is braided. 
\begin{definition} (cf. \cite[\S5]{BoDr:13}.)
A pivotal structure on a monoidal r-category $\mathcal C$ is a monoidal isomorphism between the monoidal functors $\id_\mathcal C$ and $(\cdot)^{**}$ on $\mathcal C$.
\end{definition}
In \cite{BoDr:13}, a ribbon r-category is defined to be a braided monoidal r-category equipped with a monoidal isomorphism between the identity functor and the double duality functor, $X\cong X^{**}$, satisfying a certain balancing property. We refer to \cite[\S7,8]{BoDr:13} for details.

Now let $\mathcal C$ be a braided $\Gamma$-crossed monoidal r-category. A pivotal structure on $\mathcal C$ naturally defines a pivotal structure on the equivariantization $\mathcal C^\Gamma$ which is a braided monoidal r-category (see Proposition \ref{prop:equivisbraided}).
\begin{definition}
A ribbon structure on a braided $\Gamma$-crossed monoidal r-category $\mathcal C$ is a pivotal structure such that the induced pivotal structure on the braided monoidal r-category $\mathcal C^\Gamma$ is ribbon in the sense of \cite{BoDr:13}.
\end{definition}


\begin{definition}\label{d:crossedweaklyribbon}
(i) We define a $\Gamma$-crossed weakly ribbon fusion category, or in short a $\Gamma$-crossed weakly ribbon category, to be a braided $\Gamma$-crossed weakly fusion category equipped with a ribbon structure as defined above.\\
(ii) By a weakly ribbon category we mean a braided weakly fusion category equipped with a ribbon structure.
\end{definition}


We will prove that a $\mathcal C$-extended $\Gamma$-crossed modular functor in genus 0 defines the structure of a $\Gamma$-crossed weakly ribbon category on $\mathcal C$.



\subsection{The neutral modular functor}\label{sec:crossedneutral}
Let $(\mathcal C=\bigoplus\limits_{m\in \Gamma}\mathcal C_m,\unit,\bigoplus\limits_{m\in \Gamma}R_m)$ be a $\Gamma$-crossed abelian category and suppose we are given a $\mathcal C$-extended $\Gamma$-crossed modular functor $\mathcal V$ of additive central charge $c\in \mathbb C$. We will now define a $\mathcal C_1$-extended modular functor $\mathcal V_1$ in the sense of \cite[Ch. 6]{BK:01} with the same central charge $c$. 

Let $X\in \mathcal X$ be a stable graph and let $\mathbf{M}\in \mathcal C_1^{\boxtimes H(X)}$. Then we want to define $\mathcal V_1(\mathbf{M})\in \mathscr{D}_c\Mod (\widetilde{\overline{\Mcal}}_{X})$. We have a functor $\mathcal X\to \mathcal X^\Gamma$ defined on objects by $X\mapsto (X,\mathbf1,\mathbf1_{H(X)\setminus L(X)})$ (mark all half-edges by $1\in\Gamma$) and on morphisms by $f\mapsto (f,\mathbf1)$. We also have a morphism of stacks $i_X:\widetilde{\overline{\Mcal}}_{X}\to \widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf1,\mathbf1}$ defined by $(D,\mathbf{q},\mathbf{w})\mapsto (D\times \Gamma\to D,\mathbf{q}\times 1,\mathbf{q},\mathbf{w}\times 1)$. Since $\mathcal V$ is a $\mathcal C$-extended $\Gamma$-crossed modular functor, we have the twisted $\mathcal{D}$-module $\mathcal V(\mathbf{M})$ on $\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf1,\mathbf1}$. 
\begin{definition}\label{def:neutral}
We define  $\mathcal V_1(\mathbf{M})$ to be the pullback $i_X^*\mathcal V(\mathbf{M})\in \mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}_{X})$.
\end{definition} 
We can perform the same construction for the genus 0 case. Hence in this setting we obtain
\begin{proposition}
(i) Given a $\mathcal C$-extended $\Gamma$-crossed modular functor $\mathcal V$ in genus 0, the functor $\mathcal V_1$ defined above is a $\mathcal C_1$-extended modular functor in genus 0. 

In particular, this defines the structure of a weakly ribbon category on $\mathcal C_1$ and the action of $\Gamma$ on $\mathcal C_1$ respects this structure.\\
(ii) Given a $\mathcal C$-extended $\Gamma$-crossed modular functor $\mathcal V$ with central charge $c$, the functor $\mathcal V_1$ defined above is a $\mathcal C_1$-extended modular functor with central charge $c$.
\end{proposition}
\begin{proof}The fact that $\mathcal{V}_1$ is $\mathcal{C}_1$-extended modular functor with central charge $c$ follows from the construction of $\mathcal V_1$ and the axioms satisfied by $\mathcal{V}$. 
	The part about $\mathcal{C}_1$-extended modular functor in genus $0$ giving a weakly ribbon category on $\mathcal{C}_1$ is due to Bakalov-Kirillov \cite{BK:01}.
	\end{proof}





\subsection{Generalizations to the twisted setting}\label{ss:someconj}
In this section, we state the main result  which relates the notions of $\Gamma$-crossed modular functors in genus 0 and $\Gamma$-crossed weakly ribbon categories. This result will be proved in Section \ref{sec:CATGamma} after showing that the notion of complex analytic $\Gamma$-crossed modular functors as defined in this section is equivalent to the topological version studied in \cite{KP:08}. We then derive some important consequences from the main theorem.

\subsubsection{When the base curve is genus 0.}
Suppose that $(\mathcal C,\unit,R)$ is a finite semisimple $\Gamma$-crossed abelian category such that $\unit\in \mathcal C_1$ is a simple object. In this case, we prove that the notion of a $\mathcal C$-extended $\Gamma$-crossed modular functor in genus 0 is equivalent to giving $\mathcal C$ the additional structure of a $\Gamma$-crossed weakly fusion ribbon category. In a weakly rigid category we have natural isomorphisms $\Hom(M,M')\cong \Hom(\unit, { }^*M\otimes M')$. 

Now given a $\mathcal C$-extended $\Gamma$-crossed modular functor we want to define a tensor product, i.e. given $\mathbf{m}\in \Gamma^n, \mathbf{M}=M_1\boxtimes\cdots \boxtimes M_n\in \mathcal C^{\boxtimes n}_\mathbf{m}$, we want to describe the tensor product $M_1\otimes \cdots\otimes M_n\in \mathcal C_{m_1m_2\cdots m_n}\subset \mathcal C$. 

Given a $\mathcal C$-extended $\Gamma$-crossed modular functor, let us describe the desired morphism space $\Hom(\unit,M_1\otimes\cdots \otimes M_n)$. If the product $m_1\cdots m_n\neq 1$, then this space is 0. Hence suppose that $m_1\cdots m_n=1.$ Consider the $n$-marked curve $(\mathbb P^1,\mu_n,\mu_n)$ where the $n$ marked points are the $n$-th roots of unity $\mu_n\subset \mathbb C\subset \mathbb P^1$ and for each marked point $\omega\in\mu_n$, the associated tangent vector is again $\omega$ considered as a tangent vector at $\omega$. 

Consider $0$ as the basepoint on $\mathbb P^1\setminus \mu_n$. Consider loops $\gamma_j$ in $\mathbb P^1\setminus \mu_n$ starting at $0$ and going in a straight line to $e^{\frac{2\pi\sqrt{-1}j}{n}}$ and encircling the point $e^{\frac{2\pi\sqrt{-1}j}{n}}$ counterclockwise. Then we obtain a presentation of the fundamental group  $$\pi_1(\mathbb P^1\setminus \mu_n,0)=\langle\gamma_1,\cdots,\gamma_n|\gamma_1\cdots\gamma_n=1\rangle.$$ Hence if $m_1\cdots m_n=1$, then $\gamma_j\mapsto m_j$ defines a group homomorphism $\phi:\pi_1(\mathbb P^1\setminus \mu_n,0)\to \Gamma$. Then as described in Section \ref{sec:ret}, this determines an $n$-marked admissible cover $(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}})$ in the distinguished component $\xi_{0,n}({\bf m})$ (see Section \ref{sec:distinguishedsubstack} for $\xi_{0,n}({\bf m})$ and its properties).

Then we want to define a tensor product on $\mathcal C$ for which the multiplicity spaces $\Hom(\unit,M_1\otimes\cdots \otimes M_n)$ (see also Remark \ref{rk:fusioncoeff}) are fibers of the bundles $\mathcal V_{\mathbf{M}}$ at the special covers described above. More precisely we want: 
\begin{equation}\label{eq:homspaces}
\Hom(\unit,M_1\otimes\cdots \otimes M_n)=\mathcal V_{\mathbf{M}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}}).\end{equation}



We state the following result which will be proved in Section \ref{sec:proofsofthms}.
\begin{theorem}\label{thm:modfunmodcat}
Let $(\mathcal C,\unit,R)$ be a finite semisimple faithfully graded $\Gamma$-crossed abelian category with $\unit$ being a simple object. We also continue to use all the preceding notation. Then 
 the notion of a $\mathcal C$-extended $\Gamma$-crossed modular functor in genus 0 is equivalent to equipping $\mathcal C$ with the structure of a $\Gamma$-crossed weakly ribbon category satisfying Equation (\ref{eq:homspaces}):
$$\Hom(\unit,M_1\otimes\cdots \otimes M_n)=\mathcal V_{\mathbf{M}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}}).$$
\end{theorem}

\subsubsection{When the base genus is arbitrary}\label{sec:arbgenusdescription}
Using the above genus zero result, we now derive a higher genus analog of the above result. Consider a stable pair $(g,n)$ and $\mathbf{m}\in \Gamma^n$. Then  consider the stack $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$ of $n$-marked admissible $\Gamma$-covers with monodromy data $\mathbf{m}$ with genus $g$ base curves. As before consider an object $\mathbf{M}=M_1\boxtimes\cdots \boxtimes M_n\in \mathcal C^{\boxtimes n}_\mathbf{m}$. 

Now given a $\mathcal C$-extended $\Gamma$-crossed modular functor in arbitrary genus, we firstly get the structure of a $\Gamma$-crossed weakly ribbon category on $\mathcal C$ using the previous theorem. Just as in the case of genus 0 base curves, we would like to compute the dimensions of the fibers of the vector bundle $\mathcal V_{\mathbf{M}}$ (which comes as a part of the data defining a $\Gamma$-crossed modular functor) on $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$ at various points in $\tildeM^\Gamma_{g,n}(\mathbf{m})$ as the dimensions of certain $\Hom$-spaces in the category $\mathcal C$.

\begin{remark}\label{rk:componentranksdiffer}
Note that the stacks $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$ are disconnected in general and as we will see below, the rank of $\mathcal V_{\mathbf{M}}$ may differ on the different connected components. We will describe below the ranks of $\mathcal V_{\mathbf{M}}$ at all the possible components of this stack. Note that to describe the ranks over all of $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$, it is sufficient describe the ranks at $n$-marked admissible $\Gamma$-covers in the open part $\tildeM^\Gamma_{g,n}(\mathbf{m})$ where the base curve of the $\Gamma$-cover is smooth of genus $g$.
\end{remark}
In view of the above remark consider any $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})\in \tildeM^\Gamma_{g,n}(\mathbf{m})$. Let us choose a basepoint $p_0\in C_{gen}=C\setminus\mathbf{p}$ and a lift $\wtilde{p}_0\in \tildeC_{gen}$. Since $C_{gen}$ is a smooth genus $g$ curve with $n$ punctures, we can choose closed curves $\alpha_1,\beta_1,\cdots,\alpha_g,\beta_g$ in $C_{gen}$ based at $p_0$ along with smooth paths $\delta_i$ (for $1\leq i\leq n$) beginning at $p_0$ and ending at $p_i$ such that:
\begin{itemize}
\item For each $i$, the smooth path $\delta_i$ represents the tangent vector $v_i$ in $T_{p_i}C$ that is part of the marking data on $C$ and does not pass through any marked point $p_j$ except at the endpoint.
\item Let $\sigma_i$ denote the loops in $C_{gen}$ based at $p_0$ and which encircle $p_i$ once counterclockwise defined using the path $\delta_i$ as in Definition \ref{def:pathtoloop}.
\item These $2g+n$ loops give a presentation 
\begin{equation}
\pi_1(C_{gen},p_0)=\langle\alpha_1,\beta_1,\cdots,\alpha_g,\beta_g,\sigma_1,\cdots,\sigma_n|[\alpha_1,\beta_1]\cdots[\alpha_g,\beta_g]\sigma_1\cdots\sigma_n=1\rangle.
\end{equation}
\end{itemize}
Note that $\tildeC_{gen}\to C_{gen}$ is an \'etale $\Gamma$-cover. We can now uniquely lift each path $\delta_i$ in $C$ to a smooth path $\wtilde\delta_i$ in $\tildeC$ beginning at $\wtilde{p}_0$ and which lies in $\tildeC_{gen}$ except for the ending point. Let $\wtilde{p}'_i$ denote the endpoint of $\wtilde\delta_i$; it will be some point of $\tildeC$ lying above $p_i$. Let $\tilde{v}'_i$ denote the tangent vector in $T_{\wtilde{p}'_i}(\tildeC)$ represented by $\wtilde\delta_i$. Then there exists a unique $\gamma_i\in \Gamma$ such that $\gamma_i$ takes the original marking data $(\wtilde{p}_i, \wtilde{v}_i)$ on $\tildeC$ to the newly constructed data $(\wtilde{p}'_i, \wtilde{v}'_i)$.

In other words, the choices of the paths made above determine a unique $\pmb\gamma\in \Gamma^n$ such that $$\pmb\gamma\cdot(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})=(\tildeC\to C,\wtilde{\mathbf{p}}',\mathbf{p},\wtilde{\mathbf{v}}',\mathbf{v})\in \tildeM^\Gamma_{g,n}({}^{\pmb\gamma}\mathbf{m}).$$

Now note that $\pmb\gamma$ determines a morphism in the category $\mathcal X^\Gamma$ from the genus $g$ $\Gamma$-corolla with $n$ legs marked by $\mathbf{m}$ to the genus $g$ $\Gamma$-corolla with $n$ legs marked by ${}^{\pmb\gamma}\mathbf{m}$. (This is precisely the diagram drawn in Example \ref{ex:groupaction}.) Hence by condition (2.) from Definition \ref{d:gammacrossedmodfun} of $\Gamma$-crossed modular functor
\begin{equation}\label{eq:dimofspecialcovers}
\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})=\dim \mathcal V_{{}^{\pmb\gamma}\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}}',\mathbf{p},\wtilde{\mathbf{v}}',\mathbf{v}).
\end{equation}
\begin{remark}\label{rk:specialcovers}
The above equality shows that to compute the rank of any line bundle $\mathcal V_{\mathbf{M}}$ at any $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})\in \tildeM^\Gamma_{g,n}(\mathbf{m})$, it is enough to only consider the special covers of the type $(\tildeC\to C,\wtilde{\mathbf{p}}',\mathbf{p},\wtilde{\mathbf{v}}',\mathbf{v})$ that we have constructed above. Hence from now on, we will restrict our attention to such special covers, and from now on, we assume that $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$ is one such special covering.
\end{remark}
The choice of lift $\wtilde{p}_0$ determines a group homomorphism $\chi_{\wtilde{p}_0}:\pi_1(C_{gen},p_0)\to \Gamma$. Let $\chi_{\wtilde{p}_0}(\alpha_j)=a_j, \chi_{\wtilde{p}_0}(\beta_j)=b_j\in \Gamma$. Hence we must have the relationship
$$[a_1,b_1]\cdots[a_g,b_g]\cdot m_1\cdots m_n=1.$$

Recall from Equation (\ref{eq:omegaab}) that in any $\Gamma$-crossed weakly fusion category, given $a,b\in \Gamma$, we can define the objects
$$\Omega_{a,b}:=\bigoplus\limits_{A\in P_a}A\otimes b(A^*)\in \mathcal C_{[a,b]}.$$
We can now state the following result which relates the ranks of the vector bundles defining a modular functor at special $\Gamma$-covers to certain multiplicity spaces:
\begin{theorem}\label{thm:modfunmodcatarbgenus}
Let us continue to use the set-up and all the notation from the above discussion. Suppose that we have a $\mathcal C$-extended $\Gamma$-crossed modular functor (in arbitrary genus) of additive central charge $c$. Then the structure of $\Gamma$-crossed weakly ribbon category  on $\mathcal C$ is such that we have the following relationship between the vector bundles coming from the data of the $\Gamma$-crossed modular functor $\mathcal V$ and certain multiplicity spaces in $\mathcal C$:
\begin{equation}\label{eq:highergenushomspaces}
\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})=\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_g,b_g}\otimes M_1\otimes\cdots\otimes M_n).
\end{equation}
\end{theorem}
\begin{proof}
We will use induction on the genus $g$. Theorem \ref{thm:modfunmodcat} (Equation \ref{eq:homspaces}) covers the genus 0 case. Let us now assume the result up to genus $g-1$. To complete the proof we use (Equation \ref{eq:inductionstep} where we take $(a,b)$ to be our current $(a_g,b_g)$). Recall first of all that the specialization $\mathsf{Sp}_{f_g}$ preserves the ranks of vector bundles. Hence from Equation (\ref{eq:inductionstep}) we conclude that 
$$\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})=\bigoplus\limits_{A\in P_{a_g}}\dim\mathcal V_{A\boxtimes b_g(A^*)\boxtimes\mathbf{M}}(\tildeD\to D,(\wtilde{q}',\wtilde{q}'',\wtilde{\mathbf{p}}'),(\wtilde{w}',\wtilde{w}'',\wtilde{\mathbf{v}}'))$$
where the special $\Gamma$-covering $(\tildeD\to D,(\wtilde{q}',\wtilde{q}'',\wtilde{\mathbf{p}}'),(\wtilde{w}',\wtilde{w}'',\wtilde{\mathbf{v}}'))$ with $D$ being smooth of genus $g-1$ is a normalization of a degeneration of $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$ to the boundary of $\widetilde{\overline{\Mcal}}^\Gamma_{g,n}(\mathbf{m})$ corresponding to the following morphism of stable $\Gamma$-graphs from Example \ref{ex:contractingloop}:
$$f_g:\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 0.4pt, draw, below right =.6 of B1] (Cup) {\Small$g-1$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\node[below right =.3 of Cup] (B) {$b_ga_g^{-1}b_g^{-1}$};
\node[below left =.3 of Cup] (B') {$a_g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[below =.9 of Cup] (invisible) {};
\node[below =1 of Cup] (A) {$(b_g,b_g^{-1})$};
\draw (B1) to[out=-90,in=180] (Cup);
\draw (B2) to[out=-90,in=0] (Cup);
\draw (Cup) to[out=-135,in=150] (invisible) to[out=-30,in=-45] (Cup);
\end{tikzpicture}\longrightarrow \begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)}]
\node (B1) {$m_1$};
\node[circle, inner sep = 4.8pt, draw, below right =.6 of B1] (Cup) {$g$};
\node[above =.5 of Cup] (Dots) {$\cdots$};
\node[above right =.6 of Cup] (B2) {$m_n$};
\draw (B1) to[out=-90,in=180] (Cup);
\node[below =.7 of Cup] (invisible) {};
\draw (B2) to[out=-90,in=0] (Cup);
\end{tikzpicture}.$$
It is constructed as follows: Let us consider the loop $\alpha_g$ based at $p_0$ as being composed of a path $\delta$ from $p_0$ to a point $q\in C$ and then followed by a smooth simple closed curve $\alpha'_g$ based at $q$ and following $\delta^{-1}$ from $q$ back to $p$.  

We first degenerate $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$ to a nodal $(\tildeC'\to C',\wtilde{\mathbf{p}'},\wtilde{\mathbf{v}}')$ where the base $C'$ is a nodal curve obtained by degenerating the loop $\alpha'_g$ on $C$ to a node $q'$ on $C'$. We then get a path $\delta'$ on $C'$ from $p'_0$ to $q'$.  Lift this path to $\tildeC'$ from $\wtilde{p}'_0$ to the node $\wtilde{q}'\in \tildeC'$. Now normalize $C'$ at $q'$ to get a cover $(\tildeD\to D,(\wtilde{q}',\wtilde{z}'',\wtilde{\mathbf{p}}'),(\wtilde{w}',\wtilde{v}'',\wtilde{\mathbf{v}}'))$. 

The monodromy data at the newly created marked points $\wtilde{q}',\wtilde{z}''$ will now be $(a_g,a_{g}^{-1})$. However this will not be a special cover, and we act on $(\wtilde{z}'',\wtilde{v}'')$ by $b_g\in \Gamma$ to obtain the desired special cover $(\tildeD\to D,(\wtilde{q}',\wtilde{q}'',\wtilde{\mathbf{p}}'),(\wtilde{w}',\wtilde{w}'',\wtilde{\mathbf{v}}'))$. 




By the induction hypothesis for the genus $g-1$ base curve $D$ we get
\begin{align*}
&\dim\mathcal V_{A\boxtimes b_g(A^*)\boxtimes\mathbf{M}}(\tildeD\to D,(\wtilde{q}',\wtilde{q}'',\wtilde{\mathbf{p}}'),(\wtilde{w}',\wtilde{w}'',\wtilde{\mathbf{v}}'))\\
& \quad =\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_{g-1},b_{g-1}}\otimes A\otimes b_g(A^*)\otimes M_1\otimes\cdots\otimes M_n).
\end{align*}
 for each simple object $A\in P_{a_g}$. Since by definition $$\Omega_{a_g,b_g}=\bigoplus\limits_{A\in P_{a_g}}A\otimes b_g(A^*),$$ we complete the proof by taking the direct sum of the previous equality over all $A\in P_{a_g}$.
\end{proof}

\noindent We now state some direct corollaries.
\begin{corollary}\label{cor:crossedmodfunmodcat}
Along with the assumptions of Theorem \ref{thm:modfunmodcatarbgenus}, also suppose that the corresponding neutral weakly ribbon category $\mathcal C_1\subset \mathcal C$ is rigid. Then in fact $\mathcal C$ is a $\Gamma$-crossed modular fusion category of multiplicative central charge $e^{\sqrt{-1}\pi c}$.
\end{corollary}
\begin{proof}
By Theorem \ref{thm:modfunmodcatarbgenus} the $\Gamma$-crossed modular functor $\mathcal V$ defines the structure of a $\Gamma$-crossed weakly ribbon category on $\mathcal C$, in particular $\mathcal C$ is a $\Gamma$-graded weakly fusion category. We have assumed that the component $\mathcal C_1$ is rigid. Hence by Corollary \ref{cor:rigidity of graded categories} $\mathcal C$ must be rigid and hence a braided $\Gamma$-crossed fusion category. Moreover $\mathcal C_1$ corresponds to the neutral $\mathcal C_1$-extended (untwisted) modular functor $\mathcal V_1$ in arbitrary genus of additive central charge $c$ as described in Section \ref{sec:crossedneutral}. Since we have assumed $\mathcal C_1$ is rigid, by \cite[\S6.7]{BK:01} we conclude $\mathcal C_1$ is a modular fusion category of multiplicative central charge $e^{\sqrt{-1}\pi c}$. Moreover by assumption $\mathcal C$ is faithfully graded. Hence we see that $\mathcal C$ is a faithfully graded braided $\Gamma$-crossed fusion category equipped with a ribbon (i.e. spherical structure) and that $\mathcal C_1$ is a modular category of multiplicative central charge $e^{\sqrt{-1}\pi c}$. Hence by Definition \ref{def:crossedmodcat} $\mathcal C$ is a $\Gamma$-crossed modular category of multiplicative central charge $e^{\sqrt{-1}\pi c}$ as desired.
\end{proof}

Let $\Gamma^\circ\leq \Gamma$ be the image of the holonomy homomorphism $\chi_{\wtilde{p}_0}:\pi_1(C_{gen},p_0)\twoheadrightarrow\Gamma^\circ\subset \Gamma$. Recall that by Equation (\ref{eq:dimofspecialcovers}), to describe the ranks of all the bundles $\mathcal V_{\mathbf{M}}$ at arbitrary $n$-marked admissible $\Gamma$-covers, it is enough to compute the ranks $\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\wtilde{\mathbf{v}},\mathbf{v})$ assuming that the cover is special. The following corollary does this:
\begin{corollary}\label{cor:verlindeforcrossedmodfun}
(Verlinde formula for \emph{rigid} $\Gamma$-crossed modular functors.) We use all the notation described in this section. Let $\mathcal V$ be a $\mathcal C$-extended $\Gamma$-crossed modular functor (in arbitrary genus) of additive central charge $c$. This equips $\mathcal C$ with the structure of a $\Gamma$-crossed weakly ribbon category. Suppose in addition that the neutral component $\mathcal C_1\subset \mathcal C$ is rigid, or equivalently, that $\mathcal C$ is a $\Gamma$-crossed modular fusion category. Then the ranks of the vector bundles $\mathcal V_{\mathbf{M}}$ at the special $\Gamma$-covers are described by the following Verlinde formula:
\begin{equation}\label{eq:verlindeforcrossedmodfun}
\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})=\sum\limits_{D\in P_1^{\Gamma^\circ}}\frac{\left(\frac{1}{S_{\unit,D}}\right)^{n+2g-2}\cdot S^{m_1}_{M_1,D}\cdots S^{m_n}_{M_n,D}}{\varphi_D(a_1,b_1,a_1^{-1},b_1^{-1},\cdots,m_1,\cdots,m_n)}
\end{equation}
where for $m\in \Gamma$, $S^m$ are the categorical $m$-crossed S-matrices of the $\Gamma$-crossed modular fusion category $\mathcal C$ and where the denominator is given by the cocycles described in Section \ref{sec:twistedchars}, Remark \ref{rk:ncocycle}.
\end{corollary}
\begin{proof}
By Corollary \ref{cor:crossedmodfunmodcat} and the assumption that $\mathcal C_1$ is rigid, the $\Gamma$-crossed modular functor $\mathcal V$ induces the structure of a $\Gamma$-crossed modular fusion category on $\mathcal C$. Hence we have available to us the categorical arbitrary genus twisted Verlinde formula proved in Corollary \ref{cor:highergenus}. Now Theorem \ref{thm:modfunmodcatarbgenus} implies that
\[\dim \mathcal V_{\mathbf{M}}(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})=\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_g,b_g}\otimes M_1\otimes\cdots\otimes M_n).\]
By Corollary \ref{cor:highergenus} we have
\begin{align*}&\dim\Hom(\unit,\Omega_{a_1,b_1}\otimes\cdots\otimes\Omega_{a_g,b_g}\otimes M_1\otimes\cdots\otimes M_n)\\& \hspace{1cm}=\sum\limits_{D\in P_1^{\Gamma^\circ}}\frac{\left(\frac{1}{S_{\unit,D}}\right)^{n+2g-2}\cdot S^{m_1}_{M_1,D}\cdots S^{m_n}_{M_n,D}}{\varphi_D(a_1,b_1,a_1^{-1},b_1^{-1},\cdots,m_1,\cdots,m_n)}.
\end{align*}
This completes the proof.
\end{proof}


\section{Complex analytic and topological $\Gamma$-crossed modular functors}\label{sec:CATGamma}
In this section, we compare the complex analytic notion of $\Gamma$-crossed modular functors which we defined in the previous section with the topological version of $\Gamma$-crossed functors studied by Kirillov and Prince in \cite{KP:08, Prince}. Let $(\mathcal C,\unit,R)$ be a finite semisimple $\Gamma$-crossed abelian category. It is proved in \cite{KP:08} that the structure of a topological $\mathcal C$-extended $\Gamma$-crossed modular functor in genus zero is equivalent to the structure of a $\Gamma$-crossed weakly ribbon category on $\mathcal C$. We will now prove that the notion of a $\mathcal C$-extended complex analytic $\Gamma$-crossed modular functor in genus zero is equivalent to the topological notion. This will complete the proof of Theorem \ref{thm:modfunmodcat}.


\subsection{Motivation for topological $\Gamma$-crossed modular functors}\label{sec:topmotivation} As in the previous section, let $\mathcal C$ be a finite semisimple faithfully graded $\mathbb C$-linear $\Gamma$-crossed abelian category. In order to define the structure of a $\Gamma$-crossed weakly ribbon category on $\mathcal C$, we considered marked admissible covers  $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})\in \tildeM^\Gamma_{g,n}(\mathbf{m})$ in Section \ref{sec:crossedmodular}.  For the topological version, we consider the topological analogs of such covers. 

Namely, given a $\Gamma$-cover of smooth projective curves $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$ we may consider it as a branched covering of smooth compact oriented surfaces. Now we also have the marked points $\wtilde{\mathbf{p}}$ and the marked tangent vectors $\wtilde{\mathbf{v}}$ on the top curve/surface $\tildeC$ and their images $\mathbf{p}$, $\mathbf{v}$ on the base $C$. We then delete tiny disks around the points $\mathbf{p}$ to get an oriented surface $\Sigma$ with boundary. Let $\wtilde\Sigma\subset \tildeC$ be the preimage of $\Sigma$. Note that since $\Sigma\subset  C_{gen}$ and $\wtilde\Sigma\subset \tildeC_{gen}$, the projection $\wtilde\Sigma\to \Sigma$ is a principal left $\Gamma$-bundle. We also have the marked tangent vectors $\wtilde{\mathbf{v}}$. We start from a marked point $\wtilde{p}_i\in \tildeC$ and follow the marked tangent vectors $\wtilde{v}_i$ till we hit the corresponding boundary circle in $\wtilde\Sigma$ at some point $\tilde{q}_i$.

In the topological version, instead of covers $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$ we work with $(\wtilde\Sigma\to \Sigma,\wtilde{\mathbf{q}})$. Consider any object $\mathbf{M}\in \mathcal C^{\boxtimes n}_{\mathbf{m}}$. Informally, a topological $\mathcal C$-extended $\Gamma$-crossed modular functor $\tau$ takes as an input a pair $(\mathbf{M}, (\wtilde\Sigma\to \Sigma,\wtilde{\mathbf{q}}))$ and spits out a finite dimensional vector space $\tau_{\mathbf{M}}(\wtilde\Sigma\to \Sigma,\wtilde{\mathbf{q}})$.


Hence let us recall the notion of $\Gamma$-covers of extended surfaces from \cite[\S3]{KP:08} and \cite{Prince}. We refer to these sources for more details and the proofs.
\begin{definition}
(i) An extended surface $(\Sigma,\{p_h\}_{h\in \H(\Sigma)})$ is a (possibly disconnected) smooth compact oriented surface $\Sigma$ with set of boundary components $\H(\Sigma)$ with a choice of a marked point $p_h$ on each boundary component $h\in \H(\Sigma)$. \vspace{0.2cm}

(ii) Let $\pi_0(\Sigma)$ denote the set of connected components of $\Sigma$. We have a natural map $s:\H(\Sigma)\to \pi_0(\Sigma)$ and the weight map $w:\pi_0(\Sigma)\to \mathbb Z_{\geq 0}$ which assigns to a connected component of $\Sigma$ the genus of its closure. 

Hence given an extended surface, we can assign to it a weighted graph with vertices $\pi_0(\Sigma)$ and half-edges $\H(\Sigma)$ which is a disjoint union of corollas (a graph with one vertex, no edges and possibly having some legs, see also Remark \ref{rk:corolla}), with each weighted corolla  corresponding to a connected component of $\Sigma$.\vspace{0.2cm}

(iii) We say that an extended surface as above is \emph{stable} if each connected component is stable, i.e. if each corolla as above is a stable weighted graph.
\end{definition}

\noindent We now define $\Gamma$-coverings of extended surfaces:
\begin{definition}\label{def:topgammacover}
(i) A $\Gamma$-cover $(\wtilde\Sigma,\{\tilde{p}_h\}_{h\in \H(\Sigma)})$ of an extended surface $(\Sigma,\{p_h\}_{h\in \H(\Sigma)})$ is a principal left $\Gamma$-bundle $\wtilde{\Sigma}\to \Sigma$ along with a choice of lift $\tilde{p}_h\in \partial{\wtilde{\Sigma}}$ above each $p_h$.\vspace{0.2cm}

(ii) Using the choice of the marked points in $\partial\wtilde\Sigma$, for each $h\in \H(\Sigma)$, we can define a monodromy element of $\Gamma$ (see Prince \cite{Prince} for details) defining a function $\mathbf{m}:\H(\Sigma)\to \Gamma$. Hence with each $\Gamma$-cover we have an associated weighted $\Gamma$-graph which is again just a union of $\Gamma$-corollas (see also Remark \ref{rk:corolla}).\vspace{0.2cm}
(iii) We say that the $\Gamma$-cover is stable if the base surface $\Sigma$ is stable. 
\end{definition}



Recall that in the complex analytic situation we demanded that the $\mathcal V_{\mathbf{M}}$ should form vector bundles with flat (projective) connections on $\tildeM^{\Gamma}_{g,n}(\mathbf{m})$. Note that such a connection is equivalent (via Riemann-Hilbert Correspondence) to a (projective) representation of the orbifold fundamental groupoid $\pi_1(\tildeM^\Gamma_{g,n}(\mathbf{m}))$ of the moduli stack $\tildeM^\Gamma_{g,n}(\mathbf{m})$. Hence it would have been equivalent to work with these fundamental groupoids and their representations instead. There are natural analogs of these groupoids on the topological side:
\begin{definition}\label{def:surfcorolla}
Let $(g,n)$ be a stable pair, i.e. $2g-2+n>0$. We define $\mathfrak{Surf}^\Gamma_{g,n}(\mathbf{m})$ to be the groupoid whose objects are $\Gamma$-coverings of extended surfaces $(\wtilde\Sigma\to\Sigma,\mathbf{q})$ (with base being a smooth oriented surface of genus $g$ with $n$ boundary components) as above with monodromy data (see also Definition \ref{def:topgammacover} below) $\mathbf{m}\in \Gamma^n$. The morphisms in this groupoid are isotopy classes of orientation and marked points preserving diffeomorphisms of $\Gamma$-covers.
\end{definition}

By using the ideas from \cite[\S4.2.3]{BFM}, \cite{HainL} we now prove that the two groupoids are canonically equivalent.
\begin{theorem}\label{thm:fundamentalgroupoidmappingclassgp}
For any $(g,n)$ such that $2g-2+n>0$ and for any $\mathbf{m}\in \Gamma^n$ we have a canonical equivalence of groupoids 
$$\pi_1(\tildeM^\Gamma_{g,n}(\mathbf{m}))\cong \mathfrak{Surf}^\Gamma_{g,n}(\mathbf{m}).$$
\end{theorem}
\begin{proof}
We use a modification of the standard argument in the special case when $\Gamma$ is trivial using the identification of each connected component of the moduli stack $\tildeM^\Gamma_{g,n}(\mathbf{m})$ as a quotient of a certain Teichm\"uller space. Let us choose any point $\mathbf{c}:=(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})\in \tildeM^\Gamma_{g,n}(\mathbf{m})$. 

Let us strip $\tildeC\to C$ of the complex structure and consider it as a ramified covering of smooth compact oriented surfaces with markings. Consider the Teichm\"uller groupoid $\mathscr T_{\mathbf{c}}$ (see also \cite[Chapter XV]{ACG:11} for details) whose objects are tuples $(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}},[\wtilde{f}])$ where $(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}})\in \tildeM^\Gamma_{g,n}(\mathbf{m})$ and $[\wtilde{f}]$ is the isotopy class of a smooth orientation and marking data preserving diffeomorphism $$\tilde{f}:(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}})\to (\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$$ between ramified marked $\Gamma$-covers. An isomorphism in $\mathscr T_{\mathbf{c}}$ between two objects 
$$\wtilde\phi:(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}},[\wtilde{f}])\to (\tildeD'\to D',\wtilde{\mathbf{q}'},\wtilde{\mathbf{w}}',[\wtilde{f}'])$$  is a complex analytic isomorphism $\wtilde{\phi}$ between the $\Gamma$-covers as above such that $[\wtilde{f}'\circ\wtilde{\phi}]=[\wtilde{f}]$.

The Teichm\"uller space $\mathcal T_{\mathbf{c}}$ is defined to be the space of isomorphism classes of objects of $\mathscr T_{\mathbf{c}}$. We can think of the space $\mathcal T_{\mathbf{c}}$ as the space of isotopy classes of complex analytic structures on the marked ramified $\Gamma$-covering of smooth oriented surfaces $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$. 

Note that $\tildeC\to C$ is a ramified $\Gamma$-cover of smooth oriented surfaces and hence given a complex analytic structure on $\tildeC$ we get a unique complex structure on $C$. Hence we may have defined the Teichm\"uller space $\mathcal T_{\mathbf{c}}$ entirely using the top surface $\tildeC$ which may be disconnected. Nevertheless we conclude that $\mathcal T_{\mathbf{c}}$ is contractible.

Define the Teichm\"uller modular group $\varGamma_\mathbf{c}:=\{[\wtilde{\gamma}]|(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}},[\wtilde{\gamma}])\in \mathscr T_{\mathbf{c}}\}$ which is a group under composition. Moreover we have an action of $\varGamma_{\mathbf{c}}$ on $\mathcal T_{\mathbf{c}}$ which takes the isomorphism class of an object $(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}},[\wtilde{f}])$ to $(\tildeD\to D,\wtilde{\mathbf{q}},\wtilde{\mathbf{w}},[\wtilde{\gamma}\circ\wtilde{f}])$. Then the connected component of the moduli stack $\tildeM^\Gamma_{g,n}(\mathbf{m})$ containing the point $\mathbf{c}$ is precisely the orbifold quotient $\varGamma_{\mathbf{c}}\backslash\mathcal T_{\mathbf{c}}$ and hence its orbifold fundamental group is precisely $\varGamma_{\mathbf{c}}$.

It is also clear that $\varGamma_{\mathbf{c}}$ is canonically isomorphic to the automorphism group in $\mathfrak{Surf}^\Gamma_{g,n}(\mathbf{m})$ of the $\Gamma$-cover of extended surfaces $(\wtilde\Sigma\to \Sigma,\wtilde{\mathbf{q}})$ associated with $(\tildeC\to C,\wtilde{\mathbf{p}},\wtilde{\mathbf{v}})$.

To complete the proof, we apply the same argument for each connected component of $\tildeM^\Gamma_{g,n}(\mathbf{m})$ and use the observation that any $(\wtilde\Sigma\to \Sigma,\wtilde{\mathbf{q}})\in \mathfrak{Surf}^\Gamma_{g,n}(\mathbf{m})$ can be closed up to a ramified marked $\Gamma$-cover of surfaces and can be equipped with a complex analytic structure.
\end{proof}


Just as in the complex analytic situation, we have various gluing operations for stable $\Gamma$-covers of extended surfaces along boundary components. Once again the category $\mathcal X^\Gamma$ of stable $\Gamma$-graphs will help us to organize these different types of gluings. We consider these structures next.

\subsection{Categories cofibered in groupoids over $\mathcal X^\Gamma$}
In this section, we reformulate the notion of a topological $\Gamma$-crossed modular functor (as defined in \cite{KP:08}) in the spirit of \cite{BK:01} and \cite{BFM}. As described in Appendix \ref{ap:groupmarkedgraphs}, $\mathcal X^\Gamma$ is a symmetric monoidal category under disjoint union of graphs denoted as $\sqcup$. Now for each object $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$, we will assign two groupoids, one in the topological setting of surfaces and the other in the setting of complex algebraic curves. We will use the notion of categories cofibered in groupoids over the category $\mathcal X^\Gamma$. 


So far in Section \ref{sec:topmotivation} we have only encountered stable $\Gamma$-corollas associated with stable $\Gamma$-covers. Note that we can think of any  stable $\Gamma$-graph as being obtained by gluing together stable  $\Gamma$-corollas (see also Remark \ref{rk:corolla}). If $(X,\mathbf{m},\mathbf{b})\in\mathcal X^\Gamma$ then we can cut up the graph at the midpoints of all edges to obtain a collection of $\Gamma$-corollas parameterized by $V(X)$. For each vertex $v\in V(X)$, $L_v$ denotes the set of half-edges of $X$ whose source is $v$. These form the legs of the corolla corresponding to that vertex.

We think of the groupoid $\mathfrak{Surf}^\Gamma_{g,n}(\mathbf{m})$ as being associated with the corolla whose vertex has weight $g$, and which has $n$ legs marked by $\mathbf{m}\in \Gamma^n$. We will now associate a groupoid with any stable $\Gamma$-graph:
\begin{definition}
Let $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ and we continue to use the above notation. We define $\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$ to be the product of the groupoids defined in Definition \ref{def:surfcorolla} attached to each vertex $v\in V(X)$:
$$\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b}):=\prod\limits_{v\in V(X)}\mathfrak{Surf}^\Gamma_{w(v),L_v}(\mathbf{m}|_{L_v}).$$  
\end{definition}

\begin{remark}
Equivalently $\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$ is the groupoid whose objects are $\Gamma$-covers of extended surfaces $(\wtilde\Sigma\to \Sigma,\{\tilde{p}_h\}_{h\in \H(\Sigma)})$ along with identifications $V(X)\cong \pi_0(\Sigma)$ and $H(X)\cong \H(\Sigma)$ which are compatible with the weight maps, the maps `$s$' from half-edges to vertices, as well as the monodromies at the half-edges. The morphisms in this groupoid are isotopy classes of orientation preserving diffeomorphisms of $\Gamma$-covers preserving the marked points. 
\end{remark}


\subsubsection*{Idea behind gluing along morphisms in $\mathcal X^\Gamma$} Using the identification $H(X)\cong \H(\Sigma)$ above, we obtain an involution $\iota$ of the boundary components $\H(\Sigma)$. Now suppose that $\{h_1,h_2\}\in \H(\Sigma)$ form an edge, i.e. an $\iota$ orbit of size two. Then by definition we have ${}^{\mathbf{b}(h_1)}\mathbf{m}(h_1)=\mathbf{m}(h_2)^{-1}$. Now $\mathbf{m}(h_1)$ is the monodromy element defined using the marked point $\tilde{p}_{h_1}$ lying over $p_{h_1}$ and hence the monodromy determined by the point $\mathbf{b}(h_1)\cdot \tilde{p}_{h_1}$ is ${}^{\mathbf{b}(h_1)}\mathbf{m}(h_1)$. Hence we can glue the $\Gamma$-cover by identifying the point $\mathbf{b}(h_1)\cdot \tilde{p}_{h_1}$ with the point $\tilde{p}_{h_2}$ and gluing the surface $\Sigma$ along $p_{h_1}, p_{h_2}$. 

Similarly, if $h\in \H(\Sigma)$ is a leg with $\mathbf{m}(h)=1$, then it means that the $\Gamma$-cover when restricted to the corresponding boundary component is trivial. Hence we can glue the trivial $\Gamma$-cover of a standard disk to our given $\Gamma$-cover in $\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$.

We refer to \cite[\S2.6]{Prince} for more details about the above gluing constructions and uniqueness of gluing. Recall that morphisms in $\mathcal X^\Gamma$ are compositions of isomorphisms, edge contractions and deletion of 1-marked legs. Hence we obtain:
\begin{proposition}\label{prop:surfacegluing}
Let $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ be a morphism in $\mathcal X^\Gamma$. Then the gluing constructions described above define a gluing functor between groupoids
\[
\mathcal G_{f,\pmb\gamma}:\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\to \mathfrak{Surf}^\Gamma(Y,\mathbf{m}_Y,\mathbf{b}_Y).
\]
The assignment $(X,\mathbf{m}_X,\mathbf{b}_X)\mapsto \mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)$ defines a symmetric monoidal pseudo-functor from the category $\mathcal X^\Gamma$ to the (2,1)-category of groupoids. We let $\mathfrak{Surf}^\Gamma\to \mathcal X^\Gamma$ be the corresponding symmetric monoidal category cofibered in groupoids over $\mathcal X^\Gamma$. 
\end{proposition}

On the complex analytic side, we define the tower of groupoids as follows: For any stable $\Gamma$-graph $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$, we have the smooth Deligne-Mumford stack $$\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}:=\prod\limits_{v\in V(X)}\tildeM^\Gamma_{w(v),L_v}(\mathbf{m}|_{L_v})$$ as in Appendix \ref{ap:specialization}. Following \cite[\S4]{BFM}, \cite[\S6.1]{BK:01}, to $(X,\mathbf{m},\mathbf{b})$ we attach the Poincare fundamental groupoid $\pi_1(\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}})$ of the above moduli stack. The objects are pointed admissible $\Gamma$-covers of (possibly disconnected) smooth projective curves with marked tangent vectors corresponding to $(X,\mathbf{m},\mathbf{b})$. The morphisms are 1-parameter $C^\infty$-families (considered up to homotopy) of such objects. By following the arguments from \cite{BK:01}, \cite[\S4.3.1]{BFM}, and Appendix \ref{ss:specalongclutch} we can define gluing functors for the above groupoids:
\begin{proposition}
Let $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ be a morphism in $\mathcal X^\Gamma$. Then we have a gluing functor between groupoids
\[
\mathcal G_{f,\pmb\gamma}:\pi_1(\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})\to \pi_1(\tildeM^\Gamma_{Y,\mathbf{m}_Y,\mathbf{b}_Y}).
\]
The assignment $(X,\mathbf{m}_X,\mathbf{b}_X)\mapsto \pi_1(\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})$ defines a  symmetric monoidal pseudo-functor from the category $\mathcal X^\Gamma$ to the (2,1)-category of groupoids. We let $\pi_1\tildeM^\Gamma
\to \mathcal X^\Gamma$ be the corresponding symmetric monoidal category cofibered in groupoids over $\mathcal X^\Gamma$.
\end{proposition}


In order to define $\Gamma$-crossed modular functors with central charge, we will need to consider certain central extensions of the towers of groupoids defined above. Firstly, for a real symplectic vector space $V\neq 0$ we define $\mathcal T_V$ to be the Poincare fundamental groupoid of the space of all Lagrangian subspaces of $V$. It will be convenient to set $\mathcal T_0$ to be the groupoid with only one object $0$, with $\Hom_{\mathcal T_0}(0,0)=\mathbb Z$. For a smooth oriented surface $\Sigma$ with boundary, let $cl(\Sigma)$ be the closed oriented surface obtained by gluing disks to all boundary components $\pi_0\partial(\Sigma)$. Then we have the intersection form on $H_1(cl(\Sigma),\mathbb R)$ making it a real symplectic vector space. 

We set $\mathcal T_{\Sigma}$ to be the groupoid $\mathcal T_{H_1(cl(\Sigma),\mathbb R)}.$ We refer to \cite[\S5.7]{BK:01}, \cite[\S4.1]{BFM} for more properties and details.
\begin{definition}
For $({X,\mathbf{m}_X,\mathbf{b}_X})\in \mathcal X^\Gamma$, let $\wtilde{\mathfrak{Surf}}^\Gamma({X,\mathbf{m}_X,\mathbf{b}_X})$ be the groupoid whose
\begin{enumerate}
\item  {\em objects} are tuples $$(\wtilde\Sigma\to \Sigma,\{\tilde{p}_h\}_{h\in \H(\Sigma)}, V(X)\cong \pi_0(\Sigma),H(X)\cong \pi_0\partial(\Sigma),\mathcal Y)$$ with $\mathcal Y\in \mathcal T_{\Sigma}$ and the remaining data being that of an object of  ${\mathfrak{Surf}}^\Gamma({X,\mathbf{m}_X,\mathbf{b}_X})$. 

\item A {\em morphism} in this groupoid between two objects 
\begin{center}
\xymatrix{
&(\wtilde\Sigma\to \Sigma,\{\tilde{p}_h\}_{h\in \H(\Sigma)}, V(X)\cong \pi_0(\Sigma),H(X)\cong \pi_0\partial(\Sigma),\mathcal Y)\ar[d]^{(\phi,\gamma)}\\
& \  (\wtilde\Sigma'\to \Sigma',\{\tilde{p}'_h\}_{h\in \H(\Sigma)}, V(X)\cong \pi_0(\Sigma'),H(X)\cong \pi_0\partial(\Sigma'),\mathcal Y')
}
\end{center}
is a pair $(\phi,\gamma)$, where $\phi$ is a morphism in the groupoid ${\mathfrak{Surf}}^\Gamma({X,\mathbf{m}_X,\mathbf{b}_X})$ and $\gamma:\phi_*(\mathcal Y)\to \mathcal Y'$ is a morphism in the groupoid $\mathcal T_{\Sigma'}$. 
\end{enumerate}
The forgetful functor of groupoids $\wtilde{\mathfrak{Surf}}^\Gamma({X,\mathbf{m}_X,\mathbf{b}_X})\to {\mathfrak{Surf}}^\Gamma({X,\mathbf{m}_X,\mathbf{b}_X})$  is a central extension by $\mathbb Z$ (cf. \cite[\S4.2]{BFM}).
\end{definition}

\begin{proposition}
Let $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ be a morphism in $\mathcal X^\Gamma$. Then we have a gluing functor between groupoids
\[
\wtilde{\mathcal G}_{f,\pmb\gamma}:\wtilde{\mathfrak{Surf}}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\to \wtilde{\mathfrak{Surf}}^\Gamma(Y,\mathbf{m}_Y,\mathbf{b}_Y).
\]
The assignment $(X,\mathbf{m}_X,\mathbf{b}_X)\mapsto \wtilde{\mathfrak{Surf}}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)$ defines a symmetric monoidal pseudo-functor from the category $\mathcal X^\Gamma$ to the (2,1)-category of groupoids. We let $\wtilde{\mathfrak{Surf}}^\Gamma\to \mathcal X^\Gamma$ be the corresponding symmetric monoidal category cofibered in groupoids over $\mathcal X^\Gamma$. 
\end{proposition}
\begin{proof}
By definition, objects of $\wtilde{\mathfrak{Surf}}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)$ consist of an object $$(\wtilde\Sigma\to \Sigma,\{\tilde{p}_h\}_{h\in \H(\Sigma)}, V(X)\cong \pi_0(\Sigma),H(X)\cong \pi_0\partial(\Sigma))\in {\mathfrak{Surf}}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)$$ along with $\mathcal Y\in \mathcal T_{\Sigma}.$ By Proposition \ref{prop:surfacegluing} we can glue the first part of the data along the morphism $(f,\pmb\gamma)$ in $\mathcal X^\Gamma$. The other part of the data i.e. $\mathcal Y\in \mathcal T_{\Sigma}$ only depends on the base surface $\Sigma$ (which corresponds to the untwisted case) and hence can be glued using \cite[\S5.7]{BK:01}, \cite[\S4.3]{BFM}. 
\end{proof}

On the complex analytic side, recall that we have the Hodge line bundles, which we denoted by $\Lambda$, on the moduli stacks $\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}$. By definition, the fiber of $\Lambda$ over a point $(\tildeC\to C,\wtilde{\mathbf{p}},\mathbf{p},\mathbf{v})\in \tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}$ is $\det(H^1(C,\mathcal O_C))^*$. Observe that the bundle $\Lambda$ is the pull back from the moduli space parameterizing the base curve $C$. 


The smooth projective complex curve $C$ has the structure of a smooth oriented compact closed surface, and hence we have its associated groupoid $\mathcal T_C$ of Lagrangians in the real symplectic vector space $H_1(C,\mathbb R)\cong H^1(C,\mathbb R)^*$ which can be identified with $H^1(C,\mathcal O_C)^*$ as a real vector space. By \cite[\S4.1]{BFM}, \cite[Thm. 6.7.7]{BK:01} for any smooth complex curve we have a canonical equivalence of groupoids
\begin{equation}\label{eq:equivofgroupoids}
\mathcal T_{C}\cong \pi_1({\det{}}^{\otimes 2}(H^1(C,\mathcal O_C))^*\setminus \{0\}).
\end{equation}
Let us denote the total space minus the zero section of the line bundle $\Lambda^{\otimes 2}$ on $\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}$  by $$\Lambda^{\otimes 2}_{\times}\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}\to \tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}.$$ It is a $\mathbb C^\times$-bundle over the base, hence the natural functor of groupoids  $$\pi_1(\Lambda^{\otimes 2}_\times\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}})\to \pi_1(\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}})$$ is a central extension by $\mathbb Z$. Using this we can define a central extension of the complex analytic tower of groupoids by $\mathbb Z$. Using the arguments of \cite[\S4.3]{BFM}, \cite[\S6.7]{BK:01} and Appendix \ref{ss:specalongclutch} we get:
\begin{proposition}
Let $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ be a morphism in $\mathcal X^\Gamma$. Then we have a gluing functor between groupoids
\[
\wtilde\mathcal G_{f,\pmb\gamma}:\pi_1(\Lambda^{\otimes2}_{\times}\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})\to \pi_1(\Lambda^{\otimes2}_{\times}\tildeM^\Gamma_{Y,\mathbf{m}_Y,\mathbf{b}_Y}).
\]
The assignment $(X,\mathbf{m}_X,\mathbf{b}_X)\mapsto \pi_1(\Lambda^{\otimes2}_\times\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})$ defines a  symmetric monoidal pseudo-functor from the category $\mathcal X^\Gamma$ to the (2,1)-category of groupoids. We let $\pi_1\Lambda^{\otimes2}_{\times}\tildeM^\Gamma
\to \mathcal X^\Gamma$ be the corresponding symmetric monoidal category cofibered in groupoids over $\mathcal X^\Gamma$.
\end{proposition}

Finally we have:
\begin{theorem}\label{thm:topanalytic}
For each $(X,\mathbf{m}_X,\mathbf{b}_X)\in\mathcal X^\Gamma$, we have canonical equivalences of groupoids
$$\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\cong \pi_1(\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X}) \ \mbox{ and } \wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\cong \pi_1(\Lambda^{\otimes2}_{\times}\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})
$$ which induce symmetric monoidal equivalences of categories cofibered in groupoids over $\mathcal X^\Gamma$
$$\mathfrak{Surf}^\Gamma\cong \pi_1\tildeM^\Gamma \mbox{ and } \ \wtilde\mathfrak{Surf}^\Gamma\cong \pi_1\Lambda^{\otimes2}_{\times}\tildeM^\Gamma.$$
\end{theorem}
\begin{proof}
The equivalence $\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\cong \pi_1(\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})$ has been established for $\Gamma$-corollas in Theorem \ref{thm:fundamentalgroupoidmappingclassgp}. In general both groupoids are defined as products of groupoids coming from $\Gamma$-corollas corresponding to the vertices of $(X,\mathbf{m}_X,\mathbf{b}_X)$. Moreover the above canonical equivalences are compatible with gluings along the morphisms of $\mathcal X^\Gamma$. In order to prove that $\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)\cong \pi_1(\Lambda^{\otimes2}_{\times}\tildeM^\Gamma_{X,\mathbf{m}_X,\mathbf{b}_X})$ it suffices to note that the additional data on both the sides comes from the base surface/curve which is the untwisted case. Hence using the same result from \cite[\S6.7]{BK:01}, \cite[\S4.2.3]{BFM} we complete the proof. 
\end{proof}

\subsection{Representations of the groupoids and their central extensions}
Let $\mathcal A$ be a groupoid. We denote the category of finite dimensional representations of $\mathcal A$ by $\Rep\mathcal A$. By definition a finite dimensional representation of $\mathcal A$ is a functor from the group $\mathcal A$ to the category $\Vec$ of finite dimensional complex vector spaces. Now suppose that $\wtilde{\mathcal A}\to \mathcal A$ is a central extension of groupoids by $\mathbb Z$, i.e.  for each object $\wtilde{A}\in \wtilde\mathcal A$ lying above $A\in \mathcal A$, $\Aut(\wtilde{A})$ is a central extension of $\Aut(A)$ by $\mathbb Z$, in particular the object $\wtilde{A}$ should have a canonical automorphism $\gamma_{\wtilde{A}}$ which generates the central copy of $\mathbb Z$ inside $\Aut(\wtilde{A})$. For $a\in \mathbb C^\times$, a representation $\rho:\wtilde{\mathcal A}\to \Vec$ is said to be of multiplicative central charge $a$ if for every $\wtilde{A}\in \wtilde\mathcal A$, the automorphism $\gamma_{\wtilde{A}}$ acts on $\rho(\wtilde{A})$ by the scalar $a$. We define $\Rep_a\wtilde\mathcal A$ to be the full subcategory of $\Rep\wtilde\mathcal A$ of representations with multiplicative central charge $a$.

Now for $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ we have seen that we have the two central extensions of groupoids by $\mathbb Z$, namely $\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})\to \mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$ and the complex analytic version $\pi_1(\Lambda^{\otimes 2}_\times\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}})\to \pi_1(\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}})$. Moreover, by Theorem \ref{thm:topanalytic}, the two above central extensions of groupoids are canonically equivalent. This fact combined with Deligne's \cite{Deligne1} Riemann-Hilbert correspondence (see Remark \ref{rk:delignerhc}) we obtain the equivalence of the following categories for every $c\in \mathbb C$:
\begin{equation}\label{eq:topanalyticequivalence}
\Rep_{e^{\sqrt{-1}\pi c}}\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})\cong \Rep_{e^{\sqrt{-1}\pi c}}(\pi_1(\Lambda^{\otimes 2}_\times\tildeM^\Gamma_{X,\mathbf{m},\mathbf{b}}))\cong \mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m},\mathbf{b}}).
\end{equation}
Moreover, by Theorem \ref{thm:topanalytic} and the definition of the specialization functors of twisted $D$-modules along clutchings (in Appendix \ref{ss:specalongclutch}), we see that the above equivalences are compatible with the gluing/clutching functors corresponding to morphisms in $\mathcal X^\Gamma$.
\subsection{Crossed modular functors}
We will now formulate the definition of $\Gamma$-crossed modular functors in terms of the towers of groupoids defined in the previous subsection. Let $(\mathcal C,\unit,R)$ be a $\Gamma$-crossed abelian category with the involutive duality denoted as $(\cdot)^*$.
\begin{definition}\label{def:topmodfun}
A $\mathcal C$-extended topological $\Gamma$-crossed modular functor of multiplicative central charge $a\in \mathbb C^\times$ consists of the following data:
\begin{itemize}
\item[1.] For each stable pair $(g,A)$ and $\mathbf{m}\in\Gamma^A$, (which we think of as corolla of weight $g$ and $A$-legs marked by $\mathbf{m}$) a topological conformal blocks functor
$$\tau_{g,A,\mathbf{m}}:\mathcal C^{\boxtimes A}_\mathbf{m}\rar{}\Rep_a\wtilde\mathfrak{Surf}^\Gamma(g,A,\mathbf{m}).$$
Once we have functors as above, we can canonically extend them to obtain functors
$$\tau_{X,\mathbf{m},\mathbf{b}}:\mathcal C^{\boxtimes H(X)}_\mathbf{m}\rar{}\Rep_a\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$$
for each $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$. 
\item[2.] For each morphism $(f,\pmb\gamma):(X,\mathbf{m}_X,\mathbf{b}_X)\to (Y,\mathbf{m}_Y,\mathbf{b}_Y)$ in $\mathcal X^\Gamma$ a natural isomorphism $G_{f,\pmb\gamma}$ between the two functors from $\mathcal C^{\boxtimes H(Y)}_{\mathbf{m}_Y}$ to $\Rep_a\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m}_X,\mathbf{b}_X)$:
$$G_{f,\pmb\gamma}:\tau_{X,\mathbf{m}_X,\mathbf{b}_X}\circ\mathcal R_{f,\pmb\gamma}\rar{}{\wtilde{\mathcal G}}^*_{f,\pmb\gamma}\circ \tau_{Y,\mathbf{m}_Y,\mathbf{b}_Y}$$
compatible with compositions of morphisms in $\mathcal X^\Gamma$.
\item[3.] A normalization $\tau_{0,3,\pmb{1}}(\unit\boxtimes\unit\boxtimes\unit)(S^2_3\times \Gamma\to S^2_3
, (p_1,1),(p_2,1),(p_3,1))\cong \mathbb C$, where $(S^2_3,p_1,p_2,p_3)$ is some standard Riemann sphere with 3 disks removed and three boundary points $p_1,p_2,p_3$, say as in \cite[Def. 3.4]{Prince} and where we have equipped it with the trivial $\Gamma$-cover. Note that $\mathcal T_{S^2}=\mathcal T_0$.
\item[4.] (Non-degeneracy.) Given any $\gamma\in \Gamma$ and non-zero $X\in \mathcal C_{\gamma}$, $$\tau_{0,3,(\gamma,\gamma^{-1},1)}(X\boxtimes X^*\boxtimes \unit)\neq 0.$$
\end{itemize}
\end{definition}

\begin{definition}\label{def:gen0topmodfun}
Recall that we have the full subcategory $\mathcal X^\Gamma_{0}\subset \mathcal X^\Gamma$ be the full subcategory formed by forests with all vertices having weight 0. We define a $\mathcal C$-extended topological $\Gamma$-crossed modular functor in genus 0 by replacing $\mathcal X^\Gamma$ with just the genus 0 part $\mathcal X^\Gamma_{0}$ and by replacing the tower of groupoids $\wtilde{\mathfrak{Surf}}^\Gamma$ with $\mathfrak{Surf}^\Gamma$ in Definition \ref{def:topmodfun}.
\end{definition}
\begin{remark}
In \cite{KP:08}, a slightly different definition of a $\Gamma$-crossed modular functor in genus zero is given, namely, all $\Gamma$-covers of surfaces are considered instead of considering only stable ones. Instead, we are considering the operation of forgetting 1-marked legs, i.e. attaching the trivial $\Gamma$-cover of the disk to $\Gamma$-covers of surfaces, which plays a similar role. Hence we see that the notion of $\mathcal C$-extended topological $\Gamma$-crossed modular functor in genus 0 as defined above agrees with the notion defined in \cite{KP:08}. Note that we have included non-degeneracy condition already in the definition of a $\Gamma$-crossed modular functor.
\end{remark}
\begin{proposition}\label{prop:top=analytic}
Let $\mathcal C$ be a $\Gamma$-crossed abelian category. Then the notion of a $\mathcal C$-extended complex analytic $\Gamma$-crossed modular functor of additive central charge $c$ is equivalent to the notion of a $\mathcal C$-extended topological $\Gamma$-crossed modular functor of multiplicative central charge $e^{\sqrt{-1}\pi c}$. Similarly, the notion of a $\mathcal C$-extended complex analytic $\Gamma$-crossed modular functor in genus 0 is equivalent to the notion of a $\mathcal C$-extended topological $\Gamma$-crossed modular functor in genus 0.
\end{proposition}
\begin{proof}
By (\ref{eq:topanalyticequivalence}), for each $(X,\mathbf{m},\mathbf{b})\in \mathcal X^\Gamma$ we have an equivalence of categories
$$\Rep_{e^{\sqrt{-1}\pi c}}\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})\cong \mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m},\mathbf{b}})$$ which is compatible with the morphisms in the category $\mathcal X^\Gamma$. In other words we can replace $\Rep_{e^{\sqrt{-1}\pi c}}\wtilde\mathfrak{Surf}^\Gamma(X,\mathbf{m},\mathbf{b})$ with $\mathscr{D}_c\Mod(\widetilde{\overline{\Mcal}}^\Gamma_{X,\mathbf{m},\mathbf{b}})$ in the definition of topological $\Gamma$-crossed modular functor. Then we exactly get the notion of the complex analytic $\Gamma$-crossed modular functor we defined in the previous section. Hence the two notions are equivalent. The same applies to the genus 0 case. 
\end{proof}



\subsection{Proof of Theorem \ref{thm:modfunmodcat}}\label{sec:proofsofthms}
Using the previous result we now complete the proof of Theorem \ref{thm:modfunmodcat}.  By the main theorem  in Section 5 of \cite{KP:08}, the notion of a $\mathcal C$-extended topological $\Gamma$-crossed modular functor in genus 0 is equivalent to equipping $\mathcal C$ with the structure of a $\Gamma$-crossed weakly ribbon category. On the other hand by Proposition \ref{prop:top=analytic} the notion of a $\mathcal C$-extended complex analytic $\Gamma$-crossed modular functor in genus 0 as defined in Section \ref{sec:crossedmodular} is equivalent to the notion of a $\mathcal C$-extended topological $\Gamma$-crossed modular functor in genus 0. Equation (\ref{eq:homspaces}) follows from the property (2) that holds for the equivalence established in \cite[\S5]{KP:08}. This completes the proof of Theorem \ref{thm:modfunmodcat}.


















\section{$\Gamma$-crossed modular functors from twisted conformal blocks}\label{sec:modfuntwistedconformal}
Let us now return to the setting of a finite group $\Gamma$ acting on a simple Lie algebra $\frg$. In this section, we discuss  how the twisted conformal blocks  associated to Galois covers of curves give a $\mathcal{C}$-extended $\Gamma$-crossed modular functor. We follow the notations of Sections \ref{sec:crossedabelian} and Section \ref{sec:deftwistconf}. In this section, we have the assumptions that ``$\Gamma$ preserves a Borel subalgebra of $\frg$" (See Remark \ref{rem:gammapreservesborel}). 

\subsection{$\Gamma$-crossed abelian category}\label{ss:twistedconfblockcrossedabelian}
Recall that for each $\gamma \in \Gamma$, we have the set $P^{\ell}(\frg,\gamma)$ that parameterizes representations of the twisted affine Kac-Moody Lie algebra $\widehat{L}(\frg,\gamma)$. We set $\mathcal{C}_{\gamma}$ to be the $\mathbb{C}$-linear semisimple abelian category whose simple objects are 
parameterized by  $P^{\ell}(\frg,\gamma)$. We 
define $\mathcal{C}:=\oplus_{\gamma\in \Gamma}\mathcal{C}_{\gamma}$ which is $\Gamma$-graded. 
\subsubsection{$\Gamma$-action on $\mathcal{C}$}\label{subsubsec:gammaaction}Let $\sigma$ be an automorphism on $\frg$ of order $|\sigma|$. Recall from Section \ref{sec:twistedaffinekm}, the eigenspaces $\frg_{\sigma, j}$ of $\frg$ with 
eigenvalue $\exp{\frac{2\pi{\sqrt{-1}}j}{|\sigma|}}$, where $0\leq j<|\sigma|$. Now if $\Gamma$ is a group acting on $\frg$ and let 
$\gamma$ and $\sigma$ be any two elements of $\Gamma$. Consider the map $\frg_{\sigma,j}\rightarrow 
\frg_{\gamma\sigma\gamma^{-1},j}$ obtained by sending $X$ to $\gamma X$ induces an 
isomorphism of the affine Lie algebras 
$$\psi_{\gamma}: \widehat{L}(\frg,\sigma)\rightarrow \widehat{L}(\frg,\gamma\sigma\gamma^{-1}).$$ Since the group $\Gamma$ acts on $\frg$, it follows that $\psi_{\gamma_1\gamma_2}=\psi_{\gamma_1}\circ \psi_{\gamma_2}$, where $\gamma_1$ and $\gamma_2$ are arbitrary elements of $\Gamma$.
 This in turns induces an action on the set of the simple objects  $\oplus_{\gamma \in \Gamma}P^{\ell}(\frg, \gamma)$ of $\mathcal{C}$. Observe that $\psi_{\sigma}$ induces the identity morphism on $\frg^{\sigma}$ and hence it acts by identity on $P^{\ell}(\frg,\sigma)$.
  Extending the action $\mathbb{C}$-linearly, we get an action on $\mathcal{C}$. 
\subsubsection{Invariant Object}Now observe that the simple objects of $\mathcal{C}_{1}$ 
are just elements in $P_{\ell}(\frg)$. This has a special object corresponding to the vacuum representation of the untwisted affine Kac-Moody Lie algebra which we  declare to be  the {\em $\Gamma$-invariant object $\unit$}. 
	\subsubsection{Symmetric Tensor}Let $\frg^{\gamma}$ be the Lie subalgebra of $\frg$ fixed by $\gamma$. 	For every weight $\mu \in P_{+}(\frg^{\gamma})$, let $\mu^{*}$ be the dominant 
	integral weight of $\frg^{\gamma}$ which is the highest weight of the dual representation $V_{\mu}$. Now it is easy to see (Lemma 5.3 in \cite{KH}) that $\mu \in P^{\ell}(\frg,\gamma)$ if and only if	$\mu^* \in P^{\ell}(\frg,\gamma^{-1})$. We define the following
	\begin{equation}\label{eqn:symmetricobject}
	R_\gamma:=\sum_{\mu \in P^{\ell}(\frg,\gamma)}\mu \boxtimes \mu^* \in \mathcal C_{\gamma}\boxtimes \mathcal C_{\gamma^{-1}},\  \mbox{and} \ R:=\oplus_{\gamma\in \Gamma}R_{\gamma}.
	\end{equation}
		By the definition of the action of $\Gamma$ on $\mathcal{C}$, the object $R$ is 
	clearly $\Gamma$-invariant. 
	Thus we have checked that the $\Gamma$-graded abelian category satisfies all the conditions of Definition \ref{def:crossedabeliancategory}.  
	\subsection{Twisted conformal blocks}For each stable pair $(g,A)$ and ${\bf m}\in \Gamma^{A}$ (see Definition \ref{def:cextenmodularfunctor} for notation) and $\vec{\lambda}\in \mathcal{C}_{{\bf m}}^{\boxtimes A}$, we assign the vector bundle of twisted covacua $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, \bf{p},\widetilde{\bf{v}})$ on $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,A}({\bf m})$. 
	By Theorem \ref{thm:atiyahalgebra}, we know that that the log Atiyah algebra $\mathcal{A}_{\Lambda}(-\log\widetilde{\Delta}^\Gamma_{g,A}(\mathbf{m}))$ acts on $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C, \widetilde{\bf{p}}, \bf{p},\widetilde{\bf{v}})$ with central charge $\frac{\ell\dim\frg}{2(\ell+h^{\vee}(\frg))}$. Here $\Lambda$ denote the pullback of the Hodge bundle of $\widetilde{\overline{\mathcal{M}}}_{g,A}$ 
	to $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,A}({\bf m})$ and $\widetilde{\Delta}^\Gamma_{g,A}(\mathbf{m})$ denotes the boundary divisor of  $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,A}({\bf m})$. Thus this assignment defines 
	a functor from $\mathcal{C}_{\bf{m}}^{\boxtimes{A}}$ to $\mathscr{D}_{c}\operatorname{Mod}\big(\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,A}({\bf{m}})\big)$, where $c=\frac{\ell\dim\frg}{2(\ell+h^{\vee}(\frg))}$. It 
	is clear that the above assignment, satisfies Condition (3) of Definition \ref{def:cextenmodularfunctor}. Motivated by the results of \cite{BK:01}, we have the following theorem.
	\begin{theorem}\label{conj:twistedaffineconfblocks}
		\label{conj:conformalblockismodular}The assignment above realizes sheaf of twisted covacua as a  $\mathcal{C}$-extended $\Gamma$-crossed modular functor with central charge $\frac{\ell\dim\frg}{2(\ell+h^{\vee}(\frg))}$, i.e. it satisfies the axioms of Definition \ref{def:cextenmodularfunctor}.
	\end{theorem}We give a proof of the above result in Section \ref{sec:proofofconfgammafunc}.
\subsection{Some consequences of the Theorem \ref{conj:twistedaffineconfblocks}}
Let us first state the following well known result about untwisted conformal blocks and modular functors (\cite{BK:01,Huang:08a,Huang:08b}). We continue to use the same notation as before, in particular, we consider the category $\mathcal C_1$ of level $\ell$ representations of the untwisted affine lie algebra.
\begin{theorem}\label{thm:oldconf}
The conformal blocks for the untwisted affine Lie algebra define a $\mathcal C_1$-extended modular functor of central charge $\frac{\ell\dim\frg}{2(\ell+h^{\vee}(\frg))}$. The associated weak ribbon category structure endowed on $\mathcal C_1$ is, in fact rigid, and hence $\mathcal C_1$ is a modular fusion category with additive central charge $\frac{\ell\dim\frg}{2(\ell+h^{\vee}(\frg))}$.
\end{theorem}
\begin{remark}
We remark that the rigidity statement above follows from the works \cite{Huang:08a,Huang:08b} of Huang. 
\end{remark}
\subsubsection{Proof of Theorem \ref{thm:oneofmain}}\label{sec:proofofoneofmain}
We can now deduce Theorem \ref{thm:oneofmain} as the consequences of Theorems \ref{thm:modfunmodcat} and \ref{conj:twistedaffineconfblocks}. Firstly, using Theorem \ref{conj:twistedaffineconfblocks}, we see that twisted conformal blocks give a $\mathcal{C}$-extended $\Gamma$-crossed modular functor. Here $\mathcal{C}=\mathcal{C}(\frg,\Gamma,\ell)$ is a $\Gamma$-graded abelian category such that the simple objects of each $\gamma$-component $\mathcal C_{\gamma}$ consists of $P^{\ell}(\frg,\gamma)$. 

By Theorem \ref{thm:modfunmodcat}, the $\Gamma$ graded category $\mathcal C(\frg,\Gamma,\ell)$ has a structure of a $\Gamma$-crossed weakly ribbon category satisfying Equation 
\begin{equation}
\operatorname{Hom}(\unit, \lambda_1\dot{\otimes} \lambda_2 \dot{\otimes} \lambda_3)=\begin{cases}
\mathcal V_{\vec{\lambda},\Gamma}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_3,\wtilde{\mathbf{v}}), & \text{if $m_1\cdot m_2\cdot m_3=1$}\\%\ \mbox{if $m_1.m_2.m_3=1.}\\
0 & \text{otherwise}.
\end{cases}
\end{equation}



 Moreover, by Theorem \ref{thm:oldconf}, $\mathcal C_1$ is rigid. Hence by Corollary \ref{cor:rigidity of graded categories} the whole of $\mathcal C(\frg,\Gamma,\ell)$ must be rigid. This completes the proof of Theorem \ref{thm:oneofmain}.

\subsection{Proof of Theorem \ref{conj:main1}}
We know that $\mathcal C(\frg,\Gamma,\ell)$ is a $\Gamma$-crossed modular fusion category. In particular, we have the associated categorical crossed S-matrices. In the next section we will give a proof of Theorem  \ref{conj:twistedaffineconfblocks}. An explicit description of the associated categorical crossed S-matrices has already been given by Proposition \ref{prop:charactertableviaSmatrix}. 
\begin{remark}\label{rem:cocyleszero}
Let $\gamma$ be an automorphism of $\frg$. Then $\gamma$ induces an automorphism of the abstract Cartan algebra $\frh$ as well as of the {\em abstract root system} preserving positive roots. Using Lemma 2.1 in \cite{AHR:18}, we have ${ }^\gamma V_{\lambda}{\cong} V_{\gamma\cdot\lambda}$, where $V_\lambda$ is a finite dimensional irreducible $\frg$-representation of highest weight $\lambda$, and moreover if we choose a Borel $\mathfrak{b}$ fixed by $\gamma$, then we get a canonical isomorphism. If a group $\Gamma$ acts on $\frg$, then we have an induced $\Gamma$-action on the {\em abstract root system} preserving the positive roots and let $\Gamma_\lambda$ be the stabilizer of $\lambda$. If the action of $\Gamma$ fixes a Borel $\mathfrak{b}$, then for each $\gamma\in \Gamma_\lambda$, we have a canonical isomorphism $T_\gamma:{ }^\gamma V_\lambda\xrightarrow{\cong} V_\lambda$.
Using this we can ensure that the cocycles $\varphi_{\rho}$ or $\varphi_D$ in the statements of Theorem \ref{thm:twisted verlinde}, Corollary \ref{cor:verlindeforcrossedmodfun} are trivial for twisted conformal blocks (see also \cite[Rem. 2.17(2)]{AHR:18}) if $\Gamma$ preserves a Borel subalgebra. Hence we obtain:
\end{remark}
\begin{corollary}\label{cor:main1}
The Verlinde formula (Theorem \ref{conj:main1}) holds for twisted conformal blocks associated with $\Gamma$-twisted affine Lie algebras with the crossed S-matrices given by Proposition \ref{prop:charactertableviaSmatrix}.
\end{corollary}
\begin{proof}
By Theorem \ref{conj:twistedaffineconfblocks} the twisted conformal blocks associated with $\Gamma$-twisted affine Lie algebras define a $\mathcal C$-extended $\Gamma$-crossed modular functor in arbitrary genus. Moreover by the  untwisted result Theorem \ref{thm:oldconf}, the neutral component $\mathcal C_1$ is rigid. Hence the hypothesis of Corollary \ref{cor:verlindeforcrossedmodfun} hold for this $\Gamma$-crossed modular functor and hence $\mathcal C$ is a $\Gamma$-crossed modular fusion category. Moreover we have seen in the above remark that the cocycles that appear in Corollary \ref{cor:verlindeforcrossedmodfun} in this case are all trivial. Hence Corollary \ref{cor:verlindeforcrossedmodfun} Equation (\ref{eq:verlindeforcrossedmodfun}) applied to this case gives us the Verlinde formula Theorem \ref{conj:main1}. The associated categorical crossed S-matrices have already been computed in Proposition \ref{prop:charactertableviaSmatrix}.
\end{proof}






\section{Proof of Theorem \ref{conj:twistedaffineconfblocks}}\label{sec:proofofconfgammafunc} In this section, we prove that the twisted conformal blocks, under the assumption that ``$\Gamma$ preserves a Borel subalgebra of $\frg$" satisfy the axioms of a $\mathcal{C}$-extended $\Gamma$-crossed modular functors. Our proof of Theorem \ref{conj:twistedaffineconfblocks} follows the 
same line of proofs as in Chapter 7 of \cite{BK:01}. We construct the morphism of 
functors $G_{f,\gamma}$ (see Definition \ref{d:gammacrossedmodfun}) in the case of twisted conformal blocks. 
\subsection{Verdier Specialization}\label{sec:specializationdeverdier} Let $S$ be a complex manifold and $D$ be a smooth divisor in $S$ with ideal sheaf $\mathcal{I}_D$. Let $\operatorname{Conn}^{\reg}(S,D)$ be the category of integrable connections on $S\backslash D$ with logarithmic singularities along $D$. The category $\operatorname{Conn}^{\reg}(S,D)$ is a subcategory of $\operatorname{Hol}(S)$ of holonomic $\mathcal{D}_S$-modules on $S$.


Let $j: S\backslash D \hookrightarrow S$ be the inclusion, then any object of $\operatorname{Conn}^{\reg}(S,D)$ is given by a locally free $\mathcal{O}_S$-module $\mathcal{F}$ of finite rank along with an action of $\mathcal{D}_S^0$, where $\mathcal{D}_S^0$ is the ring of differential operators on $S$ that preserve the ideal $\mathcal{I}_D$. The corresponding holonomic $\mathcal{D}_S$-module is $j_*\mathcal{O}_{S\backslash D}\otimes_{\mathcal{O}_S}\mathcal{F}$. Moreover, by Deligne's Riemann-Hilbert correspondence \cite{Deligne1}, we get an equivalence between $\operatorname{Conn}^{\reg}(S,D)$ and the category $\operatorname{Loc}(S\setminus D)$ of local systems on $S\setminus D$. 


Further, let $ND$ be the normal bundle of the smooth divisor $D$ in $S$, the Verdier specialization \cite{Ver1, Ver2} functor $\widetilde{Sp}_D: \operatorname{Hol}(S)\rightarrow \operatorname{Hol}(ND)$, restricts to a functor 
$$\widetilde{\operatorname{Sp}}_D:\operatorname{Conn}^{\reg}(S,D)\rightarrow \operatorname{Conn}^{\reg}(ND,D).$$

We have the following diagram: 
$$
\xymatrix{
	\operatorname{Conn}^{\reg}(S,D)\ar[r]^{\widetilde{Sp}_D} &\operatorname{Conn}^{\reg}(ND,D)
	\\
	\operatorname{Loc}(S\backslash D) \ar[r]\ar[u] &  \operatorname{Loc}(ND\backslash D),\ar[u]\\}
$$ where the vertical arrows  are equivalence of categories given by Deligne's Riemann-Hilbert correspondence. The horizontal arrow on the bottom is given by restrictions of representations of the fundamental group obtained by applying the tubular neighborhood theorem.  The above functor $\widetilde{\operatorname{Sp}}_D$ can be described as follows. 

The structure sheaf of the normal bundle $\mathcal{O}_{ND}$ is isomorphic to ${\bigoplus}_{m\geq 0}\mathcal{I}^m/\mathcal{I}^{m+1}$ and $\mathcal{D}_{ND}^{0}={\bigoplus}_{m\geq 0}\mathcal{I}^m\mathcal{D}_{S}^{0}/\mathcal{I}^{m+1}\mathcal{D}^0_S$. Now given a $\mathcal{D}_S^0$-module $\mathcal{F}$, the module 
\begin{equation}\label{eqn:specializationformula}
\widetilde{\operatorname{Sp}}_D(\mathcal{F}):={\bigoplus}_{m\geq 0}\mathcal{I}^m\mathcal{F}/\mathcal{I}^{m+1}\mathcal{F}.
\end{equation}
 is naturally a $\mathcal{O}_{ND}$-module as well as a $\mathcal{D}^0_{ND}$-module. The above definition of specialization functor is just the graded sum of the $V$-filtration on the $\mathcal{D}_S^0$-module $\mathcal{F}$. The notion of $V$-filtration is due to Kashiwara \cite{Kashiwara} and Malgrange \cite{Malgrange} and the fact that Equation \eqref{eqn:specializationformula} gives the Verdier specialization follows generalizations of the definition of the nearby cycles functor using the $V$-filtration. We refer the reader to  \cite[Theorem 4.7.8.5]{Ginzburg} and \cite[Section 3]{Saito}.


Let ${\Lambda}$ be a line bundle on $S$ as before and let $D$ be a smooth divisor. Let $c$ be a rational number and consider the category $\mathscr{D}_{\Lambda,c}\operatorname{Mod}(S)$ of locally free sheaves of $\mathcal{O}_S$-modules with an action of $\mathcal{A}_{c\Lambda}(-\log D)$. Formula \eqref{eqn:specializationformula} gives a functor:
$$\widetilde{\operatorname{Sp}}_D: \mathscr{D}_{\Lambda,c}\operatorname{Mod}(S)\rightarrow \mathscr{D}_{p^*\Lambda,c}\operatorname{Mod}(ND),$$ where $p: ND\rightarrow S$ factors through the natural projection. 
 


\subsection{Gluing functor along a smooth divisor}\label{sec:gluingfunckirillov}
Let $(\widetilde{C},C, \widetilde{\bf {p}},{\bf p},\widetilde{\bf{v}} )$ be a family of $n$-pointed $\Gamma$-covers with chosen non-zero tangent vectors 
at the 
marked points in $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}(\bf{m})$ parameterized by a smooth variety $S$.  Consider a smooth divisor $D$ in $S$ such that $C\rightarrow S$ 
restricted to $D$ is a family of stable $n$-pointed curves with exactly one node. We consider the variety 
$$\widetilde{N}D=\{(d,\widetilde{v}',\widetilde{v}'') | \ d \in D, \widetilde{v}'\in T'_a\widetilde{C}_d, \widetilde{v}'' \in T''_a \widetilde{C}_d\},$$ where $\widetilde{C}_d$ is 
the fiber of $\pi: \widetilde{C} \rightarrow S$ at a point $d \in D$, $a$ is any chosen point of $\widetilde{C}_d$ which lifts the  node in $C_d$ and $T'_a\widetilde{C}_d$ (respectively $T''_a\widetilde{C}$) is the 
tangent space to $\widetilde{C}_d$ at $a$ along the two components. By Equation \eqref{eqn:decompositionofnormalbundle}, the normal bundle to the divisor $ND$ has fiber $T'_a \widetilde{C}_d\otimes T''_a\widetilde{C}_d$. Hence there is a natural map $ \widetilde{N}D\rightarrow ND$ that sends the tuple $(d,\widetilde{v}',\widetilde{v}'')\rightarrow (d,\widetilde{v}'\otimes \widetilde{v}'')$. Now let $FND$ be 
the frame bundle of $ND$ that preserves the decomposition as in Equation \eqref{eqn:decompositionofnormalbundle} and let $\widetilde{N}^{\times}D$ be the variety 
$$\widetilde{N}^{\times}D:=\{(d,\widetilde{v}',\widetilde{v}'')\in \widetilde{N}D| \ \widetilde{v}'\neq 0 \ \mbox{and} \ \widetilde{v}''\neq 0\}.$$  The natural map $\widetilde{N}D \rightarrow ND$ restricted to $ \widetilde{N}^{\times}D\rightarrow FND$ is a $\mathbb{G}_m$-torsor. From Diagram \eqref{eq:clutching for normal bundle}, we get the following:
$$
\xymatrix{
\widetilde{N}^{\times}D\ar[r]& FND \ar[d]^{\mathbb{G}_m-torsor} & \\
&D\ar[r]&S
}
$$
Given the family $\widetilde{C}\rightarrow S$ restricted to $D$, we associate a natural family $\widetilde{C}_N\rightarrow \widetilde{N}^{\times}D$ of $n+1$-pointed 
$\Gamma$ covers in $\widetilde{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}(\bf{m},\gamma, \gamma^{-1})$ parameterized by $\widetilde{N}^{\times}D$. The fiber over a point $(d,\widetilde{v}',\widetilde{v}'')\in \widetilde{N}^{\times}D$, 
is the $(n+2)$-pointed curve $\widetilde{C}_{N,d}$ obtained by normalizing the curve $\widetilde{C}_d$, two more marked points $\widetilde{q}_1$ and 
$\widetilde{q}_2$ (with image $q_1$ and $q_2$ in $C_N=\widetilde{C}_N/\Gamma$) which is in the preimage of the nodal point $a$ and $\widetilde{v}'$ 
(respectively $\widetilde{v}''$) are non-zero tangent vectors at $q_1$ (respectively $q_2)$ to the curve $\widetilde{C}_{N,d}$.
 To the data $(\widetilde{C}_N,C_N, {\widetilde{\bf{p}}},\widetilde{q}_1,\widetilde{q}_2, {\bf{p}}, q_1,q_2, \widetilde{{\bf{v}}},\widetilde{v}',\widetilde{v}'')$, 
 we associate the vector bundle of twisted covacua:
\begin{equation}
\label{eqn:vectorbundleonnormalization}
\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{N}^{\times}D):=\bigoplus_{\mu \in P^{\ell}(\frg,\gamma)}\mathcal{V}_{\vec{\lambda}\cup\{\mu,\mu^*\},\Gamma}(\widetilde{C}_N,C_N, {\widetilde{\bf{p}}},\widetilde{q}_1,\widetilde{q}_2, {\bf{p}}, q_1,q_2, \widetilde{{\bf{v}}},\widetilde{v}',\widetilde{v}'').
\end{equation} By the constructions in Section \ref{sec:twistedconnectiontwistedKZ}, the above vector bundle is also a twisted $\mathcal{D}$-module on $\widetilde{N}^{\times}D$. 
Now to define the {\em gluing functor} (see Definition \ref{d:gammacrossedmodfun} ), it is enough to construct an isomorphism of twisted $\mathcal{D}_{\widetilde{N}^{\times}D}$-modules 
$$G_{\gamma}:\operatorname{Sp}_{D}(\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{{\bf p}},{\bf{p}},\widetilde{\bf{v}})\simeq \mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{N}^{\times}D), $$ 
where $\operatorname{Sp}_{D}$ is the functor defined in Section \ref{ss:specalongclutch} and Equation \eqref{eqn:specializationdeverdier}. By the same argument as in Chapter 7.8 in \cite{BK:01}, we get that $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{N}^{\times }D)$ is $\mathbb{C}^{\times}$-equivariant and monodromic and hence descends to a vector bundle (also denoted by $\mathcal{V}_{\vec{\lambda},\Gamma}(N^{\times }D))$ on $ND$ with a projective action of the Lie algebra $\mathcal{D}^{0}_{ND}$-differential operators on $ND$ that preserve the zero section. Also by construction and discussion in Section \ref{sec:specializationdeverdier}, we get   $\operatorname{Sp}_D$ is the pullback from $N^{\times}D$, of the functor $\widetilde{\operatorname{Sp}}_D$. Hence it is enough to show that there exists isomorphisms. 
$$\widetilde{G}_{\gamma}: \widetilde{\operatorname{Sp}}_{D}(\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{{\bf p}},{\bf{p}},\widetilde{\bf{v}})\simeq \mathcal{V}_{\vec{\lambda},\Gamma}({N}^{\times}D).$$

\subsection{Families over a formal base}As before let $D$ be a smooth divisor in a smooth scheme $S$ and let $\tau$ be a local equation of $D$ in $S$. 
The $m$-th infinitesimal neighborhood $D^{(m)}$ has structure sheaf $\mathcal{O}_S/\tau^{m+1}\mathcal{O}_S$.  

Given a family of nodal $\Gamma$ covers as in Section \ref{sec:gluingfunckirillov}, we choose formal parameters at the marked points and get a family  
$(\widetilde{C},C, \widetilde{\bf p},{\bf{p}},\widetilde{\bf z})$ of $\Gamma$-covers  in $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$ parameterized by a smooth scheme $S$. 
We consider the family $(\widetilde{C}_N, C_N, \widetilde{\bf{p}}', {\bf p}', \widetilde{{\bf z}}')$ 
parameterized by $D$ obtained by equivariant  normalization of $\widetilde{C}\rightarrow S$ restricted to $D$. Let $\eta_1$ and $\eta_2$ be two chosen coordinates on the two 
components of the family $\widetilde{C}\rightarrow S$ in a neighborhood of a double point $a(d)$ so that $\eta_1\eta_2=\tau$ and moreover, the double point is given by the equation 
$\eta_1=0$ and $\eta_2=0$.  Since the group $\Gamma$ acts transitively on $\widetilde{C}$ and by assumption $C$ has only one node, the other double points of $\widetilde{C}$ are in 
the orbit $\Gamma. a$.

On the normalization $\widetilde{C}_N$, both $\eta_1$ and $\eta_2$ are formal coordinates of the inverse image $\widetilde{q}_1(d)$ and $\widetilde{q}_2(d)$ of $a(d)$. By the $\Gamma$-action 
we get formal coordinates in the full inverse image of the $\Gamma$ orbit of $a(d)$. Hence we get a family of $\Gamma$-covers in $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m}, \gamma,\gamma^{-1})$. In this section, 
following the proof of Theorem  7.8.5 in \cite{BK:01}, we extend the family $(\widetilde{C},C, \widetilde{\bf p},{\bf{p}},\widetilde{\bf z})$ to a family  $\widetilde{C}_{N,D^{(m)}}\rightarrow D^{(m)}$ 
of $(n+2)$-pointed $\Gamma$-covers in $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf{m}, \gamma,\gamma^{-1}})$ parameterized by the $m$-th infinitesimal neighborhood $D^{(m)}$ of $D$
\subsubsection{Family of $\Gamma$-covers over $m$-th infinitesimal neighborhood} We need to first define a sheaf of algebras $\mathcal{O}_{\widetilde{C}_{N,D}}^{(m)}$ over $\widetilde{C}_N$ 
with the structure of a flat $\mathcal{O}_{D^{(m)}}$-module. Let $U=\widetilde{C}_N\backslash \Gamma.\widetilde{q}_1(D)\cup \Gamma.\widetilde{q}_2(D)$. Since $\widetilde{C}_N$ is the normalization 
of $\widetilde{C}$, we get that $U$ is also equal to $\widetilde{C}\backslash \Gamma.a(D)$. We define  ${\mathcal{O}_{\widetilde{C}_{N,D}}^{(m)}}_{|U}:={\mathcal{O}_{\widetilde{C}_D}^{(m)}}_{|U}$,
where $\widetilde{C}_D$ is the restriction of the family $C\rightarrow S $ to $D$ and $\mathcal{O}_{\widetilde{C}_D}^{(m)}$ is the flat $\mathcal{O}_{D^{(m)}}$-module given 
by $\mathcal{O}_{\widetilde{C}}/\tau^{m+1}\mathcal{O}_{\widetilde{C}}$. We extend the sheaf of $\mathcal{O}_{\widetilde{C}_{N,D}}^{(m)}$ across $\Gamma. \widetilde{q}_1$ and $\Gamma.\widetilde{q}_2$ 
by defining the stalks at $\widetilde{q}_1$ and $\widetilde{q}_2$ and 
extending it to the 
orbits 
of $\widetilde{q}_1$ and $\widetilde{q}_2$  via the $\Gamma$ action. As in \cite{BK:01}, let $\mathcal{O}_0(\eta_1)$ (respectively $\eta_2$) be the ring of germs of analytic functions in $\eta_1$ 
(respectively $\eta_2$) in  a 
neighborhood of $\eta_1=0$ (respectively $\eta_2=0$). We define the stalks at $\widetilde{q}_1$ and $\widetilde{q}_2$ to be $\mathcal{O}_{\widetilde{C}_{N,D},\widetilde{q}_i}^{(m)}:=\mathcal{O}_0(\eta_i)\otimes \mathcal{O}_D^{(m)}$ for $1\leq i\leq 2$. For each $\widetilde{q}_i$ in the $\Gamma$-orbits of the points given by normalization, the map $\eta_i \rightarrow \eta_i$ and $\tau\rightarrow \eta_1\eta_2$ 
gives a 
map from $\mathcal{O}_{\widetilde{C}_N,D,\widetilde{q}_i}$ to $\mathcal{O}_{\widetilde{C}_N,D}^{(m)}(V_i)$ where $V_i\subset U$ is a punctured neighborhood  of $\widetilde{q}_i$. Hence we 
define the sheaf $\mathcal{O}_{\widetilde{C}_{N,D}}^{(m)}$ as the gluing given by the above morphism. The action of $\Gamma$ is stable around the nodes and the local picture at a node $a$ 
is given by the following:
$$\operatorname{Spec}(A[x,y]/(xy=\tau))\xrightarrow{f} \operatorname{Spec}(A[x',y']/(x'y'=\tau^N))\rightarrow \operatorname{Spec}A,$$
where $f^*x'=x$, $f^*y'=y$ and $\tau\in A$. Moreover, if $\gamma$ is a generator of $\Gamma_a$, then $\gamma$ acts on $x$ (respectively $y$ ) by $\zeta$ (respectively $\zeta^{-1}$),
where $\zeta$ is a chosen $N$-th root of unity and the stabilizer of the nodes is cyclic of order $N$. From this it directly follows that the gluing morphism is $\Gamma$-equivariant and hence $\mathcal{O}_{\widetilde{C}_{N,D}}^{(m)}$ defines 
a family of curves with $\Gamma$-action. The family $\widetilde{C}_{N, D^{(m)}}$ defines a family of $n+2$-pointed $\Gamma$ covers where the section $\widetilde{{\bf p}}$ extend to sections of $\widetilde{C}_{N,D^{(m)}}$ trivially as $\widetilde{C}_{N,D^{(m)}}$ coincides with $\mathcal{O}^{(m)}_{\widetilde{C}_D}$ away from the locus of $\Gamma. \widetilde{q}_1 \cup \Gamma.\widetilde{q}_2$ along with formal parameters $\widetilde{\eta}$. 
Moreover, $\widetilde{q}_1$ and $\widetilde{q}_2$ provide two additional sections with formal 
parameters $\eta_1$ and $\eta_2$. 
\subsection{Sheaf of covacua over a formal base}Let $\mathcal{F}$ be a $\mathcal{O}_S$ quasicoherent sheaf on $S$, then $\mathcal{F}^{(m)}:=\mathcal{F}/\tau^{m+1}\mathcal{F}$ gives 
a sheaf over $D^{(m)}$. If $\mathcal{F}$ is coherent, then $\mathcal{F}^{(m)}$ is also coherent (Lemma 7.6.2 in \cite{BK:01}).  Let $(\widetilde{C}, C, \widetilde{{\bf p}}, {\bf p}, \widetilde{{\bf z}})$ be a family of $\Gamma$ covers, we 
can associate the following locally free sheaf of covacua on $S$ of finite rank 
$$\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{{\bf p}}, {\bf p}, \widetilde{{\bf z}}):=\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_S/
	(\frg\otimes \mathcal{O}_{\widetilde{C}}(\ast \Gamma.\widetilde{\bf{p}})^{\Gamma})\cdot\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_S.$$ 
	We denote by $\mathcal{V}^{(m)}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{{\bf p}}, {\bf p}, \widetilde{{\bf z}})$, the coherent sheaf over $D^{(m)}$. By Lemma 7.6.2 in \cite{BK:01}, 
	we get the following lemma:
	\begin{lemma}\label{lemma:conformalformal}The coherent sheaf
	$\mathcal{V}^{(m)}_{\vec{\lambda},\Gamma}(\widetilde{C}, C, \widetilde{{\bf p}}, {\bf p}, \widetilde{{\bf z}})$ is isomorphic to 
	the quotient 
	of $\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_{D^{(m)}}$ by the sheaf $(\frg\otimes \mathcal{O}_{\widetilde{C}_{D}}^{(m)}(\ast \Gamma .\widetilde{\bf p})^{\Gamma}).\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_{D^{(m)}}$. \end{lemma}
	
	Thus given an $n$-tuple $\vec{\lambda}$ of level $\ell$ weights, and a family of curves over $D^{(m)}$, we can use the above Lemma to define 
	(see also Equation 7.6.3 in \cite{BK:01}) the sheaf of covacua $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C}_{N,D^{(m)}}, \widetilde{{\bf p}}', {\bf p}', \widetilde{\bf z}')$ on a $m$-th 
	infinitesimal 
	neighborhood of a divisor $D$. 
	\subsubsection{Twisted $\mathcal{D}$-module structure over a formal base}Let as before $S$ be a smooth scheme and $D$ be a smooth divisor in $S$ and let $\mathcal{I}$ 
	be the ideal sheaf of $D$ in $S$. Let $\mathcal{D}_S$ be the sheaf of first order differential operators on $S$ and let $\mathcal{D}_S^0$. For each positive integer $m$ 
	consider 
	the sheaf $\mathcal{D}^0_{D^{(m)}}:=\mathcal{D}_S^0/\mathcal{I}^{m+1}\mathcal{D}^0_S$. Similarly consider the sheaf $\mathcal{D}^{(0)}_S:=\mathcal{D}^0_S/\mathcal{I}\mathcal{D}^0_S$ of $\mathcal{O}_D$-modules. By Proposition 7.8.4 (iii) in \cite{BK:01}, the sheaf $\mathcal{D}^{0}_S$ is canonically isomorphic to the sheaf $\mathcal{D}_{ND}^{(0)}:=\mathcal{D}^0_{ND}/\mathcal{I}\mathcal{D}^0_{ND}$, where $\mathcal{D}^0_{ND}$ is the sheaf of differential operators on $ND$ that preserve the ideal $\mathcal{I}$ and $\mathcal{I}$ is the ideal sheaf of the divisor $D$ in $ND$. 
	

Let $\mathcal{F}$ be a sheaf of $\mathcal{O}_S$-module and let $\operatorname{Gr}^m(\mathcal{F}):=\mathcal{I}^{m}\mathcal{F}/\mathcal{I}^{m+1}\mathcal{F}$, then $\operatorname{Gr}^m(\mathcal{F})$ are $\mathcal{D}^{(0)}_S$-modules. Moreover, we can define 
\begin{equation}
\widetilde{\operatorname{F}}^m(\widetilde{\operatorname{Sp}}_D(\mathcal{F})):= \mathcal{I}^m\widetilde{\operatorname{Sp}}_D(\mathcal{F})/\mathcal{I}^{m+1}\widetilde{\operatorname{Sp}}_D(\mathcal{F})=\operatorname{G}^m(\mathcal{F}).
\end{equation}
	


	 \iffalse
	 
	 Moreover, we assume the following: 
	 \begin{enumerate}
	 	\item $\mathcal{E}_{n}$ (respectively $\mathcal{F}_{n}$) be a filtration of $\mathcal{E}$(respectively $\mathcal{F}$) such that $\cap_{n}\mathcal{E}_n=\emptyset$
	 	\item $f:\mathcal{E}\rightarrow \mathcal{F}$ be a morphism that preserves filtrations and is $f$ is  projectively flat. 
	 	\item The induced map $f_n: \mathcal{E}_n/\mathcal{E}_{n+1}\simeq \mathcal{F}_n/\mathcal{F}_{n+1}$,
	 	 	\end{enumerate}then $f: \mathcal{E}\rightarrow \mathcal{F}$ is an isomorphism. 
	 \end{lemma}
 \begin{proof}Let $\mathcal{K}$ be the kernel of $f$. If $\mathcal{K}$ is non trivial, then we can find $M$ such that $\mathcal{K} \subset \mathcal{E}_M\backslash \mathcal{E}_{M+1}$. This implies that $\mathcal{K}$ is in the kernel of the map  $f_n:\mathcal{E}_M/\mathcal{E}_{M+1}\rightarrow \mathcal{F}_M/\mathcal{F}_{M+1}$. But this assumption , the map $f_n$ is an isomorphism, hence $\mathcal{K}$ is trivial. Since the map $f$ is projectively flat, it follows that the rank of $f$ is constant. Hence the quotient $\mathcal{F}/\mathcal{E}$ is torsion free. This completes the proof. 
 	\end{proof}
 
 \fi
	\subsection{Twisted sewing functor}Let $\mu \in P^{\ell}(\frg,\gamma)$ and $\mu^* \in P^{\ell}(\frg,\gamma^{-1})$ and let $\mathcal{H}_{\mu}(\frg,\gamma)$ and
 $\mathcal{H}_{\mu^*}(\frg,\gamma^{-1})$ be the corresponding highest weights integrable 
 modules for the twisted affine Lie algebra $\widehat{L}(\frg,\gamma)$ and $\widehat{L}(\frg,\gamma^{-1})$ respectively. Let $L_{k,{\langle \gamma\rangle }}$ be the $k$-th $\gamma$-twisted Virasoro operator as constructed in \cite{KacWakimoto:88, Wakimoto}. There is a natural grading on $\mathcal{H}_{\mu}(\frg,\gamma)$ by $\mathbb{Z}_{+}$. They are defined as follows: 
\begin{equation}\label{eqn:eigen1}
\mathcal{H}_{\mu}(\frg,\gamma)(d):=\{ |\Phi\rangle| L_{0,{\langle \gamma\rangle }}(|\Phi\rangle )=(\Delta_{\mu}+\frac{d}{N})|\Phi\rangle \},
\end{equation}
 where $\Delta_{\mu}$ is eigen value of the twisted $L_{0,{\langle \gamma \rangle }}$ acting on the finite dimensional highest weight $\frg^{\gamma}$ module with highest weights $\mu$ and $N$ is the order of $\gamma$. From the explicit description of $\mathcal{H}_{\mu}(\frg,\gamma)$ as a quotient of a Verma module and the fact (\cite{Wakimoto},\cite{KacWakimoto:88}) that $$[L_{0,{\langle \gamma \rangle }},X(m)]=-\frac{m}{N}X(m),$$ it follows that 
$$\mathcal{H}_{\mu}(\frg,\gamma)=\bigoplus_{i=0}^{\infty}\mathcal{H}_{\mu}(\frg,\gamma)(d).$$
 By Lemma 8.4 in \cite{KH}(see 
Lemma 4.14 in \cite{U} for the untwisted case), there exists a unique up to constant 
non-degenerate bilinear form 
\begin{equation}\label{eqn:bilform}
( \ | \ )_{\mu}: \mathcal{H}_{\mu}(\frg,\gamma )\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})\rightarrow \mathbb{C}.
\end{equation}
 such that
 for any  $|\Phi_1 \rangle $, $|\Phi_2\rangle $ in $\mathcal{H}_{\mu}(\frg,\gamma)$ and $\mathcal{H}_{\mu^*}(\frg,\gamma^{-1})$, we have the following equation:
\begin{equation}\label{eqn:bilo}
(X({m}).|\Phi_1 \rangle||\Phi_2\rangle  )_{\mu}+ (|\Phi_1\rangle | X({-m}).|\Phi_2\rangle ))_{\mu}=0,
\end{equation}
where $m$ is an integer and $X(m)=X\otimes t^{m}\in \widehat{L}(\frg,\gamma)$. 

Moreover, the form $( \ | \ )_{\mu}$ has the following properties: 
\begin{itemize}
\item $( \ | \ )_{\mu}$ restricted to  $\mathcal{H}_{\mu}(\frg,\gamma)(d)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})(d')$ is zero unless $d=d'$. 
\item $( \ | \ )_{\mu}$ restricted to $V_{\lambda}\otimes V_{\lambda^*}$ is the unique (upto scalars) $\frg^{\gamma}$-invariant bilinear form.
\end{itemize}
Here $\mathcal{H}_{\mu}(\frg,\gamma)(d)$ denote the degree $d$ part of $\mathcal{H}_{\mu}(\frg,\gamma)$. 

 Let $m_d$ be the dimension of $\mathcal{H}_{\mu}(\frg,\gamma)(d)$ and 
we choose a basis $\{v_{\mu,1}(d),\dots, v_{\mu,m_d}(d)\}$ of $\mathcal{H}_{\mu}(\frg,\gamma)$ and let $\{v^{\mu,1}(d),\dots, v^{\mu,m_d}(d)\}$ be the basis
 of $\mathcal{H}_{\mu^*}(\frg,\gamma^{-1})$ dual 
with respect to the bilinear form $( \ | \ )_{\mu}$. 

Consider the following element (see Section 8 in \cite{KH}, Chapter 4 in \cite{U}):
$$\gamma_{\mu,d}=\sum_{i=1}^{m_d}v_{\mu,i}(d)\otimes v^{\mu,i}(d)\in \mathcal{H}_{\mu}(\frg,\gamma)(d)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})(d)$$ and the {\em twisted
sewing element} $$\gamma_\mu:=\sum_{d\geq 0}\gamma_{\mu,d}\tau^d \in \mathcal{H}_{\mu}(\frg,\gamma)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})[[\tau]].$$
It
 is easy to check that both $\gamma_{\mu,d}$ and $\gamma_{\mu}$ are independent of the chosen basis of $\mathcal{H}_{\mu}(\frg,\gamma)(d)$. We further, observe that for each $\mu \in \mathcal{H})_{\mu}(\frg,\gamma)$, we have the following equality  which follows directly from the formula in Lemma 2.3 in \cite{Wakimoto}
 \begin{equation}
 \label{eqn:equalityoftraceanomaly}
 \Delta_{\mu}=\Delta_{\mu^*}.
 \end{equation}
 Using the 
  twisted sewing element $\gamma_{\mu}$ one defines a map: 
  \begin{align*}
  \quad \iota_{\mu}:\mathcal{H}_{\vec{\lambda}}\otimes \mathcal{O}_{D}[[\tau]]&\rightarrow \mathcal{H}_{\vec{\lambda}}\otimes \mathcal{H}_{\mu}(\frg,\gamma)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})[[\tau]], \\
\sum_{i} |\Phi \rangle \tau^{i}&\rightarrow \sum_{i,d}|\Phi\rangle \otimes \gamma_{\mu}.
\end{align*}

We have the following proposition:
\begin{proposition}\label{prop:importantflateness}
	 $\bigoplus_{\mu \in P^{\ell}(\frg,\gamma)}\iota_{\mu}$ induces an isomorphism of $\mathcal{O}_{D^{(m)}}$-modules $\mathcal{V}_{\vec{\lambda},\Gamma}^{(m)}(\widetilde{C},C, \widetilde{\bf{p}}, {\bf p}, \widetilde{\bf{z}})$ and $\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C}_{N,D^{(m)}},\widetilde{\bf{p}}', {\bf p}', \widetilde{\bf{z}}')$ for each $m\geq 0$. Moreover, the projective action of $\mathcal{D}^0_{D^{(m)}}$ preserve each component $\iota_{\mu}$ and the projective action of $\tau\partial_{\tau}$ commutes projectively (i.e up to a scalar multiplication) with $\iota_{\mu}$. 
\end{proposition}
\begin{proof}
The proof of the first part of the proposition can be found in \cite{KH} and for the untwisted case we refer the reader to \cite[Section 6]{TUY:89}, \cite{BK:01} and \cite{Looijenga}. We now discuss the second part of the proof. We can lift the vector field $\theta=\tau\partial_{\tau}$ to an $\Gamma$ invariant vector field  $\widehat{\theta}$ over $\widetilde{C}_{N,D^{(m)}}$ such that around $\widetilde{q}_1$ and $\widetilde{q}_2$, the local expansion is of the form $\alpha.\eta_1 \partial_{ \eta_1}$ and $\beta. \eta_2 \partial_{\eta_2}$ and $\alpha+\beta=1$. Here $\eta_1$ and $\eta_2$ are special formal coordinates. Thus we need to show that the projective action of $\tau\partial_{\tau}$ commutes up to a fixed scalar with the map $\iota_{\mu}$ as a map of conformal blocks. This follows directly from Lemma \ref{lem:proj}.
\end{proof}
\begin{lemma}\label{lem:proj}The following equality holds as operators on $\mathcal{H}_{\mu}(\frg,\gamma)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})[[\tau]]$:
$$\tau\partial_{\tau}(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^{d})-(\tau\partial_{\tau}(f|\Phi\rangle ))\otimes \gamma_{\mu,d}\tau^{d}=-N.\Delta_{\mu}(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^d),$$ where $N$ is the order of $\gamma$.
\end{lemma}
\begin{proof}
	By the definition of the action of $\tau\partial_{\tau}$ and applying the Liebnitz rule, we get that the left hand side of the equation in the statement of the lemma is equivalent to 
	\begin{eqnarray*}
f|\Phi\rangle\otimes (\tau\partial_{\tau}.(\gamma_{\mu,d}\tau^d))&=& d(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^{d})+f|\Phi\rangle \otimes (\tau\partial_{\tau}.\gamma_{\mu,d})\tau^d\\
&=& d(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^{d})+\sum_{i=1}^{m_d}f|\Phi\rangle (\tau\partial_\tau.(v_{\mu,i}\otimes v^{\mu,i}))\tau^d\\
&=&d(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^{d}) +\sum_{i=1}^{m_d}f|\Phi\rangle \bigg(\alpha.(\eta_1\partial_{\eta_1}.v_{\mu,i})\otimes v^{\mu,i}\\
&& \quad \quad +\beta.v_{\mu,i}\otimes (\eta_2\partial_{\eta_2}.v^{\mu,i})\bigg)\tau^d\\
&=&d(f|\Phi\rangle \otimes \gamma_{\mu,d}\tau^{d})+ \sum_{i=1}^{m_d}f|\Phi\rangle\bigg(\alpha.(-N\Delta_{\mu}-d)v_{\mu,i}\otimes v^{\mu,i})\\
&&\quad +\beta.v_{\mu,i}(-N\Delta_{\mu}-d)v^{\mu,i}\bigg)\tau^d.
	\end{eqnarray*}
Here we have used the fact that $\eta_i\partial_{\eta_i}$ acts (see Equation \eqref{eqn:viractionimp}) by $-NL_{0,{\langle \gamma \rangle}}$ and Equation \eqref{eqn:eigen1} to compute the action of $L_{0,\langle \gamma\rangle }$. Now since by the choice of the lift $\alpha+\beta=1$, the lemma follows.
	\end{proof}
We have the following corollary of Proposition \ref{prop:importantflateness}:
\begin{corollary}\label{cor:importantflatness}The maps $\bigoplus_{\mu}\iota_{\mu}$ induce an isomorphism of $$ \operatorname{G}^m(\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},C,\widetilde{\bf p}, {\bf p}, \widetilde{\bf z})) \simeq\operatorname{G}^m(\mathcal{V}_{\vec{\lambda},\Gamma}(N^{\times }D))$$ that preserves the projective action of $\mathcal{D}_S^{(0)}$ on the left and $\mathcal{D}_{ND}^{(0)}$-action on the right for all $m\geq0$.
\end{corollary}
\begin{proof}The proof of the corollary follows from Proposition \ref{prop:importantflateness} along with the observation that $\operatorname{G}^m(\mathcal{F})$ is the kernel of the natural surjective map from $\mathcal{F}^{(m)}\twoheadrightarrow \mathcal{F}^{(m-1)}$.
	\end{proof}
Since the vector bundles of twisted covacua descend as $\mathcal{D}^0$ modules on $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m})$, without loss of generality, we can assume that we have chosen formal neighborhood around the marked points. Now the twisted sewing construction and the Corollary \ref{cor:importantflatness} imply the following: 
\begin{theorem}\label{thm:specializationfunctorexplicit}The sewing construction induces an isomorphism of locally free sheaves 
	$$\widetilde{G}_{\gamma}: \widetilde{\operatorname{Sp}}_D(\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},{C},\widetilde{\bf p}, {\bf p}, \widetilde{{\bf z}}))\simeq \mathcal{V}_{\vec{\lambda},\Gamma}(N^{\times} D)$$ which preserves the projective action of $\mathcal{D}^0_{ND}$. Here  $\mathcal{V}_{\vec{\lambda},\Gamma}(N^{\times} D)$ is as in Equation \eqref{eqn:vectorbundleonnormalization}.
\end{theorem}
\begin{proof}The non-degenerate bilinear form $( \ | \ )_{\mu}$ given by Equation \eqref{eqn:bilo} induces a canonical element $\gamma_{\mu,d} \in \mathcal{H}_{\mu}(\frg,\gamma)\otimes \mathcal{H}_{\mu^*}(\frg,\gamma^{-1})$. Now consider the element $\sum_{d\geq 0}\gamma_{\mu,d}$ and	the following map 
	$$\widetilde{G}_{\gamma}:\mathcal{H}_{\vec{\lambda}}\rightarrow \mathcal{H}_{\vec{\lambda}}\otimes \mathcal{H}_{\mu}\widehat{\otimes}\mathcal{H}_{\mu^{*}}, \ |\varphi\rangle \rightarrow |\varphi \otimes \sum_{d\geq 0}\gamma_{\mu,d}\rangle. $$ The structure sheaf of $ND$ is $\bigoplus_{m\geq 0}\mathcal{I}^m/\mathcal{I}^{m+1}$ and hence all but finitely many elements in the sum $\sum_{d\geq 0}\gamma_{\mu,d}$ lies in $\mathcal{I}^M\mathcal{H}_{\vec{\lambda},\mu,\mu^*}$.
	 
	Hence  the map
 $\widetilde{G}_{\gamma}$ induces a map between $\widetilde{\operatorname{Sp}}_{D}(\mathcal{V}_{\vec{\lambda},\Gamma}(\widetilde{C},{C},\widetilde{\bf p}, {\bf p}, \widetilde{{\bf z}}))$ and the sheaf $\mathcal{V}_{\vec{\lambda},\Gamma}(N^{\times} D)$.  Since the twisted zero-th Virasoro operator $L_{0,\langle \gamma \rangle}$ preserve $\mathcal{H}_{\mu}(\frg,\gamma)(d)$ and acts diagonally, it follows that  $\widetilde{G}_{\gamma}$ preserves the projective connections. Thus, the rank of $\widetilde{G}_{\gamma}$ is constant (\cite[Lemma A.1]{Belkale:09}). We are now reduced to show that the map $\widetilde{G}_{\gamma}$ is an isomorphism in a formal neighborhood of $D$ in $ND$. 
 \iffalse
 By construction of the twisted connection and the definition of the specialization functor, it follows that the projective logarithmic $\mathcal{D}$-module structure in both the source and target descend from $\widehat{\overline{\mathcal{M}}}{}^{\Gamma}_{g,n}({\bf m},\gamma,\gamma^{-1})$. Hence without loss of generality, we  can choose formal parameters $\widetilde{{\bf z}}$ along the section $\widetilde{\bf{p}}$ of the family $\widetilde{C}\rightarrow S$.  
 \fi
	
		We will be done if we can show that for any $m\geq0$, the 	induced map $$\widetilde{G}^{(m)}_{\gamma}: \big(\widetilde{\operatorname{Sp}}_{D}\mathcal{F}\big)^{(m)}\rightarrow \mathcal{V}^{(m)}_{\vec{\lambda},\Gamma}({N}^{\times} D).$$
	Now the proof of the theorem follows from  Corollary \ref{cor:importantflatness}.
	\end{proof}

	\iffalse
\section{Twisted Fusion ring associated to automorphisms of $\frg$
\begin{remark}\label{rk:kacmoodyvscategorical}
Let $\mathfrak{g}$ be a 
finite dimensional Lie algebra which is simply laced. 
Let $D(\frg)$ be the Dynkin 
diagram of $\frg$. A diagram automorphism 
$\sigma$ of $\frg$ is a graph automorphism 
of the Dynkin diagram $D(\frg)$. Let $N$ be
the order of $\sigma$. It is well known that $N\in \{1,2,3\}$. We
can extend $\sigma$ to an automorphism of the Lie algebra $\frg$. 
To this data, one can (see \cite{FSS})
attach a new Lie algebra 
$\frg_{\sigma}$ known as the orbit Lie algebra. 
We enumerate the vertices $I$ of $D(\frg)$ as
in \cite{Kac} by integers. 
\iffalse
One defines
a new matrix $|\check{I}|\times |\check{I}|$-matrix $\check{A}$ by taking sums of rows related by 
the automorphism $\sigma$ by the following formula: 
\begin{equation}
	\label{eqn:foldingmatrix}
	\check{A}_{ij}:=s_i\frac{N_i}{N}\sum_{a=0}^{N-1}A_{\sigma^{a}i,j}, \mbox{where} \ s_i=1-\sum_{a=1}^{N_i-1}A_{\sigma^{a}i,i}.
\end{equation}
By the above formula, we get that $\check{A}$ is an indecomposable Cartan matrix of finite type and the associate simple Lie algebra is denote by $\frg_{\sigma}$.
\fi
Further  denote by $\frg^{\sigma}$ 
the Lie algebra of $\frg$ fixed by $\sigma$.  The Lie algebras
$\frg_{\sigma}$ 
and 
$\frg^{\sigma}$ are Langlands dual to each other. The following list is from \cite{FSS}: 

\iffalse
We briefly recall the construction from Section 2 in \cite{FSS} for completeness. 

Let $A$ denote the Cartan matrix of $\frg$ and let $I$ be the set of the
vertices of the Dynkin diagram. 
\fi


\begin{table}[htbp]\label{table:orbitLie1}
	\begin{center}
	
		\label{tab:table1a}
		\begin{tabular}{l|c|c|r}
			\hline
Case&			$\mathfrak{g}$  & $\frg_{\sigma}$ &$\frg^{\sigma}$ \\
			\hline
			\hline
	1&		$A_{2n}$, $n\geq 2$ & $C_n$&$B_n$\\
		2&	$A_{2n-1}$, $n\geq 3$& $B_n$& $C_n$ \\
		3&	$D_{n+1}$, $n\geq 4$ & $C_n$& $B_n$\\
		4&	$D_{4}$ & $G_2$ &$G_2$\\
		5&	$E_6$ & $F_4$& $F_4$ \\
			\hline
		\end{tabular}
	\end{center}
\end{table}

\iffalse
\begin{itemize}
	\item If $\frg=A_{2n}$, then $\frg_{\sigma}=C_n$.
	\item If $\frg=A_{2n-1}$,then  $\frg_{\sigma}=B_n$.
	\item If $\frg=D_{n+1}$, then  $\frg_{\sigma}=C_n$. 
	\item If $\frg=D_4$, then  $\frg_{\sigma}=G_2$. 
	\item If $\frg=E_6$, then  $\frg_{\sigma}=F_4$. 
\end{itemize}
\fi
We fix an enumeration the orbit representatives such
that it is the smallest in the orbit. More precisely 
$$\check{I}=\{i \in I | i \leq \sigma^{a}(i), \ \mbox{and}\  0\leq a \leq N-1\}.$$Let $N_i$ 
denote the
order of the orbit at $i\in I$. 
Let $P(\frg)^{\sigma}$ denote the set of integral weights which are invariant 
under $\sigma$ and consider the fundamental weights $\omega_1,\dots, \omega_{\operatorname{rank}{\frg}}$ of $\frg$.  The following is an easy observation:
\begin{lemma}\label{lem:bijecofweights}
	There is a natural bijection $\iota:P(\frg)^{\sigma}\rightarrow P(\frg_{\sigma})$ which 
	has 
	the following properties:
	\begin{enumerate}
		\item For $i\in \check{I}$, we get $\sum_{a=0}^{N_i}\iota(\omega_{\sigma^{a}i})=\omega_{i}$
		\item $\iota(\overline{\rho})=\overline{\rho}_{\sigma}$, where $\overline{\rho}$ and $\overline{\rho}_{\sigma}$ are 
		sums of the fundamental weights of $\frg$ and $\frg_{\sigma}$ respectively. 
	\end{enumerate}
\end{lemma}






\iffalse

\begin{notation}Recall that $\mathring{\mathfrak{g}}$ denote the finite dimensional algebra whose Cartan matrix is obtained by deleting the $0$-th row and column of $X_N^{(m)}$.  Throughout Sections \ref{sec:comp1}-\ref{sec:comp4}, $\mathring{Q}$ will denote
the root lattice $Q(\mathring{\mathfrak{g}})$; $\Lambda_i$'s  will denote the affine fundamental weights of $\frg(X_N^{(m)})$ and $\overline{\Lambda}_i$ will denote their orthogonal horizontal projects with respect to invariant bilinear form $\frg(X_N^{(m)})$; $\omega_1,\dots. \omega_{\operatorname{rank \mathring{\mathfrak{g}}}}$ will denote the fundamental weights of $\mathring{\mathfrak{g}}$; and the weight $\omega_0$ of the trivial representation of $\mathring{\mathfrak{g}}$ will be considered as the zero-th fundamental weight. Moreover $M^*$ denotes the dual lattice of $\mathring{Q}$ with respect to the Killing form $\kappa_{\mathfrak{g}}$ (Proposition \ref{prop:formulaforkg})
\end{notation}
\subsection{Integrable Highest weight representations of $A_{2n-1}^{(2)}$}\label{sec:comp1}
\iffalse
In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=B_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n-1}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the orthogonal projection to $C_n$ under the normalized invariant bilinear form on $\mathfrak{g}(A_{2n-1}^{(2)})$  denoted by $\kappa_{\mathfrak{g}}$. For notational conveniences, we let $\omega_0$ to be weights corresponding to the trivial representation of $C_n$ and regard it as the $0$-th fundamental weights.
\fi
In this case $\mathring{\mathfrak{g}}=C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n-12}
P^{\ell}(\mathfrak{g}(A_{2n-1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(C_{n})| b_1+2(b_2+\dots+b_n)\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{n+1}^{(2)}$}\label{sec:comp2}In this case ${\mathring{\mathfrak{g}}}=B_n$. As in the previous case, it turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$  are  can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforDn+12}
P^{\ell}(\mathfrak{g}(D_{n+1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(B_n)| 2(b_1+\dots+b_{n-1})+b_n\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{4}^{(3)}$}\label{sec:comp3} In this case, $\mathring{\mathfrak{g}}=\mathfrak{g}_2$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}$ is also $\mathfrak{g}_2$.  Then $\overline{\Lambda}_1=\omega_2$ and $\overline{\Lambda}_2=\omega_1$, where $\omega_1$ and $\omega_2$ are the fundamental weights of the Lie algebra $\mathfrak{g}_2$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforD43}
P^{\ell}(\mathfrak{g}(D_4^{(3)}))=\{b_1\omega_1+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.
\end{equation}

\subsection{Integrable Highest weight representations of $E_{6}^{(2)}$}\label{sec:comp5}In this case $\mathring{\mathfrak{g}}=\mathfrak{f}_4$ Then $\overline{\Lambda}_1=\omega_4$ and $\overline{\Lambda}_2=\omega_3$, $\overline{\Lambda}_3=\omega_2$ and $\overline{\Lambda}_4=\omega_1$, where $\omega_1,\dots,\omega_4$ are the fundamental weights of the Lie algebra $\mathfrak{f}_4$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforE62}
P^{\ell}(\mathfrak{g}(E_6^{(2)}))=\{b_1\omega_1+\dots+ b_4\omega_4\in P_{+}(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.
\end{equation}

\subsection{S-matrix for $A_{2n-1}^{(2)}$}\label{sec:comp6}Let $P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n-1}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n-i}$ of the vertices of the Dynkin diagram of $A_{2n-1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n-1}b_{i}(\omega_i+\omega_{2n-i})+b_n\omega_n\in P_{+}(A_{2n-1})| 2(b_1+\dots+b_{n-1})+b_n\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $A_{2n-1}$ under the action of the involution $\sigma$ is $B_n$, there is a natural bijection between $\iota:P(A_{2n-1})^{\sigma}\rightarrow P(B_n).$ Thus under the map $\iota$ restricts to a bijection:
\begin{equation}
\label{eqn:idf1}
\iota:P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_{n+1}^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $B_n$ and $C_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(B_n)\rightarrow \mathfrak{h}(C_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i, \ \mbox{for $1\leq i\leq n$},$$ and where $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively dual Coxeter) label of the Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n-1}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n-1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{n+1}^{(2)}))$. We recall the following formula \cite{Kac} for the crossed $S$-matrix ${S}^{(\ell)}(A_{2n-1}^{(2)})$ whose $(\lambda,\mu)$-th entry is given by the formula:
\begin{align}
	\label{{eqn:SmatrixforA2n-12}}{S}_{\lambda,\mu}^{(\ell)}(A_{2n-1}^{(2)})=
 i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{align}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)


\subsection{S-matrix for $D_{n+1}^{(2)}$}\label{sec:comp7}Let $P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{n+1}^{(1)})$ which are fixed by the involution which exchanges the $n$ and $n+1$-th vertices of the Dynkin diagram of $D_{n+1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}b_{i}\omega_i+b_n(\omega_n+\omega_{n+1})\in P_{+}(D_{n+1})| b_1+2(b_1+\dots+b_{n})\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{n+1}$ under the action of the involution $\sigma$ is $C_n$, there is a natural isomorphism between $\iota:P(D_{n+1})^{\sigma}\rightarrow P(C_n)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{eqn:idff4}
\iota:P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(A_{2n-1}^{(2)}))
\end{equation}and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $C_n$ and $B_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(C_n)\rightarrow \mathfrak{h}(B_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i,$$ where $1\leq i \leq n$ and $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{n+1}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{n+1}^{(2)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{n+1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(A_{2n-1}^{(2)}))$. The $(\lambda,\mu)$-th entry of the crossed $S$-matrix ${S}_{\lambda,\mu}^{(\ell)}(D_{n+1}^{(2)})$ is
\begin{equation}\label{{eqn:SmatrixforDn+12}}
	{S}^{(\ell)}_{\lambda,\mu}(D_{n+1}^{(2)})=
	i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{equation}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)



\subsection{S-matrix for $D_{4}^{(3)}$}\label{sec:comp8}Let $P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{4}^{(1)})$ which are fixed by rotation $\sigma$ that rotates the $1\rightarrow 3\rightarrow4\rightarrow 1$-th vertices of the Dynkin diagram of $D_{4}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_3+\omega_4)+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{4}$ under the action of the involution $\sigma$ is $\mathfrak{g}_2$, there is a natural isomorphism between $\iota:P(D_{4})^{\sigma}\rightarrow P(\mathfrak{g}_2)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{idf2}
\iota:P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_4^{(3)}))
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{g}_2$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{g}_2)\rightarrow \mathfrak{h}(\mathfrak{g}_2), \  \omega_2 \rightarrow \frac{a_2}{a_2^{\vee}}\omega_1, \ \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_2,$$ where $1\leq i \leq 2$ and $a_{1},a_{2}$ (respectively $a_1^{\vee},a_2^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{4}^{(3)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{4}^{(3)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{4}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{4}^{(3)}))$. We recall the following formula \cite{Kac}:
\begin{equation}	\label{{eqn:SmatrixforD43}}
	{S}^{(\ell)}_{\lambda,\mu}(D_{4}^{(3)})=
	i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{3}}{|M^*/(\ell+6)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+6}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}))\bigg), 
\end{equation}
where $\overline{\rho}$ denotes the sum of the fundamental weights of $\mathfrak{g}_2$


\subsection{S-matrix for $E_{6}^{(2)}$}\label{sec:comp4}Let $P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(E_{6}^{(1)})$ which are fixed by rotation $\sigma$ that interchanges $1$-st with $5$-th;$2$-th with $4$-th and fixes the $3rd$ and $6$-th vertices of the Dynkin diagram of $E_{6}$. It can be described explicitly as. 
$$P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_5)+b_2(\omega_2+\omega_4)+ b_3\omega_3+ b_4\omega_6\in P_+(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.$$
Since the orbit Lie algebra of $E_{6}$ under the action of the involution $\sigma$ is $\mathfrak{f}_4$, there is a natural bijection between $\iota:P(E_{6})^{\sigma}\rightarrow P(\mathfrak{f}_4)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}
\label{eqn:idf2}
\iota:P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(E_6^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{f}_4$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{f}_4)\rightarrow \mathfrak{h}(\mathfrak{f}_4), \  \omega_4 \rightarrow \frac{a_4}{a_4^{\vee}}\omega_1, \ \omega_3\rightarrow \frac{a_3}{a_3^{\vee}}\omega_2, \ \omega_2\rightarrow \frac{a_2}{a_2^{\vee}}\omega_3, \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_4,$$ where  $a_{1},a_{2},a_3, a_4$ (respectively $a_1^{\vee},a_2^{\vee},a_3^{\vee},a_4^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(E_{6}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({E_{6}^{(2)}}))$ and $ P^{\ell}(\frg(E^{(1)}_{6}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(E_{6}^{(2)}))$. We recall the following formula from \cite{Kac}
\begin{align}
	\label{{eqn:SmatrixforE62}}
	{S}^{(\ell)}_{\lambda,\mu}(E_{6}^{(2)})=
	\sqrt{2}i^{|\mathring{\Delta}_{+}|}|M^*/(\ell+12)\mathring{Q}|^{-\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+12}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho})\bigg), 
\end{align}
where $\overline{\rho}$  denotes the sum of the fundamental weights of $\mathfrak{f}_4$







\subsection{S-matrix for $A_{2n}^{(2)}$}In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=C_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the projection to $C_n$ under the normalized invariant bilinear form on  denoted by $\kappa_{\mathfrak{g}}$. Now let $\omega_0,\omega_1,\dots,\omega_n$ denote the fundamental weights of $C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n2}
P^{\ell}(\mathfrak{g}(A_{2n}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_{+}(C_n)| 2(b_1+b_2+\dots+b_n)\leq \ell \}.
\end{equation}


\begin{remark}\label{rem:altdef}
	With the convention of the numbering of the vertices of the affine Dynkin diagram in the case $A_{2n}^{(2)}$, we get the fixed point Lie algebra is of type $B_n$ whereas $\mathring{\mathfrak{g}}=C_n$. However it is sometimes convenient to choose a different ordering of the vertices of the Dynkin diagram such that the new horizontal subalgebra is same as the fixed point algebra $B_n$. This can be done if we renumber the vertices  by reflecting about the $n$-th vertex of the affine Dynkin diagram. Under the new numbering system we get an alternate description
	\begin{equation}\label{eqn:a2n}
	P^{\ell}(\frg(A_{2n}^{(2)}))=\{\sum_{i=1}^n{\widetilde{b}_i}\omega_i\in P_{+}(B_n)| \widetilde{b}_1+\dots+\widetilde{b}_{n-1}+\frac{\widetilde{b}_{n}}{2}\leq \frac{\ell}{2}, \ \ell-\widetilde{b}_n \ \mbox{is even}\},
	\end{equation}
	where $\widetilde{\omega}_1,\dots,\widetilde{\omega}_n$ are fundamental weights of the Lie algebra of type $B_n$. In particular, we observe that $P^{1}(\frg,\sigma)=\{\omega_n\}$. 
	We refer the reader to compare it with the description of $P^{\ell}(\frg,\gamma)$ in \cite{KH}.
\end{remark}

Let $P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n+1-i}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}a_{i}(\omega_i+\omega_{2n-i})\in P_+(A_{2n})| 2(b_1+\dots+b_n)\leq \ell\}.$$ Under the map $\iota: P(A_{2n})^{\sigma}\rightarrow P(C_n)$, there is a natural bijection between $\iota: P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}\rightarrow P^{\ell}(\frg({A_{2n}^{(2)})})$. Hence we will identify the two using the map $\iota$.
The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}$ respectively. We recall the following Theorem 13.8 \cite{Kac}
\begin{equation}
\label{{eqn:SmatrixforA2n2}}
{S}^{(\ell)}_{\lambda,\mu}(A_{2n}^{(2)})=i^{|\mathring{\Delta}_{+}|}(\ell+2n+1)^{-\frac{1}{2}}\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n+1}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \mu+\overline{\rho})\bigg), 
\end{equation}where $\overline{\rho}$ denotes the sum of the fundamental weights of $C_n$. Moreover, the matrix ${S}^{(\ell)}(A_{2n}^{(2)})$ has the following properties \cite{Kac}.
\begin{proposition}\label{prop:propertiesofSmatrixA2n2}
	\label{prop:unitarityforSmatrixA2n2}The matrix $\big({S}^{(\ell)}(A_{2n}^{(2)})\big)_{\lambda,\mu}={S}^{(\ell)}_{\lambda,\mu}({A_{2n}^{(2)}})$  is symmetric and unitary. 
\end{proposition}
\iffalse
\subsubsection{Crossed $S$-matrices associated to arbitrary automorphisms}\label{sec:croosedarbitrary}
Let $\gamma$ be an arbitrary automorphism of a simple Lie algebra $\frg$ and let $\widehat{L}(\frg,\gamma)$ denote the twisted Kac-Moody Lie algebra as defined in Section \ref{sec:affineLiealgtwisted}. Recall there is a natural isomorphism of $\widehat{L}(\frg,\gamma)$ with an twisted affine Kac-Moody Lie algebra of type $X_N^{(m)}$, where the Lie algebra $\frg$ is of type $X_N$ and $X_N^{(m)}$ is determined by the diagram automorphism  $\sigma$ arising from $\gamma$.
Thus there are  natural bijections $$\beta_1: P_{\ell}(\frg)^{\gamma}\simeq P_{\ell}(\frg)^{\sigma}, \ \mbox{and} \ \beta_2:P^{\ell}(\frg,\langle \gamma \rangle )\simeq P^{\ell}(\frg(X_N^{(m)})).$$
Let for any element $(\lambda,\mu)\in P^{\ell}(\frg,\gamma)\times P_{\ell}(\frg)^{\gamma}$, consider the number \begin{equation}\label{eqn:crossedsgeneral}
S^{\gamma}_{\lambda,\mu}:=S^{(\ell)}_{\beta_1(\lambda),\beta_2(\mu)}(X_N^{(m)}),
\end{equation}
where $S^{(\ell)}(X_N^{(m)})$ is the crossed S-matrix at level $\ell$  given by equations \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}}, \ref{{eqn:SmatrixforD43}}, \ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}.
\begin{definition}
 We define the {\em crossed S-matrix} $S^{\gamma}$ at level $\ell$ associated to $\gamma$ to be a matrix whose rows  and columns are parameterized by $P^{\ell}(\frg,\langle \gamma \rangle)$ and $P_{\ell}(\frg)^{\gamma}$ and whose $(\lambda, \mu)$-th entry $S_{\lambda,\mu}^{\gamma}$ is given by Equation \eqref{eqn:crossedsgeneral}.
 \end{definition}
\fi
\subsection{Relation with untwisted S-matrices}\label{sec:comparision}This section is motivated by the two observations. First, the equivariantization of a $\Gamma$-crossed modular functor is a modular functor, hence crossed $S$-matrices must be submatrices of an uncrossed $S$-matrix. Secondly, in the {\tt KAC} software, the uncrossed $S$-matrices and the crossed $S$-matrices of type $A_{2n}^{(2)}$ are available for computational purposes.   One can compute all crossed $S$-matrices in the remaining types using {\tt KAC} as follows:



Let $A$ be a Cartan matrix of either of the following types $$A: A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_6^{(2)}, D_4^{(3)}.$$
We consider the Cartan matrix $A^{t}$ obtained by taking transpose of the matrix $A$. In these cases,  observe that the affine Lie algebra associated to $A^t$ is of untwisted type. They are given as: $$A^t: B_n^{(1)}, C_n^{(1)}, F_4^{(1)}, G_2^{(1)}.$$ If $\mathring{A}$ and $\mathring{A}^t$ denote the Cartan matrix obtained by deleting the $0$-th row and column, then we get $\frg(\mathring{A})$ and $\frg(\mathring{A}^t)$ are Langlands dual. 
Define  the map $\tau:\mathfrak{h}(A)\rightarrow {\mathfrak{h}}(A^t)$ by the following:
	\begin{equation}\label{eqn:transposemap}
	\Lambda_i \rightarrow\frac{a_i^{\vee}}{a_i}\Lambda_i^{t}, \ \delta \rightarrow \delta^t, 
	\end{equation}
	where $\Lambda_0,\dots,\Lambda_n$ (respectively $\Lambda_0^{t},\dots,\Lambda_n^{t}$) are affine fundamental weights for the affine Lie algebra associated to $A$ (respectively $A^t$) and $\delta$ (respectively $\delta^t$) as in Section \ref{sec:twistedaffinekmnew}. We now consider the map $\mathring{\tau}: P^{\ell}(\mathfrak{g}(A))\hookrightarrow P^{\ell+h^{\vee}-h}(\mathfrak{g}(A^{t}))$ given by the formula 
\begin{equation}\label{weirdshift}
\mathring{\tau}(\lambda):=\tau(\lambda+\overline{\rho})-\overline{\rho}^t,
\end{equation}
where $\overline{\rho}$(respectively $\overline{\rho}^t$) are sum of the fundamental weights of the horizontal subalgebra of $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. 

The affine Lie algebras of type $A^{t}$ are all untwisted affine Kac-Moody Lie algebra, hence denote by $S_{\lambda,\mu}^{(\ell)}(A^t)$-the $(\lambda,\mu)$-th entry of the  $S$-matrix of type $A^t$ at level $\ell$. We refer the reader to Chapter 13 in \cite{Kac} for more details. The following proposition is well known  and can be checked directly. We also refer the reader to Proposition 3.2 in \cite{AG}.

\begin{proposition}\label{prop:crossedvsuncrossed}
	Let $\mathfrak{g}(A)$ be a twisted affine Kac-Moody Lie algebra associated to the Cartan matrix $A$ of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, D_4^{(3)}, E_6^{(2)}$, then the crossed $S$ matrices are related to the $S$ matrices of $\mathfrak{g}(A^t)$ by the following formula
	$${S}_{\lambda,\mu}^{(\ell)}(A)=|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|^{\frac{1}{2}}S_{\mathring{\tau}(\lambda),{\tau}\circ\tau_{\kappa}(\mu)}^{(\ell+h^{\vee}-h)}(A^t),$$ where $h^{\vee}$ and $h$ are the dual Coxeter numbers of the Lie algebra $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. Moreover, $|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|$ is two when $A$ is either $A^{(2)}_{2n-1}$, $D^{(2)}_{n+1}$ and $E^{(2)}_6$ and is three when $A$ is of type $D_4^{(3)}$.
\end{proposition}
\subsubsection{Some computations}\label{sec:usefulcomputations}
We list the following facts which are very useful in computing the crossed S-matrices. Using proposition \ref{prop:crossedvsuncrossed}, we can use \texttt{KAC} to compute the crossed $S$ matrices. 
\begin{itemize}
	\item The case $A_{2n-1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_{n+1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_4^{(3)}$:
	\begin{itemize}
		\item $\tau(\omega_1)=3\omega_2^t$ and $\tau(\omega_2)=\omega_1^t$.
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i^{t}$ for $1\leq i\le 2$.
		\item $\mathring{\tau}(\omega_0)=2\omega_2^t$.
	\end{itemize}
	\item The case $E_6^{(2)}$: 
	\begin{itemize}
		\item $\tau(\omega_1)=2\omega_4^t$, $\tau(\omega_2)=2\omega_3^t$, $\tau(\omega_3)=\omega_2^t$, $\tau(\omega_4)=\omega_1^t$. 
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i$ for $1\leq i\leq 4$.
		\item $\mathring{\tau}(\omega_0)=\omega_3^{t}+\omega_4^t$.
	\end{itemize}
\end{itemize}
\fi
\iffalse

\section{Twisted Fusion Rings}\label{sec:twistedfusion}



	
	
	
	
	



	%

	
	
	


	
	
	
	

\subsection{Categorical twisted Grothendieck rings and fusion rings}
In this section we recall the definition of categorical twisted fusion rings from \cite[\S2.2,\S2.3]{Desh:17}. Let $\mathcal C$ be a finite semisimple $\mathbb C$-linear abelian category equipped with an autoequivalence $\gamma:\mathcal C\to \mathcal C$. Let $P$ denote the finite set of (isomorphism classes of) simple objects of $\mathcal C$. Consider the (non-semisimple) abelian category $\mathcal C^\gamma$ obtained by $\gamma$-equivariantization whose objects are pairs $(C,\psi)$ where $C$ is an object $\mathcal C$ and $\psi:\gamma(C)\xrightarrow\cong C$. We now define the twisted complexified Grothendieck group $K_{\CBbb}(\mathcal C,\gamma)$ as follows:  Consider the complexified Grothendieck group $K_{\CBbb}(\mathcal C^\gamma)$ and then quotient out by the relation $[C,c\psi]=c[C,\psi]$ for each class $[C,\psi]\in K_{\CBbb}(\mathcal C^\gamma)$ and $c\in \mathbb C^\times$. We continue to use the notation $[C,\psi]$ to denote the corresponding class in $K_{\CBbb}(\mathcal C,\gamma)$.
\begin{proposition}\label{p:dimoftwistedspace}
(i) We have $\dimK_{\CBbb}(\mathcal C,\gamma)=|P^\gamma|$, the number of simple objects stabilized by $\gamma$. For each $C\in P^\gamma$, choose an isomorphism $\psi_C:\gamma(C)\to C$. Then the set $\{[C,\psi_C]|C\in P^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C,\gamma)$.\newline
(ii) If $\mathcal C$ also has a monoidal structure and if $\gamma$ is a monoidal autoequivalence, then $K_{\CBbb}(\mathcal C,\gamma)$ has the structure of a $\mathbb C$-algebra, which we call the (complexified) twisted fusion ring.
\end{proposition}
\begin{proof}
Note that we can consider $\mathcal C$ as a module category over the monoidal category $\Vec$ of finite dimensional $\mathbb C$-vector spaces. Now the statement (i) follows from the proof of \cite[Prop. 2.4(i)]{Desh:17}. We essentially need to prove that for any $\gamma$-orbit $O\subset P$ of cardinality at least 2, $K_{\CBbb}(\mathcal C_O,\gamma)=0$, where $\mathcal C_O\subset \mathcal C$ is the full subcategory generated by the simple objects in $O$. As in {\it loc. cit.} this can be done by looking at the isomorphism classes of simple objects in $\mathcal C_O^\gamma$ and noting that $1-\zeta\in \mathbb C^\times$ must act by 0 on $K_{\CBbb}(\mathcal C_O,\gamma)$ for each $|O|$-th root of unity $\zeta\in \mathbb C^\times$. Now to prove (ii), it is straightforward to check that the subspace of $K_{\CBbb}(\mathcal C^\gamma)$ that we are quotienting by is an ideal.
\end{proof}

Suppose we have an object $(A,\psi)\in \mathcal C^\gamma$ for an abelian category $\mathcal C$. For each simple object $C$, define the multiplicity vector space $N_A^C:=\Hom(C,A)$. We obtain the isomorphism of vector spaces
$$N_A^C=\Hom(C,A)\cong \Hom(\gamma(C),\gamma(A))\xrightarrow{\psi\circ(\cdot)}\Hom(\gamma(C),A)=N_A^{\gamma(C)}.$$
Now for each simple object in $\mathcal C$ stabilized by $\gamma$ let us choose an isomorphism $\psi_C:\gamma(C)\xrightarrow\cong C$. These choices give us the linear isomorphisms $N_C^{\gamma(C)}\xrightarrow{}N_A^C$ and hence the linear automorphisms $\phi_{A,\psi}^{C,\psi_C}:N_A^C\xrightarrow{\cong}N_A^C$. Then using the above proposition, we have the following equality in the twisted Grothendieck vector space $K_{\CBbb}(\mathcal C,\gamma)$
\begin{equation}\label{eq:equalityintwistedgrothendieck}
[A,\psi]=\sum\limits_{C\in P^\gamma}\tr(\phi_{A,\psi}^{C,\psi_C})[C,\psi_C].
\end{equation}



\subsubsection{The twisted fusion ring in terms of traces on multiplicity spaces} Let us now assume that $\mathcal C$ is a weakly fusion category equipped with a monoidal action of a finite group $\Gamma$. Let $\gamma\in \Gamma$ be an element of order $m$. In particular we have an equivalence $\gamma^m\cong \id_{\mathcal C}$ of monoidal functors. Then the $\langle\gamma\rangle\cong \mathbb Z/m\mathbb Z$-equivariantization $\mathcal C^{\langle\gamma\rangle}$ is also a weakly fusion category. We can consider the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ as a quotient of $K_{\CBbb}(\mathcal C^{\langle\gamma\rangle})$ modulo the relations $[C,\zeta\psi]=\zeta[C,\psi]$ for any $m$-th root of unity $\zeta$ (see \cite[\S2.3]{Desh:17} for details). As in {\it loc. cit.} the weak duality on $\mathcal C^{\langle\gamma\rangle}$ induces a $\mathbb C$-semilinear involution $(\cdot)^*$ on $K_{\CBbb}(\mathcal C,\gamma)$ as a vector space.

Consider objects $(C_1,\psi_1),\cdots (C_n,\psi_n)$ in $\mathcal C^{\langle\gamma\rangle}$. Then we have the following composition of natural isomorphisms 
$$\phi_{C_1,\psi_1,\cdots,C_n,\psi_n}:\Hom(\unit,C_1\otimes\cdots \otimes C_n)\xrightarrow{\cong}\Hom(\gamma(\unit),\gamma(C_1\otimes\cdots \otimes C_n))$$
$$\xrightarrow{\cong}\Hom(\unit,\gamma(C_1)\otimes\cdots \otimes \gamma(C_n))\xrightarrow\cong\Hom(\unit,C_1\otimes\cdots \otimes C_n).$$

Now let $A,B,C$ be simple objects of $\mathcal C$. Since we have assumed that $\mathcal C$ is weakly fusion, the multiplicity space $N^C_{A\otimes B}=\Hom(C,A\otimes B)$ is canonically identified with $\Hom(\unit,{ }^*C\otimes A\otimes B)$. 

Now as before, for each simple object $C\in \mathcal C$ stabilized by $\gamma$, let us choose a $\langle\gamma\rangle$-equivariant structure $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C^{\langle\gamma\rangle}$. Using (\ref{eq:equalityintwistedgrothendieck}) for each $A,B\in P^\gamma$ we obtain the following equality in the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$
\begin{equation}\label{eq:equalityintwistedfusionring}
[A,\psi_A]\cdot[B,\psi_B]=\sum\limits_{C\in P^\gamma}\tr(\phi_{{}^*C,{}^*\psi_C,A,\psi_A,B,\psi_B})[C,\psi_C].
\end{equation}
\begin{remark}\label{rk:twistedfusionringsagree}
In other words, this means that the twisted fusion ring $K_{\CBbb}(\mathcal C,\gamma)$ can also be defined by taking the fusion rules (see Section \ref{section:hongfusion} below) obtained by tracing out automorphisms of multiplicity spaces. This approach was used in \cite{Hong1,Hong} to define twisted fusion rings at level $\ell$ associated to a diagram automorphism of a simple Lie algebra $\frg$.
\end{remark}
\subsubsection{Character table of twisted fusion rings of modular categories}
Let us now assume that $\mathcal C=\bigoplus\limits_{\gamma\in \Gamma}\mathcal C_\gamma$ is a $\Gamma$-crossed modular category. In particular, we have a modular action of $\Gamma$ on the identity component $\mathcal C_1$ which is a modular category. Hence for each $\gamma\in \Gamma$ we have the twisted fusion ring $K_{\CBbb}(\mathcal C_1,\gamma)$ which in this case is a commutative Frobenius $\ast$-algebra that has been studied in \cite{Desh:17}. We recall that for each $\gamma\in \Gamma$, $P_\gamma$ denotes the set of simple objects of $\mathcal C_\gamma$. For each simple object $C$ of $\mathcal C_1$ stabilized by $\gamma$, we choose an isomorphism $\psi_C:\gamma(C)\to C$ such that $(C,\psi_C)\in \mathcal C_1^{\langle\gamma\rangle}$. The set $\{[C,\psi_C]|C\in P_1^\gamma\}$ is a basis of $K_{\CBbb}(\mathcal C_1,\gamma)$. It was proved in \cite[Thm. 2.12(i)]{Desh:17} that the categorical $\gamma$-crossed S-matrix $S^\gamma$ (it is a $P_\gamma\times P_1^\gamma$ matrix, see Definition \ref{d:normalizedcrossedsmatrix}) is essentially the character table of $K_{\CBbb}(\mathcal C_1,\gamma)$:
\begin{proposition}\label{p:chartableoftwistedfusion}
Let $M$ be a simple object of $\mathcal C_\gamma$. For each $C\in P_1^\gamma$, define $\chi_M([C,\psi_C])=\frac{S^\gamma_{M,C}}{S^{\gamma}_{M,\unit}}$ and extend linearly. Then $\chi_M:K_{\CBbb}(\mathcal C_1,\gamma)\to \mathbb C$ is a character and the set $\{\chi_M|M\in P_\gamma\}$ is the set of all irreducible characters of $K_{\CBbb}(\mathcal C_1,\gamma)$. 
\end{proposition}
\fi

Let $\mathcal C$ be the $\Gamma$-crossed modular category obtained in Theorem \ref{thm:oneofmain} associated with $\Gamma$ acting on $\frg$ and a level $\ell$. Then by Remark \ref{rk:twistedfusionringsagree} the categorical crossed S-matrix associated with the above is precisely the character table of the twisted fusion ring $\mathcal{R}_{{\ell}}(\frg,\gamma)$ from \cite{Hong1,Hong}. On the other hand, the character table of $\mathcal R_\ell(\frg,\gamma)$ will be computed below using the results of {\it op. cit.} and hence we will have explicitly computed the categorical crossed S-matrices that appear in the twisted Verlinde formula.
\end{remark}
\subsection{Fusion rules associated to diagram automorphism}\label{section:hongfusion}

Let $\frg$ be any simple  Lie algebra. For any $n$-tuple $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)$, consider the dual conformal block 
$\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1, \vec{z})$ at level $\ell$. 
Now given any diagram automorphism $\sigma: \mathfrak{g} \rightarrow \mathfrak{g}$, we get an 
automorphism of $\sigma^*: P_{\ell}(\frg)\rightarrow P_{\ell}(\frg)$. 
This induces a map 
of the dual conformal blocks 
$$\sigma: \mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})\rightarrow \mathcal{V}_{\sigma^*({\vec{\lambda}})}(\mathbb{P}^1,\vec{z}),$$ 
where $\sigma^*({\vec{\lambda}})=(\sigma^*\lambda_1,\dots, \sigma^*\lambda_n)$.  Let $P_{\ell}(\mathfrak{g})^{\sigma}$ 
denote the set of level $\ell$ weights fixed by $\sigma$. Thus, 
if $\vec{\lambda} \in (P_{\ell}(\mathfrak{g})^{\sigma})^n$, then we get 
an element $\sigma$ in $\operatorname{End}(\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$. 
In \cite{Hong}, Jiuzu Hong defines a fusion rule associated to $\sigma$. 
\subsubsection{Twisted fusion rules for diagram automorphisms}\label{{section:hongfusion}}Now we restrict to 
the case when $\mathfrak{g}$ is simply laced and $\sigma$ is diagram automorphism 
of the Lie algebra $\mathfrak{g}$.  The following proposition can be found in  \cite{Hong} 
\begin{proposition} \label{pro:twistedfusionrule}
	The map $N_{\sigma}: \mathbb{N}^{P_{\ell}^{\sigma}(\mathfrak{g})}\rightarrow \mathbb{C}$ 
	given by 
	$N_{\sigma}(\sum_i \lambda_i ):=\operatorname{Tr}(\sigma| \mathcal{V}_{\vec{\lambda}}( \mathbb{P}^1, \vec{z}))$ satisfies 
	the hypothesis of  fusion rules (see \cite{BeauHirz}).
\end{proposition}The set of characters of the fusion ring $\mathcal{R}_{{\sigma}}$ has been described in \cite{Hong}. We recall the details below. \iffalse
Let $S_{\sigma}$ be the set of characters
of the fusion ring $\mathcal{R}_{{\sigma}}$ 
associated to the fusion rule $N_{\sigma}$. We 
now recall an explicit description the set $S_{\sigma}$ and
in particular of the matrix $\Sigma$ whose entries
are $(\chi(\lambda))_{S_{\sigma}\times P_{\ell}^{\sigma}(\mathfrak{g})}$. Consider the element $\omega=\sum_{\lambda \in P_{\ell}^{\sigma}(\frg)}\lambda\lambda^*$ 
and the diagonal
matrix $D_{\omega}$ whose entries are $|\chi(\lambda)|^{2}$ for $\chi \in S_{\sigma}$. 
\fi
\iffalse Let $\mathfrak{g}$ be a simply laced Lie algebras and $\sigma$ be a
diagram automorphism of the Lie algebra $\mathfrak{g}$. Associated to
the pair $(\mathfrak{g},\sigma)$, one considers the orbit Lie algebra $\mathfrak{g}_{\sigma}$ introduced in \cite{FSS}. 
We only recall a few basic notations and 
we refer the reader to Section 2.2 in \cite{FSS} for full details.  
Let $I$ be the set of vertices of the Dynkin diagram of $\mathfrak{g}$ and $\sigma$ i
s a graph 
automorphism of the Dynkin diagram. Now $I_{\sigma}$ denote
the set of orbits in $I$ under the automorphism $\sigma$. The vertices of
the Dynkin diagram of $\mathfrak{g}_{\sigma}$ has vertices index by $I_{\sigma}$. 
Now it is easy to observe that the lattice $P_{\ell}^{\sigma}(\mathfrak{g})$ 
has generators indexed by the elements in $I_{\sigma}$ with generators
of the $\sum{\omega_a}$, where $\omega_a$'s are all in the same orbit. Clearly
there is a bijection 
$$\iota : P^{\sigma}\simeq P_{\sigma}$$ 
\fi
Let $G_{\sigma}$ be the simply connected group associated to the
Lie algebra $\mathfrak{g}_{\sigma}$ and $T_{\sigma}$ be a maximal
torus in $G_{\sigma}$. Let $Q(\frg)$ be the root lattice of $\frg$ and let $Q(\frg)^{\sigma}$ be elements in the
root lattice of $\mathfrak{g}$ which are fixed by the automorphism
$\sigma$. Then under the transformation $\iota:P(\frg)^{\sigma}\rightarrow P(\frg_{\sigma})$, we get 
\begin{equation}\label{lemma:iotamagic}
\iota (Q(\mathfrak{g})^{\sigma})= \left\{
\begin{array}{ll}
Q(\mathfrak{g}_{\sigma}) & \mathfrak{g}\neq A_{2n}, \\
P(\mathfrak{g}_{\sigma})=\frac{1}{2}Q(\frg_{\sigma}) & \mathfrak{g}=A_{2n}. \\
\end{array} 
\right.
\end{equation}

Consider the following subset $T_{\sigma,\ell}$ of $T_{\sigma}$ given by 
$$T_{\sigma,\ell}:=\{t \in T_{\sigma}|e^{\alpha}(t)=1 \  \mbox{for} \ \alpha \in (\ell+h^{\vee})\iota(Q^{\sigma}(\mathfrak{g}))\}.$$ An element $t$ of $T_{\sigma,\ell}$ is called {\em regular} if the Weyl group $W_{\sigma}$ of $\frg_{\sigma}$ acts freely on $t$ and let $T^{\operatorname{reg}}_{\sigma,\ell}$ is set of regular elements in $T_{\sigma,\ell}$.  
\iffalse
Then by the Weyl character formula, we get:
\begin{equation}
\label{eqn:weylcharc}
\operatorname{Tr}_{V_{\iota({\lambda})}}(t)= \frac{\sum_{w\in W_{\sigma}}\ep(w)\exp((w(\iota(\lambda)+\overline{\rho}_{\sigma})(t))}{\sum_{w\in W_{\sigma}}\ep(w)\exp((w(\overline{\rho}_{\sigma})(t))},
\end{equation}
where $\overline{\rho}_{\sigma}$ is 
the half sum of positive roots in $\mathfrak{g}_{\sigma}$ and $t\in T^{\operatorname{reg}}_{\sigma,\ell}$.
\fi
Now the main result in \cite{Hong} is the following:
\begin{proposition}\label{prop:mainhong1}For $t \in T^{\reg}_{\sigma,\ell}/W_{\sigma}$,  
	the set $\operatorname{Tr}_{*}(t)$ gives the characters of 
	the fusion ring $\mathcal{R}_{{\sigma}}$.  
\end{proposition}
Thus to study the character table of the fusion ring $\mathcal{R}_{{\sigma}}$, we need to give an  explicit description of the set $T_{\sigma,\ell}^{\reg}/W_{\sigma}$ in terms of weights of the level $\ell$-representations of the twisted affine Lie algebra $\mathfrak{g}(X_N^{(m)})$ associated to $\sigma$. 
\begin{remark}
	In the case of fusion ring $\mathcal{F}_N$ associated to untwisted conformal blocks, there is a natural bijection \cite{BeauHirz} between $P_{\ell}(\frg)$ and $T^{\operatorname{reg}}_{\ell}/W$, where $W$ is the Weyl group of $\frg$. However, in the case of twisted fusion ring $\mathcal{R}_{{\sigma}}$, there
	is no such natural bijection. 
\end{remark}

The following proposition should be considered as a generalization of Proposition 6.3 in \cite{BeauHirz} to the case of all affine Kac-Moody Lie algebras.
\begin{proposition}\label{prop:vitalbijectionthathongsshouldhavewrittenproperly}
	There is a natural bijection between $T_{\sigma,\ell}^{\operatorname{reg}}/W_{\sigma}$ with $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$.
\end{proposition}
\begin{proof}We divide our proof in the two major cases. First, we consider the case when the twisted affine Kac-Moody Lie algebra is of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_{6}^{(2)}$ or $D_{4}^{(3)}$. In \cite{Hong}, Hong introduces the following subset set of coweights $\check{P}(\frg_{\sigma})$ 
	$$\check{P}_{\sigma,\ell}:=\{\check{\mu}\in \check{P}(\frg_{\sigma})|\theta_{\sigma}(\check{\mu})\leq \ell\}.$$ Now Lemma 5.20 in \cite{Hong}, shows that there is a natural bijection between $\check{P}_{\sigma,\ell}$ and $T_{\sigma,\ell}^{\operatorname{reg}}/W_{\sigma}$. Thus we will be done if we can show that $P^{\ell}(\frg,\sigma)$ is in a natural bijection with $\check{P}_{\sigma,\ell}$. This set can be precisely described as 
	\begin{enumerate}\label{enu:hongpain1}
		\item If $\frg=A_{2n-1}$, then $\check{P}_{\sigma,\ell}=\{\sum_{i=1}^ne_i\check{\omega}_i| e_1+2(e_2+\dots+e_n)\leq \ell\}$.
		\item If $\frg=D_{n+1}$, then $\check{P}_{\sigma,\ell}:=\{\sum_{i=1}^ne_i\check{\omega}_i | 2(e_1+\dots+e_{n-1})+e_n\leq \ell\}$.
		\item If $\frg=D_{4}$, then $\check{P}_{\sigma,\ell}:=\{e_1\check{\omega}_1+e_2\check{\omega}_2|3e_1+2e_2\leq \ell\}$.
		\item If $\frg=E_{6}$, then $\check{P}_{\sigma,\ell}:=\{\sum_{i=1}^4e_i\check{\omega}_i| 2e_1+4b_2+3b_3+2e_4\leq \ell\}$.
	\end{enumerate}Here $\check{\omega}_i$'s are the fundamental coweights of the Lie algebra $\frg_{\sigma}$ and $e_i$'s are non-negative integers. 	By the explicit description of the set $P^{\ell}(\frg(X_N^{(m)}))$ by equations \eqref{eqn:levellweightforA2n-12}, \eqref{eqn:levellweightforDn+12},\eqref{eqn:levellweigtforD43} and \eqref{eqn:levellweigtforE62}, it follows that there is a natural bijection between $P^{\ell}(\frg,\sigma)$ and $\check{P}_{\sigma,\ell}$. 
	
	Now we consider the remaining case when $A=A_{2n}^{(2)}$. In this case, the horizontal subalgebra $\mathring{\mathfrak{g}}$ is same as $\frg_{\sigma}$. We define the map $\beta:P^{\ell}(\frg(A))\rightarrow T_{\sigma,\ell}$ given by the formula $\beta(\lambda)=\exp\big(\frac{2\pi i}{\ell+h^{\vee}}\nu_{\frg(A)}(\lambda+\overline{\rho})\big)$, where $\nu_{\frg(A)}$ is the isomorphism between $\mathfrak{H}^{*}(A) \rightarrow \mathfrak{H}(A)$ induced by the normalized Cartan-Killing form $\kappa_{\frg(A)}$ on $\frg(A)$ and $\overline{\rho}$ is the sum of the fundamental weights of the horizontal subalgebra $\mathring{\mathfrak{g}}$. Now the rest of the proof follows as in Proposition 9.3 in \cite{BeauHirz}.
	
\end{proof}
\iffalse
\begin{proof}We only need to consider the case $\mathfrak{g}(X_N^{(m)})$. In this case $\mathfrak{g}(X_N)_{\sigma}=\mathring{\mathfrak{g}}$. Hence $\mathring{W}=W_{\sigma}$ and $\widetilde{M}=M$.
	First we justify that it is enough to show that $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ is naturally isomorphic to $\mathring{P}/(\ell+h^{\vee})M$. Once we can show this,  then the $\mathring{W}$-orbits of $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ will be same as the $\mathring{W}$-orbits of $\mathring{P}/(\ell+h^{\vee})M$. Now by Proposition \ref{prop:fundamentalalcove}, this corresponds to points in the fundamental alcove $P^{+}(\mathfrak{g}(X_N^{(m)}))\cap C_{af, \ell+h^{\vee}}$ which by Corollary \ref{cor:interiorlevelell} is just $P^{\ell}(\mathfrak{g}(X_N^{(m)}))$. Now the proof there is a natural isomorphism of $T_{\ell}(\mathfrak{g}(X_N^{(m)}))$ onto $\mathring{P}/(\ell+h^{\vee})M$ follows exactly as in Lemma 9.3 in \cite{BeauHirz}. 
\end{proof}
\fi

\subsubsection{Fusion rings associated to arbitrary automorphisms}\label{sec:arbtwistedfusion} In the previous section, we discussed how one can associate fusion rings to diagram automorphism. 
Let $\gamma:\frg \rightarrow \frg$ be an arbitrary automorphism and $\sigma$ be the diagram automorphism of $\frg$ related to $\gamma$ by Proposition \ref{prop:classdia}. Then $\gamma $ 
and $\sigma$ differ by an inner 
automorphism of $\frg$ and hence we get  a bijection between $P(\frg)^{\gamma}$ and $P(\frg)^{\sigma}$. Now since $\gamma$ and $\sigma$ both preserve a normalized Cartan Killing 
form it follows that there exists a bijection between $P_{\ell}(\frg)^{\gamma}$ and $P_{\ell}(\frg)^{\sigma}$. 

If $\vec{\lambda}=(\lambda_1,\dots,\lambda_n)\in (P_{\ell}(\frg)^{\sigma})^n$, then as in Section \ref{section:hongfusion}, we get an element in $\operatorname{End}(\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$. Since the conformal block $\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})$ is constructed as coinvariants of representation of the Lie algebra $\frg\otimes \mathcal{O}_{\mathbb{P}^1}(*\vec{z})$, it follows \cite{FS} that inner automorphism of $\frg$ acts trivially on $\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z})$. The above discussion can be summarized as follows:
\begin{proposition}
	Let $\vec{\lambda}\in (P_{\ell}(\frg)^{\sigma})^n$, we get $\operatorname{Tr}(\gamma|\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))=\operatorname{Tr}(\sigma|\mathcal{V}_{\vec{\lambda}}(\mathbb{P}^1,\vec{z}))$.
\end{proposition}
Hence the fusion ring  associated to an arbitrary automorphism $\gamma$ just depends on the class of the diagram automorphism $\sigma$. 
\section{Twisted Conformal Blocks as braided $\Gamma$-crossed modular fusion category}We now state without proof one of the main theorems in this paper. We postpone the proof to the later sections. We use this theorem to connect the fusion ring studied by J. Hong \cite{Hong} as a categorical twisted fusion ring as in Section \ref{sec:twistedfusion}. 

Let $m_1,m_2,m_3$ be elements of $\Gamma$ such that $m_1.m_2.m_3=1$. Consider the $3$-pointed marked curve $(\mathbb{P}^1, \mu_3$, where three-marked points are the 3-rd roots of unity $\mu_{3}\subset \mathbb{C}\subset \mathbb{P}^1$, the associated tangent vector is again $\omega$ considered as a tangent vector at $\omega$. Consider $0$ as the basepoint on $\mathbb P^1\setminus \mu_3$. Consider loops $C_j$ in $\mathbb P^1\setminus \mu_3$ based at 0 and encircling the point $e^{\frac{2\pi\sqrt{-1}j}{3}}$ counterclockwise. Then we obtain a presentation of the fundamental group  $\pi_1(\mathbb P^1\setminus \mu_3,0)=\langle C_1,C_2,C_3 | C_1.C_2.C_3=1\rangle.$ Hence if $m_1.m_2. m_3=1$, then $C_j\mapsto m_j$ defines a group homomorphism $\phi:\pi_1(\mathbb P^1\setminus \mu_3,0)\to \Gamma$. Then  \cite[\S2.4]{JKK} this determines an $3$-marked admissible cover $(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}})$.
\iffalse
Then we want to define a tensor product on $\mathcal C$ which satisfies: 
\begin{equation}\label{eq:homspaces}
\Hom(\unit,M_1\otimes\cdots \otimes M_n)=\mathcal V_{\mathbf{M}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_n,\wtilde{\mathbf{v}}), &\.\end{equation}
\fi
\begin{theorem}
	The $\Gamma$- twisted conformal blocks for a group $\frg$ at level define a braided $\Gamma$-crossed ribbon category
	$\mathcal{C}=\bigoplus_{\gamma}\mathcal{C}_{\gamma} , $ such that 
	\begin{enumerate}
		\item The $C_1$ is modular tensor category defined by untwisted conformal blocks for $\frg$ at level $\ell$.
		\item The simple objects of $\mathcal{C}_{\gamma}$ are parameterized by the set $P^{\ell}(\frg,\gamma)$
		\item The monoidal structure is defined by the following $\operatorname{Hom}$-spaces:\\
		For simple objects $[\lambda_i] \in \mathcal{C}_{m_i}$
		\begin{equation}\label{eq:threepointhomspaces}
		\Hom(\unit,[\lambda_1]\otimes[\lambda_2] \otimes [\lambda_3])=
		\begin{cases}
		\mathcal V_{\vec{\lambda}}(\tildeC\to \mathbb P^1,\wtilde{\mathbf{p}},\mu_3,\wtilde{\mathbf{v}}), & \text{if $m_1.m_2.m_3=1$}\\%\ \mbox{if $m_1.m_2.m_3=1.}\\
		0 & \text{otherwise}.
		\end{cases}
		\end{equation}
		\end{enumerate}
\end{theorem}

\subsection{Twisted conformal blocks and categorical crossed $S$ matrices}\label{sec:crossedmatrix} Let $\mathcal{F}$ be a fusion ring coming from fusion rules with basis $I$ and let $S$ be the set of characters. Consider a matrix $\Sigma$ whose rows are parameterized by $S$ and columns are parameterized by $I$. For $(\chi,\lambda)\in S\times I$, we set $\Sigma_{\chi,\lambda}=\chi(\lambda)$.  We denote by $\Sigma'$ the  unitary matrix corresponding to $\Sigma$ defined as follows. Consider the element $\omega=\sum_{\lambda \in I}\lambda\lambda^*$ 
and the diagonal
matrix $D_{\omega}$ whose entries are $\sum_{I}|\chi(\lambda)|^{2}$ for $\chi \in S$.  Now we get $\Sigma \cdot \overline{\Sigma}^{t}=D_{\omega}.$ Then set $\Sigma'=D_{\omega}^{-\frac{1}{2}}\Sigma$. Note that the column of $\Sigma'$ corresponding to the unit in $I$ is real positive.
We call $\Sigma'$ the normalized character table.
 

In this section, we describe how to  compute the normalized character table $\Sigma'$ for the fusion ring $\mathcal{R}_{\ell}(\frg,\sigma)\cong \mathcal R_{\ell}(\frg,\gamma)$ associated to diagram automorphisms $\sigma$ (resp. automorphism $\gamma$ in the diagram automorphism class of $\sigma$) at level $\ell$ as discussed in Section \ref{section:hongfusion}. Recall by Proposition \ref{prop:mainhong1}, the rows of the matrix $\Sigma'$ are parameterized by the set $T^{reg}_{\sigma,\ell}/W_{\sigma}$, where 
$$T_{\sigma,\ell}:=\{t \in T_{\sigma}|e^{\alpha}(t)=1 \  \mbox{for} \ \alpha \in (\ell+h^{\vee})\iota(Q^{\sigma}(\mathfrak{g}))\},$$ where $T_{\sigma}$ is a maximal torus of the orbit Lie algebra $\mathfrak{g}_{\sigma}$ and $\iota(Q^{\sigma})$ be as in equation \ref{lemma:iotamagic}. 

Let $\beta :P^\ell(\frg,\gamma)\cong P^{\ell}(\mathfrak{g}(A))\rightarrow T^{reg}_{\sigma,\ell}/W_{\sigma}$ be the natural bijection given by Proposition \ref{prop:vitalbijectionthathongsshouldhavewrittenproperly} and Equation \ref{eqn:bijfromarbtodia} in Section \ref{sec:arbtodia}, where $A$ is the Cartan matrix type associated to the Lie algebra $\frg$ and the diagram automorphism $\sigma$. 

The columns of the matrix $\Sigma'$ are parameterized by the set $P_{\ell}(\frg)^{\sigma}$. For the automorphism $\gamma$ of $\frg$, the categorical $\gamma$-crossed S-matrix $S^\gamma$ at level $\ell$ is the normalized character table of the categorical twisted fusion ring (Theorem \ref{thm:chartableoftwistedfusion}) which is the same as $\mathcal R_\gamma\cong \mathcal R_{\sigma}$. Using the natural bijection (see Section \ref{sec:arbtwistedfusion}) between $P_{\ell}(\frg)^{\gamma}\cong P_{\ell}(\frg)^{\sigma}$ and the fact that both $S^{\gamma}$ and $\Sigma'$ are the unitary matrices associated to the character table of the same algebra and both have the column corresponding to $0\in P_\ell(\frg)^\gamma$ positive real, we have: 
\begin{equation}\label{eq:categoricalsmatrixequalskacmoody}
S^\gamma_{\lambda,\mu}=\Sigma'_{\beta(\lambda),\mu}
\end{equation} 


\section{Character table for twisted fusion rules of diagram automorphisms}\label{section:crossedS}
Following \cite{Kac}, we now recall the notion S-matrices in the setting of twisted affine Lie algebras and connect them to the characters of the fusion ring in Section \ref{section:hongfusion}. As observed in \cite{Kac}, these S-matrices (except for $A_{2n}^{(2)}$) are not matrices for the modular transformation of the characters with respect to the group $\operatorname{SL}_2(\mathbb{Z})$. These S-matrices should be considered as crossed S-matrices as in \cite{Desh:17, Desh:18a}. We follow the ordering and labeling of the roots and weights as in \cite{Kac}. 
\begin{notation}Recall that $\mathring{\mathfrak{g}}$ denote the finite dimensional algebra whose Cartan matrix is obtained by deleting the $0$-th row and column of $X_N^{(m)}$.  Throughout Sections \ref{sec:comp1}-\ref{sec:comp4}, $\mathring{Q}$ will denote
	the root lattice $Q(\mathring{\mathfrak{g}})$; $\Lambda_i$'s  will denote the affine fundamental weights of $\frg(X_N^{(m)})$ and $\overline{\Lambda}_i$ will denote their orthogonal horizontal projects with respect to invariant bilinear form $\frg(X_N^{(m)})$; $\omega_1,\dots. \omega_{\operatorname{rank \mathring{\mathfrak{g}}}}$ will denote the fundamental weights of $\mathring{\mathfrak{g}}$; and the weight $\omega_0$ of the trivial representation of $\mathring{\mathfrak{g}}$ will be considered as the zero-th fundamental weight. Moreover $M^*$ denotes the dual lattice of $\mathring{Q}$ with respect to the Killing form $\kappa_{\mathfrak{g}}$ (Proposition \ref{prop:formulaforkg})
\end{notation}
\subsection{Integrable Highest weight representations of $A_{2n-1}^{(2)}$}\label{sec:comp1}
\iffalse
In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=B_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n-1}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the orthogonal projection to $C_n$ under the normalized invariant bilinear form on $\mathfrak{g}(A_{2n-1}^{(2)})$  denoted by $\kappa_{\mathfrak{g}}$. For notational conveniences, we let $\omega_0$ to be weights corresponding to the trivial representation of $C_n$ and regard it as the $0$-th fundamental weights.
\fi
In this case $\mathring{\mathfrak{g}}=C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n-12}
P^{\ell}(\mathfrak{g}(A_{2n-1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(C_{n})| b_1+2(b_2+\dots+b_n)\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{n+1}^{(2)}$}\label{sec:comp2}In this case ${\mathring{\mathfrak{g}}}=B_n$. As in the previous case, it turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$  are  can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforDn+12}
P^{\ell}(\mathfrak{g}(D_{n+1}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_+(B_n)| 2(b_1+\dots+b_{n-1})+b_n\leq \ell \}.
\end{equation}

\subsection{Integrable Highest weight representations of $D_{4}^{(3)}$}\label{sec:comp3} In this case, $\mathring{\mathfrak{g}}=\mathfrak{g}_2$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}$ is also $\mathfrak{g}_2$.  Then $\overline{\Lambda}_1=\omega_2$ and $\overline{\Lambda}_2=\omega_1$, where $\omega_1$ and $\omega_2$ are the fundamental weights of the Lie algebra $\mathfrak{g}_2$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforD43}
P^{\ell}(\mathfrak{g}(D_4^{(3)}))=\{b_1\omega_1+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.
\end{equation}

\subsection{Integrable Highest weight representations of $E_{6}^{(2)}$}\label{sec:comp5}In this case $\mathring{\mathfrak{g}}=\mathfrak{f}_4$ Then $\overline{\Lambda}_1=\omega_4$ and $\overline{\Lambda}_2=\omega_3$, $\overline{\Lambda}_3=\omega_2$ and $\overline{\Lambda}_4=\omega_1$, where $\omega_1,\dots,\omega_4$ are the fundamental weights of the Lie algebra $\mathfrak{f}_4$. Moreover, $\overline{\Lambda}_0=\omega_0$. With this notation, we have 
\begin{equation}\label{eqn:levellweigtforE62}
P^{\ell}(\mathfrak{g}(E_6^{(2)}))=\{b_1\omega_1+\dots+ b_4\omega_4\in P_{+}(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.
\end{equation}

\subsection{S-matrix for $A_{2n-1}^{(2)}$}\label{sec:comp6}Let $P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n-1}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n-i}$ of the vertices of the Dynkin diagram of $A_{2n-1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n-1}b_{i}(\omega_i+\omega_{2n-i})+b_n\omega_n\in P_{+}(A_{2n-1})| 2(b_1+\dots+b_{n-1})+b_n\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $A_{2n-1}$ under the action of the involution $\sigma$ is $B_n$, there is a natural bijection between $\iota:P(A_{2n-1})^{\sigma}\rightarrow P(B_n).$ Thus under the map $\iota$ restricts to a bijection:
\begin{equation}
\label{eqn:idf1}
\iota:P^{\ell}(\frg(A_{2n-1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_{n+1}^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $B_n$ and $C_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(B_n)\rightarrow \mathfrak{h}(C_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i, \ \mbox{for $1\leq i\leq n$},$$ and where $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively dual Coxeter) label of the Lie algebra $\mathfrak{g}(A_{2n-1}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n-1}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n-1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{n+1}^{(2)}))$. We recall the following formula \cite{Kac} for the crossed $S$-matrix ${S}^{(\ell)}(A_{2n-1}^{(2)})$ whose $(\lambda,\mu)$-th entry is given by the formula:
\begin{align}
\label{{eqn:SmatrixforA2n-12}}{S}_{\lambda,\mu}^{(\ell)}(A_{2n-1}^{(2)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{align}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)


\subsection{S-matrix for $D_{n+1}^{(2)}$}\label{sec:comp7}Let $P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{n+1}^{(1)})$ which are fixed by the involution which exchanges the $n$ and $n+1$-th vertices of the Dynkin diagram of $D_{n+1}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}b_{i}\omega_i+b_n(\omega_n+\omega_{n+1})\in P_{+}(D_{n+1})| b_1+2(b_1+\dots+b_{n})\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{n+1}$ under the action of the involution $\sigma$ is $C_n$, there is a natural isomorphism between $\iota:P(D_{n+1})^{\sigma}\rightarrow P(C_n)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{eqn:idff4}
\iota:P^{\ell}(\frg(D_{n+1}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(A_{2n-1}^{(2)}))
\end{equation}and we identify the two via $\iota$. We recall the following map between the Cartan subalgebras of $C_n$ and $B_n$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(C_n)\rightarrow \mathfrak{h}(B_n), \  \omega_i \rightarrow \frac{a_i}{a_i^{\vee}}\omega_i,$$ where $1\leq i \leq n$ and $a_{1},\dots, a_{n}$ (respectively $a_1^{\vee},\dots, a_n^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{n+1}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{n+1}^{(2)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{n+1}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(A_{2n-1}^{(2)}))$. The $(\lambda,\mu)$-th entry of the crossed $S$-matrix ${S}_{\lambda,\mu}^{(\ell)}(D_{n+1}^{(2)})$ is
\begin{equation}\label{{eqn:SmatrixforDn+12}}
{S}^{(\ell)}_{\lambda,\mu}(D_{n+1}^{(2)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{2}}{|M^*/(\ell+2n)\mathring{Q}|^\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}'))\bigg), 
\end{equation}
where $\overline{\rho}$ (respectively $\overline{\rho}'$) denotes the sum of the fundamental weights of $C_n$ (respectively $B_n$)



\subsection{S-matrix for $D_{4}^{(3)}$}\label{sec:comp8}Let $P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(D_{4}^{(1)})$ which are fixed by rotation $\sigma$ that rotates the $1\rightarrow 3\rightarrow4\rightarrow 1$-th vertices of the Dynkin diagram of $D_{4}$. It can be described explicitly as. 
$$P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_3+\omega_4)+b_2\omega_2\in P_{+}(\mathfrak{g}_2)| 3b_1+2b_2\leq \ell\}.$$
Since the fixed point orbit Lie algebra of $D_{4}$ under the action of the involution $\sigma$ is $\mathfrak{g}_2$, there is a natural isomorphism between $\iota:P(D_{4})^{\sigma}\rightarrow P(\mathfrak{g}_2)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}\label{idf2}
\iota:P^{\ell}(\frg(D_{4}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(D_4^{(3)}))
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{g}_2$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{g}_2)\rightarrow \mathfrak{h}(\mathfrak{g}_2), \  \omega_2 \rightarrow \frac{a_2}{a_2^{\vee}}\omega_1, \ \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_2,$$ where $1\leq i \leq 2$ and $a_{1},a_{2}$ (respectively $a_1^{\vee},a_2^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(D_{4}^{(3)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({D_{4}^{(3)}}))$ and $ P^{\ell}(\frg(D^{(1)}_{4}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(D_{4}^{(3)}))$. We recall the following formula \cite{Kac}:
\begin{equation}	\label{{eqn:SmatrixforD43}}
{S}^{(\ell)}_{\lambda,\mu}(D_{4}^{(3)})=
i^{|\mathring{\Delta}_{+}|}\frac{\sqrt{3}}{|M^*/(\ell+6)\mathring{Q}|^{\frac{1}{2}}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+6}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho}))\bigg), 
\end{equation}
where $\overline{\rho}$ denotes the sum of the fundamental weights of $\mathfrak{g}_2$


\subsection{S-matrix for $E_{6}^{(2)}$}\label{sec:comp4}Let $P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(E_{6}^{(1)})$ which are fixed by rotation $\sigma$ that interchanges $1$-st with $5$-th;$2$-th with $4$-th and fixes the $3rd$ and $6$-th vertices of the Dynkin diagram of $E_{6}$. It can be described explicitly as. 
$$P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}:=\{b_1(\omega_1+\omega_5)+b_2(\omega_2+\omega_4)+ b_3\omega_3+ b_4\omega_6\in P_+(\mathfrak{f}_4)| 2b_1+4b_2+3b_3+2b_4\leq \ell\}.$$
Since the orbit Lie algebra of $E_{6}$ under the action of the involution $\sigma$ is $\mathfrak{f}_4$, there is a natural bijection between $\iota:P(E_{6})^{\sigma}\rightarrow P(\mathfrak{f}_4)$. Moreover, the map $\iota$ restricts to a bijection of
\begin{equation}
\label{eqn:idf2}
\iota:P^{\ell}(\frg(E_{6}^{(1)}))^{\sigma}\simeq P^{\ell}(\frg(E_6^{(2)})) 
\end{equation}
and we identify the two via $\iota$. We recall the following map between the Cartan subalgebra of $\mathfrak{f}_4$ following Section 13.9 in \cite{Kac}
$$\tau_{\kappa}:\mathfrak{h}(\mathfrak{f}_4)\rightarrow \mathfrak{h}(\mathfrak{f}_4), \  \omega_4 \rightarrow \frac{a_4}{a_4^{\vee}}\omega_1, \ \omega_3\rightarrow \frac{a_3}{a_3^{\vee}}\omega_2, \ \omega_2\rightarrow \frac{a_2}{a_2^{\vee}}\omega_3, \omega_1\rightarrow \frac{a_1}{a_1^{\vee}}\omega_4,$$ where  $a_{1},a_{2},a_3, a_4$ (respectively $a_1^{\vee},a_2^{\vee},a_3^{\vee},a_4^{\vee}$) denote the Coxeter (respectively Dual Coxeter) labels of the Lie algebra $\mathfrak{g}(E_{6}^{(2)})$. 

The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({E_{6}^{(2)}}))$ and $ P^{\ell}(\frg(E^{(1)}_{6}))^{\sigma}$ respectively. Under the identification $\iota$, the columns will be parameterized by $P^{\ell}(\frg(E_{6}^{(2)}))$. We recall the following formula from \cite{Kac}
\begin{align}
\label{{eqn:SmatrixforE62}}
{S}^{(\ell)}_{\lambda,\mu}(E_{6}^{(2)})=
\sqrt{2}i^{|\mathring{\Delta}_{+}|}|M^*/(\ell+12)\mathring{Q}|^{-\frac{1}{2}}  \sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+12}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \tau_{\kappa}(\mu+\overline{\rho})\bigg), 
\end{align}
where $\overline{\rho}$  denotes the sum of the fundamental weights of $\mathfrak{f}_4$







\subsection{S-matrix for $A_{2n}^{(2)}$}In this case ${\mathring{\mathfrak{g}}}=C_n$ and the orbit Lie algebra $\mathfrak{g}_{\sigma}=C_n$. Let $\Lambda_0,\dots,\Lambda_n$ denote the affine fundamental weights of $\mathfrak{g}(A_{2n}^{(2)})$ and $\overline{\Lambda}_0,\dots \overline{\Lambda}_n$, denote the projection to $C_n$ under the normalized invariant bilinear form on  denoted by $\kappa_{\mathfrak{g}}$. Now let $\omega_0,\omega_1,\dots,\omega_n$ denote the fundamental weights of $C_n$. It turns out that for all $0\leq i\leq n$, the $\overline{\Lambda}_i=\omega_i$. 
The set of level $\ell$ integrable highest weight representations of the affine Lie algebra $\mathfrak{g}(A_{2n}^{(2)})$ can be rewritten as follows:
\begin{equation}\label{eqn:levellweightforA2n2}
P^{\ell}(\mathfrak{g}(A_{2n}^{(2)}) )=\{\sum_{i=1}^nb_i\omega_i\in P_{+}(C_n)| 2(b_1+b_2+\dots+b_n)\leq \ell \}.
\end{equation}


\begin{remark}\label{rem:altdef}
	With the convention of the numbering of the vertices of the affine Dynkin diagram in the case $A_{2n}^{(2)}$, we get the fixed point Lie algebra is of type $B_n$ whereas $\mathring{\mathfrak{g}}=C_n$. However it is sometimes convenient to choose a different ordering of the vertices of the Dynkin diagram such that the new horizontal subalgebra is same as the fixed point algebra $B_n$. This can be done if we renumber the vertices  by reflecting about the $n$-th vertex of the affine Dynkin diagram. Under the new numbering system we get an alternate description
	\begin{equation}\label{eqn:a2n}
	P^{\ell}(\frg(A_{2n}^{(2)}))=\{\sum_{i=1}^n{\widetilde{b}_i}\omega_i\in P_{+}(B_n)| \widetilde{b}_1+\dots+\widetilde{b}_{n-1}+\frac{\widetilde{b}_{n}}{2}\leq \frac{\ell}{2}, \ \ell-\widetilde{b}_n \ \mbox{is even}\},
	\end{equation}
	where $\widetilde{\omega}_1,\dots,\widetilde{\omega}_n$ are fundamental weights of the Lie algebra of type $B_n$. In particular, we observe that $P^{1}(\frg,\sigma)=\{\omega_n\}$. 
	We refer the reader to compare it with the description of $P^{\ell}(\frg,\gamma)$ in \cite{KH}.
\end{remark}

Let $P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}$ denote the set of integrable level $\ell$ weights of the Lie algebra $\frg(A_{2n}^{(1)})$ which are fixed by the involution $\sigma:i \rightarrow {2n+1-i}$. It can be described explicitly as. 
$$P^{\ell}(\frg(A_{2n}^{(1)}))^{\sigma}:=\{\sum_{i=1}^{n}a_{i}(\omega_i+\omega_{2n-i})\in P_+(A_{2n})| 2(b_1+\dots+b_n)\leq \ell\}.$$ Under the map $\iota: P(A_{2n})^{\sigma}\rightarrow P(C_n)$, there is a natural bijection between $\iota: P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}\rightarrow P^{\ell}(\frg({A_{2n}^{(2)})})$. Hence we will identify the two using the map $\iota$.
The rows and columns of the S-matrix are parameterized by the set $P^{\ell}(\frg({A_{2n}^{(2)}}))$ and $ P^{\ell}(\frg(A^{(1)}_{2n}))^{\sigma}$ respectively. We recall the following Theorem 13.8 \cite{Kac}
\begin{equation}
\label{{eqn:SmatrixforA2n2}}
{S}^{(\ell)}_{\lambda,\mu}(A_{2n}^{(2)})=i^{|\mathring{\Delta}_{+}|}(\ell+2n+1)^{-\frac{1}{2}}\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(-\frac{2\pi i }{\ell+2n+1}\kappa_{\mathfrak{g}}(w( \lambda+\overline{\rho}), \mu+\overline{\rho})\bigg), 
\end{equation}where $\overline{\rho}$ denotes the sum of the fundamental weights of $C_n$. Moreover, the matrix ${S}^{(\ell)}(A_{2n}^{(2)})$ has the following properties \cite{Kac}.
\begin{proposition}\label{prop:propertiesofSmatrixA2n2}
	\label{prop:unitarityforSmatrixA2n2}The matrix $\big({S}^{(\ell)}(A_{2n}^{(2)})\big)_{\lambda,\mu}={S}^{(\ell)}_{\lambda,\mu}({A_{2n}^{(2)}})$  is symmetric and unitary. 
\end{proposition}
\iffalse
\subsubsection{Crossed $S$-matrices associated to arbitrary automorphisms}\label{sec:croosedarbitrary}
Let $\gamma$ be an arbitrary automorphism of a simple Lie algebra $\frg$ and let $\widehat{L}(\frg,\gamma)$ denote the twisted Kac-Moody Lie algebra as defined in Section \ref{sec:affineLiealgtwisted}. Recall there is a natural isomorphism of $\widehat{L}(\frg,\gamma)$ with an twisted affine Kac-Moody Lie algebra of type $X_N^{(m)}$, where the Lie algebra $\frg$ is of type $X_N$ and $X_N^{(m)}$ is determined by the diagram automorphism  $\sigma$ arising from $\gamma$.
Thus there are  natural bijections $$\beta_1: P_{\ell}(\frg)^{\gamma}\simeq P_{\ell}(\frg)^{\sigma}, \ \mbox{and} \ \beta_2:P^{\ell}(\frg,\langle \gamma \rangle )\simeq P^{\ell}(\frg(X_N^{(m)})).$$
Let for any element $(\lambda,\mu)\in P^{\ell}(\frg,\gamma)\times P_{\ell}(\frg)^{\gamma}$, consider the number \begin{equation}\label{eqn:crossedsgeneral}
S^{\gamma}_{\lambda,\mu}:=S^{(\ell)}_{\beta_1(\lambda),\beta_2(\mu)}(X_N^{(m)}),
\end{equation}
where $S^{(\ell)}(X_N^{(m)})$ is the crossed S-matrix at level $\ell$  given by equations \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}}, \ref{{eqn:SmatrixforD43}}, \ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}.
\begin{definition}
	We define the {\em crossed S-matrix} $S^{\gamma}$ at level $\ell$ associated to $\gamma$ to be a matrix whose rows  and columns are parameterized by $P^{\ell}(\frg,\langle \gamma \rangle)$ and $P_{\ell}(\frg)^{\gamma}$ and whose $(\lambda, \mu)$-th entry $S_{\lambda,\mu}^{\gamma}$ is given by Equation \eqref{eqn:crossedsgeneral}.
\end{definition}
\fi
\subsection{Relation with untwisted S-matrices}\label{sec:comparision}This section is motivated by the two observations. First, the equivariantization of a $\Gamma$-crossed modular functor is a modular functor, hence crossed $S$-matrices must be submatrices of an uncrossed $S$-matrix. Secondly, in the {\tt KAC} software, the uncrossed $S$-matrices and the crossed $S$-matrices of type $A_{2n}^{(2)}$ are available for computational purposes.   One can compute all crossed $S$-matrices in the remaining types using {\tt KAC} as follows:



Let $A$ be a Cartan matrix of either of the following types $$A: A_{2n-1}^{(2)}, D_{n+1}^{(2)}, E_6^{(2)}, D_4^{(3)}.$$
We consider the Cartan matrix $A^{t}$ obtained by taking transpose of the matrix $A$. In these cases,  observe that the affine Lie algebra associated to $A^t$ is of untwisted type. They are given as: $$A^t: B_n^{(1)}, C_n^{(1)}, F_4^{(1)}, G_2^{(1)}.$$ If $\mathring{A}$ and $\mathring{A}^t$ denote the Cartan matrix obtained by deleting the $0$-th row and column, then we get $\frg(\mathring{A})$ and $\frg(\mathring{A}^t)$ are Langlands dual. 
Define  the map $\tau:\mathfrak{h}(A)\rightarrow {\mathfrak{h}}(A^t)$ by the following:
\begin{equation}\label{eqn:transposemap}
\Lambda_i \rightarrow\frac{a_i^{\vee}}{a_i}\Lambda_i^{t}, \ \delta \rightarrow \delta^t, 
\end{equation}
where $\Lambda_0,\dots,\Lambda_n$ (respectively $\Lambda_0^{t},\dots,\Lambda_n^{t}$) are affine fundamental weights for the affine Lie algebra associated to $A$ (respectively $A^t$) and $\delta$ (respectively $\delta^t$) as in Section \ref{sec:twistedaffinekmnew}. We now consider the map $\mathring{\tau}: P^{\ell}(\mathfrak{g}(A))\hookrightarrow P^{\ell+h^{\vee}-h}(\mathfrak{g}(A^{t}))$ given by the formula 
\begin{equation}\label{weirdshift}
\mathring{\tau}(\lambda):=\tau(\lambda+\overline{\rho})-\overline{\rho}^t,
\end{equation}
where $\overline{\rho}$(respectively $\overline{\rho}^t$) are sum of the fundamental weights of the horizontal subalgebra of $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. 

The affine Lie algebras of type $A^{t}$ are all untwisted affine Kac-Moody Lie algebra, hence denote by $S_{\lambda,\mu}^{(\ell)}(A^t)$-the $(\lambda,\mu)$-th entry of the  $S$-matrix of type $A^t$ at level $\ell$. We refer the reader to Chapter 13 in \cite{Kac} for more details. The following proposition is well known  and can be checked directly. We also refer the reader to Proposition 3.2 in \cite{AG}.

\begin{proposition}\label{prop:crossedvsuncrossed}
	Let $\mathfrak{g}(A)$ be a twisted affine Kac-Moody Lie algebra associated to the Cartan matrix $A$ of type $A_{2n-1}^{(2)}, D_{n+1}^{(2)}, D_4^{(3)}, E_6^{(2)}$, then the crossed $S$ matrices are related to the $S$ matrices of $\mathfrak{g}(A^t)$ by the following formula
	$${S}_{\lambda,\mu}^{(\ell)}(A)=|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|^{\frac{1}{2}}S_{\mathring{\tau}(\lambda),{\tau}\circ\tau_{\kappa}(\mu)}^{(\ell+h^{\vee}-h)}(A^t),$$ where $h^{\vee}$ and $h$ are the dual Coxeter numbers of the Lie algebra $\mathfrak{g}(A)$ and $\mathfrak{g}(A^t)$ respectively. Moreover, $|\nu_{\frg}(\mathring{Q}^{\vee})/\mathring{Q}|$ is two when $A$ is either $A^{(2)}_{2n-1}$, $D^{(2)}_{n+1}$ and $E^{(2)}_6$ and is three when $A$ is of type $D_4^{(3)}$.
\end{proposition}
\subsubsection{Some computations}\label{sec:usefulcomputations}
We list the following facts which are very useful in computing the crossed S-matrices. Using proposition \ref{prop:crossedvsuncrossed}, we can use \texttt{KAC} to compute the crossed $S$ matrices. 
\begin{itemize}
	\item The case $A_{2n-1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_{n+1}^{(2)}$:
	\begin{itemize}
		\item $\tau\circ\tau_{\kappa}$ is identity.
		\item $\tau(\omega_i)=\omega_i^{t}$ for $1\leq i \leq n-1$ and $\tau(\omega_n)=2\omega_n^t$.
		\item $\mathring{\tau}(\omega_0)=\omega_n^t$.
	\end{itemize}
	\item The case $D_4^{(3)}$:
	\begin{itemize}
		\item $\tau(\omega_1)=3\omega_2^t$ and $\tau(\omega_2)=\omega_1^t$.
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i^{t}$ for $1\leq i\le 2$.
		\item $\mathring{\tau}(\omega_0)=2\omega_2^t$.
	\end{itemize}
	\item The case $E_6^{(2)}$: 
	\begin{itemize}
		\item $\tau(\omega_1)=2\omega_4^t$, $\tau(\omega_2)=2\omega_3^t$, $\tau(\omega_3)=\omega_2^t$, $\tau(\omega_4)=\omega_1^t$. 
		\item $\tau\circ\tau_{\kappa}(\omega_i)=\omega_i$ for $1\leq i\leq 4$.
		\item $\mathring{\tau}(\omega_0)=\omega_3^{t}+\omega_4^t$.
	\end{itemize}
\end{itemize}
\subsection{Explicit description of $\Sigma'$}
The Weyl character formula and the proof of Lemma 9.7 in \cite{BeauHirz} and \cite{Hong}, we get
\begin{equation}
\label{eqn:J}
D_{\omega}(t)={|T_{\sigma,\ell}|}\bigg(\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t))\bigg)^{-2}.
\end{equation} By the definition of $\Sigma'$ and  the Weyl character formula, we get the following: 
\begin{equation}
\label{eqn:normalizedcharacter}
\Sigma'_{t, \mu}={|T_{\sigma,\ell}|}^{-\frac{1}{2}}\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t)|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(t)-e^{-\frac{\alpha}{2}}(t))}\bigg(\sum_{w\in W_{\sigma}}\epsilon(w)e^{(w(\iota(\mu)+\overline{\rho}_{\sigma}))}(t)\bigg),
\end{equation}
where $\overline{\rho}_{\sigma}$ is the sum of the fundamental weights of $\frg_{\sigma}$ and $W_{\sigma}$ is the Weyl group of $\frg_{\sigma}$. 
Recall that by Proposition \ref{prop:vitalbijectionthathongsshouldhavewrittenproperly} there is a natural bijection $\beta :P^{\ell}(\mathfrak{g}(A))\rightarrow T^{reg}_{\sigma,\ell}/W_{\sigma}$, where $\frg(A)$ is a twisted affine Kac-Moody Lie algebra. 
\begin{proposition
	\label{prop:charactertableviaSmatrix}Let $\Delta_{\sigma}$ denote the set of roots of the Lie algebra $\frg_{\sigma}$. Then the relations between the matrix $\Sigma'$ and the crossed $S$-matrices are given by the following:
	$$\Sigma'_{\beta(\lambda),\mu}=i^{|\mathring{\Delta}_{+}|}\bigg(\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda))|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda)))}\bigg)\overline{{S}_{\lambda,\iota(\mu)}^{(\ell)}},$$ where $\iota$ is the natural bijection between $P_\ell(\frg)^{\sigma}  $ and $P_\ell(\frg_{\sigma})$ and ${S}^{(\ell)}_{\lambda,\iota(\mu)}$ denote the crossed $S$-matrices given in Equations  \ref{{eqn:SmatrixforA2n-12}}, \ref{{eqn:SmatrixforDn+12}},\ref{{eqn:SmatrixforD43}},\ref{{eqn:SmatrixforE62}} and \ref{{eqn:SmatrixforA2n2}}. 
\end{proposition}
\begin{proof}We split up the proof of the proposition to case by case for the untwisted affine Lie algebras.
	\subsection{The case $A=A_{2n}^{(2)}$}In this case $\mathring{\frg}=\mathfrak{g}_{\sigma}$. Hence we get $W_{\sigma}=\mathring{W}$ and $\overline{\rho}_{\sigma}=\overline{\rho}$. Let $J_{\iota(\mu)}(\beta(\lambda))=\sum_{w\in W_{\sigma}}\epsilon(w)e^{(w(\iota(\mu)+\overline{\rho}_{\sigma}))}(\beta(\lambda))$. In this case, the bijection $\beta$ is given by the following $\beta(\lambda)=\exp(\frac{2\pi i} {\ell+h^{\vee}}(\nu_{\frg(A)}(\lambda+\overline{\rho})))$, where $h^{\vee}$ is the dual Coxeter number. Hence we get 
	\begin{eqnarray}
	\label{eqnarray:mainfuldeduction1}
	J_{\iota(\mu)}(\beta(\lambda))&=&\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg(\kappa_{\mathfrak{g}(A)}(w(\iota(\mu)+\overline{\rho}),\lambda+\overline{\rho})\bigg),\\
	&=&i^{|\mathring{\Delta}_{+}|}(\ell+2n)^{\frac{1}{2}}{\overline{{S}^{(\ell)}_{\lambda,\iota({\mu})}}(A_{2n}^{(2)})}.
	\end{eqnarray}Hence we get the following 
	\begin{equation}
	\label{equation:characterfora2n2n}
	\Sigma'_{\beta(\lambda),\mu}(\ell)=i^{|\mathring{\Delta}_{+}|}\bigg(\frac{\prod_{\alpha \in \Delta_{\sigma,+}}|e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda))|}{\prod_{\alpha \in \Delta_{\sigma,+}}(e^{\frac{\alpha}{2}}(\beta(\lambda))-e^{-\frac{\alpha}{2}}(\beta(\lambda)))}\bigg)\overline{{S}^{(\ell)}_{\lambda,\iota({\mu})}}(A_{2n}^{(2)}).
	\end{equation}
	This completes the proof in the case $A=A_{2n}^{(2)}$. 
\end{proof}


\subsection {The case $A$ is either $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $D_{4}^{(3)}$, $E_6^{(2)}$}In these cases the Lie algebras $\mathring{\frg}$ and the $\mathfrak{g}_{\sigma}$ are Langlands dual. In particular, $\mathring{W}=W_{\sigma}$ and $\mathring{Q}^{\vee}$ is equal to $Q(\mathfrak{g}_{\sigma})$ and vice versa. As before, let $\beta: P^{\ell}(\frg(A))\rightarrow T^{reg}_{\sigma,\ell}$ be the natural bijection. Then define a function $J_{A}$ from the set $T^{reg}_{\sigma,\ell}\times P^{\ell}(\mathfrak{g})^{\sigma}$ given by the formula 
$$ J_{A}(\beta(\lambda), \mu)=\sum_{w\in \mathring{W}}\epsilon(w)\exp\bigg((w(\iota(\mu)+\overline{\rho}))(\beta(\lambda))\bigg).$$
Let $\check{P}_{\ell}(A)=\{\check{\lambda}\in \check{P}(\mathring{\frg})|\theta(\check{\lambda})\leq \ell\}$, where $\theta$ is the highest root of $\mathring{\frg}$. There is a natural bijection $\eta: P^{\ell}(\frg)^{\sigma}\rightarrow \check{P}_{\ell}(A)$. Similarly define another function $J'_A$ on $P^{\ell}(\frg(A))\times \check{P}_{\ell}(A)$ by the formula:
$$ J'_{A}(\tilde{\lambda}, \tilde{\mu})=\sum_{w\in {W}_{\sigma}}\epsilon(w)\exp\frac{2\pi i }{\ell+h^{\vee}}\bigg((w(\lambda+\overline{\rho}))(\tilde{\mu}+\check{\overline{\rho}})\bigg),$$ where $\overline{\rho}$ and $\check{\rho}$ are the sum of the fundamental weights (respectively coweights) of the Lie algebra $\mathring{\frg}$. By a direct calculation, we can check that 
$J_A(\beta(\lambda),\mu)=J'_A(\lambda,\eta(\mu)).$

To a Cartan matrix $A$ of types $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $E_6^{(2)}$, V. Kac \cite{Kac} associates another Cartan matrix $A'$ of type $D_{n+1}^{(2)},A_{2n-1}^{(2)}$, $E_6^{(2)}$ respectively. Since $\frg_{\sigma}$ and $\mathring{\frg}$ are Langlands dual, we observe by the calculations in Section \ref{section:crossedS} that there is a natural  bijection $\eta': \check{P}_{\ell}(A)\rightarrow P^{\ell}(\frg(A'))$. In particular:
\begin{equation}
\label{eqn:complicatedcalculationthattookwednesday}J_{A}(\beta(\lambda),\mu)=i^{|\mathring{\Delta}_{+}|}|T_{\sigma,\ell}|^{\frac{1}{2}}\overline{{S}^{(\ell)}_{\lambda,\eta'\circ\eta({\mu})}}(A).
\end{equation}Substituting Equation \eqref{eqn:complicatedcalculationthattookwednesday} in Equation \eqref{eqn:normalizedcharacter},  we get the required result by observing that $\iota=\eta'\circ\eta$.

\subsection{Dimensions using the formula}\label{sec:dimensioncrosscheck1}In this subsection, we use the Verlinde formula \eqref{conj:main1} stated in the introduction to compute dimensions of some twisted conformal blocks. We also discuss in specific cases, how to cross check our calculations. We start with examples of \'etale cases.
\begin{example}\label{ex:etale}
	Let $\Gamma=\langle \gamma \rangle$ be a cyclic group of order $m$ and $\frg$ is either of type $A_{n\geq 2}, D_{n\geq 4}, E_6$. Let $\widetilde{C}\rightarrow C$ is an \'etale cover with Galois group $\Gamma$, then the dimension of the twisted conformal block at level one
	\begin{equation}\label{eqn:arbitrarygenusverlindeexampleetale1}
	\dim_{\mathbb{C}}\mathbb{V}_{\Gamma}^{\dagger}(\widetilde{C},C)=|P_1(\frg)^{\gamma}|(S_{0,0})^{2-2g},
	\end{equation} where $S_{0,0}$ is $\frac{1}{\sqrt{n+1}}$, $\frac{1}{2}$,$\frac{1}{\sqrt{3}}$ for $\frg=A_n,D_n, E_6$ respectively. 
	
	Consider an elliptic curve $\widetilde{C}$ with rotation of order $m$. Then $C$ is also an elliptic curve and the map $\widetilde{C}\rightarrow C$ is an \'etale cyclic cover of order $m$. We can degenerate $C$ to a nodal elliptic curve and $\widetilde{C}$ to a cycle of $\mathbb{P}^1$'s with $m$ components. In this case, by factorization, we can cross check our answer by reducing it to the case of trivial \'etale cover $\widetilde{C}$ of $\mathbb{P}^1$ along with two marked points. Since we are in the \'etale case, no crossed $S$-matrices are involved and  we can apply the untwisted Verlinde formula after using the group action to bring all the marked points $\widetilde{\bf{p}}$ in $\widetilde{C}$ in the same component.

\end{example}
\begin{remark}
Example \ref{ex:etale} is a priori neither covered by the untwisted Verlinde formula nor by the conjectural Verlinde formula in \cite{FSS}. 
\end{remark}
 \begin{remark}
	G. Faltings \cite{Faltingsnew}  has shown that in the untwisted case that  conformal blocks for a simply laced Lie $\frg$ algebra has dimension $|Z_{G}|^{g}$, where $Z_{G}$ is the center of the simply connected group with Lie algebra $\frg$.  This can also be seen from the Verlinde formula. The formula in Equation \eqref{eqn:arbitrarygenusverlindeexampleetale1} can be thought of a generalization of the result to the twisted case. 
\end{remark}

We end the section with some examples of ramified cases.
\begin{example}\label{ex:double}Let $\frg=A_{2r-1}^{(2)}$ and consider a double cover $\widetilde{C}\rightarrow C$ ramified at $2n$ points $\widetilde{p}$ and let $g$ be the genus of $C$. The level one weights of $A^{(2)}_{2r-1}$ are $\{0,\dot{\omega}_1\}$. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted level one conformal block is
	$$\dim_{\mathbb{C}}\mathbb{V}_{\vec{0}}^{\dagger}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p})=2^{g}r^{g+n-1}.$$ 
\end{example}
The computations in Section \ref{sec:usefulcomputations}, tell us that the crossed $S$-matrix is given by the following $2\times 2$ matrix.
$$S^{\gamma}=\sqrt{2} \cdot \begin{pmatrix} 
\frac{1}{{2}}& \frac{1}{{2}} \\
\frac{1}{{2}} & -\frac{1}{{2}}
\end{pmatrix}.$$

If $C=\mathbb{P}^1$ and $\widetilde{C}$ is a genus $n-1$  curve which is double cover of $\mathbb{P}^1$ ramified at $2n$ points. We now discuss how to cross check the answer above using factorization theorem and invariants of representations.

 In this case, we can degenerate $\widetilde{C} \rightarrow {C}$ to a double cover $\widetilde{D}\rightarrow D$, where $\widetilde{D}$ is a chain of $n-1$ elliptic curves where the end components have three ramification points and all the other components have two ramfication points. Moreover the nodes of $\widetilde{D}$ are ramification points. By the factorization theorem, we can reduce to check  the following for double covers $\widetilde{C}\rightarrow \mathbb{P}^1$ ramified at four points:

	\begin{enumerate}
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,0}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,\dot{\omega}_1,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
	\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$. 
\end{enumerate}

We can now degenerate the double cover  $\widetilde{C}$ of  $\mathbb{P}^1$ with four ramification points by degenerating the $\mathbb{P}^1$ to a reducible $\mathbb{P}^1$ with two components meeting at one point, which is \'etale. Moreover each component has two ramification points. Then normalizing we get two disjoint copies of $\mathbb{P}^1$ with a double cover ramified at two points. Hence by factorization, we are reduced to check the following
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,0,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is even }\\
0 & \mbox{otherwise},
\end{cases}
\]where  $\omega_i$ is the $i$-th fundamental weight of $A_{2r-1}$ attached to an \'etale point and also 
\[
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,\dot{\omega}_1,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
1 & \mbox{if $i$ is odd}\\
0 & \mbox{otherwise}.
\end{cases}
\
This can be verified directly from the fact that these conformal blocks are isomorphic to the space of invariant $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$ (respectively $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\mathbb{C}^{2r}\otimes \Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$) which has dimensions one or zero depending on the parity of $i$. Further the dimension calculation for the ramified double cover $\mathbb{P}^1\rightarrow \mathbb{P}^1$ obtained above also agrees with the computations from the twisted Verlinde formula. The general case where genus of $C$ is positive can be approached similarly. 
\begin{example}\label{ex:a2r}
	Consider the Lie algebra $A^{(2)}_{2r}$. The level one weights of $A^{(2)}_{2r}$ is just the $r$-th fundamental weight $\dot{\omega}_r$ of the Lie algebra of type $B_r$. Consider $\mathbb{P}^1$ as a ramified double cover of $\mathbb{P}^1$. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted conformal blocks at level one. 
	\begin{equation}
	\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=1.
	\end{equation}
	Here $\omega_i$ is the $i$-th fundamental weight of $A_{2r}$ attached to an \'etale point. If $i=0$, Example \ref{ex:a2r} can be crossed checked by Lemma \ref{lem:linebundlecase}. For all $i$'s,  this example can be crossed checked similarly as in Example \ref{ex:double} by embedding into the space of invariants.
\end{example}


\begin{example}\label{ex:noncheckable}Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$. We consider the triple $\vec{0}=(0,0,0)$ of weights in $P^{\ell}(D_4^{(3)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. 
\begin{itemize}
\item Let $\ell=1$. The Verlinde formula \ref{conj:main1}, gives that the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is two dimensional. We use the fact that $0$ is the only fixed point of $P^1(D_{4}^{(1)})$ under the diagram automorphism and $S_{0,0}=\frac{1}{2}$. 
\item Let $\ell=2$. By Proposition \ref{prop:crossedvsuncrossed}, Section \ref{sec:usefulcomputations} and using \texttt{KAC} software, we get the crossed $S$-matrix: 
$$S^{\gamma}=\sqrt{3}\cdot \begin{pmatrix}
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}}  \\
\frac{1}{\sqrt{6}} & -\frac{1}{\sqrt{6}} 
\end{pmatrix}.$$
The fixed points of $P^2(D_{4}^{(1)})$ under the diagram automorphism are $\{0,\omega_2\}$ and from the uncrossed $S$-matrix we get $S_{0,0}=\frac{1}{4\sqrt{2}}$ and $S_{0,\omega_2}=\frac{1}{2\sqrt{2}}$. Now the Verlinde formula \ref{conj:main1} implies that 
$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=3.$
\end{itemize}

\end{example}
\begin{remark}
	Since the curve $\widetilde{C}$ has genus one, the twisted conformal blocks $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ do not embed in the space of invariants of tensor product representations. Hence the dimension of invariants do not give any natural upper bounds in these cases. This is in stark contrast with the situation for untwisted conformal blocks. Also since the moduli space of $\Gamma$-covers of $\mathbb{P}^1$ with three marked points have genus zero, we do not have a way to degenerate to simpler cases using factorization. 	Hence unlike the other example considered in this section, we do not have any other way to cross check the calculations in Example \ref{ex:noncheckable}.
\end{remark}
We now discuss an example of with $|\Gamma|=3$ with two ramification points on $\mathbb{P}^1$. 
\begin{example}\label{ex:checkablenontrivial}Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$. Here assume that the first two marked points are ramified and the third point is \'etale. Hence $\widetilde{C}$ is again $\mathbb{P}^1$. We consider the triple $\vec{0}=(\dot{0},\dot{0},0)$ of weights in $(P^{\ell}(D_4^{(3)}))^2\times P^{\ell}(D_4^{(1)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. 
	\begin{itemize}
		\item Let $\ell=1$. The Verlinde formula \ref{conj:main1}, gives that the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is one dimensional.
	\item Let $\ell=2$. The calculation of the crossed $S$-matrix in Example \ref{ex:noncheckable} and the Verlinde formula \ref{conj:main1} implies that 
		$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0}}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=1.$
		\end{itemize}
These numbers agree with the dimensions coming from Lemma \ref{lem:linebundlecase} and hence cross checks the Verlinde formula. 
\end{example}
\begin{remark}
	Example \ref{ex:checkablenontrivial} provides a non-trivial example of the Verlinde formula for twisted conformal blocks that is not covered by the conjectural Verlinde formula in \cite{FSS}. Recall that the conjecture in \cite{FSS} concerns with diagram automorphisms of order two. 
\end{remark}

\iffalse
\section{Dimensions of the conformal blocks using the Verlinde formula}\label{sec:dimensioncrosscheck}In this subsection, we use the Verlinde formula \ref{conj:main1} stated in the introduction to compute dimensions of some twisted conformal blocks. In various checks, we cross check our answer by obtaining the same result by using different methods like factorizations etc.
\subsection{\'Etale Cases}Let $\Gamma=\langle \gamma \rangle$ be a cyclic group of order $m$ acting on $\frg$ and consider an \'etale-Galois cover $\widetilde{C}\rightarrow C$ with Galois group $\Gamma$. We assume that $\frg$ is either of type $A_{n\geq 2}, D_{n\geq 4}, E_6$. We consider the following cases. 
\subsubsection{Genus zero case}Assume that $C=\mathbb{P}^1$, then $\widetilde{C}=\sqcup_{i=0}^{m-1}\mathbb{P}^1$ where $\gamma$ sends the $i$-th component to the $i+1$-th component.  Further assume that we have three marked points $\widetilde{q}$, $\widetilde{p}_1$ and $\widetilde{p}_2$ on $\widetilde{C}$ and an integer $i$ such that $\gamma^{i} \cdot \widetilde{p}_2$, $\widetilde{q}$ and $\widetilde{p}_1$ are in the same component of $\widetilde{C}$. Let ${\bf p}$ be the image of the tuple $(\widetilde{p}_1,\widetilde{p}_2,\widetilde{q})$ in $\mathbb{P}^1$.

Let $\lambda \in P_{1}(\frg)$. We consider the following tuples $(\widetilde{C}, \mathbb{P}^1,\widetilde{p}_1, \widetilde{p_2}, \widetilde{q},\lambda, \lambda^*,0)$ and $(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2}, \widetilde{q}, \lambda, \gamma^{i}\cdot\lambda^*,0)$ and the corresponding twisted  conformal blocks $\mathbb{V}^{\dagger}_{\lambda,\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1,\widetilde{p}_1, \widetilde{p_2},\widetilde{q},{\bf p})$ and $\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2},\widetilde{q},{\bf p})$ attached to the data. By construction (Section \ref{subsubsec:equivariance}), both conformal blocks have the same dimension and moreover since $(\widetilde{p}_1, \gamma^{i}\widetilde{p}_2, \widetilde{q})$ are in the same component of $\widetilde{C}$, we get the following by construction: 
\begin{proposition}
	\label{prop:genuszerofirstexample}$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0,\Gamma}(\widetilde{C}, \mathbb{P}^1, \widetilde{p}_1, \gamma^{i}\cdot\widetilde{p_2},\widetilde{q},{\bf p})=\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0}(\mathbb{P}^1, {\bf p})$, where 
	\[\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\gamma^i\cdot\lambda^*,0}(\mathbb{P}^1, {\bf p})=
	\begin{cases}
	1 & \gamma^i\cdot\lambda^*=\lambda^*, \\	
	0 & \mbox{otherwise}
	\end{cases}
	\]
\end{proposition}The dimension equality of 
Proposition \ref{prop:genuszerofirstexample} can be seen directly from the Verlinde formula in Theorem \ref{conj:main1} taking into account that the untwisted $S$-matrices are unitary and $\Gamma^\circ$ is trivial. Hence this verifies Theorem \ref{conj:main1} independently in this case. 

\subsubsection{Genus one case}\label{sec:positivegenusone}Assume that $C$ is an elliptic curve and $\widetilde{C}$ is another elliptic curve and $\widetilde{C}\rightarrow C$ is an \'etale Galois cover with Galois group $\Gamma$. The cover $\widetilde{C}\rightarrow C$ can be degenerated to a curve $\widetilde{D}\rightarrow D$, where $\widetilde{D}$ is a nodal curve with $m$-copies of $\mathbb{P}^1$ forming regular $m$-polygon and $D$ is an elliptic curve with one cycle pinched. Let ${\widetilde{p}}$ be any marked point of $\widetilde{C}$ and $p$ be its image in $C$. Note that it is an unramified point. We consider the twisted conformal block $\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)\cong \mathbb{V}^{\dagger}_{0,\Gamma}(\widetilde{C},C,\widetilde{p},p)$ (by Propagation of vacua). By factorization (Proposition \ref{prop:factorizationofhongkumar}), we get 
$$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=\sum_{\lambda \in P_{1}(\frg)}\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \gamma\cdot \lambda^*}(\mathbb{P}^1,{q,q'} ).$$ By applying Proposition \ref{prop:genuszerofirstexample}, we get 
	$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=|P_{1}(\frg)^{\gamma}|.$
On the other hand if we apply the condition that $n=0$ and $g=1$ in the Verlinde formula in Theorem \ref{conj:main1}, we also get $|P_{1}(\frg)^{\gamma}|$.
\subsubsection{Genus one case with one marked point}\label{sec:genusonenontrivialmarkedpoint}Let $\frg=A_{N}$ and $\gamma$ is the diagram automorphism of $A_{N}$. We denote the fundamental weights by $\omega_i$ for $0\leq i\leq N-1$. Then $|P_{1}(A_N)^\gamma|$ is two if $N$ is odd and one if $N$ is even. We have the following proposition to supplement the  Theorem \ref{conj:main1}.
\begin{proposition}Let $\widetilde{C}$ and $C$ be as above and $\widetilde{{p}}$ be a marked point in $\widetilde{C}$ and ${p}$ be denote the image of $\widetilde{{p}}$ in $C$. 
\begin{enumerate}
	\item Let $\frg={A_{2r-1}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=
	  2 $  if $i$ is even and $0$  otherwise.	 
		\item Let $\frg=A_{2r}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=1$, for all $i$. 
\end{enumerate}
\end{proposition}
\begin{proof}
We degenerate the cover $\widetilde{C}\rightarrow C$ to $\widetilde{D}\rightarrow D$ as in the Section \ref{sec:positivegenusone}. We apply the factorization theorem and get 
$$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\omega_i,\Gamma}(\widetilde{C},C,\widetilde{{p}}, {p})=\sum_{\lambda \in P_{1}(\frg)}\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \gamma\cdot \lambda^*,\omega_i}(\mathbb{P}^1,{\bf{p}'} ).$$
It is well known \cite{Fakhruddin:12} that if $\frg=A_{r}$, then the dimension of level one conformal blocks with three marked points $\dim_{\mathbb{C}}\mathbb{V}_{\omega_i,\omega_j,\omega_k}(\mathbb{P}^1,{\bf{p}}')$ is one if and only $(r+1)| (i+j+k)$ and is zero otherwise. Using this we have the following:
\begin{itemize}
	\item Let $\frg=A_{2r-1}$. If $i$ is odd and $\lambda=\omega_m$, we get $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda, \lambda,\omega_i}(\mathbb{P}^1,{\bf{p}'} )=0$. This follows from the fact that by choice $2m+i$ is odd and hence $2\lambda+ \omega_i$ is not in the root lattice of $A_{2r-1}$. 
	\item Let $\frg=A_{2r-1}$. If $i=2a$ is even, $a\leq r-1$ and $\lambda=\omega_m$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\lambda,\lambda,\omega_{2a}}(\mathbb{P}^1,{\bf p}')$ is one dimensional if and only if $2m+2a$ is divisible by $2r$. In the range $0\leq m<2r$, then $m=r-a$ or $(2r-a)$ are the two solutions. 
	\item Let $\frg=A_{2r}$. For any $\lambda=\omega_m$, we get the condition $2m+i$ is divisible by $2r+1$ and $0\leq m \leq 2r$ has exactly one solution.   
\end{itemize}
Thus the result follows.
	\end{proof}

This can also be checked by using the Verlinde formula  \ref{conj:main1}.

\subsubsection{\'Etale double cover of a genus two curve}\label{sec:etalegenustwo} Let $\widetilde{C}$ be a genus $3$ curve and $C$ be a genus two curve such that $\widetilde{C}\rightarrow C$ is an \'etale Galois cover of degree $2$. Let $\frg=A_N$ and consider the conformal blocks $ \mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)$. We can degenerate the cover such that it normalization is a disjoint union of \'etale double covers of elliptic curves. By the computation in Section \ref{sec:genusonenontrivialmarkedpoint}, we get the following:
\begin{enumerate}
	\item Let $\frg={A_{2r-1}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=
	4r. $
	\item Let $\frg={A_{2r}}$, then $\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=
	2r+1.$
\end{enumerate}
\subsubsection{Arbitrary genus case}Let $\mu$ be any element  in $P_{1}(\frg)$ and $S$ be the uncrossed $S$-matrix for $\widehat{L}({\frg})$ at level one.  We observe the following:
\begin{enumerate}
	\item If $\frg=A_{n}$,  then $S_{0,\mu}=\frac{1}{\sqrt{n+1}}$.
	\item If $\frg=D_n$, then $S_{0,\mu}=\frac{1}{2}$.
	\item If $\frg=E_6$, then $S_{0,\mu}=\frac{1}{\sqrt{3}}$. 
\end{enumerate}Let $\gamma$ be an automorphism of order $m$ acting on $\frg$ and let $\widetilde{C}\rightarrow C$ be an \'etale  cyclic Galois cover of order $m$. Let $g$ be the genus of $C$. Then by the Verlinde formula \ref{conj:main1}, we get 
\begin{equation}
\label{eqn:arbitrarygenusverlindeexampleetale}
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\Gamma}(\widetilde{C},C)=|P_{1}(\frg)^{\gamma}|({S_{0,0}})^{2-2g}.
\end{equation}
The above can be checked directly using the degenerations and the genus zero computations in Sections \ref{sec:genusonenontrivialmarkedpoint}, \ref{sec:etalegenustwo} for the group $\frg=A_N$ and $\gamma$ being the diagram automorphism of $A_{N}$ directly using the degenerations and the genus zero computations in Sections \ref{sec:genusonenontrivialmarkedpoint}, \ref{sec:etalegenustwo} for the group $\frg=A_N$ and $\gamma$ is the diagram automorphism of $A_{N}$.

\subsection{Ramified Cases with diagram automorphisms of order two}We use compute some dimensions of twisted covers of conformal blocks associated diagram automorphism and ramified cover of curves.
\subsubsection{Twisted affine Lie algebra: $A^{(2)}_{2r-1}$ at level one}\label{sec:twistedfirst}Consider the diagram automorphism of $A_{2r-1}$. The level one weights of $A^{(2)}_{2r-1}$ are $\{0,\dot{\omega}_1\}$. By Proposition \ref{prop:crossedvsuncrossed} and the computations in Section \ref{sec:usefulcomputations}, tell us that the crossed $S$-matrix is given by the following $2\times 2$ matrix.
$$S^{\gamma}=\sqrt{2} \cdot \begin{pmatrix} 
\frac{1}{{2}}& \frac{1}{{2}} \\
\frac{1}{{2}} & -\frac{1}{{2}}
\end{pmatrix}.$$
  Consider the Galois two cover  $\mathbb{P}^1\rightarrow \mathbb{P}^1$ ramified at two points $\widetilde{p}_1$ and $\widetilde{p}_2$ and let $\widetilde{p}_3$ be any \'etale point on $\mathbb{P}^1$. Then using the Verlinde formula \ref{conj:main1} and the \texttt{KAC} software, we get the dimension of the level one twisted conformal block
\[
	\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,0,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
	1 & \mbox{if $i$ is even }\\
	0 & \mbox{otherwise},
	\end{cases}
	\]where  $\omega_i$ is the $i$-th fundamental weight of $A_{2r-1}$. Similarly, we can also check that 
	\[
	\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{0,\dot{\omega}_1,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=\begin{cases}
	1 & \mbox{if $i$ is odd}\\
	0 & \mbox{otherwise}.
	\end{cases}
	\
	This can be verified directly from the fact that these conformal blocks are isomorphic to the space of invariant $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$ (respectively $\operatorname{Hom}_{\mathfrak{sp}(2r)}(\mathbb{C}^{2r}\otimes \Lambda^{i}\mathbb{C}^{2r},\mathbb{C})$) which has dimensions one or zero depending on the parity of $i$. 
	\subsubsection{$A_{2n-1}^{(2)}$ and four ramification points at level one}\label{sec:4ram}Consider the degree two Galois cover of $\mathbb{P}^1$ ramified at four points ${\widetilde{\bf p}}$. Then $\widetilde{C}$ is an elliptic curve. By the crossed $S$-matrix in Section \ref{sec:twistedfirst} and the Verlinde formula \ref{conj:main1}, we get the following: 
	\begin{enumerate}
		\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,0}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
		\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,\dot{\omega}_1,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$;
		\item $\dim_{\mathbb{C}}\mathbb{V}_{0,0,0,\dot{\omega}_1}^{\dagger}(\widetilde{C}, \mathbb{P}^1, \widetilde{\bf{p}}, {\bf {p}})=1$. 
	\end{enumerate}

We can now degenerate the double cover of  $\mathbb{P}^1$ with four marked points to a reducible $\mathbb{P}^1$ with two components meeting at one point, which is \'etale. Then normalizing we get two disjoint copies of $\mathbb{P}^1$ with a double cover ramified at two points.  By factorization and the calculations in Section \ref{sec:twistedfirst} we get back the above numbers. 
\subsubsection{$A_{2r-1}^{(2)}$ and arbitrary genus at level one}Let $C$ be a smooth curve of genus $g$ and consider a double cover ${\widetilde{C}}$ of $C$ which is ramified at $2n$ points $\widetilde{\bf p}$. Assume that $\widetilde{C}$ is connected and hence is of genus $2g+n-1$.  Consider the $2n$-tuple of  weights $\vec{0}=(0,\dots, 0)$. Then by the Verlinde formula  \ref{conj:main1}, we get 
$$\dim_{\mathbb{C}}\mathbb{V}_{\vec{0}}^{\dagger}(\widetilde{C}, C, \widetilde{\bf p}, {\bf p})=2^{g}r^{g+n-1}.$$ 
If we assume that $g=0$, then $\widetilde{C}$ is a curve of genus $n-1$. We can degenerate the cover $\widetilde{C}\rightarrow \mathbb{P}^1$ to cover $\widetilde{D}'\rightarrow D$, where $\widetilde{D}'$ has $n-1$-components consists of a chain of elliptic curves such that the two extreme components has three ramification points and all others have two ramification points. Moreover, all the nodes are also ramification points. We can applying the factorization theorem and apply the calculations in Section \ref{sec:4ram} to get the dimension of the twisted conformal block is $r^{n-1}$. This also verifies the Verlinde formula \ref{conj:main1} in this case. 
\subsubsection{Twisted affine Lie algebra: $A^{(2)}_{2r}$ in genus zero}Consider the diagram automorphism of $A^{(2)}_{2r}$. The level one weights of $A^{(2)}_{2r}$ is just the $r$-th fundamental weight $\dot{\omega}_r$ of the Lie algebra of type $B_r$. Consider the same data of the curve and marked points as in Section \ref{sec:twistedfirst}. Then by the Verlinde formula  \ref{conj:main1}, we get the dimension of the twisted conformal blocks at level one. 
\begin{equation}
\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})=1.
\end{equation}
Again this can be verified directly by the fact that $\mathbb{V}^{\dagger}_{\dot{\omega}_r,\dot{\omega}_r,\omega_i}(\mathbb{P}^1, \mathbb{P}^1, {\widetilde{\bf{p}}}, {\bf p})$ is isomorphic to the space $\operatorname{Hom}_{\mathfrak{so}(2r+1)}(V_{\dot{\omega}_r}\otimes  V_{\dot{\omega}_r}\otimes \wedge^{i}\mathbb{C}^{2r+1},\mathbb{C})$, where $V_{\dot{\omega}_r}$ are irreducible representations of $\mathfrak{so}(2r+1)$ with highest weight $\dot{\omega}_r$. This space of invariants is always one dimensional by \cite{KempfNess:88}.

\subsection{The twisted affine Lie algebra $D_4^{(3)}$}Consider a connected ramified Galois cover $\widetilde{C}\rightarrow \mathbb{P}^1$ of order three with three marked points $\widetilde{\bf p}$. By the Riemann-Hurwitz formula, we get that $\widetilde{C}$ is an elliptic curve. We consider the triple $\vec{0}=(0,0,0)$ of weights in $P^{\ell}(D_4^{(3)})$ and consider the twisted conformal block $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ at level $\ell$. 
\begin{remark}
	Since the curve $\widetilde{C}$ has genus one, like in the untwisted case,  the twisted conformal blocks $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ do not embed in the space of invariants of tensor product representations. Hence the dimension of invariants do not give any natural upper bounds. This will be clear in the next two examples. 
\end{remark}
\subsubsection{The case $\ell=1$}In this case, the set $P^{1}(D_4^{(3)})$ and it follows that the crossed $S$-matrix is has integer $1$. Now by the uncrossed $S$-matrix for $D_4^{1}$ at level one has $S_{0,0}=\frac{1}{2}$. Hence by the Verlinde formula \ref{conj:main1}, it follows that $\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})$ is two dimensional.
\subsubsection{The case $\ell=2$} The set $P^{2}(D_{4}^{(3)})=\{0, \dot{\omega}_2\}$. By Proposition \ref{prop:crossedvsuncrossed}, Section \ref{sec:usefulcomputations} and using \texttt{KAC} software, we get the crossed $S$-matrix: 
$$S^{\gamma}=\sqrt{3}\cdot \begin{pmatrix}
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}}  \\
\frac{1}{\sqrt{6}} & -\frac{1}{\sqrt{6}} 
\end{pmatrix}.$$
The fixed points of $P^1(D_{4}^{(1)})$ under the diagram automorphism are $\{0,\omega_2\}$ and from the uncrossed $S$-matrix we get $S_{0,0}=\frac{1}{2\sqrt{8}}$ and $S_{0,\omega_2}=\frac{1}{\sqrt{8}}$. Now the Verlinde formula \ref{conj:main1} implies that 
$\dim_{\mathbb{C}}\mathbb{V}^{\dagger}_{\vec{0}}(\widetilde{C}, \mathbb{P}^1, {\widetilde{\bf {p}}}, {\bf{p}})=3.$
\fi
\fi
