\subsection{Actions of algebraic groups on affine varieties}
We recall the following framework and basic facts about actions of algebraic groups.
Let $\Gamma$ be a reductive algebraic group acting on an affine variety $X$.
The following holds (see Section 8.3 in \cite{Humphreys} and Lemma 3.3 in \cite{Newstead})
\begin{proposition}
	All the orbits of $\Gamma$ in $X$ are locally closed. For a $\Gamma$-orbit $\mathcal{O}$ in $X$, it holds that $\overline{\mathcal{O}}\backslash \mathcal{O}$ is the union of orbits of smaller dimension.
\end{proposition}
\begin{proposition}\label{prop:sepinvs} If $W_1$ and $W_2$ are two closed disjoint $\Gamma$-stable subsets of $X$, then there is an element $f\in K[X]^{\Gamma}$ such that $f(W_1) = 1$ and $f(W_2)=0$.
In other words- we can separate the subsets $W_1$ and $W_2$ by an invariant polynomial.
\end{proposition}

\end{section}

\begin{section}{Finite dimensional Hopf algebras in braided fusion categories}\label{sec:hopffusion}
Let $H$ be a finite dimensional Hopf algebra in a braided fusion category $\mathcal{C}$.
The coradical filtration of $H$ is defined as follows (see Chapter IX of \cite{Sweedler} and \cite{AS98}):
\begin{itemize}
	\item $H_0\subseteq H$ is the coradical. It is the sum of all simple subcoalgebras of $H$. This is dual to the operation of taking the quotient of $H$ by its Jacobson radical.
	\item For every $n> 0$ we define $H_n = \text{Ker} (H\stackrel{\Delta}{\to} H\otimes H\to (H/H_{n-1})\otimes (H/H_0)$.
	Equivalently, $H_n = \text{Ker}\big(H\stackrel{\Delta^{n-1}}{\to}H^{\otimes n}\to (H/H_0)^{\otimes n}\big)$.
\end{itemize}
If $H$ satisfy the dual Chevalley property, i.e. the tensor product of semisimple $H$-comodules is again a semisimple $H$-comodule, then $H_0$ is also a subalgebra of $H$, and not only a subcoalgebra (see \cite{AGM}). In this case the filtration is a filtration of algebras as well, that is $H_i\cdot H_j \subseteq H_{i+j}$.
As a result, the associated graded object \begin{equation}H_{gr} := \oplus H_n/H_{n-1}\end{equation} is a graded Hopf algebra. We will say that $H$ is \textit{coardically graded} if $H\cong H_{gr}$ as Hopf algebras. The grading gives a split surjection $\pi:H_{gr}\to H_0$ of Hopf algebras.
Using the process of Bosonization (or Radford-Majid biproduct) one can also write this algebra in the form
$H_{gr} = H_0\# R$ where $R$ is a graded Hopf algebra in the category of Yetter-Drinfeld modules over $H_0$.
As a vector space \begin{equation}R=\{r\in H_{gr}| (1\otimes \pi)\Delta(r) = r\otimes 1\in H_{gr}\otimes H_0\}\end{equation} and $R_0=\textbf{1}$.
See \cite{AS10} for the description of $R$ as a Hopf algebra in $_{H_0}^{H_0}\mathcal{YD}$.

The following lemma is the first step in proving Theorem \ref{thm:main2}:
\begin{lemma}\label{lem:genHgenR}
Let $A$ be a finite dimensional semisimple Hopf algebra.
The following conditions are equivalent:
\begin{enumerate}
\item Every finite dimensional Hopf algebra $H$ in which the coradical $H_0$ is isomorphic to $A$ is generated by the zeroth and first levels of its coradical filtration.
\item Every coardically graded finite dimensional Hopf algebra $H$ in which the coradical $H_0$ is isomorphic to $A$ is generated by the zeroth and first levels of its coradical filtration.
\item Every coradically graded finite dimensional Hopf algebra $R\in ^A_A\mathcal{YD}$ in which $R_0=\textbf{1}$ is generated by its primitive elements.
\end{enumerate}
\end{lemma}
\begin{proof}
The first condition clearly implies the second one. On the other hand, if the second condition holds and $H$ is a Hopf algebra such that $H_0\cong A$, we can pass to the associated graded Hopf algebra $H_{gr}$. Since this Hopf algebra is coardically graded the second condition implies that it is generated by its zeroth and first terms of the coradical filtration, and the same thus holds also for $H$ (see Lemma 2.2. in \cite{AS98}).

We next prove that the second and third conditions are equivalent.
Indeed, if $H$ is coradically graded then the above discussion implies that $H\cong H_0\# R$ where $R$ is a coradically graded Hopf algebra in $_A^A\mathcal{YD}$. It then holds that $H$ is generated by its first and zeroth terms of its coradical filtration if and only if the same holds for $R$. But this is equivalent to $R$ being generated by its primitive elements.
\end{proof}
\begin{lemma}\label{lem:pgen} (see also Lemma 5.5 in \cite{AS00})
Assume that $R$ is a Hopf algebra inside a braided fusion category $\mathcal{C}$.
If $R$ is generated by $\text{P}(R)$, and $R^*$ is generated by $\text{P}(R^*)$, then $R$ is isomorphic to $\text{B}(\text{P}(R))$ (that is: $R$ is a Nichols algebra).
\end{lemma}
\begin{remark} This proposition also holds if one replaces the braided fusion category with a finite braided tensor category.
\end{remark}
\begin{proof}
Write $\text{P}(R) = V$ and $\text{P}(R^*) = W$.
Write $\pi:T(V)\to R$ for the resulting surjective Hopf-algebra map in $\text{Ind}(\mathcal{C})$.
Let $p:T(V)\to\text{B}(V)$ be the canonical surjection.
We will show that $\pi$ splits via $p$.

Assume that $U\subseteq T(V)$ is a primitive subobject of degree $n>1$ (that is: $U\subseteq \text{P}(T(V))$). We will show that $\pi(U)=0$.
The primitivity of $W$ implies that
$$\langle W,V^{\cdot n}\rangle = \langle \sum_{i=0}^{n-1}\epsilon^i\otimes W\otimes \epsilon^{n-1-i},V^{\otimes n}\rangle = 0.$$
So in particular $\langle W,\pi(U)\rangle = 0$. Using now the primitivity of $U$ (which also implies the primitivity of $\pi(U)$, since $\pi$ is a Hopf-algebra morphism) we get
$$\langle W^{\cdot m},\pi(U)\rangle = \langle W^{\otimes m},\sum_{i=0}^{m-1}1^i\otimes \pi(U)\otimes 1^{m-i-1}\rangle=0$$
for every $m$. But this implies that $\pi(U)$ is perpendicular to the subalgebra of $R^*$ generated by $W$, which is $R^*$ itself.
This means that $\pi(U)=0$, so $U\subseteq \text{Ker}(\pi)$.

This implies that the ideal $I_1\subseteq T(V)$ generated by primitive elements of degree $>1$ is contained in $\text{Ker}(\pi)$.
We thus get a surjective Hopf algebra map $\pi_1:T(V)/I_1\to R$. Denote by $I_2$ the ideal of $T(V)/I_1$ generated by primitive elements of degree $>1$ in this algebra. By the same argument, $I_2\subseteq \text{Ker}(\pi_1)$. We define now inductively ideals $I_n$ and Hopf algebra surjections $\pi_n:T(V)/I_n\to R$ such that $I_n\subseteq T(V)/I_{n-1}$ is the ideal generated by all primitive elements of degree >1. This is the same as the chain of ideals which appears after Definition \ref{def:Nichols}.
The union of the inverse images of the ideals $I_n$ inside $T(V)$ is exactly the kernel of the surjection $p:T(V)\to \text{B}(V)$. We thus get a surjective map
$$\overline{\pi}:\text{B}(V)\to R$$ which is injective on $V$.
This map must be injective as well, because if $n$ is the minimal number such that $\text{Ker}(\overline{\pi})_n\neq 0$ then $\text{Ker}(\overline{\pi})_n$ must be a primitive object by grading consideration, and by the definition of the Nichols algebra this is impossible.
\end{proof}

\begin{lemma}\label{lem:pairing}
The pairing $\text{P}(R)\otimes \text{P}(R^*)\to \textbf{1}$ is non-degenerate if and only if $R\cong \text{B}(\text{P}(R))$.
\end{lemma}
\begin{proof}
One direction follows from the fact that the graded dual of $\text{B}(V)$ is $\text{B}(V^*)$, see \ref{lem:nicholsdual}.
Assume, on the other hand, that the pairing is non-degenerate.
By the previous proposition, it will be enough to prove that $R^*$ is generated by $W=\text{P}(R^*)$.
By a dual argument, $R$ is then generated by $V=\text{P}(R)$, and we can use the previous proposition to finish the proof.

Now for the coradical filtration $(R_i^*)$ of $R^*$ it holds that $R^*_0=K$ and $R^*_1=K\oplus W$.
Since the coradical filtration is dual to the radical filtration, It holds that $R^*_1\cong (R/J^2)^*$ where $J$ is the Jacobson radical of $R$. The fact that the pairing between $V$ and $W$ is non-degenerate then means that the image of $V$ inside $R/J^2$ must be onto. But this means that $V$ generates $R$ as a unital algebra.
By a similar argument $W$ generates $R^*$, and by the previous proposition $R$ is a Nichols algebra.
\end{proof}

We are now ready to prove the equivalence of the third and fourth conditions of \ref{thm:main2}.
\begin{proof}
Lemma \ref{lem:genHgenR} and Lemma \ref{lem:pgen}shows that the third condition of Theorem \ref{thm:main2} is equivalent to the statement that all finite dimensional coardically graded Hopf algebras $R\in ^A_A\mathcal{YD}$ with $R_0=\textbf{1}$ are Nichols algebras.
If the fourth condition of Theorem \ref{thm:main2} holds and all the ccc Hopf algebras in $^A_A\mathcal{YD}$ are Nichols algebras, this is in particular true for coardically graded Hopf algebras with $R_0=\textbf{1}$, and the fourth condition thus implies the third condition.

If on the other hand the third condition holds and $R$ is a ccc Hopf algebra in $^A_A\mathcal{YD}$ then the Hopf algebra $R_{gr}$ arising from the coradical filtration of $R$ is a Nichols algebra. This implies that $R$ is generated by its primitive elements. Similarly, the dual $R^*$ is also generated by its primitive elements, and by Lemma \ref{lem:pgen} $R$ is a Nichols algebra.
\end{proof}
\end{section}

\begin{section}{Braided fusion categories by linear algebra}\label{sec:catslinear}
Let $\mathcal{C}$ be a braided fusion category.
Write $X_1,\ldots X_s$ for a set of representatives of the isomorphism classes of simple objects of $\mathcal{C}$. We would like to describe all the data encoded in the structure of $\mathcal{C}$ as a braided fusion category using vector spaces and linear maps.
We begin with the hom-spaces, which are very easy to describe. Indeed, it holds that
\begin{equation}\label{eq:simples}\text{Hom}_{\mathcal{C}}(X_i,X_j) = \begin{cases} 0 & \text{ if } i\neq j \\
									K\cdot Id_{X_i} & \text{ if } i=j \end{cases}
								\end{equation}
since $\mathcal{C}$ is a semisimple category, and the $X_i$ are non-isomorphic simple objects. Every object of $\mathcal{C}$ is isomorphic to a direct sum of simple objects.
Instead of writing an object of $\mathcal{C}$ as $\bigoplus_i X_i^{\oplus a_i}$ we will use the isomorphic object $$\bigoplus_i U_i\otimes X_i$$ where $U_i$ are plain vector spaces. Notice that the fact that $\mathcal{C}$ is a $K$-linear category means that taking tensor products of objects in $\mathcal{C}$ with vector spaces makes sense.

The hom-spaces in $\mathcal{C}$ are then given by
\begin{equation}\label{eq:homs} \text{Hom}_{\mathcal{C}}(\bigoplus _i V_i\otimes X_i,\bigoplus_j U_j\otimes X_j) = \bigoplus_i \text{Hom}_K(V_i,U_i)\end{equation}
We describe next the tensor product and the associativity constraints.
Assume that $$[X_i]\cdot [X_j] = \sum_k N_{i,j}^k [X_k]$$ in the Grothendieck ring of $\mathcal{C}$. For every three indices $i,j,k\in \{1,\ldots s\}$ fix a vector space $V_{i,j}^k$ of dimension $N_{i,j}^k$. We can then write
$$X_i\otimes X_j \cong  \bigoplus_k V_{i,j}^k\otimes  X_k.$$ Notice that
$$\big(\bigoplus_i U_i\otimes X_i\big)\otimes \big(\bigoplus_j W_j\otimes X_j\big)\cong
\bigoplus_{i,j,k} U_i\otimes W_j\otimes V_{i,j}^k\otimes X_k.$$
For $i,j,k\in\{1,\ldots s\}$ we then have
$$(X_i\otimes X_j)\otimes X_k\cong \bigoplus_a V_{i,j}^a\otimes X_a\otimes X_k\cong \bigoplus_{a,b} V_{i,j}^a\otimes V_{a,k}^b \otimes X_b$$ while on the other hand
$$ X_i\otimes (X_j\otimes X_k)\cong \bigoplus_c X_i\otimes V_{j,k}^c\otimes X_c\cong \bigoplus_{c,b} V_{i,c}^b\otimes V_{j,k}^c \otimes X_b.$$
The associativity constraints $$\alpha_{i,j,k}:(X_i\otimes X_j)\otimes X_k\to X_i\otimes (X_j\otimes X_k)$$ are then given by a family of linear maps
\begin{equation}\alpha_{i,j,k}^{a,b,c}: V_{i,j}^a\otimes V_{a,k}^b\to V_{i,c}^b\otimes V_{j,k}^c.\end{equation}
The Pentagon axiom then translates into a list of axioms which say that
certain sums of compositions of the linear maps $\alpha_{i,j,k}^{a,b,c}$ are equal. More precisely, for every $i,j,k,l\in \{1,\ldots s\}$ writing the pentagon diagram for the tensor product of $X_i\otimes X_j\otimes X_k\otimes X_l$ gives us that for every $a,b,c\in\{1,\ldots s\}$ the composition

$$V_{i,j}^a\otimes V_{a,k}^b\otimes V_{b,l}^c\stackrel{\alpha_{i,j,k}^{a,b,d}}{\longrightarrow}
\bigoplus_d V_{i,d}^b\otimes V_{j,k}^d\otimes V_{b,l}^c\stackrel{\alpha_{i,d,l}^{b,c,e}}{\longrightarrow} $$
\begin{equation}\bigoplus_{d,e}\otimes V_{i,e}^c\otimes V_{j,k}^d V_{d,l}^e\stackrel{\alpha_{j,k,l}^{d,e,f}}{\longrightarrow}
\bigoplus_{e,f} V_{i,e}^c \otimes V_{j,f}^c\otimes V_{k,l}^f\end{equation} is equal to the composition
\begin{equation} V_{i,j}^a\otimes V_{a,k}^b\otimes V_{b,l}^c\stackrel{\alpha_{a,k,l}^{b,c,f}}{\longrightarrow}
\bigoplus_f V_{i,j}^a\otimes V_{a,f}^c\otimes V_{k,l}^f\stackrel{\alpha_{i,j,f}^{a,c,e}}{\longrightarrow}q
\bigoplus_{f,e} V_{i,e}^c\otimes V_{j,f}^t\otimes V_{k,l}^f.\end{equation}

Assuming that $X_1=\textbf{1}$ is the tensor unit, the unit axioms for the monoidal category $\mathcal{C}$ can be translated as saying that $V_{1,i}^j$ and $V_{i,1}^j$ are zero if $i\neq j$, are one dimensional in case $i=j$, and that there are distinguished bases $l_i\in V_{1,i}^i$ and $r_i\in V_{i,1}^i$ such that for every $i,j,k\in\{1,\ldots s\}$ it holds that
\begin{equation}\alpha_{i,1,j}^{i,k,j}:V_{i,1}^i\otimes V_{i,j}^k\to V_{i,j}^k\otimes V_{1,j}^j\end{equation} sends $r_i\otimes v$ to $v\otimes l_i$ for $v\in V_{i,j}^k$.

The rigidity of the category can be described in this language in the following way:
for every $i\in \{1,\ldots s\}$ there is a unique $\bar{i}\in \{1,\ldots s\}$ such that $V_{i,\bar{i}}^1$ and $V_{\bar{i},i}^1$ are one-dimensional, and $V_{i,j}^1=0$ for $j\neq \bar{i}$.
The evaluation \begin{equation}ev_i:X_{\bar{i}}\otimes X_i\to X_1\end{equation} is then given by a linear isomorphism which we denote by the same symbol $ev_i:V_{\bar{i},i}\to K$ and the coevaluation $X_1\to X_i\otimes X_{\bar{i}}$ is then given by a linear isomorphism $coev_i:K\to V_{i,\bar{i}}$. The rigidity axioms translate again to equality between compositions of linear maps.
The equality between the composition \begin{equation}X_i\to (X_i\otimes X_{\bar{i}})\otimes X_i\to X_i\otimes(X_{\bar{i}}\otimes X_i)\to X_i\end{equation} and $Id_{X_i}$ translates to the equality \begin{equation}K\to V_{i,\bar{i}}^1\otimes V_{1,i}^i\to V_{i,1}^i\otimes V_{\bar{i},i}^1\to K=K\stackrel{Id_K}{\to} K\end{equation} where the first map sends 1 to $coev_i\otimes l_i$, the second map is $\alpha_{i,\bar{i},i}^{1,1,i}$ and the third map sends $r_i\otimes v$ to $ev_i(v)\in K$.

The braided structure is given by maps $\sigma_{X_i,X_j}:X_i\otimes X_j\to X_j\otimes X_i$. This is the same as a collection of linear isomorphisms
\begin{equation}\sigma_{i,j}^k:V_{i,j}^k\to V_{j,i}^k,\end{equation}
which should satisfy the axioms arising from the braid relations.

The introduction of the vector spaces $V_{i,j}^k$ here and the linear maps $\alpha_{i,j,k}^{a,b,c}$ and $\sigma_{i,j}^k$
can be seen as a way to ``introduce coordinates'' on the category $\mathcal{C}$. We use here the fact that as an abelian category, $\mathcal{C}$ is very simple to understand on the level of objects and morphisms. The additional braided monoidal structure is described using linear algebra. This will be used later on in the construction of the variety $X_B$.
This should be seen as more of an auxiliary result, and will not play a dominant role in the sequel.
\end{section}

\begin{section}{The variety $X_B$ and the action of the group}\label{sec:variety}
Usually, when one speaks of ``a Hopf algebra $R$ inside the braided fusion category $\mathcal{C}$'' it is understood that $R$ is an object of $\mathcal{C}$ which is equipped with structure maps which are not written explicitly.
We will take here a different approach. We will fix an object $B$ inside our braided fusion category $\mathcal{C}$, and ask what are \textit{all the possible} Hopf algebra structures one can give on that object.

A Hopf algebra is given by morphisms $$m: B\otimes B\to B,$$ $$u:K\to B,$$ \begin{equation}\Delta:B\to B\otimes B\end{equation} $$\epsilon:B\to K \text{ and }$$ $$S:B\to B$$ which satisfy some axioms.
We can thus think of a Hopf algebra as a point in the affine space
$$\mathbb{A}^N = \text{Hom}_{\mathcal{C}}(B\otimes B,B)\oplus\text{Hom}_{\mathcal{C}}(K,B)\oplus\text{Hom}_{\mathcal{C}}(B,B\otimes B)$$ \begin{equation} \oplus\text{Hom}_{\mathcal{C}}(B,K)\oplus\text{Hom}_{\mathcal{C}}(B,B).\end{equation}
We will write a point in this spaces as $(m,u,\Delta,\epsilon,S)$.
Notice that not all points in this affine space will define Hopf algebra structure, and not all Hopf algebras will be ccc.
We write $$X_B\subseteq \mathbb{A}^N$$ for the subset of all points $(m,u,\Delta,\epsilon,S)$ which define a ccc Hopf algebra structure on $B$.
For $t=(m,u,\Delta,\epsilon,S)\in X_B$ we write $(B,t)$ for the Hopf algebra $B$ with structure given by $t$. When we will say ``$R$ is a Hopf algebra in $X_B$'' we will mean that $R = (B,t)$ and $t\in X_B$. We will also write $R\in X_B$.

Write $\Gamma_B=\text{Aut}_{\mathcal{C}}(B)$. When no confusion will arise we will write $\Gamma = \Gamma_B$. The group $\Gamma$ acts on the different direct summands in $\mathbb{A}^n$ by conjugation.
The action of $\Gamma$ on $B\otimes B$ is the diagonal one, and on $K$ is the trivial one.
This induces a linear action of $\Gamma$ on $\mathbb{A}^N$. We claim the following:
\begin{lemma}
	The action of $\Gamma$ on $\mathbb{A}^N$ stabilizes the subset $X_B$.
	Two points $(m_1,u_1,\Delta_1,\epsilon_1,S_1)$ and $(m_2,u_2,\Delta_2,\epsilon_2,S_2)$ in $X_B$ define isomorphic Hopf algebras
	if and only if they lie in the same $\Gamma$-orbit. The stabilizer of $(m,u,\Delta,\epsilon,S)$ in $\Gamma$ can be identified with the group of automorphisms
	of the Hopf algebra that this tuple defines.
\end{lemma}
\begin{proof}
	Write $t_i = (m_i,u_i,\Delta_i,\epsilon_i,S_i)$ for $i=1,2$.
	The Hopf algebra axioms can be phrased as equalities between certain linear maps. Associativity of the multiplication, for example, is the equality
	\begin{equation}m(1_B\otimes m)\alpha_{B,B,B} = m(m\otimes 1_B)\end{equation} as morphisms in $\text{Hom}_{\mathcal{C}}((B\otimes B)\otimes B,B)$. If $\gamma:B\to B$ is an automorphism in $\mathcal{C}$, and if
	$\gamma(t_1)=(t_2)$ then we have that
	$$m_2(1_B\otimes m_2)\alpha_{B,B,B} = \gamma m_1 (\gamma^{-1}\otimes \gamma^{-1})(1_B\otimes \gamma m_1 (\gamma^{-1}\otimes\gamma^{-1}))\alpha_{B,B,B} = $$
	\begin{equation} \gamma m_1(1_B\otimes m_1)\alpha_{B,B,B} (\gamma^{-1}\otimes \gamma^{-1}\otimes \gamma^{-1})\end{equation} where we used the naturality of $\alpha$ and the definition of the action of $\gamma$. On the other hand
	a similar calculation gives us
	\begin{equation}m_2(m_2\otimes 1_B) = \gamma m_1(m_1\otimes 1_B)(\gamma^{-1}\otimes\gamma^{-1}\otimes\gamma^{-1}).\end{equation}
	This shows that if $\gamma(t_1) = t_2$ then $m_1$ is associative if and only if $m_2$ is associative.
	Similarly, all the other Hopf algebra axioms are valid for $t_1$ if and only if they are valid for $t_2$.
	So if $\gamma(t_1) = t_2$ then $t_1$ defines a Hopf algebra if and only if $t_2$ does.
	Moreover, $t_1$ will define a ccc Hopf algebra if and only if $\text{Ker}(\epsilon_1)$ is a nilpotent ideal in $B$ with respect to the multiplication $m_1$
	and $\text{Ker}(u_1^*)$ is a nilpotent ideal in $B^*$ with respect to the multiplication $\Delta_1^*$.
	For the same reason as above, this happens if and only if $\text{Ker}(\epsilon_2)$ is a nilpotent ideal with respect to the multiplication $m_2$
	and $\text{Ker}(u_2^*)$ is a nilpotent ideal in $B^*$ with respect to the multiplication $\Delta_2^*$.
	In other words, $\Gamma$ stabilizes the subset $X_B$ of $\mathbb{A}^N$.

	We will think of the equation $\gamma(t_1) = t_2$ as saying that $\gamma$ defines an isomorphism between $(B,t_1)$ and $(B,t_2)$.
	Indeed, $\gamma m_1 (\gamma^{-1}\otimes \gamma^{-1})=m_2$ can be rephrased as saying that the diagram
	\begin{equation}\xymatrix{ B\otimes B\ar[r]^{\gamma\otimes \gamma}\ar[d]^{m_1} & B\otimes B\ar[d]^{m_2} \\ B\ar[r]^{\gamma} & B}\end{equation} is commutative.
	Similar statements hold for $u,\Delta,\epsilon$ and $S$. This implies that if $\gamma(t_1)=t_2$ then $t_1$ and $t_2$ define isomorphic Hopf algebras.
	On the other hand, if $t_1$ and $t_2$ define isomorphic Hopf algebras on $B$, take an isomorphism $\gamma:(B,t_1)\to (B,t_2)$ between these Hopf algebras.
	Then by the same calculations as above we get that $\gamma(t_1)=t_2$.
	So the orbits of $\Gamma$ in $X_B$ are in one to one correspondence with isomorphism classes of ccc Hopf algebras which are isomorphic to $B$ as an object of $\mathcal{C}$.
	Finally, the equality $\gamma(t) = t$ for $t\in X_B$ just means that $\gamma:(B,t)\to (B,t)$ is an automorphism.
\end{proof}

The rest of this section will be devoted to prove the following claim:
\begin{lemma}
	The subset $X_B$ is an affine sub-variety of $\mathbb{A}^N$. The group $\Gamma$ is isomorphic to a direct product of general linear groups,
	and the action of $\Gamma$ on $\mathbb{A}^N$ is rational.
	\end{lemma}

\begin{proof} The proof of the lemma will be based on analyzing objects and morphisms in the category $\mathcal{C}$.
We begin by writing $B$ as \begin{equation}B=\bigoplus_i B_i\otimes X_i\end{equation} where $X_i$ are representatives of the isomorphism classes of simple objects of $\mathcal{C}$ and $B_i$ are vector spaces.
By Equation \ref{eq:homs} this already gives us an isomorphism
$\Gamma\cong \prod_i \text{GL}(B_i)$.
We choose a basis $\{e_{i1},\ldots e_{id_i}\}$ for $B_i$.

A Hopf algebra structure on $B$ will be given by maps $m:B\otimes B\to B$, $u:\textbf{1}\to B$, $\Delta:B\to B\otimes B$, $\epsilon:B\to \textbf{1}$ and $S:B\to B$. By writing tensor products using the spaces $V_{i,j}^k$ from Section \ref{sec:catslinear} we see that the morphism $m$ is given by
\begin{equation}\bigoplus_{i,j} B_i\otimes B_j\otimes X_i\otimes X_j\to \bigoplus_k B_k\otimes X_k.\end{equation}
Rewriting the first object using the vector spaces $V_{i,j}^k$ gives us \begin{equation}\bigoplus_{i,j,k}B_i\otimes B_j\otimes V_{i,j}^k\otimes X_k\to \bigoplus_k B_k\otimes X_k.\end{equation}
This means that $m$ is equivalent to a collection of linear maps \begin{equation}m_{i,j}^k:B_i\otimes B_j\otimes V_{i,j}^k\to B_k.\end{equation} Similarly, the morphism $u$ is equivalent to a map \begin{equation}u_1:K\to B_1,\end{equation}
the morphism $\Delta$ is equivalent to a collection of maps
\begin{equation}\Delta_k^{i,j}:B_k\to B_i\otimes B_j\otimes V_{i,j}^k,\end{equation}
the morphism $\epsilon$ is equivalent to a map
\begin{equation}\epsilon_1:B_1\to K\end{equation} and the antipode $S$ is equivalent to a collection of linear maps
\begin{equation}S_i:B_i\to B_i.\end{equation}

We rewrite now the affine variety $\mathbb{A}^N$ as
$$\mathbb{A}^N = \bigoplus_{i,j,k} Hom_K(B_i\otimes B_j\otimes V_{i,j}^k, B_k)\oplus Hom_K(K,B_1) \oplus $$ \begin{equation}\bigoplus_{i,j,k} Hom_K(B_k,B_i\otimes B_j\otimes V_{i,j}^k)\oplus Hom_K(B_1,K)\oplus \bigoplus_i Hom_K(B_i,B_i).\end{equation}

This description of $\mathbb{A}^N$ shows us that the action of  $\text{Aut}_{\mathcal{C}}(B) =\prod_i \text{GL}(B_i)$ on it is rational. Indeed, it is simply given by pre- and post-composing of linear maps.

A choice of bases for $B_i$ and for $V_{i,j}^k$ for all $i,j,k$ will give us a basis for $\mathbb{A}^N$. This enables us to describe the structure we have at hand, the tuple $t=(m,u,\Delta,\epsilon,S)$, as a collection of numbers, the \textit{structure constants} of $t$. Indeed, using the bases for $B_i$ and $V_{i,j}^k$ we can describe the different structure maps as linear maps between vector spaces with given bases, and these are just given by matrices of scalars.

We explain now why the subset $X_B$ is in fact an affine variety.
The idea is to show that all the Hopf algebra axioms can be expressed using polynomial equations. We will also show that the property of being ccc can be described using polynomial equations.

We begin with proving this for the associativity. The proof for the other Hopf algebra axioms is similar.
The associativity axioms says that $m(m\otimes 1_B) = m(1_B\otimes m)\alpha_{B,B,B}$. Writing this using the maps $\alpha_{i,j,k}^{a,b,c}:V_{i,j}^a\otimes V_{a,k}^b\to V_{i,c}^b\otimes V_{j,k}^c$ and $m_{i,j}^k$ we get that associativity is equivalent to the commutativity of the diagram
\begin{equation}\xymatrix{ B_i\otimes B_j\otimes B_k\otimes V_{i,j}^a\otimes V_{a,k}^b\ar[rr]^{\sum_c\alpha_{i,j,k}^{a,b,c}}\ar[d]^{m_{i,j}^a} & & \bigoplus_c B_i\otimes B_j\otimes B_k\otimes V_{i,c}^b\otimes V_{j,k}^c\ar[d]^{m_{j,k}^c} \\
B_a\otimes B_k\otimes V_{a,k}^b\ar[d]^{m_{a,k}^b} & & \bigoplus_c B_i\otimes B_c\otimes V_{i,c}^b\ar[d]^{m_{i,c}^b} \\
B_b\ar[rr]^{=} & & B_b } \end{equation}
where we simplified the morphisms by writing $\alpha_{i,j,k}^{a,b,c}$ instead of $1_{B_i\otimes B_j\otimes B_k}\otimes \alpha_{i,j,k}^{a,b,c}$ and similarly for the other morphisms. The linear map $m_{i,j}^a$ goes from  $B_i\otimes B_j\otimes V_{i,j}^a$ to $B_a$, but it is clear how to get a linear map from it as shown in the diagram.
If we write now the linear maps $m_{i,j}^k$ and $\alpha_{i,j,k}^{a,b,c}$ in terms of the bases of $B_i$ and $V_{i,j}^k$ we get a set of quadratic polynomials on the structure constants whose vanishing is equivalent to the associativity of $m$. For similar reasons the other Hopf algebra axioms can be written as well as polynomials in the structure constants.

It is left to show that being ccc is a closed condition for Hopf algebras. For this, write $n=\sum_i dim_K(B_i)$. We claim the following:
\begin{lemma} An ideal $J$ of $(B,t)$ is nilpotent if and only if $J^n=0$.
\end{lemma}
\begin{proof}
	One direction is clear. For the other direction, if $J$ is nilpotent, the sequence of ideals $J\supsetneq J^2\supsetneq J^3\cdots  $ is
	strictly monotonic decreasing until it stabilizes at zero. Thus, the sequence $d_a:=\dim \text{Hom}_{\mathcal{C}}(\oplus_i X_i, J^a)$ satisfy
	\begin{equation}n > d_{1} > d_{2}> \ldots \end{equation} and this sequence of numbers stabilizes at zero. This implies that if $J$ is nilpotent its $n$-th power must already be zero.
\end{proof}

By definition, a Hopf algebra $(B,t)$ is ccc if it is connected and coconnected. We will show that being connected is a closed condition. The fact that coconnectedness is a closed condition follows from a dual argument.
By definition of connectedness, $(B,t)$ is connected if the ideal $\text{Ker}(\epsilon)$ is nilpotent. This is equivalent to $\text{Ker}(\epsilon)^n=0$ by the above lemma. It holds that the map \begin{equation}P=1_B-u\epsilon:B\to B \end{equation}is a projection on $\text{Ker}(\epsilon)$ (this holds in any Hopf algebra, and follows from the fact that $\epsilon\circ u=\text{Id}_{\textbf{1}}$).
The nilpotency of $\text{Ker}(\epsilon)$ is thus equivalent to the fact that the map $$B^{\otimes n}\stackrel{P^{\otimes n}}{\longrightarrow} B^{\otimes n}\stackrel{m^{n-1}}{\longrightarrow} B$$ is the zero map.
But again, this can be written as a polynomial equation using the structure constants of $u$, $\epsilon$ and $m$. The subset $X_B$ is thus a subvariety of $\mathbb{A}^N$, and the action of $\Gamma$ on it is rational. The theory of algebraic groups and geometric invariant theory can thus be applied in our setting.
\end{proof}
\begin{definition}\label{def:leadsto}
If $R_1$ and $R_2$ are two Hopf algebras in $X_B$, we say that $R_2$ is a specialization of $R_1$ and write $R_1\leadsto R_2$ if $\mathcal{O}_{R_2}\subseteq \overline{\mathcal{O}_{R_1}}$.
\end{definition}
\begin{remark}
We have used here a slightly heavy categorical language, in order to construct the variety $X_B$ in the most general way possible.
If, for example, the category $\mathcal{C}$ is $_G^G\YD$ there is a way around this: we can fix only the dimension of $B$ as a vector space, and consider also the action and coaction of $KG$ as part of the structure of $B$, instead of something that is given a-priori, as we have done here. Describing the isomorphism type of $B$ as an object in $\mathcal{C}$ can then be done by declaring what the trace of the operations of the elements of $D(G)$, the Drinfeld double of $G$, on $B$, should be. The construction here relies heavily on the fact that the category we are working in is semisimple. Indeed, the semisimplicity gives us an easy classification of the object of the category and their automorphism groups. See also \cite{AA18} for the study of Nichols algebras in non-semisimple braided monoidal categories.
\end{remark}
\begin{remark}\label{rmk:gradings} The Hopf algebras in $_G^G\YD$ which one encounters in the study of pointed Hopf algebras are usually graded.
We study here ccc Hopf algebras and not graded algebras for two reasons. Firstly,
being connected and coconnected is a conditions which can be described by polynomial equations.
If we consider instead the variety of all graded Hopf algebras we will get something which is too rigid, and we will not be able to see the specializations in the orbits of $X_B$. Secondly, all finite dimensional graded Hopf algebras with $R_0=\textbf{1}$ are automatically ccc. Indeed, this follows from the fact that if $R=\bigoplus_{i\geq 0}R_i$ then the Jacobson radical is $\bigoplus_{i\geq 1}R_i$, and the quotient is isomorphic to $\textbf{1}$. The same holds for the dual.
\end{remark}

\begin{remark}\label{rmk:duality} The map $R\mapsto R^*$ gives us an isomorphism of varieties $X_B\cong X_{B^*}$ which commutes with the action of $\text{Aut}_{\mathcal{C}}(B)\cong\text{Aut}_{\mathcal{C}}(B^*)$. In particular, if $R_1,R_2\in X_B$ then $R_1\leadsto R_2$ if and only if $R_1^*\leadsto R_2^*$ in $X_{B^*}$.
\end{remark}

The following lemma will be useful for the proof of Theorem \ref{thm:main3}.
\begin{lemma}\label{lem:subobj}
Assume that $R\leadsto R'$. Then $\text{P}(R)$ is isomorphic to a subobject of $\text{P}(R')$.
\end{lemma}
\begin{proof}
The object of primitive elements in $R$ is the same as the kernel of the map $$T_R=\Delta - u\otimes 1_R - 1_R\otimes u : R\to R\otimes R$$
We can write this map as the direct sum of maps $B_i\otimes X_i\to \oplus_{j,k}B_j\otimes B_k\otimes V_{i,j}^k\otimes X_i$.
Such a map is thus equivalent to a collection of maps $(T_R)_i:B_i\to B_j\otimes B_k\otimes V_{i,j}^k$.
For every linear map $L$ and any natural number $m$ the condition that $rank(L)\leq m$ is a Zariski closed condition.
This implies that for every $i$ it holds that $$rank((T_{R'})_i)\leq rank((T_R)_i)$$ and therefore
$$\dim(\text{Ker}(T_{R'})_i)\geq \dim(\text{Ker}((T_R)_i).$$
This gives us the desired result.
\end{proof}

\begin{proof}[Proof of Theorem \ref{thm:main3}]
If $R\leadsto \text{B}(V)$ then $\text{P}(R)$ is isomorphic to a subobject of $\text{P}(\text{B}(V)) = V$.
Similarly $R^*\leadsto \text{B}(V)^*\cong \text{B}(V^*)$ by Lemma \ref{lem:nicholsdual} and Remark \ref{rmk:duality} so $\text{P}(R^*)$ is isomorphic to a subobject of $\text{P}(\text{B}(V^*))=V^*$.
Since $V$ is simple, $V^*$ is simple as well, and it follows that $\text{P}(R)= 0$ or $V$ and $\text{P}(R^*)= 0$ or $V^*$.
The option $\text{P}(R^*)= 0$ is not possible, since this would imply that $J/J^2=0$ where $J$ is the Jacobson radical of $R$, and $R$ must then be the trivial algebra.
In a similar way, $\text{P}(R)=0$ is impossible. We are left with the situation where $\text{P}(R) = V$ and $\text{P}(R^*)=V^*$.
But this already implies that $\text{P}(R)\otimes \text{P}(R^*)\to \textbf{1}$ is a non-degenerate pairing, which implies by Lemma \ref{lem:pairing} that $R$ is a Nichols algebra, as desired.
\end{proof}

\end{section}

\begin{section}{Filtrations of Hopf algebras}\label{sec:filtrations}
As we have seen in previous sections, understanding specializations is fundamental to understand ccc Hopf algebras.
Using the Hilbert-Mumford criterion, we will show that if $\mathcal{O}_{R_1}\subseteq \overline{\mathcal{O}_{R_2}}$ and $\mathcal{O}_{R_1}$ is closed, the specialization $R_2\leadsto R_1$ follows from a filtration on $R_2$, in a way which we will describe now. Let $R=(B,t)$ be a ccc Hopf algebra in $\mathcal{C}$.
\begin{definition}[see also \cite{Makhlouf}] A Hopf algebra filtration on $R$ is a chain of $\mathcal{C}$-subobjects of $R$
$$\cdots R_{-2}\subseteq R_{-1}\subseteq R_0\subseteq R_1\subseteq\cdots$$ such that the following properties hold:
$$R_i = R \text{ for } i>>0,$$
$$R_i=0 \text{ for } i<<0,$$
$$\forall i,j: m(R_i\otimes R_j)\subseteq R_{i+j},$$
\begin{equation}\forall k: \Delta(R_k)\subseteq \sum_{i+j= k} R_i\otimes R_j,\end{equation}
$$\epsilon(R_{-1})=0,$$
$$\text{Im}(u)\subseteq  R_0,$$
$$\forall i: S(R_i)\subseteq R_i.$$
We will denote the filtration by $(R_i)$.
\end{definition}
\begin{lemma} Every ccc Hopf algebra filtration $(R_i)$ of $R$ determines a $\mathbb{Z}$-graded ccc Hopf algebra $R_{gr}$ with the same underlying object $B$, defined as follows:
\begin{enumerate}
\item As an object of $\mathcal{C}$, $$R=\oplus_{i\in \mathbb{Z}} R_i/R_{i-1}.$$
\item The unit $\overline{u}\in R_{gr}$ is the image of $u$ in $R_0/R_{-1}$.
\item The counit $\overline{\epsilon}:R_{gr}\to K$ is given by $\oplus R_i/R_{i-1}\to R_0/R_{-1}\stackrel{\epsilon}{\to} K$ where $\epsilon$ here is the map which is induced from $\epsilon$, since $\epsilon(R_{-1})=0$.
\item The condition on the antipode $S$ implies that it defines a collection of induced maps $\overline{S}_i:R_i/R_{i-1}\to R_i/R_{i-1}$. The antipode $\overline{S}$ of $R_{gr}$ is $\sum_i \overline{S}_i$.
\item The condition on $m$ implies that we have an induced map $\overline{m}_{i,j}:R_i/R_{i-1}\otimes R_j/R_{j-1}\to R_{i+j}/R_{i+j-1}$ for every $i,j\in \mathbb{Z}$. We define $\overline{m}=\sum_{i,j} \overline{m}_{i,j}$.
\item The condition on $\Delta$ implies that we have an induced map $\overline{\Delta}_{i,j}:R_{i+j}/R_{i+j-1}\to R_i/R_{i-1}\otimes R_j/R_{j-1}$ for every $i,j\in\mathbb{Z}$. We define $\overline{\Delta}=\sum_{i,j}\overline{\Delta}_{i,j}$.
\end{enumerate}
\end{lemma}
\begin{proof}
All the maps for $R_{gr}$ are well defined due to the condition the structure maps of $R$ satisfy.
As we will prove in the next lemma, the condition on the filtration implies that $R\cong \oplus_i R_i/R_{i-1}$ as an object of $\mathcal{C}$. This implies that $R_{gr}\cong R\cong B$ as objects in $\mathcal{C}$.
The fact that $R$ is a ccc Hopf algebra can be verified directly, or using the next lemma.
\end{proof}
\begin{lemma}
Let $(R_i)$ be a Hopf algebra filtration of the ccc Hopf algebra $R$. Then
$\mathcal{O}_{R_{gr}}\subseteq \overline{\mathcal{O}_R}$. In particular, $\mathcal{O}_{R_{gr}}$ is also contained in the closed subset $X_B$, and as a result $R_{gr}$ is also a ccc Hopf algebra.
\end{lemma}
\begin{proof}
We first claim that we can write $R$ as $R=\oplus_{i\in \mathbb{Z}} T_i$ such that $R_i = \oplus_{j\leq i} T_j$ where $T_i$ are subobjects of $R$ in $\mathcal{C}$. This follows from the semisimplicity of $\mathcal{C}$ together with the conditions on the filtration $R_i$. Indeed, take $i<<0$ for which $R_i=0$. Define $T_j=0$ for all $j\leq i$. Then choose $T_{i+k}$ inductively to be a direct sum complement of $T_{i+k-1}$ in $R_{i+k}$. Notice that this implies that $T_j\cong R_j/R_{j-1}$ for every $j\in \mathbb{Z}$, and that $B\cong R\cong\oplus T_j\cong \oplus R_j/R_{j-1}\cong R_{gr}$ as objects of $\mathcal{C}$.

Next, we write all the structure maps of $R$ in terms of the direct sum decomposition $R=\oplus_i T_i$. The conditions on the filtration gives us
$$m=\sum_{i+j\geq k}m_{i,j}^k,
\Delta= \sum_{i+j\leq k} \Delta_k^{i,j},$$
\begin{equation}u = \sum_{i\leq 0} u^i, \quad
\epsilon = \sum_{i\geq 0}\epsilon_i\end{equation}
$$S = \sum_{i\geq j}S_i^j$$
 where
$$m_{i,j}^k:T_i\otimes T_j\to T_k,\quad \Delta_k^{i,j}: T_k\to T_i\otimes T_j,$$
\begin{equation}u^i:K\to T_i, \quad \epsilon_i:T_i\to K,\text{ and }\end{equation} $$S_i^j:T_i\to T_j.$$
Using the identification $R\cong \oplus_i T_i\cong \oplus_i R_i/R_{i-1}\cong R_{gr}$ we see that the multiplication in $R_{gr}$ is given by $\sum_{i,j}m_{i,j}^{i+j}$, the comultiplication is given by $\sum_{i,j}\Delta_{i+j}^{i,j}$, the unit by $u=u_0$, the counit is $\epsilon^0$, and the antipode is $\sum_i S_i^i$. We thus see that in passing from $R$ to $R_{gr}$ we ``deleted'' all the parts of the structure maps which are of positive degree and stayed with maps of degree zero (maps of negative degree do not appear here at all), where the degree of a map $T_{i_1}\otimes \cdots\otimes T_{i_r}\to T_{j_1}\otimes\cdots\otimes T_{j_m}$ is $i_1+i_2+\cdots + i_r-j_1-j_2-\cdots-j_m$.

We use this idea to prove that $R_{gr}\in \mathbb{A}^N$ is in the closure of the orbit of $R$. This will already imply that $R_{gr}$ is a ccc Hopf algebra, because $\mathcal{O}_R\subseteq X_B$, and $X_B$ is closed. To prove this, we will use a so called \textit{one-parameter subgroup} of $\Gamma$. That is: a group homomorphism $\phi:\mathbb{G}_m\to \Gamma= \text{Aut}_{\mathcal{C}}(B)$. We define $\phi$ as follows
\begin{equation}\phi(\lambda) = \sum_{i\in \mathbb{Z}}\lambda^{-i}Id_{T_i}.\end{equation}
We claim that $\phi(\mathbb{G}_m)(R)$ contains $R_{gr}$ in its closure.
Since $\phi(\mathbb{G}_m)$ is a subgroup of $\Gamma$ this will be enough.
To prove this write \begin{equation}\phi(\lambda)(R) = (B,t_{\lambda}) =  (B,m_{\lambda},u_{\lambda},\Delta_{\lambda},\epsilon_{\lambda},S_{\lambda}).\end{equation}
We get $$m_{\lambda} = \sum_{i+j\geq k } \lambda^{i+j-k}m_{i,j}^k,\quad
\Delta_{\lambda} = \sum_{i+j\leq k} \lambda^{k-i-j}\Delta_k^{i,j}$$
\begin{equation}u_{\lambda} = \sum_{i\leq 0} \lambda^{-i}u^i,\quad
\epsilon_{\lambda} = \sum_{i\geq 0} \lambda^i\epsilon_i\end{equation}
$$S_{\lambda} = \sum_{i\geq j}\lambda^{i-j}S_i^j.$$
This description shows us that $\lim_{\lambda\to 0}\phi(\lambda)(R)$ exists, since in all the above expression $\lambda$ appears only with non-negative powers. Taking the limit $\lambda\to 0$ gives us $\lim_{\lambda \to 0}\phi(\lambda)(B,t)= (B,m',u',\Delta',\epsilon',S')$
where
$$m' = \sum_{i,j}m_{i,j}^{i+j} = \overline{m}, \Delta' = \sum_{i,j}\Delta_{i+j}^{i,j}=\overline{\Delta}$$
\begin{equation}u' = u_0 = \overline{u}, \epsilon' = \epsilon_0 = \overline{\epsilon}\end{equation}
$$S' = \sum_i S_i^i = \overline{S}$$
This shows us that the limit point is exactly the structure constants of $R_{gr}$. We are done.
\end{proof}
\begin{remark}
If $R\in X_B$ and $\phi:\mathbb{G}_m\to \Gamma$ is any one-parameter subgroup for which $\lim_{\lambda\to 0}\phi(\lambda)(R)$ exists,
then we get a filtration on $R$ by setting $$T_i= \text{Ker}(\phi(\lambda)-\lambda^{-i})\subseteq R\text{ for a generic } \lambda$$ $$R_i = \oplus_{j\leq i} T_j.$$
The fact that $\lim_{\lambda\to 0} \phi(\lambda)(R)$ exists implies, by the same argument as above, that $(R_i)$ is a Hopf algebra filtration. We thus see that the isomorphism classes of ccc Hopf algebras which appear on the boundary of $R$ by the action of a 1-parameter subgroup are exactly the ccc Hopf algebra arising from $R$ by a Hopf algebra filtration.
Moreover, by the Hilbert-Mumford criterion if $\mathcal{O}_{R'}\subseteq \overline{\mathcal{O}_R}$ and $\mathcal{O}_{R'}$ is closed, then there exists a one-parameter subgroup $\phi:\mathbb{G}_m\to \Gamma$ such that $R'=\lim_{\lambda\to 0}\phi(\lambda)(R)$ (see Theorem 1.4. in \cite{Kempf}). This implies that in order to understand specializations, and especially specializations to ccc Hopf algebras with closed orbits, we need to study Hopf algebra filtrations.
\end{remark}

We finish this section with two filtrations which are canonically associated to any ccc Hopf algebra: the radical and the coradical filtration. They are dual to one another, in a way which we shall explain below. As was explained in the introduction, the coradical filtration of a Hopf algebra (not necessarily a ccc one) is used in a fundamental way in the classification of non-semisimple Hopf algebras. The use of both filtrations together will play an important role in studying closure of orbits in this paper.

For the radical filtration, let $J=\text{Ker}(\epsilon)$ be the Jacobson radical of $R$. We claim the following:
\begin{lemma}
The filtration $R_i = J^{-i}$ for $i<0$ and $R_i=R$ for $i\geq 0$ is a Hopf algebra filtration.
\end{lemma}
\begin{proof}
Since $J$ is a nilpotent ideal, the condition $R_i=0$ for $i<<0$ holds. It is clear that the condition $R_i=R$ for $i>>0$ holds as well (it holds, in fact, for $i=0$).
The fact that $J^i\subseteq J^j$ when $j\leq i$ implies that $R_i\cdot R_j\subseteq R_{i+j}$.
The condition $u\in R_0$ is immediate, and the condition $\epsilon(R_{-1})=0$ follows from the fact that $J=\text{Ker}(\epsilon)$. For the condition on $\Delta$, notice that $\Delta(J) \subseteq J\otimes R + R\otimes J$. For any $i,j\geq 0$ the braiding $\sigma:R\otimes R\to R\otimes R$ satisfies $\sigma(J^i\otimes J^j) = J^j\otimes J^i$. A direct calculation implies that $\Delta(J^k) \subseteq \sum_{i+j=k} J^i\otimes J^j$, which is what we wanted to prove.
\end{proof}
We write $R_{gra}$ for the graded Hopf algebra arising from $R$ via the radical filtration.

We recall here also the definition of the dual filtriation, the coradical filtration, from Section \ref{sec:hopffusion}:
We define $R_i=0$ for $i<0$, $R_0 = \text{Im}(u)$ and $$R_n = \text{Ker}\Big(R\stackrel{\Delta^{n-1}}{\to}R^{\otimes n}\to (R/R_0)^{\otimes n}\Big)\text{ for } n>0.$$
Again, a direct verification, using the fact that the dual algebra is connected, reveals the fact that this is a filtration of Hopf algebras as well. We write $R_{grc}$ for the graded Hopf algebra associated to this filtration. We thus see that $R\leadsto R_{gra}$ and $R\leadsto R_{grc}$ for every ccc Hopf algebra $R$ in $X_B$.
The two filtrations are dual to one another in the following sense: For $i\in \mathbb{Z}$ let $R_i$ be the $i$-th level of the coradical filtration, and let $X_i\subseteq R^*$ be defined as \begin{equation}X_i = \text{Ker}(R^*\to R_{-i}^*).\end{equation}
Then it holds that $(X_i)$ is the radical filtration on $R^*$.
This duality induces isomorphisms $(R_{gra})^*\cong (R^*)_{grc}$ and $(R_{grc})^*\cong (R^*)_{gra}$.
 \end{section}

\begin{section}{A proof of Theorem \ref{thm:main1} and \ref{thm:main4}}\label{sec:proofthm1}
In this section we prove that a ccc Hopf algebra in $X_B$ has a closed orbit if and only if it is isomorphic to a Nichols algebra.
Let $R$ be a Hopf algebra in $X_B$. Recall the associated graded Hopf algebras $R_{gra}$ and $R_{grc}$ from Section \ref{sec:filtrations}.
We know that $R\leadsto R_{gra}$ and $R\leadsto R_{grc}$. In particular, if the orbit of $R$ is closed we get that $R\cong R_{grc}$ and $R\cong R_{gra}$. The following proposition shows that if $\mathcal{O}_R$ is closed then $R$ is a Nichols algebra.
\begin{proposition}\label{prop:gragrc}
Assume that the Hopf algebras $R_{gra}$ and $R_{grc}$ are isomorphic as Hopf algebras.
Then $R$ is a Nichols algebra.
\end{proposition}
\begin{proof}
Assume that the two Hopf algebras are isomorphic.
Write $R_{gra} = \bigoplus_{i=0}^n A_i$ where $A_i = J^i/J^{i+1}$ (for the sake of simplicity, we use here positive grdaing instead of the negative grading from Section \ref{sec:filtrations} for the radical filtrations). Then the algebra $R_{gra}$ is generated by the elements in $A_1$. These elements are also primitive, since $\Delta(A_1)\subseteq A_1\otimes A_0 + A_0\otimes A_1$ and $A_0\cong R/J\cong \textbf{1}$.
This implies, in particular, that $R_{gra}$ is generated by primitive elements.
The algebra $R_{grc} = \oplus_{i=0}^m C_i$ has all primitives in degree 1. Since it is isomorphic to the algebra $R_{gra}$, it is also generated by these elements. This implies that $R_{grc}$ is a graded Hopf algebra which is generated in degree 1 and has all its primitive elements in degree 1. By Definition \ref{def:Nichols} this implies that $R_{grc}$ is a Nichols algebra. It follows that $R$ is generated by primitive elements.
By a dual argument, and by using the fact that $(R_{gra})^*\cong (R^*)_{grc}$ and $(R_{grc})^*\cong (R^*)_{gra}$ we get that $R^*$ is also generated by its primitive elements. Lemma \ref{lem:pgen} gives us the desired result.
\end{proof}

This finishes the proof that if $\mathcal{O}_R$ is closed then $R$ is a Nichols algebra, because the fact that $R\leadsto R_{grc}$ and $R\leadsto R_{gra}$ together with the closure of $\mathcal{O}_R$ implies that $R_{grc}\cong R\cong R_{gra}$.
Next, we will show that if $R$ is a Nichols algebra then $\mathcal{O}_R$ is closed.
Assume that this is not the case and let $R=\text{B}(V)$ be a Nichols algebra with a non-closed orbit. The closure $\overline{\mathcal{O}_R}$ is the union of the orbit of $R$ with orbits of smaller dimension.
An orbit of minimal dimension in $\overline{\mathcal{O}_R}$ is closed. It follows that $R\leadsto R'$ for some $R'\in X_B$ with $\mathcal{O}_{R'}$ closed.
But we already know that this implies that $R'$ is a Nichols algebra.

Write $R'=\text{B}(V')$. Then we have $\text{B}(V)\leadsto \text{B}(V)'$.
By \ref{lem:subobj} we know that this implies that $\text{P}(\text{B}(V))=V$ is isomorphic to a subobject of $\text{P}(\text{B}(V'))=V'$.
Since $R\ncong R'$ the object $V$ must be isomorphic to a proper subobject of $V'$. Write $V'=V\oplus V''$.
The split inclusion of objects in $\mathcal{C}$, $V\to V'\to V$, induces a split inclusion of Nichols algebras $\text{B}(V)\to \text{B}(V')\to \text{B}(V)$.
This implies that $\text{B}(V)\ncong \text{B}(V')$ because then $\text{B}(V')$ properly contains $\text{B}(V)$, and this contradicts the fact that $R$ and $R'$ are isomorphic to the same object of $\mathcal{C}$.
This finishes the proof of Theorem \ref{thm:main1}

The proof of Theorem \ref{thm:main1} gives us a description of the irreducible components of $X_B$:
\begin{theorem}
Let $B\in \mathcal{C}$. For every $V\in \mathcal{C}$ such that $\text{B}(V)\in X_B$ write $X_V= \{R| R\in X_B\text{ and } R \leadsto \text{B}(V)\}$.
Then the subsets $X_V$ are stable under the action of $\Gamma$ and are exactly the connected components of $X_B$.
\end{theorem}
\begin{proof}
The fact that $X_V$ is stable under $\Gamma$ is immediate.
Notice that for dimension considerations the number of objects $V$ such that $\text{B}(V)\in X_B$ is finite.
We denote these objects by $V_1,V_2,\ldots V_m$.
We claim now that the dimension of the invariant subalgebra $K[X_B]^{\Gamma}$ is finite.
Indeed, if $R\leadsto \text{B}(V)$ then continuity considerations imply that $f(R)=f(\text{B}(V))$ for every $f\in K[X_B]^{\Gamma}$.
This implies that $$\phi: K[X_B]^{\Gamma}\to K^m$$ $$f\mapsto (f(\text{B}(V_1)),\ldots, f(\text{B}(V_m)))$$ is an injective algebra homomorphism.
Since $\text{B}(V_i)\ncong \text{B}(V_j)$ when $i\neq j$ and $\mathcal{O}_{\text{B}(V_i)}$ and $\mathcal{O}_{\text{B}(V_j)}$ are closed and disjoint Proposition \ref{prop:sepinvs} implies that for every $i\neq j$ there is a function $f_{ij}\in K[X_B]^{\Gamma}$ such that $f_{ij}(\text{B}(V_i))\neq f_{ij}(\text{B}(V_j))$. Since $\phi$ is an algebra map this implies that $\phi$ is also surjective and thus an isomorphism.
We thus see that all the $X_{V_i}$ are closed, since $X_{V_i}$ is the zero set of the polynomial $1-\phi^{-1}(e_i)$ (where $\{e_i\}$ is the standard basis of $K^m$).

We next claim that $X_{V_i}$ is connected for every $i$. Indeed, assume that $X_{V_i}= Y_1\sqcup Y_2$ with $Y_1$ and $Y_2$ closed and nonempty.
Take $y_1\in Y_1$. Then $\mathcal{O}_{y_1}=\Gamma\cdot y_1$ is connected, contained in $X_{V_i}$ and intersects $Y_1$, so $\mathcal{O}_{y_1}\subseteq Y_1$. But then $\mathcal{O}_{\text{B}(V_i)}\subseteq \overline{\mathcal{O}_{y_1}}\subseteq Y_1$. By a similar argument $\mathcal{O}_{\text{B}(V_i)}\subseteq Y_2$ and this is a contradiction.
\end{proof}

Due to the last theorem, we can focus our attention on the different subvarieties $X_V$. These subvarieties are stable under the action of $\Gamma$.
The conditions in Theorem \ref{thm:main5} then boil down to the statement that if $\text{B}(V)$ is finite dimensional, then the variety $X_V$ has a single orbit under the action of $\Gamma$.
We finish with a proof of Theorem \ref{thm:main4}:
\begin{proof}[Proof of Theorem \ref{thm:main4}]
Assume that $\text{B}(V)$ is not rigid. In other words, assume that there are non-closed orbits in $X_V$.
Take a non-closed orbit $\mathcal{O}_R$ of minimal dimension in $X_V$. We will prove that such an orbit is the orbit of a pre-Nichols algebra or a post-Nichols algebra.
For this consider the Hopf algebras $R_{gra}$ and $R_{grc}$. If both these Hopf algebras are isomorphic to $R$, then $R\cong R_{gra}\cong R_{grc}$, which implies that $R$ itself is a Nichols algebra by Proposition \ref{prop:gragrc}. This is a contradiction.
If both these algebras are non-isomorphic to $R$, then from the fact that $R_{grc},R_{gra}\in \overline{\mathcal{O}_R}$ it follows that the dimensions of the orbits $\mathcal{O}_{R_{gra}}$ and $\mathcal{O}_{R_{grc}}$ are smaller than the dimension of $\mathcal{O}_R$. By the minimality condition on $R$, this implies that $R_{grc}\cong R_{gra}\cong \text{B}(V)$. But By Proposition \ref{prop:gragrc} again, this implies that $R$ itself is a Nichols algebra, which leads again to a contradiction.

We thus see that either $R\cong R_{gra}$ and $R\ncong R_{grc}$, or $R\ncong R_{gra}$ and $R\cong R_{grc}$. Assume first that $R\cong R_{gra}$ and $R\ncong R_{grc}$.
Since $R\cong R_{gra}$, $R$ has a grading $R= \oplus R_i$ such that the Jacobson radical $J$ satisfy $J^i = \oplus_{j\geq i} R_j$ for every $i\geq 1$. The grading implies that $R_1$, which generate $R$ as an algebra, is a primitive object. But this already implies that $R$ is a pre-Nichols algebra, as it lies between $T(R_1)$ and $\text{B}(R_1)$. Notice that it is impossible that $R_1\cong V$. Indeed, if this was the case then from dimension considerations the fact that $R$ projects onto $\text{B}(R_1)$ would imply that $R\cong \text{B}(R_1) = \text{B}(V)$, contradicting the fact that the orbit of $R$ is not closed.
By Lemma \ref{lem:subobj} it follows that $R_1$ is isomorphic to a subobject of $V$. We thus see that it must be a proper subobject.

This shows that if $R\cong R_{gra}$ then $R$ is a pre-Nichols algebra.
If $R\cong R_{grc}$ then by duality of the radical and coradical filtrations we get that $R^*$ is a pre-Nichols algebra. This finishes the proof of Theorem \ref{thm:main4} and also of \ref{thm:main5}
\end{proof}
\end{section}

\begin{section}{Different notions of rigidity}\label{sec:rigidity}
In this paper we call a ccc Hopf algebra $R$ rigid if any Hopf algebra which speciailzes to it is isomorphic to it.
There are other notions of rigidity, using deformations by a one-parameter family. We will explain here the relations between them.

In \cite{AKM} and \cite{DCY} a deformation of a graded bialgebra (not necessarily a finite dimensional one) $B=\oplus_{i\geq 0} B_{(i)}$ by a parameter $\lambda$ is defined as a pair $(m_{\lambda},\Delta_{\lambda})$ such that \begin{equation}m_{\lambda} = \sum_{i=0}^{\infty} m_{(i)}\lambda^i\text{ and }\Delta_{\lambda} = \sum_{i=0}^{\infty} \Delta_{(i)}\lambda^i\end{equation} where $m_{(i)},\Delta_{(i)}$ are maps of degree $-i$, $m_{(0)}=m$ and $\Delta_{(0)}=\Delta$, and $(m_{\lambda},\Delta_{\lambda},u,\epsilon)$ defines a bialgebra structure on $B$ for every $\lambda$. (Bialgebra deformations of Hopf algebras are automatically Hopf algebras as well. Due to the uniqueness of the antipode, we do not need to consider it as part of the deformation data).
It is shown that this is the same as a filtered Hopf algebra $U$ which satisfies $grU\cong B$. In \cite{AKM} and \cite{DCY} a graded Hopf algebra $B$ is called rigid if it has no non-trivial deformations. We will call it here deformation rigid.
We claim the following:
\begin{lemma}
A finite dimensional Nichols algebra $\text{B}(V)$ is rigid with respect to Definition \ref{def:rigidity} if and only if both $\text{B}(V)$ and $\text{B}(V^*)$ are deformation rigid.
\end{lemma}
\begin{proof}
Remark \ref{rmk:duality} implies that $\text{B}(V)$ is rigid if and only if $\text{B}(V^*)$ is rigid (with respect to Definition \ref{def:rigidity}).
To prove the first direction it will thus be enough to show that if $\text{B}(V)$ is rigid with respect to Definition \ref{def:rigidity} then it is deformation rigid.

Assume that $(m_{\lambda},\Delta_{\lambda})$ is a one-parameter deformation of $\text{B}(V)$.
Using the grading $\text{B}(V)=\oplus \text{B}(V)_i$ we have a one-parameter family $\phi:\mathbb{G}_m\to \text{Aut}_{\mathcal{C}}(B)$ which sends $\lambda$ to the automorphism which acts on $\text{B}(V)_i$ by the scalar $\lambda^{-i}$. We then have that
$$(m_{\lambda},\Delta_{\lambda}) = \phi(\lambda)\cdot (m_1,\Delta_1)\text{ and }(m_0,\Delta_0)=\lim_{\lambda\to 0}\lambda\cdot (m_1,\Delta_1).$$
Since $\text{B}(V)$ is rigid, any algebra specializing to it is isomorphic to it. So we get a Hopf algebra isomorphism $\Psi:\text{B}(V)\cong (B,m_1,\Delta_1,u,\epsilon,S_1)$ where $S_1$ is the uniquely defined antipode.

Next, we claim that $\text{B}(V)_1$ consists of primitive elements with respect to the comultiplication $\Delta_1$ (and therefore, with respect to $\Delta_{\lambda}$ for every $\lambda\in K^{\times}$ as well). Indeed, by grading consideration we have that $\Delta_1|_{\text{B}(V)_1} = \Delta{(0)} + \Delta_{(1)}$, where $\Delta_{(0)}=\Delta$. The map $\Delta_{(1)}:\text{B}(V)_1\to \text{B}(V)_0\otimes \text{B}(V)_0=\textbf{1}\otimes\textbf{1}= \textbf{1}$ must be zero since otherwise this will contradict the fact that $\epsilon(\text{B}(V)_1)=0$.
This implies that the isomorphism $\Psi$ will map $\text{B}(V)_0$ to $\text{B}(V)_0$ and $\text{B}(V)_1$ to
$\text{B}(V)_1$. Without loss of generality we can assume that $\Psi|_{\text{B}(V)_1} = Id_{\text{B}(V)_1}$
(recall that both $\text{B}(V)$ and the deformed algebra have the same underlying object $B$).
Since $\text{B}(V)_n$ is the image of $\text{B}(V)_1^{\otimes n}\to \text{B}(V)$ with respect to the iterated multiplication $m$, and since $\bigoplus_{i\leq n}\text{B}(V)_i$ contains the image of $\text{B}(V)_1^{\otimes n}\to \text{B}(V)$ under the iterated multiplication $m_1$, we get that $\Psi$ preserves the filtration $B_{(0)}\subseteq \text{B}_{(1)}\subseteq\cdots $ of $B$ given by $\text{B}_{(n)} = \bigoplus_{i\leq n}\text{B}(V)_i$. But this already implies that the deformation $(m_{\lambda},\Delta_{\lambda})$ is trivial with respect to the definition in Section 2.3 of \cite{AKM}.

In the other direction, assume that $\text{B}(V)$ and $\text{B}(V^*)$ are deformation rigid.
By Theorem \ref{thm:main5} we know that if $\text{B}(V)$ is not rigid then there is a pre-Nichols Hopf algebra $R$ such that $R\leadsto \text{B}(V)$ or $R\leadsto \text{B}(V^*)$. Since both $\text{B}(V)$ and $\text{B}(V^*)$ are deformation rigid, we can assume without loss of generality that the first case holds.
The algebra $R$ is generated by its primitive elements, and therefore admits a filtration $$R_{(0)}\subseteq R_{(1)}\subseteq\cdots $$ where $R_{(n)} = \sum_{i=0}^n \text{P}(R)^i$. This can easily be seen to be a Hopf algebra filtration of $R$.
The associated graded object is then $\text{B}(V)$ with its usual grading. Since we assumed that $\text{B}(V)$ is deformation rigid we get that $R\cong \text{B}(V)$, which is a contradiction.
\end{proof}

We recall here Theorem 6.2 from \cite{AKM}. This result relies on the classification result from \cite{A1}.
\begin{theorem} Assume that $\text{B}(V)$ is finite dimensional and that the braiding on $V$ is of diagonal type. Then $\text{B}(V)$ is deformation rigid.
\end{theorem}
This theorem, combined with Theorem \ref{thm:main5} gives a new proof for the generation of pointed Hopf algebras with abelian groups of group-like elements by group-like elements and skew-primitives.
Indeed, the above theorem implies that all the finite dimensional Nichols algebra in $_G^G\YD$ for $G$ abelian are rigid, and therefore by Theorem \ref{thm:main5} all finite dimensional ccc Hopf algebras in $_G^G\YD$ are Nichols algebras, and every Hopf algebras $H$ such that $H_0=KG$ with $G$ abelian is generated by group-like elements and skew-primitives.

\end{section}
\begin{section}*{Acknowledgments}
I would like to thank Nicol{\'a}s Andruskiewitsch, Iv{\'a}n Angiono and Istvan Heckenberger for their useful comments.
\end{section}


\section{Introduction}
The aim of this paper is to study the local geometry of the immersion given by the period map of curves.
Let $\mathsf{M}_g$ be the moduli space of smooth complex projective curves
of genus $g$,  $\mathsf{A}_g$ the moduli space of principally polarized
abelian varieties of dimension $g$. Denote by $j : \mathsf{M}_g \fr \mathsf{A}_g$ the period map or Torelli map and by $\mathsf{T}_g$ the Torelli locus, that is the closure of $j(\mathsf{M}_g)$ in $\mathsf{A}_g$. We consider $ \mathsf{A}_g$ endowed with the (orbifold) metric induced by the symmetric metric on the Siegel space
${\mathsf H}_g$ of which $ \mathsf{A}_g$  is a quotient by the symplectic group $Sp(2g, \bZ)$. We want to relate the Torelli locus  to the geometry of  $ \mathsf{A}_g$ considered as a locally symmetric variety (see also \cite{moonen-oort,cf1,cfg,deba} for motivation and related problems).  More precisely, we are interested in studying totally geodesic subvarieties $Y$ of $ \mathsf{A}_g$ which are generically contained in $\mathsf{T}_g$, i.e. such that $Y$ is contained in  $\mathsf{T}_g$ and $Y \cap j(\mathsf{M}_g) \neq \emptyset$.
A totally geodesic subvariety $Y$ of $ \mathsf{A}_g$ is an algebraic subvariety which is the image of a totally geodesic submanifold $\tilde{Y} \subset  {\mathsf H}_g$. One expects that there exist very few totally geodesic subvarieties of $ \mathsf{A}_g$ generically contained in $\mathsf{T}_g$, at least for high genus $g$.  This is related with a conjecture of Coleman and Oort according to which, for $g$ sufficiently high, there should not exist Shimura subvarieties of $ \mathsf{A}_g$ generically contained in $\mathsf{T}_g$ (\cite{moonen-oort}.). In fact Shimura subvarieties of $ \mathsf{A}_g$ are those totally geodesic subvarieties of $ \mathsf{A}_g$ admitting a point with complex multiplication (\cite{moonen-JAG}).

To study totally geodesic subvarieties of $ \mathsf{A}_g$ generically contained in the Torelli locus, we  compute the second fundamental form of the Torelli map. This also allows to study totally geodesic subvarieties that are not necessarily algebraic. The computation of the second fundamental form of the Torelli map  was initiated in \cite{cpt} and continued in \cite{cfg} and \cite{gpt}. In \cite{cfg} a bound for the maximal dimension of a germ of a totally geodesic subvariety $Y$ of  $ \mathsf{A}_g$ contained in $\mathsf{T}_g$ is given in terms of the gonality of a point $[C] \in  \mathsf{M}_g$ such that $j([C] ) \in Y$. From this one obtains a bound for the  the maximal dimension of a germ of a totally geodesic subvariety $Y$ of  $ \mathsf{A}_g$ contained in $\mathsf{T}_g$ for $g \geq 4$, which only depends on the genus: $\dim Y \leq \frac{5}{2}(g-1)$.  This bound was recently improved in \cite{gpt}, where it is proven that $\dim Y \leq (7g-2)/3$, using the Fujita decomposition of the Hodge bundle of a (real one-dimensional) family of abelian varieties given by a geodesic in ${\mathsf H}_g$ and results on the Massey products obtained in \cite{pt}, \cite{gst}.

In this paper we further improve such a bound by developing the techniques  used in \cite{cfg}.

We give a geometric interpretation of  one of the main results of \cite{cfg} where the second fundamental form was expressed in terms of a multiplication by an intrinsic double differential of the second kind on the product $C\times C$.  This form appears also in an unpublished book of Gunning \cite{gun}.

In this way we are able  to use a family of quadrics of rank 4 containing the canonical curve whose images via the second fundamental form give quadrics that can be simultaneously diagonalised on a suitable linear subspace of $H^1(T_C)$. This allows to give a better estimate on the rank of the second fundamental form.

The main results are the following
\begin{theorem}
\label{gonality}
If $C$ is a smooth curve of genus $g>5$, gonality $k$, it has no involutions and is not a smooth plane curve,  then any totally geodesic subvariety generically contained in the Torelli locus and passing through $j(C)$ has
dimension $$m\leq  \frac {3(g-1)}{2}+k.$$
\end{theorem}

From this, recalling that the gonality $k\leq [(g+3)/2]$, we obtain the following estimate (the cases $g=4,5$ follow from \cite[Thm.4.4]{cfg}).

\begin{theorem}
Let $Y$ be a germ of a totally geodesic submanifold generically contained in the Torelli locus $\mathsf{T}_g$, $g>5$,  then  $\dim Y \leq 2g-1$ if $g$ is even, $\dim Y \leq 2g$ if $g$ is odd.
\end{theorem}

These techniques are also used to give a good estimate on the dimension of totally geodesic  subvarieties $Y$ of  $ \mathsf{A}_g$ generically contained in the hyperelliptic Torelli locus $\mathsf {TH}_g$, i.e. contained in the closure of the image of the hyperelliptic locus $j(\mathsf {HE}_g)$ and such that $Y \cap j(\mathsf {HE}_g) \neq \emptyset$.

The analogous of the Coleman Oort conjecture for Shimura subvarieties generically contained in  the hyperelliptic Torelli locus was considered by Lu and Zuo in \cite{lu-zuo} where they proved that  for $g>7$ there do not exist Kuga curves generically contained in the hyperelliptic Torelli locus. In particular for $g>7$ there do not exist Shimura curves generically contained in the hyperelliptic Torelli locus.

Our  techniques are different, since they are local, hence allow to study totally geodesic subvarieties which are not necessarily algebraic and of any dimension.

In fact recall that the Torelli map is an immersion outside the hyperelliptic locus but also if restricted to the hyperelliptic locus (\cite{os}), so it is possible to study the second fundamental form of the restriction of the Torelli map to the hyperelliptic locus (see also \cite{cf1}).

We prove the following

\begin{theorem}
Let $Y$ be a germ of a totally geodesic submanifold of ${\mathsf A}_g$ contained in $ \mathsf {TH}_g$ then $\dim Y \leq g+1$.
\end{theorem}

 For $g=3$ we get a better bound, namely
 \begin{proposition}
Let $Y$ be a germ of a totally geodesic submanifold of ${\mathsf A}_3$,  contained in the hyperelliptic Torelli locus, then $\dim Y \leq 3$.
\end{proposition}

Notice that for low genus there are examples of Shimura (hence totally geodesic) subvarieties of  ${\mathsf A}_g$ contained in  $ \mathsf {TH}_g$, namely the ones given by families (8), (22), (36), (39) of Table 2 of \cite{fgp} (see also Tables 1 of \cite{moo} for family (8), Table 2 of \cite{moonen-oort} for family (22)).  Family (8) yields a 2-dimensional Shimura subvariety generically contained in  $\mathsf {TH}_3$, while families (22), (36), (39) yield one dimensional Shimura subvarieties  generically contained respectively in  $\mathsf {TH}_3$,  $\mathsf {TH}_4$,  $\mathsf {TH}_5$. \\

{\bfseries \noindent{Acknowledgements.} }
The second author would like to thank Indranil Biswas for the very
interesting conversations during his visit at Tata Institute of
fundamental research, Mumbai in April 2019.

\section{Second fundamental form}
In this section we recall the definition and the results on the second fundamental form of the Torelli locus obtained in \cite{cpt} and in \cite{cfg} and we give a geometric interpretation of the form $\hat{\eta}$ introduced in \cite{cfg} .

Let $\mathsf{M}_g$ be the moduli space of smooth complex algebraic curves of genus $g$, and let $\mathsf{A}_g$ be the moduli space of principally polarised abelian varieties of dimension $g$. Denote by $j: \mathsf{M}_g \rightarrow  \mathsf{A}_g$ the Torelli map. Both $\mathsf{M}_g$ and $\mathsf{A}_g$ are complex orbifolds.
The space  $\mathsf{A}_g$ is the quotient of the Siegel space ${\mathsf H}_g$ by the action of the  symplectic group $Sp(2g, \bZ)$, hence  $\mathsf{A}_g$ is endowed with the orbifold locally symmetric metric (called the Siegel metric) which is induced by the symmetric metric on the Siegel space ${\mathsf H}_g$.
We denote by $\nabla$ the corresponding Levi Civita connection. Recall that the Torelli map is an orbifold immersion outside the hyperelliptic locus and also restricted to the hyperelliptic locus (\cite{os}).

Assume now that $g \geq 4$.
Outside the hyperelliptic locus  we have the following exact sequence of tangent bundles associated to the orbifold immersion  $j: \mathsf{M}_g \rightarrow  \mathsf{A}_g$ evaluated at a non hyperelliptic curve $[C]$:
\begin{equation}\label{short_exact_intro}
0 {\rightarrow} T_{[C]} \mathsf{M}_g \xrightarrow{dj} T_{([JC],\Theta)} \mathsf{A}_g \xrightarrow{\pi} N_{[JC],\Theta} {\rightarrow} 0.
\end{equation}
Consider its dual
\begin{equation}
0 {\rightarrow} I_2(K_C) {\rightarrow} S^2H^0(K_C) {\rightarrow} H^0(2K_C) {\rightarrow} 0.
\end{equation}

Denote by
\begin{equation}
\label{II}
II: S^2 T_{[C]} \mathsf{M}_g \longrightarrow  N_{([JC],\Theta)}
\end{equation}
 the second fundamental form of the Torelli map, and by
 \begin{equation}
 \label{rho}
 \rho:= II^{\vee} : I_2(K_C) {\rightarrow} S^2H^0(C,2K_C)\cong S^2H^1(C,T_C)^\vee
 \end{equation}
 its dual.

We shall state a result obtained in \cite{cpt} which gives an expression of $\rho(Q)(v \odot w)$, where $Q \in I_2(K_C)$ and  $v, w \in H^1(C, T_C)$ are Schiffer variations. First let us recall the definition of a Schiffer variation at a point $p \in C$.

Consider the exact sequence
\begin{equation}
0 {\rightarrow} T_C {\rightarrow} T_C(p) {\rightarrow} T_C(p)_{|p} {\rightarrow} 0.
\end{equation}
The coboundary map gives an injection $\delta: H^0(C,T_C(p)_{|p} )  \hookrightarrow H^1(C, T_C)$. A Schiffer variation at $p$ is a generator of $\delta(H^0(C,T_C(p)_{|p} ) $.
Choose a local coordinate $(U,z)$ at $p$ and $b$ a bump function which is equal to 1 in a neighbourhood of $p$. Then the form  $\theta:= \frac{\bar{\partial}b}{z} \cdot \frac{\partial}{\partial z}\in A^{0,1}(T_C)$ is a Dolbeault representative of a Schiffer variation at $p$. One can easily check that the map
$$\xi: T_pC {\rightarrow} H^1(C, T_C), \ u:= \lambda \frac{\partial}{\partial z}(p) \mapsto \xi_u:= \lambda^2 [\theta]$$
is independent of the choice of the local coordinate $z$.

Consider a curve $C$ of genus $g \geq 2$, and take a point $p \in C$. The space $H^0(C,K_C(2p))$ of meromorphic $1$-forms on $C$ with a double pole on $p$ injects into $H^1(C \setminus \{p\}, \mathbb{C}) \cong H^1(C, \mathbb{C})$.  In fact, if a meromorphic one form $\omega \in H^0(C,K_C(2p))$  were exact, there would exist a meromorphic  function $f$ on $C$ with a simple pole at $p$ and holomorphic elsewhere such that $\omega = df$, hence $C$ would be isomorphic to ${\mathbb P}^1$.
 Denote by $j_p: \; H^0(C,K_C(2p)) \hookrightarrow H^1(C,\mathbb{C})$ this injection.

Observe that $h^0(C,K_C(2p))=g+1$ and  $H^0(C, K_C) \subset H^0(C, K_C(2p))$ is mapped by $j_p$ onto $H^{1,0}(C)$, hence the preimage  $j_p^{-1}(H^{0,1}(C))$ has dimension $1$. Fix a local coordinate $(U,z)$ centered in $p$. Then there exists a unique element $\phi$ in this line whose expression on $U\setminus \{p\}$ is
\begin{equation}
\phi := \bigg( \frac{1}{z^2}+h(z) \bigg) dz,
\end{equation}
where $h$ is a holomorphic function. The form $\eta_p$ is defined as follows:
\begin{equation}\begin{split}
\eta_p: T_pC &\longrightarrow H^0(C,K_C(2p)), \\
u=\lambda \frac{\partial}{\partial z}(p) &\longmapsto \eta_p(u)=\lambda \phi.
\end{split}\end{equation}
One can easily prove that $\eta_p$ is independent of the choice of the local coordinate.

Denote by $\mu_2: I_2(K_C) {\rightarrow} H^0(4K_C)$ the second gaussian map of the canonical bundle (\cite{wh}).

Let us now state a result of \cite{cpt}.

\begin{theorem}[Colombo, Pirola, Tortora  ~\cite{cpt}]
\label{copito}
Let $C$ be a non-hyperelliptic curve of genus $g \geq 4$. Let $p,q \in C$ and $u \in T_p C$, $v \in T_q C$. Then:
\begin{equation}\label{rhomu_equazione}\begin{split}
&\rho (Q) (\xi _u \odot \xi _v) = -4 \pi i \eta _{p} (u)(v)Q(u,v), \\
&\rho(Q) (\xi_u \odot \xi_u) = -2 \pi i \mu _2 (Q) (u^{\otimes 4}).
\end{split}\end{equation}
\end{theorem}

 Theorem \ref{copito} is used  in \cite{cf1} to compute the holomorphic sectional curvature of  $\mathsf{M}_g$ with respect to the Siegel metric along the Schiffer variations.

 Let us now recall a more intrinsic description of the form $\eta_p$  obtained in \cite{cfg}.

  Let $S:= C\times C$, let $\Delta$ denote the diagonal and let $\pi_1, \pi_2:
  S {\rightarrow} C$ be the projections ${\pi_1}(x,y) =x$, $\pi_2(x,y) = y$.  Then $ K_S =
  \pi_1^*K_C \otimes \pi_2^*K_C$. Consider the line bundle $L:= K_S(2\Delta)$
  on $S$ and set  $ V:={\pi_1}_*(\pi_2^*K_C ( 2\Delta))$, $ E:={\pi_1}_* L \cong  K_C \otimes V$  by the projection formula. We have $H^0(
  \pi_1^{-1}(x) , \pi_2^*K_C (2\Delta)) \cong H^0 (C,K_C (2x)) $, hence $V$ is a holomorphic vector bundle on $C$
  with fibre $V_x \cong H^0( C , K_C ( 2x)) $ and the map $x\mapsto
  \eta_x$ is a section of $ E$ that we call $\eta$.
  Since $E={\pi_1}_* L$ there is an isomorphism $ H^0(C,E) \cong H^0(S,L)$ and $\eta$ corresponds to a global section $\hat{\eta} \in  H^0(S,L)$ such that  for  $u\in
  T_xC$ and $v\in T_y C$ with $x\neq y$, we have $ \eta_x
  (u)(v)=\hat{\eta} (u,v) $.

\begin{proposition}[\cite{cfg}]
 The section $\eta$  of $E$ is holomorphic.
Moreover the form $\hat{\eta} $ is symmetric, i.e. $\hat{\eta} (u,v) = \hat{\eta} (v,u)$.

\end{proposition}

The exact sequence on the surface $S$
$$0 \to K_S(-\Delta) \rightarrow K_S \rightarrow  {K_S}_{|\Delta} \rightarrow 0,$$
induces an exact sequence on  global sections

$$0 \to H^0( K_S(-\Delta) )\rightarrow H^0(K_S) \rightarrow  H^0({K_S}_{|\Delta}) \rightarrow 0.$$
With the natural identifications  $H^0(K_S) \cong H^0(K_C) \otimes H^0(K_C)$,  $H^0({K_S}_{|\Delta}) \cong H^0(2K_C)$, the restriction to the diagonal is identified with the multiplication map $H^0(K_C) \otimes H^0(K_C) \to  H^0(2K_C)$. Hence its kernel $H^0( K_S(-\Delta) )$ is isomorphic to $\Lambda^2(H^0(K_C)) \oplus I_2(K_C)$.  Since
  elements of $I_2(K_C)$ are symmetric, they are in fact contained in
  $H^0(S,K_S(-2\Delta))$. So if $Q\in I_2(K_C)$,  the section $Q\cdot
\hat{\eta} $ lies in $H^0(S,2K_S) \cong H^0(C, 2K_C) \otimes H^0(C,
  2K_C)$.
\begin{theorem}[\cite{cfg}]
  \label{prodotto} With the above identifications, if $C$ is
  non-hyperelliptic and of genus $g\geq 4$, then $\rho : I_2(K_C) {\rightarrow}
  S^2H^0(C,2K_C)$ is the restriction to $I_2(K_C)$ of the multiplication
  map
  \begin{equation}
    H^0(S, K_S(-2\Delta)) \longrightarrow H^0(S,2K_S) \qquad Q \mapsto Q \cdot \hat{\eta} .
  \end{equation}
\end{theorem}

The form $\hat{\eta}$  is very mysterious, locally one has
\begin{equation}
\hat{\eta}= \frac{dz\wedge dw}{(z-w)^2}+ f(z,w)dz\wedge dw \label{2diff}\end{equation} in coordinates near the diagonal and $f(z,w)=f(w,z)$ is smooth. It appears also in an unpublished book of Gunning under the name of "intrinsic double differential of the second kind'' \cite{gun}.
It seems very hard to give an actual computation of $\hat{\eta}.$ But we have the following geometric argument that gives information.

Take a quadric $Q\in I_2(K_C) \subset S^2H^1(\cO_C)^{\vee}$, $Q: H^1(\cO_C)\times H^1(\cO_C)\to \bC$.

By the above discussion,  we see the quadric $Q \in I_2(K_C)$  as  a holomorphic section $\tilde{Q}$ of $K_S$ which belongs to $H^0( K_S(-2\Delta) )$, hence it vanishes on the diagonal.

Denote by $\phi_{K_C}: C \to \bP H^1(\cO_C)$ the canonical map.
Take $\{\omega_1,...,\omega_g\}$ a basis of $H^0(K_C)$, then we have $Q = \sum_{i,j} a_{ij} \omega_i \odot \omega_j$, while $\tilde{Q} = \sum_{ij} a_{ij} \pi_1^*(\omega_i) \wedge \pi_2^*(\omega_j) $ as a section of $H^0(K_S)$.
Take $ p, q \in C$,  then  we have the identification $T_{(p,q)}S  \cong \pi_1^*T_pC \oplus \pi_2^* T_qC$. So, if we take $u_p \in T_pC$, $u_q \in T_qC$, we have
$$\tilde{Q}(u_p,u_q) = \sum_{i,j} a_{ij} \omega_i(u_p) \omega_j(u_q), $$which is equal to the value of the bilinear form $Q$ at the points  $\phi_{K_C}(p)$ and  $\phi_{K_C}(q)$.

Since $\tilde{Q}$ vanishes on the diagonal,
the zero locus  $Z(Q)$ of $\tilde{Q}$  is
$$\{(p,q) \in S : p\neq q : \tilde{Q}(u_p,u_q)=0\} \cup \Delta.$$
Since $\tilde{Q}(u_p,u_p)=\tilde{Q}(u_q,u_q)=0$,  if $(p,q) \in Z(Q)$, then the symmetric bilinear form $Q$ vanishes at the points $(\phi_{K_C}(p), \phi_{K_C}(q))$, $(\phi_{K_C}(p), \phi_{K_C}(p))$, and $(\phi_{K_C}(q), \phi_{K_C}(q))$.  Hence the line $L(p,q)$ in  $ \bP H^1(\cO_C)$  through $\phi_{K_C}(p)$ and  $\phi_{K_C}(q)$ is contained in $Q$, therefore
$$Z(Q)=\{(p,q) \in S :   Q(x,x)=0, \   \forall x\in L(p,q) \}.$$

Similarly if $Q'=\rho(Q) \in S^2H^0(2K_C) \subset H^0(2K_S)$, set
$$Z(Q')=\{(p,q) \in S  : Q'(p,q)=0\}.$$

By Theorem \ref{prodotto} we have
$$Z(Q')=Z(Q)\cup Z(\hat{\eta}).$$
Then if $p \neq q$, $(p,q) \in Z(Q)$ implies that $(p,q) \in Z(Q')$,  but this time $Q'(p,p)\neq 0$ in general (the intersection with the diagonal is the divisor of the image of the second Gaussian map).
In particular,  if the quadric $Q$ has rank $4$,  we project form the kernel of $Q$ to $\bP^3$  to get a quadric  $Q_{\bP^3}$ of $\bP^3$ which is  isomorphic to $\bP^1\times \bP^1.$  Call $f: C \rightarrow \bP^1$ the composition of the canonical map with the projection form the kernel of $Q$ and finally with one of the two projections from $\bP^1 \times \bP^1$  to $\bP^1$. For $y\in \bP^1$,  set $f^{-1}(y)=\{P_1\dots P_d\}$. If $y$ is general we get for $i\neq j$, $\tilde{Q}(P_i,P_j)=Q'(P_i,P_j)=0$, but
$Q'(P_i,P_i)\neq 0$. Notice that here (and also later in the paper) we use the simplified notation $\tilde{Q}(P_i,P_j)$ instead of writing $\tilde{Q}(u_i,u_j)$, with $u_i \in T_{P_i}C$, $u_j  \in T_{P_j}C$. This is clearly possible once we choose a local trivialisation of the line bundle $K_S$ in a neighborhood of $(P_i, P_j)$. When there is no ambiguity,  we will also identify $Q$ and $\tilde{Q}$ as in Theorem \ref{prodotto}.

\begin{theorem}
\label{interpretation}
If $Q$ has rank $4$ the quadric $Q'$ has rank $\geq \deg f$ where $f$ is  the composition of the canonical map with the projection to one of the two factors of $\bP^1\times \bP^1.$
\end{theorem}
\proof

Consider the linear subspace $V = \langle \xi_{P_1}, ..., \xi_{P_d} \rangle \subset H^1(T_C)$. It is easy to see that $\dim V = d$ (see e.g. the proof of Theorem 4.1 of \cite{cfg}). The quadric $Q'$ belongs to $S^2 H^1(T_C)^{\vee}$ and the image of the points $P_i$ via the bicanonical map are the points $[\xi_{P_i}] \in  \bP(H^1(T_C))$. Hence the above argument shows that the matrix associated to the restriction of $Q' = \rho(Q)$  to $V$ in the basis  given by the Schiffer variations at the points $P_i$ is diagonal with non zero diagonal entries.
\qed\\

Recall that quadrics $Q \in I_2(K_C)$ of rank 4 correspond to $\{L, K_C(-L), U, W\}$ where $L$ is a line bundle on $C$, $U \subset H^0(C,L)$ and $W \subset H^0(K_C(-L))$ are 2-dimensional subspaces. The quadric $Q$ has rank 3 if and only if $2L = K_C$ and $U =W$. In the case $rank(Q) =4$,  if $U = \langle s_0,s_1\rangle $ and $W = \langle t_0, t_1\rangle$,
$Q= s_0t_0\odot s_1t_1 - s_0t_1 \odot s_1 t_0. $
So, if we denote by $f,g:C \rightarrow \bP^1$ the two maps given by the two pencils $U$ and $W$, we see that the zero locus of $Q$ in $S$ is given by
$$\{(p,q) \in S \ | \  f(p) = f(q)\} \cup \{(p,q) \in S \ | \  g(p) = g(q)\} \cup ( (B_f \cup B_g) \times   C) \cup  (C \times (B_f \cup B_g)), $$
where $B_f$ and $B_g$ are the base loci of the pencils $f$ and $g$.

If $rank(Q) =3$ and $U=W = \langle s_0,s_1\rangle$, then $Q = s_0^2 \odot s_1^2 - s_0s_1 \odot s_0s_1$. If we denote by $h:C \rightarrow \bP^1$ the map given by the pencil $U=W$, the zero locus of $Q$ in $S$ is $2R_h  +2F$ where $F =  (B_h \times C) \cup (C \times B_h)$ with $B_h$ the base locus of $h$ and
$$R_h := \{(p,q) \in S \ | \  h(p) = h(q)\}.$$

Now we give another application.

\begin{proposition}
\label{rankQ'}
If $Q$ is non zero, then the rank of $Q'$ is $\geq 2$.
If  rank of $Q=3 $ then the rank of $Q'$ is   $\geq 3.$
\end{proposition}

\begin{proof} First we show that the rank of $Q'$ is $>1$ for any non zero $Q.$  In fact if $Q'=X^2$ we get
$$Z(Q')=\{(P,Q)\in S \ | \  X(Q)X(P)=0\}=\{(P,Q) \ | \ X(P)=0\}\cup \{(P,Q) \  | \  X(Q)=0\}, $$ that is a union of coordinate curves of the type
$\{P\}\times C \cup C\times \{P\}$, so all the components meet  the diagonal. On the other hand,  we get that
$Z(Q')=Z(\hat{\eta})\cup Z(Q)$ but $Z(\hat{\eta})$ does not intersect the diagonal, as one can easily see from the definition of $\hat{\eta}$, hence $Z(\hat{\eta})$ does not contain any coordinate curve.
Now assume $Q'=XY$, so that  $$Z(Q')=\{(P,Q)\in S \ | \  X(Q)Y(P)+X(P)Y(Q)=0\}$$
That is, if $P$ and $Q$ are not in the base locus of the pencil,
$$\frac{X(Q)}{Y(Q)}=-\frac{X(P)}{Y(P)}.$$

Now if  $f:C\to \bP^1$ is the map defined by   the sections $X$ and $Y$ of $H^0(2K_C)$, we get
$ Z(Q')= \{(P,Q)\in S: f(P)=-f(Q)\}\cup B=A\cup B$ where $B$ is union of coordinate curves defined by the base locus of the pencil. Let $e$ be the degree of $f.$ For general $t\in \bP^1$ then $f^{-1}(t)=\{P_1,\dots,P_e\}$ and
 $f^{-1}(-t)=\{Q_1,\dots,Q_e\}$ are distinct. It follows that $A$ has not multiple components.
 Now assume that the rank of $Q$ is $3$.  In this case we have
 $Z(Q)= 2R_h +2F$  as above. The equation $ 2R_h+Z(\hat{\eta})+2F= A+B$ gives $2R_h+Z(\hat{\eta})=A$ and then  we get a contradiction, since
$A$ has not multiple components.
\end{proof}

Theorem \ref{interpretation} gives a geometric interpretation and easier proof of Theorem 4.1 of \cite{cfg}. This was the main ingredient used in \cite{cfg} to give a bound on the the maximal dimension of a germ of a totally geodesic submanifold generically contained in the Torelli locus. We recall the main results of \cite{cfg}.
\begin{theorem} [\cite{cfg}]

\label{stima1}
  Assume that $C$ is a $k$-gonal curve of genus $g$ with $g\geq 4$ and
  $k\geq 3$. Let $Y$ be a germ of a totally geodesic submanifold of
  ${\mathsf A}_g$ which is contained in the jacobian locus and passes through
  $j([C])$. Then $\dim Y \leq 2g+k - 4$.

\end{theorem}

From this, using that the gonality is at most  $ [(g+3)/{2}]$, they get the following

\begin{theorem}  [\cite{cfg}]
  \label{stima2}
  If $g\geq 4$ and $Y$ is a germ of a totally geodesic submanifold of
  $A_g$ contained in the jacobian locus, then $\dim Y \leq
  \frac{5}{2}(g-1)$.
\end{theorem}

The strategy used in \cite{cfg} to prove Theorem \ref{stima1} is to construct  a rank 4 quadric $Q \in I_2(K_C)$ such that the quadric $\rho(Q) \in S^2H^0(2K_C) \cong S^2H^1(T_C)^{\vee}$ has rank at least $2g-2k-1$. This was done in \cite[Thm 4.1]{ cfg} and now follows from Theorem \ref{interpretation}. Then the proof of Theorem  \ref{stima1} follows by observing that the tangent space to a totally geodesic submanifold contained in the Torelli locus and passing through $j(C)$ is a linear subspace of $H^1(T_C)$ which is isotropic with respect to $\rho(Q)$, hence its dimension is at most $3g-3 - (2g-2k-1) + \frac{(2g-2k-1)}{2}=
2g+ k - \frac{7}{2}$.

\section{Gonality}
Let $C$ be a curve of genus $g>5$. Assume that $C$ is not hyperelliptic, and denote by $k$ its gonality. We have $2<k<g-1$.
Let $L$ be  a line bundle  on $C$ of degree $k$  and such that $h^0(L)=2.$ Set $M:=K_C-L$, where $K_C$ is the canonical bundle.
From Riemann Roch we get $h^0(M)=2g-2-k+2-(g-1)=g+1-k>2.$
The Clifford index  of $C$ is either $k-2$ (computed by $L$) or $k-3$.
We have the following

\begin{proposition} Let $B$ be the base locus of $M=K_C-L.$ Then
 \begin{enumerate}  \item $B$ is either empty or $B=P$ is a point.
 \item  If $B=P$ is a point, then  $h^0(L(P))=3,$ the map
$f: C\to |L(P)|$ is birational onto its image which is a smooth curve.
\item If $B=\emptyset,$  and $D>0$ is a divisor  such that $h^0(M(-D))=h^0(M)-1, $ then   $\deg D\leq 3.$
\item If $B=\emptyset,$ and $D, E>0$  are divisors such that $h^0(M(-D))= h^0(M(-E)) = h^0(M)-1,$ $\deg D = \deg(E) =3,$ then $D=E.$
In particular  the map $g: C\to |M|$ is either birational on its image or has degree $ 2.$
\end{enumerate}
 \end{proposition}
\begin{proof} If $B\neq \emptyset$ is the base locus of  $M$, we have that $h^0(M(-B))=h^0(M).$
Then by Riemann Roch,  $h^0(L(B))=2+\deg B$, the Clifford index of $L(B)$ is  $k+\deg B-2(1+\deg B)=k-2-\deg B\geq k-3$,  hence $B=P$ is a point, and $h^0(L(P))=3.$ Consider the map  $f:C\to |L(P)|$.  It is birational onto its image which is smooth. In fact,  if we set $s=\deg f(C)$ and $d = deg(f)$,  we have $sd=k+1$. Considering the composition of $f$ with the projection from a point $q\in f(C)$ of multiplicity $m_q$, we get a map $C\to \bP^1$ of degree
$d(s-m_q)=k+1-dm_ q\leq k$. Then  $dm_q= 1$, $d=1$, that is $f$ birational,  and for any $q\in f(C)$, $m_q=1$,  hence $q$ is a smooth point.

\bigskip Assume now that $B=\emptyset.$ Let $D>0$ be a divisor of degree $s$ such that $h^0(M)=1+h^0(M(-D))$. Then again from Riemann Roch we have $h^0(L(D))=2+s-1=s+1$,
$\deg(L(D))=k+s$. Hence its  Clifford index is  $k+s-2s=k-s\geq k-3,$  so $s\leq 3.$

Assume that there are two divisors
$D$ and $E$ of degree $3$ such that $h^0(M(-D))=h^0(M(-E))=h^0(M)-1.$
If   $F= D\cap  E$ (this is the MCD of the divisors) we would like to show that $F=\emptyset.$ In fact, set $G=D+E-F$  and consider the exact sequence:
$$0\to M(-G)\to  M(-D)\oplus M(-E)\to M(-F) \to 0.$$
If by contradiction we assume $F\neq \emptyset$, we have $h^0(M-E) \leq h^0(M-F)<h^0(M)$ then $ h^0(M-F)=h^0(M)-1.$ It follows that $h^0(M-G)\geq 2(h^0(M)-1)-(h^0(M)-1)=h^0(M)-1$,
but  $\deg G>3$ and we find a contradiction.  So we have $F=\emptyset$. Consider the exact sequence:
$$0\to L\to  L(D)\oplus L(E)\to L(D+E)\to 0$$
that in cohomology gives
$0\to H^0(L)\to H^0(L(D))\oplus H^0(L(E))\to H^0(L(D+E)).$ Since $h^0(L(D))=h^0(L(E))=4$,  we obtain
 $H^0(L(D+E))\geq 6$ and its Clifford index $\leq k+6-10= k-4< k-3$, so we get a contradiction.

\end{proof}
From this we immediately get the following
\begin{corollary} Let $C$ be a projective curve
of genus $g$, gonality $k=\deg L$ where $h^0(L)=2$. Then if $C$ is not a smooth plane curve and has no involutions, the linear system $|M|=|K_C-L|$ is base point free and $C\to |M|$ is birational onto its image.\end{corollary}
\section{Divisors and  quadrics}

\subsection{The quadrics and the second fundamental form}
Here we follow \cite{cfg}.
Let $C$ be a smooth projective curve, $L$ a line bundle on $C$ and $M=K_C(-L)$.
In practice we will consider the case where $L$ computes the gonality, but for the moment we only assume
\begin{enumerate}
\item $h^0(L)\geq 2,$
\item $h^0(M)=r+1\geq 3,$
\item $M$ base point free,
\item $f: C\to |M|=\bP^r $ is birational onto its image.
\end{enumerate}
Set  $\deg M=d$ and  fix now and for all two indipendent  sections $x,y$ of $L$.  Let $\omega=\mu_{1,L}(x\wedge y)\in H^0(K_C(L^2))$ be the image of the first gaussian (or Wahl) map. The zero divisor $Z$ of $\omega$ is $Z=B+2F$ where $B$ is the branch divisor of $h=x/y$ and $F$ is the fixed divisor (that  in the application  will be empty).
For any global section $s$ of $M$ we consider the associated divisor $D(s)\in |M|.$
We fix  a general section $t$
such that:
\begin{enumerate}
\item $D(t)\cap Z=\emptyset.$
\item $D(t)=p_1+\dots +p_d$, $p_i\neq p_j$ if $i\neq j.$
\item The points $p_i$ are in general linear position: for any group of or $r$ distinct points $p_{i_1},\dots p_{i_j},\dots p_{i_r},$
we have $H^0(M-(p_{i_1}+\dots  +p_{i_r}))=\langle t \rangle$.
\end{enumerate}
The last condition follows for instance  from the uniform lemma of Castelnuovo (see e.g.  \cite[Ch.3]{acgh}) since $f:C\to \bP^r$ is birational onto its image.

Consider the exact sequence induced by $t$
$$0\to \cO_C\stackrel{t}\to M\to M_D\to 0.$$
We  get  $$M_D=\sum M_{p_i}\cong \sum\bC_{p_i},$$
where the last isomorphism follows from the choice of local trivializations of $M.$
Let $W\subset H^0(M)$ be complementary to $t:$ $H^0(M)=\langle t \rangle \oplus W$, so that $\dim W=r$.
Consider the induced injection $j: W\to H^0(\oplus \bC_{p_i})=\bC^d.$
 We can rewrite the linear uniform condition.
For any $s\in W$, $s\neq0$,  then the vector
$j(s)=(a_1,\dots,a_i,\dots a_d)$
has at most $r-1$ coordinates that are zero.

Let $I_2(K_C)\subset S^2 H^0(K_C)$  be the vector space of quadrics that contain the canonical image of $C$.
For any $s\in W$,  set  $\omega_1=xt ,\omega_2=yt, \omega_3=xs$ and $\omega_4=ys$. We define the rank $4$ quadric $Q_s\in I_2$ by
$$Q_s=\omega_1\otimes \omega_4-\omega_2\otimes \omega_3.$$
Denote by $\mu_{1,M}: \Lambda^2H^0(M) \rightarrow H^0(K_C\otimes M^2)$ the first Gaussian map of $M$.
Let $V := \langle \xi_{p_1},..., \xi_{p_d}\rangle \subset H^1(T_C)$ be the subspace generated by the Schiffer variations $\xi_{p_i}$ at the points $p_i$.
To be more precise, we choose a  coordinate $z_i$ around any point $p_i$ and a trivialization $\sigma$ of $L$  such that
$t_i=z_i\sigma.$ We then let $$\xi_i=\delta (\frac{1}{z_i}\partial/\partial z_i)$$ under the coboundary map $\delta:H^0(T(p_i))\to H^1(T_C).$
Dually we have a surjection $H^0(K^2_C)\to V^\ast.$

We  also define
\begin{equation}
\label{pi}
\pi: W\to S^2V^\ast, \ \pi(s)(v \odot w) = \rho(Q_s)(v \odot w), \ \forall v,w \in V.
\end{equation}

The following fundamental result has been proved  in
 \cite[Thm. 4.1]{ cfg}, with the variant here that all the quadrics $Q_s,$ $s\in W,$ are taken into account.
It also immediately follows from Theorem \ref{interpretation}.
\begin{theorem}
\label{diago}
Let $x_1,\dots x_d$ be the basis of $V^\ast$ dual to the basis $\{\xi_{p_1},...,\xi_{p_d}\}$ of $V$ given by the Shiffer variations.
Then $$\pi(s)= \lambda \sum_{i=1}^d a_ix_i^2$$ where $\lambda\neq 0$ is a constant independent of $s$,
$j(s)=(a_1,\dots,a_d)$ where $ j:W\to \bC^d$ is the evaluation map.
The quadrics $\pi(s)$ are diagonalized  at the same time and  for any  $s\neq 0,$
${\rm{rank}} (\pi(s))\geq d-r+1.$
\end{theorem}
\begin{proof} The fact that all the quadrics are in diagonal form follows from  \cite[Thm. 4.1]{ cfg}, or  from Theorem \ref{interpretation}.
Recall formula \eqref{rhomu_equazione}: $\rho(Q_s)(\xi_{p_i} \odot \xi_{p_i}) = -2 \pi i \mu_2(Q_s) (u_i^4) = -2 \pi i \mu_{1,L}(x\wedge y)\cdot \mu_{1,M}(t\wedge s)(u_i^4)$ where $u_i=\partial/\partial z_i$ and $z_i$ is the coordinate centred at $p_i$.
Since $\mu_{1,L}(x\wedge y)$ does not depend on $s$, we have to evaluate $ \mu_{1,M}(t\wedge s)$. Now  $ \mu_{1,M}(t\wedge s)= (t's-s't)(p_i)=(t's)(p_i)$  since $t(p_i)=0$ by construction.  Then
 $a_i$ is the evaluation of $s$ at $p_i$. \end{proof}
\subsection{Le zero locus of the quadrics}
For an element $z \in V$, write $z = \sum_{i=1}^d z_i \xi_{p_i}$ and denote by $[z]:=[z_1,...,z_d] \in  \bP^{d-1} \cong  \bP(V)$.
Consider the locus
$$Z=\{[z] \in \bP^{d-1}: \pi(s)(z \odot z)=\rho(Q_s)(z \odot z)=0,  \ \forall s\in W\}.$$
 First we have the following
\begin{lemma} Set $H=\{[z] \in \bP^{d-1}: z_i=0,\ i>r\},$ then $Z \cap H=\emptyset,$  therefore  $\dim Z=  d-r-1.$
 \end{lemma}
\begin{proof}
Notice that by the uniform position (see e.g.  \cite[Ch.3]{acgh}), we know that for all $i \in \{1,...,r\}$, there is exactly  a section $s_i\in W$   such that  $s_i(p_j) =0$, $\forall j \in \{1,...,r\}$, $j \neq i$, $s_i(p_i) \neq 0$, $s_i(p_k) \neq 0$, $\forall k >r$, hence by Theorem \ref{diago} we get
\begin{equation}
\label{bau}
\pi(s_i)=  a_{i,i}x^2_i+\sum_{j>r} a_{i,j}x^2_j,
\end{equation}
  with $a_{i,i} \neq 0$, $a_{i,j} \neq 0$, $\forall j >r$.
Take $[z] = [z_1,...,z_r,0,...,0]\in H$ such that $\pi(s)(z \odot z) =\rho(Q_s)(z \odot z)=0$, $\forall s \in W$.
Set $Q_i:= Q_{s_i},$ then $\rho(Q_i)(z \odot z)= a_{i,i} z_i^2 =0$ $\forall i$ if and only if  $z_i=0$, $\forall i =1,...,r$, which is impossible, since $[z] \in H$.  Therefore we have  $H\cap Z=\emptyset$
and then $\dim Z \leq d-1-r.$ Notice that $Z=\{[v]\in \bP^{d-1}: \rho(Q_i)(v \odot v)=0, \ i=1,\dots,r\}$, so $\dim Z = d-1-r$.

\end{proof}

\subsection {Estimate}
We need to estimate the dimension of a linear space $\Pi\subset Z.$ Denote by $T$ the linear subspace of $V$ corresponding to $\Pi$.

Consider the maps $\pi_i:V\to V$,  $\pi_i (x_1,\dots x_i, x_{i+1},\dots,x_d)= (0,\dots,0,x_{i+1},\dots x_d)$
The restriction of $\pi_i$ to $T$ is injective for $i \leq r$ since $\Pi\subset Z$.
By formula \eqref{bau} we can see $\pi(s_r)$ as a quadric in $\pi_{r-1}(V)$.

We have the inclusion $$\pi_{r-1}(T)\subset \{v \in \pi_{r-1}(V) \ | \ \pi(s_r)(v \odot v) = \rho(Q_{r})(v \odot v)=0\}.$$ Since
$\pi(s_{r})$ has rank $d-r+1$, $\dim(\pi_{r-1}(V)) = d-r+1$ and $\pi_{r-1}: T \longrightarrow V$ is injective,  we get:
\begin{proposition}
\label{bound}
With the previous notation, let $\Pi$ be a linear subspace contained in $Z,$ and let $T$ be the corresponding  subspace  of $V$.  Then
$$\dim T \leq  \frac{d-r+1}{2}.$$
\end{proposition}

\section{Application}
We assume that $C$ is a curve of genus $g>5,$ gonality $k$ computed by $L$ and assume that $C$ has no involutions and is not a smooth plane curve.
Then we can apply to the general section of $M=K_C-L$ the estimate of the previous section. We have:
$\deg M= 2g-2-k$ and $h^0(M)=g+1-k$,  that is $r=g-k.$
Then if $t$ is a general section  of $M$ and $V$ is generated by the Schiffer variations
at the zeroes of $t$, by Proposition \ref{bound} we get that a linear space $T\subset V$  contained in the zero locus of the quadrics $\rho(Q_s)$, for $s \in W$  has dimension
\begin{equation}
\label{mao}
n\leq \frac {g-1}{2}.
\end{equation}
 Then we obtain the following
\begin{theorem}
\label{gonality}
If $C$ is a smooth curve of genus $g>5$, gonality $k$, it has no involutions and is not a smooth plane curve,  then any totally geodesic subvariety generically contained in the Torelli locus and passing through $j(C)$ has
dimension $$m\leq  \frac {3(g-1)}{2}+k.$$
\end{theorem}
\begin{proof} Let $S$ be the  tangent space at $[C]$ of a totally geodesic subvariety. Let $V$ be as above,  then $T=S\cap V$ is a linear subspace where all
the quadrics vanish, so by \eqref{mao} we get:  $\dim (S\cap V)\leq \frac{g-1}{2}$.  Then $\dim S+ \dim V \leq 3g-3 +\dim (S\cap V)$, hence
$$\dim S\leq 3g-3 -(2g-k-2)+\frac{g-1}{2}= \frac {3(g-1)}{2}+k.$$
\end{proof}
\begin{theorem}
Let $Y$ be a germ of a totally geodesic submanifold generically contained in the Torelli locus $\mathsf{T}_g$, $g>5$,  then
$\dim Y \leq 2g-1$ if $g$ is even, $\dim Y \leq 2g$ if $g$ is odd.
\end{theorem}
\begin{proof}
For $g>5$ the result follows by Theorem \ref{gonality}, recalling that $k\leq [(g+3)/2].$ For $g=4,5$ the result follows from \cite[Thm.4.4]{cfg}.
\end{proof}

\section{The hyperelliptic locus}

Assume that $C$ is a hyperelliptic curve of genus $g \geq 3$. Denote by $L$ the line bundle giving the $g^1_2$, $H^0(L) = \langle x,y\rangle$. Set $M = K_C(-L)$, denote by $\pi:C \rightarrow \bP^1$ the map induced by $|L|$. Call $\nu_n: \bP^1 \hookrightarrow \bP^{n}$ the $n$th Veronese embedding.  The canonical map is the composition $\nu_{g-1} \circ \pi$, so $K_C \cong \pi^*({\mathcal O}_{{\bP}^1}(g-1)) \cong L^{\otimes (g-1)}$ and $M \cong  L^{\otimes (g-2)}$. Then $H^0(C,M) \cong H^0(\bP^1, {\mathcal O}_{{\bP}^1}(g-2))$  has dimension $r+1= g-1$, so $r = g-2$.  Denote by $\sigma$ the hyperelliptic involution and write   $H^0(C, 2K_C) \cong H^0(C, 2K_C)^+ \oplus  H^0(C, 2K_C)^-$ the decomposition of  $H^0(C, 2K_C)$ in invariant and anti-invariant subspaces by the action of $\sigma$.  By the projection formula one gets: $H^0(C, 2K_C)^+ \cong H^0(\bP^1, {\mathcal O}_{{\bP}^1}(2g-2))$, $H^0(C, 2K_C)^- \cong H^0(\bP^1, {\mathcal O}_{{\bP}^1}(g-3))$.
	Denote by ${\mathsf {HE}}_g$ the hyperelliptic locus in ${\mathsf M}_g$ and by $j_{h}: {\mathsf {HE}}_g \rightarrow {\mathsf A}_g$ the restriction of the Torelli map to ${\mathsf {HE}_g}$. Then $j_h$ is an orbifold immersion and we have the following tangent bundle exact sequence

\begin{gather}
\label{tangent}
  \xymatrix{& & 0 \ar[d] & & &\\
    &0\ar[r] &  T_{{\mathsf {HE}}_g}\ar[d]\ar[r] &  {T_{{\mathsf A}_g}}_{|{\mathsf{HE}_g}}\ar[d]^=\ar[r] & N_{{\mathsf {HE}}_g/{\mathsf A}_g} \ar[r]\ar[d] & 0\\
    &  &{T_{{\mathsf M}_g}}_{|{\mathsf HE}_g} \ar[r]&  {T_{{\mathsf A}_g}}_{|{\mathsf{HE}_g}}\ar[r]& {N_{{\mathsf {M}}_g/{\mathsf A}_g}}_{| {{\mathsf {HE}}_g}}
     \ar[r] &0\\
    & & & &  &}
\end{gather}

Denote by
\begin{equation}
\rho_{HE}: N^*_{{\mathsf {HE}}_g|{\mathsf A}_g} \rightarrow S^2 T_{{\mathsf {HE}}_g}
\end{equation}
the dual of the second fundamental form of $j_h$.

At a point $[C] \in {\mathsf {HE}}_g$, the dual of \eqref{tangent} is

\begin{gather}
\label{cotangent}
  \xymatrix{
        &0 \ar[r] & I_2(K_{C}) \ar[d]^=\ar[r]& S^2 H^0(K_{C})\ar[d]^=\ar[r]^m& H^0(2K_{C})\ar[d] &\\
    &0\ar[r] & I_2(K_{C})\ar[r] &  S^2 H^0(K_{C})\ar[r]^m &  H^0(2K_{C})^+\ar[r] & 0}
\end{gather}

and $I_2(K_C)$ can be identified with the set of quadrics containing the rational normal curve.

We have $\forall Q \in I_2(K_C)$, $\forall v,w \in H^1(T_C)^+$, $\rho_{HE}(Q) (v \odot w) = \rho(Q)(v \odot w)$ (see \cite[Prop. 5.1]{ cf1}).  Here  we denote by $\rho(Q)$ the section $ Q \cdot \hat{\eta} $, seen as an element in $S^2 H^0(K_C)$ as in Theorem  \ref{prodotto}.

Take $t \in H^0(M) $ a generic section and denote by $D(t)$ its divisor. It has degree $2g-4$ and  it is invariant by the action of $\sigma$, hence $D(t) = q_1 + \sigma(q_1)+...+q_{g-2} + \sigma(q_{g-2})$. Write as above $H^0(M) = \langle t \rangle \oplus W$. Since $H^0(C,M) \cong H^0(\bP ^1, {\mathcal O}_{\bP^1}(g-2))$, to the section $t \in H^0(C, M)$ corresponds a section $\overline{t} \in  H^0(\bP ^1, {\mathcal O}_{\bP^1}(g-2))$, whose zero divisor is $\overline{D} = r_1 + ...+r_{g-2}$ where $r_i = \pi(q_i)$, $\forall i$.  Denote by $\overline{W}$ the isomorphic image of $W$ in $H^0(\bP ^1, {\mathcal O}_{\bP^1}(g-2))$. For every $i \in \{1,...,g-2\}$ there exists a unique section $\bar{s_i} \in \overline{W}$ such that $\bar{s_i}(r_j) =0 $ for all $j \neq i$ and $\bar{s_i}(r_i) \neq 0$. The section $\bar{s_i}$ coresponds to a section $s_i \in W$ such that $s_i(q_j) = 0$ for all $j \neq i$ and $s_i(q_i) \neq 0$.

For every section $s \in W$ consider as above the quadric
$$Q_s = (xt) \odot (ys) - (xs) \odot (yt) \in I_2(K_C),$$
and the tangent vectors $v_i := \xi_{q_i} + \xi_{\sigma(q_i)}$, $i =1,...,g-2$. Clearly $v_i \in H^1(T_C)^+$, hence by the $\sigma$-invariance, and using \eqref{rhomu_equazione},  if $i \neq j$ we have
$$\rho_{HE}(Q_s)(v_i \odot v_j) = \rho(Q_s)(v_i \odot v_j)=   2\rho(Q_s)(\xi_{q_i} \odot \xi_{q_j}) +  2\rho(Q_s)(\xi_{q_i} \odot \xi_{\sigma(q_j)}) = $$
$$=8 \pi i (Q_s(q_i, q_j) \eta_{q_i}(q_j) + Q_s(q_i, \sigma(q_j) )\eta_{q_i}(\sigma(q_j))  ) =0,$$
since $q_i, q_j$ and $\sigma(q_j)$ are in the zero locus of $t$.
On the other hand we have
  $$\rho_{HE}(Q_s)(v_i \odot v_i) = \rho(Q_s)(v_i \odot v_i)=   2\rho(Q_s)(\xi_{q_i} \odot \xi_{q_i}) +  2\rho(Q_s)(\xi_{q_i} \odot \xi_{\sigma(q_i)}) = $$
$$=8 \pi i (2\mu_2(Q_s)(q_i) + Q_s(q_i, \sigma(q_j)) \eta_{q_i}(\sigma(q_j))  ) =16 \pi i \mu_2(Q_s)(q_i) = $$
$$=16 \pi i \mu_{1,L}(x \wedge y)(q_i) \mu_{1, M}(s \wedge t)(q_i) = 16 \pi i a_i,$$
where  $a_i =0$ if and only if $s(q_i) =0$.

So if we denote by $V = \langle v_1,...,v_{g-2}\rangle$,  we have shown that $\rho_{HE}(Q_s)_{|V}$ is diagonal with diagonal entries equal to $ca_i$, $c = 16 \pi i$.
\begin{proposition}
\label{HE}
Assume that $T \subset H^1(T_C)^+$ is a linear subspace which is isotropic with respect to all the quadrics $\rho_{HE}(Q_{s})$, $\forall s \in W$, then $T \cap V = \{0\}$.

\end{proposition}
\proof
If $v = z_1 v_1 + ...+ z_{g-2} v_{g-2} \in V$, then $\rho_{HE}(Q_{s_i})(v \odot v) = c a_i z_i^2$, with $a_i \neq 0$. Hence $\rho_{HE}(Q_{s_i})(v \odot v) =0$ if and only if $z_i =0$.
\qed
\begin{theorem}
Let $Y$ be a germ of a totally geodesic submanifold of ${\mathsf A}_g$ contained in the hyperelliptic locus, then $\dim Y \leq g+1$.
\end{theorem}
\proof
If $Y$ is a germ of a totally geodesic submanifold of  ${\mathsf {HE}}_g$ passing to $[C]$,  its tangent space at $[C]$ is isotropic with respect to all the quadrics $\rho_{HE}(Q)$ with $Q \in I_2(K_C)$,  hence to all the quadrics  $\rho_{HE}(Q_{s_i})$, therefore $T_{[C]}Y \cap V =\{0\}$ by Proposition \ref{HE}.
Thus $\dim T_{[C]}Y + \dim V = \dim Y + g-2 \leq \dim H^1(T_C)^+ = 2g-1$, so $\dim Y \leq g+1$.
\qed

\begin{proposition}
Let $Y$ be a germ of a totally geodesic submanifold of ${\mathsf A}_3$,  contained in the hyperelliptic locus, then $\dim Y \leq 3$.
\end{proposition}
\proof

If $g =3$ then the dimension of the space of quadrics containing the rational normal curve is one and this space is generated by the rational normal curve, which is a smooth conic $Q$. By Proposition \ref{rankQ'}, the rank of $\rho(Q)$ is at least 3, hence $\dim(Y) \leq 5-3+\frac{3}{2} = \frac{7}{2}$.
\qed

\begin{remark}
Families (8) and (22) of Table 2 of \cite{fgp} (see also Tables 1 and 2 of \cite{moonen-oort}) yield respectively a two-dimensional and a one-dimensional Shimura (hence totally geodesic) subvariety of ${\mathsf A}_3$ generically contained in the hyperelliptic Torelli locus.

Family (36) of Table 2 of \cite{fgp} yields  a one-dimensional Shimura (hence totally geodesic) subvariety of ${\mathsf A}_4$ generically contained in the hyperelliptic Torelli locus.

Family (39)  of Table 2 of \cite{fgp} yields  a one-dimensional Shimura (hence totally geodesic) subvariety of ${\mathsf A}_5$ generically contained in the hyperelliptic Torelli locus.

\end{remark}
\proof
See \cite{fgp} 4.6.
\qed