Bifurcations along a fold of cycles curve

In CL_MATCONT there are five generic codim 2 bifurcations that can be detected along a fold of cycles curve: A Generalized Hopf (GH) marks the end (or start) of an LPC curve.
To detect the generic singularities, we first define $bp+5$ test functions, where $bp$ is the number of branch parameters:

In the $\psi_i$ expressions $w$ is the vector computed in (57) and $\beta_i$ (branch parameter) is a component of $\alpha$.

In the second expression $\psi_{bp+1}$, we compute $v_{1M}$ by solving

\begin{displaymath}
\left[\begin{array}{c}D-TA(t)\\
\delta_0-\delta_1\\
\in...
...y}{c}TF(u_{0,1}(t))\\
0\\
0
\end{array}\right]_{disc}.
\end{displaymath} (73)

By discretization we obtain

\begin{displaymath}(\varphi_{1W}^*)^T\left[\begin{array}{c}D-TA(t)\\ \delta_0-\delta_1\end{array}\right]_{disc}=0.\end{displaymath}

To normalize $(\varphi_1^*)_{W_1}$ we require $\sum_{i=1}^N\sum_{j=1}^m\left\vert((v_1^*)_{W_1})_{(i-1)m+j}\right\vert _1=1$. Then $\int_{0}^{1} {\langle \varphi_1^*(t),v_1(t)\rangle dt}$ is approximated by $(\varphi_1^*)^T_{W_1}L_{C\times M}v_{1M}$ and if this quantity is nonzero, $\varphi^*_{1W}$ is rescaled so that $\int_{0}^{1} {\langle \varphi_1^*(t),v_1(t)\rangle dt}=1$.

So the third expression for the normal form coefficient $b$ becomes

\begin{displaymath}b = \frac{1}{2}((\varphi_{1W_1}^*)^T((B(t;v_{1M},v_{1M})_C+2(A(t)v_{1}(t))_C)).\end{displaymath}

In the fourth expression, $M$ is the monodromy matrix.

In the fifth expression, $M2$ is the $(n-2) \times (n-2)$ matrix that restricts the $n \times n$ matrix $M$ to the space orthogonal to the two-dimensional left eigenspace of the two multipliers that are closest to $1$.

The number of branch parameters is not fixed. If the number of branch parameters is $3$ then this matrix has three more rows and columns. This singularity matrix is automatically extended:

\begin{displaymath}
S = \left(\begin{array}{ccccc}
0 & - & - & - & -\\
- &...
...- & - & - & 0 & -\\
- & - & - & 1 & 0
\end{array}\right).
\end{displaymath}