text:
# 1 Essential mathematical backgrounds for physicists.

## 1 Essential mathematical backgrounds for physicists.

We collect in this section the most essential backgrounds for understanding these notes. Along the way, we also set up the notations for the notes.

$``$ Stable maps and their moduli. \[Ko\]

Definition 1.1 \[stable map\]. Let $`X`$ be a smooth projective variety. An $`n`$-pointed stable map into $`X`$ consists of a connected marked curve $`(C,p_1,\mathrm{},p_n)`$ and a morphism $`f:CX`$ satisfying the following properties:

> (1) The only singularities of $`C`$ are ordinary double points.
>
> (2) $`p_1,\mathrm{},p_n`$ are distinct ordered smooth points of $`C`$.
>
> (3) If $`C_i`$ is a component of $`C`$ that is isomorphic $`\text{}\mathrm{P}^1`$ and is mapped to a point under $`f`$, then $`C_i`$ contains at least three special (i.e. nodal or marked) points.
>
> (4) If $`C`$ has (arithmertic) genus $`1`$ and $`n=0`$, then $`f`$ is not constant.

Remark 1.2. Given Conditions (1) and (2) in the above definition, Conditions (3) and (4) are equivalent to the assertion that the data $`(f,C,p_1,\mathrm{},p_n)`$ has only finitely many automorphisms.

Given a class $`\beta H_2(X,\text{})`$, the moduli space of all stable maps $`(f,C,p_1,\mathrm{},p_n)`$ such that $`[f(C)]=\beta `$ into $`X`$ will be denoted by $`\overline{}_{g,n}(X,\beta )`$.

$``$ Equivariant cohomology. (See \[Au\].) Given a group $`G`$ acting on a space $`X`$. Let $`BG`$ be the classifying space and $`\text{EG}\text{BG}`$ be the universal principle $`G`$-bundle associated to $`G`$. The equivariant cohomology $`H_G^{}(X)`$ of $`X`$ associated to the $`G`$-action is defined to be

$$H_G^{}(X)=H^{}(X_G),$$

where $`X_G=\text{EG}\times _GX`$ is the total space of the associated $`X`$-bundle over $`BG`$. Note that $`H_G^{}(\text{pt})=H^{}(BG)`$, and that $`H_G^{}(X)`$ is naturally a $`H_G^{}(\text{pt})`$-module.

The constant map $`X\text{pt}`$ induces an equivariant projection $`\pi _X:X_GBG`$. The induced pushforward map $`\pi _{X}^{}{}_{!}{}^{}`$ from $`H_G^{}(X)`$ to $`H_G^{}(\text{pt})`$ is given by integration along the fiber of $`\pi _X`$. This is also called the equivariant integral. In notation,

$$\pi _{X}^{}{}_{!}{}^{}=_{X_G}:H_G^{}(X)H_G^{}(\text{pt}).$$

Remark 1.3. In this article, the coefficient for $`H^{}(X_G)`$ can be , , or . Usually we use  or  in the discusssion.

Example 1.4. Let $`\text{𝕋}^r=_rS^1`$ be an $`r`$-torus. Then $`B\text{𝕋}^r=_r\text{}\mathrm{P}^{\mathrm{}}`$ and $`H^{}(B\text{𝕋}^r)=H_{\text{𝕋}^r}^{}(\text{pt})=\text{}[\lambda _1,\mathrm{},\lambda _r]`$, the polynomial ring generated by $`\lambda _1,\mathrm{},\lambda _r`$, where $`\lambda _i`$ is the first Chern class of the hyperplane line bundle $`𝒪(1)`$ over the $`i^{th}`$ $`\text{}\mathrm{P}^{\mathrm{}}`$ in the product.

Let $`\text{𝕋}^r\text{GL}(N+1,\text{})`$ be a representation of an $`r`$-torus on $`\text{}^{N+1}`$ with weight $`(\beta _0,\mathrm{},\beta _N)`$. Note that each $`\beta _i`$ is a linear combination of the $`\lambda _j`$’s. This induces a $`\text{𝕋}^r`$-action on $`\text{}\mathrm{P}^N`$. With respect to this action,

$$H_{\text{𝕋}^r}^{}(\text{}\mathrm{P}^N)=H_{\text{𝕋}^r}^{}(\text{pt})[\zeta ]\text{}/_{i=0}^N(\zeta \beta _i),$$

where $`\zeta `$ is the equivariant hyperplane class from a fixed lifting of the hyperplane class of $`\text{}\mathrm{P}^N`$. The equivariant integral $`_{(\text{}\mathrm{P}^n)_{\text{𝕋}^r}}:H_{\text{𝕋}^r}^{}(\text{}\mathrm{P}^N)H_{\text{𝕋}^r}^{}(\text{pt})`$ picks out the coefficient of $`\zeta ^N`$ in elements of $`H_{\text{𝕋}^r}^{}(\text{}\mathrm{P}^N)`$.

$`\mathrm{}`$

$``$ The Atiyah-Bott localization formula. \[A-B\] Let $`T`$ be an $`r`$-torus that acts on a manifold $`X`$ with the set of fixed points a union of smooth connected submanifolds $`Z_j`$. Then the normal bundle $`N_j`$ of $`Z_j`$ in $`X`$ is a $`T`$-equivariant vector bundle with its equivariant Euler class $`e_T(N_j)H_T^{}(Z_j)`$.

There are three fundamental maps between $`H_T^{}(Z_j)`$ and $`H_T^{}(X)`$:

> (1) the restriction homomorphism :
>
> $$i_j^{}:H_T^{}(X)H_T^{}(Z_j)$$
>
> induced by the equivariant inclusion $`i_j:Z_jX`$;
>
> (2) the Gysin map :
>
> $$i_{j}^{}{}_{!}{}^{}:H_T^{}(Z_j)H_T^{}(X);$$

Note that (\[Au\]), for any $`\alpha _jH_T^{}(Z_j)`$, one has

$$i_j^{}i_{j}^{}{}_{!}{}^{}(\alpha )=\alpha _je_T(N_j).$$

Let $``$ be the localization of $`H_T^{}(\text{BT})`$. With the notation following Example 1.4, $`=\text{}(\lambda _1,\mathrm{},\lambda _r)`$. Then $`e_T(N_j)`$ is an invertible element in the localization $`H_T^{}(Z_j)`$. We can now state the Atiyah-Bott localization formula \[A-B\]:

Fact 1.5 \[Atiyah-Bott localization formula\]. The following map is an isomorphism

$$\begin{array}{ccccc}H_T^{}(X)& \stackrel{}{}& _jH_T^{}(Z_j)& & \\ \alpha & & \left(\frac{i_j^{}(\alpha )}{e_T(N_j)}\right)_j& .& \end{array}$$

Its inverse is given by

$$(\alpha _j)_j\underset{j}{}i_{j}^{}{}_{!}{}^{}(\alpha _j).$$

Combining these two, one has

$$\alpha =\underset{j}{}i_{j}^{}{}_{!}{}^{}\left(\frac{i_j^{}(\alpha )}{e_T(N_j)}\right),$$

for any $`\alpha H_T^{}(X)`$.

Example 1.6. (Continuing Example 1.4). The fixed point set on $`\text{}\mathrm{P}^N`$ comes from the $`N+1`$ coordinate lines of $`\text{}^{N+1}`$. Denote this set by $`\{p_0,\mathrm{},p_N\}`$. Let $`\alpha H_T^{}(\text{}\mathrm{P}^N)`$, then $`\alpha `$ can be written as a polynomial $`f(\zeta )`$ with coefficients in $``$. In terms of this, $`i_j^{}(\alpha )=f(\beta _j)`$; $`e_T(N_j)=_{kj}(\beta _j\beta _k)`$, where $`k`$ runs in $`\{\mathrm{\hspace{0.17em}0},\mathrm{},N\}`$; and the Gysin map $`i_{j}^{}{}_{!}{}^{}`$ is given by the cup product with $`_{kj}(\zeta \beta _k)`$. Thus, from the localization formula, one has

$$f(\zeta )=\underset{j=0}{\overset{N}{}}f(\beta _i)\frac{_{kj}(\zeta \beta _k)}{_{kj}(\beta _j\beta _k)}.$$

$`\mathrm{}`$

$``$ Concavex bundles over $`\text{}\mathrm{P}^n`$. (\[L-L-Y, I\].) Let $`T=\text{𝕋}^{n+1}`$ acts on $`\text{}^{n+1}`$ with weights $`\lambda _0,\mathrm{},\lambda _n`$. It induces an action on $`\text{}\mathrm{P}^n`$.

Definition 1.7 \[concavex bundle\]. Let $`V`$ be a $`T`$-equivariant vector bundle over $`\text{}\mathrm{P}^n`$. We call $`V`$ convex (resp. concave) if the $`T`$-equivariant Euler class $`e_T(V)`$ is invertible and $`H^1(C,f^{}V)=0`$ (resp. $`H^0(C,f^{}V)=0`$) for any $`0`$-pointed genus $`0`$ stable map $`f:C\text{}\mathrm{P}^n`$. We call $`V`$ concavex if it is a direct sum of a convex and a concave bundle. We denote this decomposition by $`V=V^+V^{}`$.

Definition 1.8 \[splitting type\]. Let $`V`$ be a $`T`$-equivariant concavex bundle over $`\text{}\mathrm{P}^n`$. Let $`l_a`$, $`k_b`$ be positive integers such that for every $`T`$-invariant line $`C\text{}\mathrm{P}^1`$ in $`\text{}\mathrm{P}^n`$ we have a $`T`$-equivariant isomorphism

$$V|_C_a𝒪(l_a)_b𝒪(k_b).$$

Then we call $`(l_1,\mathrm{};k_1,\mathrm{})`$ the splitting type of $`V`$.

## 2 Summary of related constructs in “ Mirror Principle ”.

This section follows \[L-L-Y, I\]. Readers should consult \[L-L-Y, I\] (see also \[L-L-Y, II\]) for more details.

$``$ Set-up of the problem. Let $`T=\text{𝕋}^{n+1}`$, $`V`$ be a concavex $`T`$-equivariant bundle over $`\text{}\mathrm{P}^n`$ of splitting type $`(l_1,\mathrm{};k_1,\mathrm{})`$, and $`d`$ be a class in $`H_2(\text{}\mathrm{P}^n,\text{})=\text{}`$. Let $`\overline{}_{0,0}(\text{}\mathrm{P}^n,d)`$ be the moduli space of stable maps into $`\text{}\mathrm{P}^n`$, of degree $`d`$, genus $`0`$, without marked points; and similarly for $`\overline{}_{0,1}(\text{}\mathrm{P}^n,d)`$ and $`M_d=\overline{}_{0,0}(\text{}\mathrm{P}^1\times \text{}\mathrm{P}^n,(1,d))`$. Let $`N_d=\text{}\mathrm{P}^{(n+1)d+n}`$ be the linear $`\sigma `$-model for $`\text{}\mathrm{P}^n`$. (We will say more about $`N_d`$ in the next item.) Then one has the following $`S^1\times T`$-equivariant diagram:

$$\begin{array}{cccccccccc}& & V_d=\pi ^{}U_d& & U_d& & \rho ^{}U_d& & V& \\ & & & & & & & & & \\ N_d& \stackrel{\phi }{}& M_d& \stackrel{\pi }{}& \overline{}_{0,0}(\text{}\mathrm{P}^n,d)& \stackrel{\rho }{}& \overline{}_{0,1}(\text{}\mathrm{P}^n,d)& \stackrel{\text{ev}}{}& \text{}\mathrm{P}^n& \\ & & & & & & & & & \\ & & \overline{}_{0,0}(\text{}\mathrm{P}^1\times \text{}\mathrm{P}^n,(1,d))& & & & & & & ,\hfill \end{array}$$

where $`\rho `$ forgets and ev evaluates at the marked point of a $`1`$-pointed stable map; $`U_d=\rho _!\text{ev}\text{ }^{}V`$, the pushforward via $`\rho `$ of the pullback of $`V`$ via ev; $`\pi `$, the contracting morphism, is induced by the projection of a stable map in $`\text{}\mathrm{P}^1\times \text{}\mathrm{P}^n`$ to the $`\text{}\mathrm{P}^n`$ component and contracting the unstable components; and $`\phi `$, the collapsing morphism, will be explained in the next two items.

Let $`c_{\text{top}}`$ be the top Chern class (i.e. the Euler class) of $`U_d`$, then the intersection number of degree $`d`$ is defined to be

$$K_d=_{\overline{}_{0,0}(\text{}\mathrm{P}^n,d)}c_{\text{top}}(U_d).$$

One of the goals in the mirror symmetry literatures is to compute $`K_d`$’s and to relate them to enumerative problems on $`\text{}\mathrm{P}^n`$, or some varieties therein. An important insight from \[L-L-Y\] is that one can reduce this problem to an easy problem on projective spaces $`\{N_d\}_{d=0}^{\mathrm{}}`$, called the linear $`\sigma `$-model in \[L-L-Y\]. In fact the intersection numbers $`K_d`$ can be recovered from cohomology classes $`Q=\{Q_d\}_{d=0}^{\mathrm{}}`$, called Euler data, defined on those projective spaces. In turn the Euler data can be computed essentially by an elementary algorithm, and, sometimes, via an explicit formula. A nonlinear recursion involving graph sums was use to compute $`K_4`$ in the case of $`O(5)`$ on $`\text{}\mathrm{P}^4`$ in \[Ko\].

If $`b`$ is any multiplicative cohomology classes, then we can apply our algorithm to compute the integrals

$$K_d=_{\overline{}_{0,0}(\text{}\mathrm{P}^n,d)}b(U_d).$$

More generally, suppose $`a,b,\mathrm{}`$ are any multiplicative cohomology classes. Then, for any given vector bundle $`V`$, we have

$$a(V)=a_0(V)+a_1(V)+\mathrm{}+a_r(V),$$

where $`a_i(V)`$ is the degree $`i`$ component of $`a(V)`$. We can homogenize $`a`$ by writing

$$a_x(V)=\underset{i}{}x^{ri}a_i(V),$$

where $`x`$ is a formal variable, and the class $`a_x`$ remains multiplicative. Likewise, we have

$$b_y(V)=\underset{i}{}y^{ri}b_i(V),$$

etc. Multiplying them, we get $`a_x(V)b_y(V)\mathrm{}`$, which is a new multiplicative class. Note that this is a polynomial in the variables $`x,y,\mathrm{}`$, with coefficients of the form $`a_i(V)b_j(V)\mathrm{}`$. Moreover, each such product correspond to a unique monomial in $`x,y,\mathrm{}`$. Now our algorithm computes $`K_d\text{}[x,y,\mathrm{}]`$ for the multiplicative class $`a_x(U_d)b_y(U_d)\mathrm{}`$ and, hence, computes all coefficients of the form

$$_{\overline{}_{0,0}(\text{}\mathrm{P}^n,d)}a_i(U_d)b_j(U_d),\mathrm{}.$$

Note that this number is zero unless the integrand has the right total degree.

Notation. (Cf. Example 1.4.) We shall adapt the following notations for the rest of the article: $`G=S^1\times T`$, $`\lambda =(\lambda _0,\mathrm{},\lambda _n)`$, $`\alpha =c_1(𝒪(1))H_{S^1}^{}(BS^1)`$, $`=\text{}(\lambda )[\alpha ]`$, $`^1=\text{}(\lambda ,\alpha )`$, $`H_G^{}()=H_G^{}()_{\text{}[\lambda ,\alpha ]}`$, $`^1H_G^{}()=H_G^{}()_{\text{}[\lambda ,\alpha ]}^1`$.

$``$ The linear $`\sigma `$-model $`\{N_d\}_{d=0}^{\mathrm{}}`$ for $`\text{}\mathrm{P}^n`$. Let

$$N_d=\text{}(H^0(\text{}\mathrm{P}^1,𝒪_{\text{}\mathrm{P}^1}(d))^{n+1})\text{}\mathrm{P}^{(n+1)d+n}$$

be the space of $`(n+1)`$-tuple of homogeneous polynomials of degree $`d`$ on $`\text{}\mathrm{P}^1`$ up to an overall constant multiple in . An element in $`N_d`$ can be written as

$$[\underset{r}{}z_{0r}w_0^rw_1^{dr}:\mathrm{}:\underset{r}{}z_{nr}w_0^rw_1^{dr}],$$

where $`[w_0:w_1]`$ is the homogeneous coordinates for $`\text{}\mathrm{P}^1`$ and $`z_{ir}\text{}`$. The sequence $`\{N_d\}_{d=0}^{\mathrm{}}`$ is called the linear $`\sigma `$-model for $`\text{}\mathrm{P}^n`$.

Let $`G=S^1\times \text{𝕋}^{n+1}`$; then $`G`$ acts on $`\text{}\mathrm{P}^1\times \text{}\mathrm{P}^n`$ by

$$(t,t_0,\mathrm{},t_n)([w_0:w_1],[x_0:\mathrm{}:x_n])=([tw_0:w_1],[t_0x_0:\mathrm{}:t_nx_n]).$$

This induces a $`G`$-action on $`N_d`$ with fixed points

$$p_{i,r}=[\mathrm{\hspace{0.17em}0}:\mathrm{}:\mathrm{\hspace{0.17em}0}:w_0^rw_1^{dr}:\mathrm{\hspace{0.17em}0}:\mathrm{}:\mathrm{\hspace{0.17em}0}],$$

where the non-zero term appears at the $`i^{th}`$ position, $`i=0,\mathrm{},n`$, and $`r=0,\mathrm{},d`$. Note that the weight for the $`G`$-action at $`T_{p_{i,r}}N_d`$ is $`\lambda _i+r\alpha `$.

There are two $`G`$-equivariant maps between the $`N_d`$’s, defined as follows:

> $`I:N_{d1}N_d`$, $`[f_0:\mathrm{}:f_n][w_1f_0:\mathrm{}:w_1f_n]`$; and
>
> $`\overline{\text{}\text{ }}:N_dN_d`$, $`[f_0(w_0,w_1):\mathrm{}:f_n(w_0,w_1)][f_0(w_1,w_0):\mathrm{}:f_n(w_1,w_0)]`$.

From $`I`$, one obtaines a chain of inclusions

$$N_0=\text{}\mathrm{P}^n\stackrel{I}{}N_1\stackrel{I}{}\mathrm{}\stackrel{I}{}N_d,$$

whose composition gives a canonical incluion $`I_d:N_0=\text{}\mathrm{P}^nN_d`$. Let $`\kappa `$ be the equivariant hyperplane class in $`H_G^{}(N_d)`$. Then the induced map of $`\overline{\text{}\text{ }}`$ on $`^1H_G^{}(N_d)`$ is generated by $`\overline{\kappa }=\kappa d\alpha `$, $`\overline{\alpha }=\alpha `$, and $`\overline{\lambda _i}=\lambda _i`$.

$``$ The $`G`$-equivariant morphism $`\phi :M_dN_d`$. First note that $`M_d`$ and $`N_d`$ are two different compactifications of the space $`_{0,0}(\text{}\mathrm{P}^n,d)`$ of degree $`d`$ maps from $`\text{}\mathrm{P}^1`$ to $`\text{}\mathrm{P}^n`$. Precisely, an element in $`_{0,0}(\text{}\mathrm{P}^n,d)`$ can be written as

$$[f_0:\mathrm{}:f_n]=[\underset{r}{}z_{0r}w_0^rw_1^{dr}:\mathrm{}:\underset{r}{}z_{nr}w_0^rw_1^{dr}]$$

with $`f_0,\mathrm{},f_n`$ relatively prime. Its embedding in $`N_d`$ is tautological, while its embedding in $`M_d`$ is given by

$$[f_0:\mathrm{}:f_n]([w_1:w_0],[f_0:\mathrm{}:f_n]).$$

Via these embeddings, the identity map on $`_{0,0}(\text{}\mathrm{P}^n,d)`$ extends to a $`G`$-equivariant morphism $`\phi :M_dN_d`$. Explicitly, $`\phi `$ can be described as follows:

> Let $`(f,C)M_d`$ and $`\pi _1`$, $`\pi _2`$ be the projections of $`\text{}\mathrm{P}^1\times \text{}\mathrm{P}^n`$ onto its first and second factor respectively. Then one can decompose $`C`$ into $`C_0C_1\mathrm{}C_s`$ with $`C_0C_j=x_j`$ for $`j>0`$ such that $`\pi _1f:C_0\stackrel{}{}\text{}\mathrm{P}^1`$ and any other $`C_j`$ is pinched to some $`\pi _1f(x_j)=[a_j,b_j]\text{}\mathrm{P}^1`$ under $`\pi _1f`$. Let $`d_i`$ be the degree of $`\pi _2f:C_j\text{}\mathrm{P}^n`$ and $`[\sigma _0:\mathrm{}:\sigma _n]`$ represent the degree $`d_0`$ map $`\pi _2f:C_0\text{}\mathrm{P}^n`$. Then
>
> $$\phi :(f,C)[g\sigma _0:\mathrm{}:g\sigma _n],\text{where}g=\underset{j=1}{\overset{s}{}}(a_jw_0b_jw_1)^{d_j}.$$

$``$ Euler data.

Definition 2.1 \[Euler data\]. Given an invertible class $`\mathrm{\Omega }H_T^{}(\text{}\mathrm{P}^n)^1`$, the localization of $`H_T^{}(\text{}\mathrm{P}^n)`$, an $`\mathrm{\Omega }`$-Euler data is a sequence $`Q=\{Q_d\}_{d=0}^{\mathrm{}}`$ of classes $`Q_dH_G^{}(N_d)`$ that satisfy

> (1) $`Q_0=\mathrm{\Omega }`$.
>
> (2) The gluing identity :
>
> $$i_{p_i}^{}(\mathrm{\Omega })i_{p_{i,r}}^{}(Q_d)=\overline{i_{p_{i,0}}^{}(Q_r)}i_{p_{i,0}}^{}(Q_{dr}),$$
>
> for all $`d`$ and $`i=0,\mathrm{},n`$, $`r=0\mathrm{}d`$.

An immediate consequence is the following lemma:

Fact 2.2 \[reciprocity\]. (Lemma 2.4 in \[L-L-Y, I\].) If $`Q`$ is an Euler data, then, for $`i,j=0,\mathrm{},n`$, $`r=0,\mathrm{},d`$, $`d=0,\mathrm{\hspace{0.17em}1},\mathrm{\hspace{0.17em}2},\mathrm{}`$, one has

> (1) $`Q_d(\lambda _i+d\alpha )=\overline{Q_d(\lambda _i)}`$.
>
> (2) $`Q_d(\lambda _i)|_{\alpha =(\lambda _i\lambda _j)/d}=Q_d(\lambda _j)|_{\alpha =(\lambda _j\lambda _i)/d}`$ for $`d>0`$.
>
> (3) $`\mathrm{\Omega }(\lambda _i)Q_d(\lambda _j)=Q_r(\lambda _j)Q_{dr}(\lambda _i)`$ at $`\alpha =(\lambda _j\lambda _i)/r`$ for $`r>0`$.

Recall the various bundles and maps from Item Set-up.

Fact 2.3 \[Euler data\]. (Theorem 2.8 in \[L-L-Y, I\].) Let $`V=V^+V^{}`$ be a concavex bundle over $`\text{}\mathrm{P}^n`$, $`\chi _d^V`$ be the equivariant Euler class of $`V_d`$, $`Q_0=\mathrm{\Omega }^V=e_T(V^+)/e_T(V^{})`$, $`Q_d=\phi _!(\chi _d^V)`$ for $`d>0`$. Then $`Q=\{Q_d\}`$ is an $`\mathrm{\Omega }^V`$-Euler data.

We call a concavex bundle $`V\text{}\mathrm{P}^n`$ critical if the induced bundle $`U_d\overline{}_{0,0}(\text{}\mathrm{P}^n,d)`$ has rank equal to $`\text{dim}(\overline{}_{0,0}(\text{}\mathrm{P}^n,d))=(n+1)d+n3`$.

Fact 2.4. (Theorem 3.2 (ii) in \[L-L-Y, I\].) Let $`V`$ be a critical concavex bundle over $`\text{}\mathrm{P}^n`$. Then in the non-equivariant limit $`\lambda 0`$,

$$_{\text{}\mathrm{P}^n}e^{Ht/\alpha }\frac{lim_{\lambda 0}I_d^{}(Q_d)}{_{m=1}^d(Hm\alpha )^{n+1}}=\alpha ^3(2dt)K_d.$$

Thus, once $`Q_d`$ is determined, the intersection number $`K_d`$ is also determined.

Remark 2.5. Since $`H^{n+1}=0`$, one can rewrite the above formula as

$$_{\text{}\mathrm{P}^n}\left[\underset{k=0}{\overset{n}{}}\frac{\left(Ht/\alpha \right)^k}{k!}\right]\left[\underset{\lambda 0}{lim}I_d^{}\left(Q_d\right)\right]\frac{\left(1\right)^{\left(n+1\right)d}}{\left(d!\right)^{n+1}\alpha ^{\left(n+1\right)d}}\left[\underset{k=0}{\overset{n}{}}\left(\frac{H}{m\alpha }\right)^k\right]^{n+1}=\alpha ^3\left(2dt\right)K_d.$$

Note  also that in \[C-K\], there is another formula, implicitly in \[L-L-Y, I\], that relates $`Q_d`$ and $`K_d`$:

$$_{\text{}\mathrm{P}^n}He^{Ht/\alpha }\frac{lim_{\lambda 0}I_d^{}(Q_d)}{_{m=1}^d(Hm\alpha )^{n+1}}=\alpha ^2dK_d.$$

$``$ Determination of an Euler data. By the localization formula, $`Q_d`$ is determined by its restriction $`i_{p_{i,r}}^{}(Q_d)`$ at the fixed points $`p_{i,r}`$, for $`i=0,\mathrm{},n`$, $`r=0,\mathrm{},d`$. Explicitly,

$$Q_d=\underset{(i,r)}{}\frac{i_{p_{i,r}}^{}(Q_d)_{(j,s)(i,r)}(\kappa \lambda _js\alpha )}{_{(j,s)(i,r)}\left(\text{}\lambda _i\lambda _j+(rs)\alpha \right)}.$$

Since the Euler data condition says that

$$i_{p_{i,r}}^{}(Q_d)=\frac{\overline{i_{p_{i,0}}^{}(Q_r)}i_{p_{i,0}}^{}(Q_{dr})}{i_{p_i}^{}(\mathrm{\Omega })},$$

it turns out that, to determine $`Q_d`$, one only needs to know its restrictions $`i_{p_{i,0}}^{}(Q_d)`$ at $`p_{i,0}`$ for $`i=0,\mathrm{},n`$.

We can now state theorems from \[L-L-Y, I\] that enables one to determine $`i_{p_{i,0}}^{}(Q_d)`$.

Fact 2.6 \[degree bound and determination of Euler data\]. (Theorem 2.10, Theorem 2.11, and Theorem 3.2 (i) in \[L-L-Y, I\].) Let $`V`$ be a concavex bundle over $`\text{}\mathrm{P}^n`$ of splitting type $`(l_1,l_2,\mathrm{};k_1,k_2,\mathrm{})`$, $`\chi `$ be its Euler characteristic class, and $`Q=\{Q_d\}_{d\text{}\{0\}}`$ be the $`\chi `$-Euler data for $`V`$, as in Fact 2.3. Then the restrictions $`I_d^{}(Q_d)H_G^{}(\text{}\mathrm{P}^n)`$ has

$$\text{deg }_\alpha I_d^{}(Q_d)(n+1)d2.$$

Furthermore, $`Q`$ is completely determined by the value of the restrictions $`i_{p_{i,0}}^{}(Q_d)`$, $`i=0,\mathrm{},n`$, $`d=0,1,2,\mathrm{}`$, at $`\alpha =(\lambda _i\lambda _j)/d`$, $`ij`$. These values are given explicitly by

$$i_{p_{i,0}}^{}(Q_d)|_{\alpha =\frac{\lambda _i\lambda _j}{d}}=\underset{a}{}\underset{m=0}{\overset{l_ad}{}}(l_a\lambda _im\frac{\lambda _i\lambda _j}{d})\underset{b}{}\underset{m=1}{\overset{k_bd1}{}}(k_b\lambda _i+m\frac{\lambda _i\lambda _j}{d}).$$

Remark 2.7 \[total degree bound\]. For $`V`$ critical, since the rank of $`U_d\overline{}_{0,0}(\text{}\mathrm{P}^n,d)`$ is $`(n+1)d+n3`$, the total degree of $`Q_d`$, as a polynomial of $`\kappa `$, $`\alpha `$, and $`\lambda `$, is bounded by $`(n+1)d+n3`$.

These facts and remarks allow one to compute $`Q_d`$ as a polynomial of $`\kappa `$ and $`\alpha `$ with coefficients in $`\text{}(\lambda _0,\mathrm{},\lambda _n)`$. We now turn to this detail.

## 3 Computation of $`Q_d`$ inductively.

Following previous notations, let $`V`$ be a critical concavex bundle over $`\text{}\mathrm{P}^n`$ of splitting type $`(l_1,l_2,\mathrm{};k_1,k_2,\mathrm{})`$. Then $`Q_1`$ can be computed, using the Atiyah-Bott formula. The higher $`Q_d`$ can be computed by the recursive relation from the gluing identities, the special values of $`Q_d`$ at the fixed points, and the $`\alpha `$ degree bound of $`I_d^{}(Q_d)`$.

The computation of $`Q_1`$.

For $`d=1`$, $`\text{deg}\text{ }_\alpha Q_1(\lambda _i,\alpha )n1`$ and, for a fixed $`i`$, the $`n`$-many values $`Q_1(\lambda _i,\lambda _i\lambda _j)`$, $`ji`$ are known from Fact 2.6:

$$Q_1(\lambda _i,\lambda _i\lambda _j)=\underset{a}{}\underset{m=0}{\overset{l_a}{}}(l_a\lambda _im(\lambda _i\lambda _j))\underset{b}{}\underset{m=1}{\overset{k_b1}{}}(k_b\lambda _i+m(\lambda _i\lambda _j)),\text{for}ji.$$

Thus, using the Lagrange interpolation formula, one obtains

$$i_{p_{i,0}}^{}(Q_1)=Q_1(\lambda _i,\alpha )=\underset{\begin{array}{c}j=0,\mathrm{},n\\ ji\end{array}}{}Q_1(\lambda _i,\lambda _i\lambda _j)\frac{_{ki,j}(\alpha \lambda _i+\lambda _k)}{_{ki,j}(\lambda _k\lambda _j)}.$$

By the Reciprocity Lemma, $`i_{p_{i,1}}^{}(Q_1)=\overline{Q_1(\lambda _i,\alpha )}=Q_1(\lambda _i,\alpha )`$. In this way, the restriction of $`Q_1`$ at the set of fixed points of the $`S^1\times \text{𝕋}^{n+1}`$-action on $`N_1`$ are all acquired. Using the localization formula and playing around with the indices, one obtains an exact expression

$$Q_1=\underset{i=0}{\overset{n}{}}\left[\left(\text{}f_i\left(\alpha \right)\left(\kappa \lambda _i\alpha \right)+f_i\left(\alpha \right)\left(\kappa \lambda _i\right)\right)\underset{ji}{}\left(\kappa \lambda _j\right)\underset{ji}{}\left(\kappa \lambda _j\alpha \right)\right],$$

where

$`f_i\left(\alpha \right)={\displaystyle \frac{i_{p_{i,0}}^{}\left(Q_1\right)}{_{(j,s)(i,0)}\left(\lambda _i\lambda _js\alpha \right)}}`$
$`={\displaystyle \underset{ji}{}}{\displaystyle \frac{_a_{m=0}^{l_a}\left(\text{}l_a\lambda _im\left(\lambda _i\lambda _j\right)\right)_b_{m=1}^{k_b1}\left(\text{}k_b\lambda _i+m\left(\lambda _i\lambda _j\right)\right)}{\alpha \left(\alpha \lambda _i+\lambda _j\right)_{ki}\left(\lambda _i\lambda _k\right)_{ki,j}\left(\lambda _j\lambda _k\right)}}.`$
The computation of $`Q_d`$ for $`d>1`$.

Let $`N=(n+1)d+n3`$. Then one may write $`Q_d`$ as a polynomial in $`\kappa ,\alpha `$ with coefficients in $`\text{}[\lambda ]`$:

$$Q_d=\underset{\mu =0}{\overset{N}{}}\underset{\nu =0}{\overset{N\mu }{}}w_{\mu \nu }\alpha ^\mu \kappa ^\nu \text{with}w_{\mu \nu }\text{}[\lambda ].$$

Since we have an explicit formula for $`Q_1`$, we may assume that $`Q_0,Q_1\mathrm{},Q_{d1}`$ are all determined.

$``$ Systems from the gluing identity : The gluing identity that an Euler data must satisfy is completely encoded in the following two systems of linear equations in $`w_{\mu \nu }`$:

> (1) $`Q_d(\lambda _i+r\alpha ,\alpha )`$ for $`i=0,\mathrm{},n`$ and $`r=1,\mathrm{},d1`$:
>
> The gluing identity says
>
> $$Q_d(\lambda _i+r\alpha ,\alpha )=\underset{\mu =0}{\overset{N}{}}\underset{\nu =0}{\overset{N\mu }{}}w_{\mu \nu }\alpha ^\mu \left(\lambda _i+r\alpha \right)^\nu =i_{p_{i,r}}\left(Q_d\right)=\overline{Q_r(\lambda _i,\alpha )}Q_{dr}(\lambda _i,\alpha )\text{}/\mathrm{\Omega }\left(\lambda _i\right)$$
>
> for $`i=0,\mathrm{},n`$ and $`r=1,\mathrm{},d1`$. Denote $`\overline{Q_r(\lambda _i,\alpha )}Q_{dr}(\lambda _i,\alpha )\text{}/\mathrm{\Omega }(\lambda _i)`$ by $`b_1(i,r)`$; then $`b_1(i,r)`$ is known by induction, Furthermore,
>
> $$\text{deg}\text{ }_\alpha (b_1(i,r))(n+1)r2+(n+1)(dr)2=(n+1)d4<N.$$
>
> Thus, one may write $`b_1(i,r)=_{s=0}^Nb_1(i,r,s)\alpha ^s`$, where $`b_1(i,r,s)=0`$ for $`s(n+1)d3`$. After expanding the powers and exchanging and relabelling the indices to the above equation, one obtains the following linear system in $`w_{\mu \nu }`$:
>
> $`\{\text{}`$
> $$\underset{\mu =0}{\overset{s}{}}\underset{\nu =s\mu }{\overset{N\mu }{}}w_{\mu \nu }\left(\begin{array}{c}\nu \\ s\mu \end{array}\right)r^{s\mu }\lambda _i^{\mu +\nu s}=b_1(i,r,s)$$
> for $`i=0,\mathrm{},n`$, $`r=1,\mathrm{},d1`$, and $`s=0,\mathrm{},N`$.
>
> (2) $`Q_d(\lambda _i+d\alpha ,\alpha )`$ for $`i=0,\mathrm{},n`$:
>
> The gluing identity says
>
> $$Q_d(\lambda _i+d\alpha ,\alpha )=\underset{\mu =0}{\overset{N}{}}\underset{\nu =0}{\overset{N\mu }{}}w_{\mu \nu }\alpha ^\mu \left(\lambda _i+d\alpha \right)^\nu =\overline{Q_d(\lambda _i,\alpha )}=Q_d(\lambda _i,\alpha )=\underset{\mu =0}{\overset{N}{}}\underset{\nu =0}{\overset{N\mu }{}}w_{\mu \nu }\left(\alpha \right)^\mu \lambda _i^\nu $$
>
> for $`i=1=0,\mathrm{},n`$. This gives rise to the second linear system in $`w_{\mu \nu }`$:
>
> $`\{\text{}`$
> $$\underset{\mu =0}{\overset{s1}{}}\underset{\nu =s\mu }{\overset{N\mu }{}}w_{\mu \nu }\left(\begin{array}{c}\nu \\ s\mu \end{array}\right)d^{s\mu }\lambda _i^{\mu +\nu s}+\underset{\nu =0}{\overset{Ns}{}}w_{s\nu }\left(\text{}1+(1)^{s+1}\right)\lambda _i^\nu =\mathrm{\hspace{0.33em}0}$$
> for $`i=0,\mathrm{},n`$ and $`s=0,\mathrm{},N`$.

$``$ System from the special values :

> (3) $`Q_d(\lambda _i,\frac{\lambda _i\lambda _j}{d})`$ for $`i=0,\mathrm{},n`$:
>
> Fact 2.6 gives rise to the third linear system in $`w_{\mu \nu }`$:
>
> $`\{\text{}`$
> $$\underset{\mu =0}{\overset{N}{}}\underset{\nu =0}{\overset{N\mu }{}}w_{\mu \nu }\left(\frac{\lambda _i\lambda _j}{d}\right)^\mu \lambda _i^\nu =\underset{a}{}\underset{m=0}{\overset{l_ad}{}}(l_a\lambda _im\frac{\lambda _i\lambda _j}{d})$$
> for $`i,j=0,\mathrm{},n`$, $`ij`$.

$``$ System from the $`\alpha `$-degree bound :

> (4) $`\text{deg }_\alpha I_d^{}(Q_d)(n+1)d2`$:
>
> Since $`H_G^{}(\text{}\mathrm{P}^n)=\text{}[\lambda ,\alpha ][\kappa ]\text{}/_{i=0}^n(\kappa \lambda _i)`$, $`I_d^{}(Q_d)`$ is obtained by $`Q_d`$ modulo the relation $`_{i=0}^n(\kappa \lambda _i)=0`$. This is achieved by iterations of the set of replacements
>
> $$\{\kappa ^{n+1+i}\kappa ^i(\kappa ^{n+1}+_{i=0}^n(\kappa \lambda _i))|i=0,\mathrm{},Nn1\}$$
>
> until the $`\kappa `$-degree of the resulting $`Q_d`$ is less than $`n+1`$. This can be easily done by computer. In this way, one obtains $`I_d^{}(Q_d)`$. Let
>
> $$I_d^{}(Q_d)=\underset{i,j}{}w_{ij}^{}\alpha ^i\kappa ^j.$$
>
> Then $`w_{ij}^{}`$ is a linear combination of $`w_{\mu \nu }`$ with coefficients in $`\text{}[\lambda ]`$. The $`\alpha `$-degree bound then gives us the fourth system of linear equations in $`w_{\mu \nu }`$:
>
> $`\{\text{}`$
> $$w_{ij}^{}=\mathrm{\hspace{0.33em}0},\text{for}i(n+1)d1.$$

Remark 3.1. Note that the whole content of gluing identities in the definition of Euler data is already absorbed in the first and the second linear systems (1) and (2) above. Since all the identities that appear in the Reciprocity Lemma are obtained by substituting into the gluing identities some special $`\alpha `$ values, they will be automatically satisfied once System (1) and System (2) above are satisfied. Thus, they do not provide us with extra equations. Furthermore, Fact 2.6 implies that the above system has a unique solution.

## 4 Modifications for non-critical bundles over $`\text{}\mathrm{P}^n`$.

So far, our discussion has been focusing on critical bundles. For non-critical bundles $`V`$ over $`\text{}\mathrm{P}^n`$, $`\text{rank}(U_d)`$ and $`\text{dim}\overline{}_{0,0}(\text{}\mathrm{P}^n,d)`$ are different for some $`d`$, by definition. If one takes $`\{Q_d\}_d`$ associated to the top Chern class of $`V`$, then one will simply get $`0`$ for $`K_d`$. Let $`r`$ be the rank of $`V`$. Then, to obtain more interesting invariants, one may consider taking $`\{Q_d\}_d`$ to be the Euler data associated to the Chern polynomial

$$c(x)=x^r+c_1(V)x^{r1}+\mathrm{},+c_{top}(V)$$

of $`V`$. In this case, some details in Sec. 2 and Sec. 3 will have to be modified accordingly; however, the conceptual flow remains the same.

The various items that are involved in the actual computation of $`Q_d`$ and $`K_d`$ and their modifications following \[L-L-Y\] are listed below:

* degree bound of $`Q_d`$: Since the top Chern class gives the highest degree terms, both the total degree bound and the $`\alpha `$-degree bound remain valid.
* the special values $`i_{p_{i,0}}^{}(Q_d)|_{\alpha =\frac{\lambda _i\lambda _j}{d}}`$: These special values are now given by

$$i_{p_{i,0}}^{}(Q_d)|_{\alpha =\frac{\lambda _i\lambda _j}{d}}=\underset{a}{}\underset{m=0}{\overset{l_ad}{}}(x+l_a\lambda _im\frac{\lambda _i\lambda _j}{d})\underset{b}{}\underset{m=1}{\overset{k_bd1}{}}(xk_b\lambda _i+m\frac{\lambda _i\lambda _j}{d}).$$

This leads to a corresponding change in the computation of $`Q_1`$ and right-hand-side of the third linear systems in Sec. 3. The first, second, and the fourth linear systems remains valid.
* from $`Q_d`$ to $`K_d`$: Let $`s=\text{rank}(U_d)\text{dim}\overline{}(\text{}\mathrm{P}^n,d)`$. Theorem 7.2 in \[L-L-Y, II\] gives

$$\frac{1}{s!}\frac{d^s}{dx^s}|_{x=0}_{\text{}\mathrm{P}^n}e^{Ht/\alpha }\frac{lim_{\lambda 0}I_d^{}(Q_d)}{_{m=1}^d(Hm\alpha )^{n+1}}=\frac{1}{\alpha ^3x^s}(2dt)K_d.$$

Note that, for the validity of this formula alone, it is not required that $`s_d`$ be independent of $`d`$ \[Li\]. Thus, once $`Q_d`$ is obtained by solving the system of linear equation, $`K_d`$ follows.

Based on Sec. 3 and the discussion here, a code `EulerData_MP.m` is written. The detail is in Sec. 6.

## 5 Examples.

Using the Maple code ”`EulerData_MP.m`” in Sec. 6 and taking $`\mathrm{\Omega }`$ to be the Chern polynomial, we compute the first few $`K_d`$ for some non-critical bundles, as listed in Table 5-1 (cf. Cases 6, 14-18 in SEC. 3 of the code).

| bundle |  | $`d=1`$ | $`d=2`$ | $`d=3`$ |  |
| --- | --- | --- | --- | --- | --- |
| $`T_{}\text{}\mathrm{P}^2`$ |  | $`10x^2`$ |  |  |  |
| $`O_{\text{}\mathrm{P}^4}\left(6\right)`$ |  | $`50400x`$ | $`\left(752729895/4\right)x^2`$ | $`\left(433244745198080/243\right)x^3`$ |  |
| $`O_{\text{}\mathrm{P}^4}\left(7\right)`$ |  | $`451570x^2`$ | $`\left(403985396325/32\right)x^4`$ | $`\left(15755269694706695755/17496\right)x^6`$ |  |
| $`O_{\text{}\mathrm{P}^4}\left(8\right)`$ |  | $`2773820x^3`$ | $`\left(3178734062035/8\right)x^6`$ | $`\left(46028387589557254161275/314928\right)x^9`$ |  |
| $`O_{\text{}\mathrm{P}^4}\left(9\right)`$ |  | $`13198850x^4`$ | $`\left(243281907041715/32\right)x^8`$ | $`\left(197802281929974511821535/17496\right)x^{12}`$ |  |
| $`O_{\text{}\mathrm{P}^4}\left(10\right)`$ |  | $`52040450x^5`$ | $`\left(25908993204089625/256\right)x^{10}`$ | $`\left(71418501571607082433686025/139968\right)x^{15}`$ |  |

Table 5-1. $`K_d`$ for some non-critical bundles.

Note that, in Table 5-1, if one formally converts $`K_d`$ to $`n_d`$ using the usual multiple cover formula $`K_d=_{k|d}n_{\frac{d}{k}}\frac{1}{k^3}`$, then the $`n_d`$ thus obtained will no longer be integers for $`d2`$. Compared with the other twelve examples computed/tested using the code, this indicates that for those non-critical bundles over $`\text{}\mathrm{P}^n`$, whose $`\text{rank}(U_d)\text{dim}(\overline{}_{0,0}(\text{}\mathrm{P}^n,d))`$ depends on $`d`$ in a non-trivial way, the above multiple cover formula will have to be modified. Exactly how is an issue for further investigation.

## 6 A package in Maple V for the computation of $`Q_d`$ and $`K_d`$.

General remarks.

A few remarks are given below concerning the code, its current scope, and its usage.

* Two bad things first. The first one is that the code, as currently written, is limited only to the case that $`\mathrm{\Omega }`$ is an Euler class or a Chern polynomial. For other multiplicative characteristic classes, one will not be able to use the code to make sensible computation without entering the core part, SEC. 1.3 (Q1K1) and SEC. 2 (EulerData), to do some modifications. This shortage will hopefully be gradually removed along with the development of the theory, using the relation of a given multiplicative class with Chern roots. The second one is that the actual computation of Euler data and $`K_d`$ could be a very demanding task both for Maple V and the machine (cf. some words in SEC. 3 of the code about Test 6: $`T_{}\text{}\mathrm{P}^2`$ even for $`d=2`$). When it exceeds the capacity the Maple V, one will likely get an error message. Experience tells us that occasionally these messages may be misleading.
* Now let us mention something more positive. As indicated in SEC. 3 of the code, the code has been tested correct for all known cases within the capacity of Maple V and the machine used. It is also made user-friendly: to run for a case of study, one only has to follow the examples in SEC. 3 and modify the various arguments/parameters to be fed into the function ‘ EulerData’, as instructed there. By no means does one need to do anything else; nor do we assume any knowledge of Maple at all.
* The specialization used, the time consumed, and the RAM memory used for the examples tested, particularly those that take long hours, are recorded in SEC. 3 of the code for reference. Only the last run of each case is recorded in these notes.

Instruction of running the code under Window 98.

For non-maple-user, let us give here some instruction of running the code under Window 98: (assuming there is already Maple V in the folder “Programm Files”)

* Read first the instructions both at the beginning of the code and at the start of SEC. 3 of the code .
* Save the code (say by the file name ‘`EulerData_MP.m`’) in the subfolder ‘Bin.wnt’ in the folder ‘Maple V Release 5’ that is automatically set up in the folder ‘Programm Files’ when installing Maple V. Double click the maple icon to open a Maple V worksheet. Inside the worksheet, type in the following command line after the prompt

> `restart; read "EulerData_MP.m";`

then hit Enter  on the keyboard. The output will be displayed directly on the worksheet.

For all other operating systems, please consult the system manager.

The code ‘`EulerData_MP.m`’.

```

#========================( Beginning of the code. )========================

#------------------------( PLEASE READ ME BEFORE USE )------------------
# NOTE 1. Though the code has been thoroughly tested, nevertheless if you find any bug that has escaped
#         our scrutiny, please send an e-mail to ‘chienliu@math.harvard.edu’ for remedy of this.
#
# NOTE 2. CAUTION TO USER:
#         The machine used for the tests is
#
#            Dell PC with Pentium II 400 MH, Cache 512 KB, RAM 384 MB, Hard Drive 7 GB.
#
#         Make sure the code is run in a machine at least of the same level as above to avoid possible crashes.
#
# NOTE 3. Anything free comes with no guarantee. Please take your own caution/judgement or consult experts
#         BEFORE running the code. The author of the code shall not be responsible for any possible damage
#         and/or loss caused by the code. The author does not recommend the use of the code for applications
#         in which errors or omissions could threaten life, injury or significant loss.
#==========================================================================

#-----------------------------------------------------------------------
# Language used: Maple V, created by Waterloo Maple Inc. at Waterloo, Ontario, Canada.
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# SEC. 0  Introduction and outline.
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# EulerData_MP.m  -- a package in Maple V.
#   Given an Euler class or the Chern polynomial of a concavex bundle $V$ over $CP^n$, the
#   package computes the Euler data $Q=\{Q_d\}$ and the intersection numbers $K_d$ for $V$
#-----------------------------------------------------------------------
# Date of completion: November 21, 1999.
# Test: All the subroutines involved are tested correct separately. See the individual remarks for
#       details. Some records of the run are recorded in SEC. 3 for a reference of future improvements.
# Date of last revision: January 7, 2000.
#-----------------------------------------------------------------------
# List of functions/subroutines:
#   Main routine (Sec. 2): EulerData.
#   Subroutines  (Sec. 1): LSolveSub (Sec. 1.1.1), LSolveSub_A (Sec. 1.1.2 ),
#                          PolyCongruent (Sec.1.2), Q1K1 (Sec.1.3).
#-----------------------------------------------------------------------
# SEC.3 contains INSTRUCTIONS of using the code and various cases of computation and serves as
#       a self-explanatory TUTORIAL for users.
# NOTE. For the computataion of $K_d$ alone, one may add a specialization BEFORE employing the function
#       ‘EulerData’. Different cases or different degrees for the same case may require different
#       specializations. To be compatible with the code, the specialization must be of the form in the
#       variables ‘lambda’and ‘u’. The specialization is given in the form:
#
#             lambda :i -> some_made_up_function(i, u)
#
#       such that lambda(i)=0 when u=0. (See the examples in SEC. 3.)
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# SEC. 1  Subroutines.
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# SEC. 1.1.1  Definition of the function ‘LSolveSub’.
#-----------------------------------------------------------------------
# ‘LSolveSub(equation_set, variable_list, check)’
#   solves a system ‘equation_set’ of linear equations in  variables in ‘variable_list’ by
#   eliminations and back substitutions.
#
# NOTE: If ‘check’=0 (resp. 1), then the consistency of the system will not (resp. will) be checked.
#-----------------------------------------------------------------------
# Date of completion: November 19, 1999.
# Test: Tested correct for six sample examples.
# Date of last revision: November 23, 1999.
#-----------------------------------------------------------------------

 LSolveSub := proc( equation_set, variable_list, check )
 local eqn_list_diag, eqn_list_tri, eqn_set, i, j, list_part,
       m, modification, s, sol, t, test, v, vl:

 eqn_set := equation_set:
 eqn_set := map( el->lhs(el)-rhs(el)=0, eqn_set ):
 m := nops(eqn_set):
 v := variable_list:
 vl := nops(v):
 eqn_list_tri := []:

# print("Number of equations = ", m):
# print("Number of variables = ", vl):

# print("LSolveSub: 1000000"):

 for i from 1 to vl do
#   print("i = ", i):

   for j from 1 to m do
#      print("j = ", j):
      t := j:
      test := coeff( lhs(eqn_set[j]), v[i] ):
#      print("v[i] = ", v[i]):    #################
#      print("LSolveSub: 1220000"): #################
      if test<>0 then
#        print("test = ", test):   #################
#        print("eqn_set[j] = ", eqn_set[j]):  #################
#        print("v[i] = ", v[i]):
         s := solve( { eqn_set[j] }, { v[i] } ):
#        print("s = ", s):
         sol := s[1]:
      fi:
#      print("LSolveSub: 1240000"): #################
      if test<>0 then break fi:
   od:

#  print("LSolveSub: 1400000"):

   eqn_list_tri := [ op(eqn_list_tri), sol ]:
   eqn_set := eqn_set minus { eqn_set[t] }:

   if nops(eqn_set)=0 then break fi:

   eqn_set := map( el -> subs( sol, el ), eqn_set ):
   eqn_set := map( el -> expand( lhs(el) )=0, eqn_set):
   eqn_set := eqn_set minus {0=0}:

   if eqn_set <> {} then
      eqn_set := map( el -> collect( lhs(el), v )=0, eqn_set )
   fi:

   m := nops( eqn_set ):
 od:

 #----------------------------------------------------------------------
 # In terms of matrices, so far an upper triangular matrix is formed.
 # The next step is the back substitutions to solve v.
 #----------------------------------------------------------------------

# print("LSolveSub: 6000000"):

 m := nops( eqn_list_tri ):
 eqn_list_diag := eqn_list_tri:

 unassign( ’eqn_list_tri’ ):

 for i from 2 to m do
   list_part := [ op(-(i-1)..-1, eqn_list_diag)]:
   modification := rhs( op( -i, eqn_list_diag ) ):
   modification := subs( list_part, modification ):
   modification := normal( modification ):
   modification := simplify( modification ):
   eqn_list_diag := subsop( [-i,2]=modification, eqn_list_diag ):
 od:

 #----------------------------------------------------------------------
 # consistency check.
 #----------------------------------------------------------------------

# print("LSolveSub: 9000000");

 if check=1 then
    if eqn_set<>{} then
       eqn_set = map( el -> subs( eqn_list_diag,  el), eqn_set ):
       eqn_set = { map( el -> lhs(el)-rhs(el), eqn_set ) }:
         if eqn_set <> {0} then
            print("inconsistent")
            else print("consistent")
         fi:
       else print("consistent")
    fi:
 fi:

 unassign( ’eqn_list_tri’, ’eqn_set’, ’i’, ’j’, ’list_part’,
           ’m’, ’modification’, ’s’, ’sol’, ’t’, ’test’, ’v’, ’vl’):
 RETURN(eqn_list_diag):
 end:

#-----------------------------------------------------------------------
# SEC. 1.1.2  Definition of the function ’LSolveSub_A’.
#-----------------------------------------------------------------------
# ’LSolveSub_A(equation_set, variable_list, check)’
#   solves a system ’equation_set’ of linear equations in variables in ’variable_list’
#   by eliminations and back substitutions.
#
# NOTE: If ’check’=0 (resp. 1), then the consistency of the system will not (resp. will) be checked.
#-----------------------------------------------------------------------
# Date of completion: November 19, 1999.
# Test: Tested correct for six sample examples.
# Date of last revision: January 6, 1999.
# Modification from ’LSolveSub’:
#   Replacing the built-in function ’solve’ by direct algebra to increase the capacity of the code.
#-----------------------------------------------------------------------

 LSolveSub_A := proc( equation_set, variable_list, check )
 local eqn_list_diag, eqn_list_tri, eqn_set, i, j, list_part,
       m, modification, s, s_1, sol, t, test, v, vl:

 eqn_set := equation_set:
 eqn_set := map( el->lhs(el)-rhs(el)=0, eqn_set ):
 m := nops(eqn_set):
 v := variable_list:
 vl := nops(v):
 eqn_list_tri := []:

# print( "Number of equations = ", m ):
# print( "Number of variables = ", vl ):

# print( "LSolveSub_A: 1000000" ):

 for i from 1 to vl do
#   print( "i = ", i ):

   for j from 1 to m do
#      print( "j = ", j ):    #####################
#      ( "LSolveSub_A: 1220000" ):  ##########
      t := j:
      test := coeff( lhs(eqn_set[j]), v[i] ):
#      print( "v[i] = ", v[i] ):
      if test<>0 then
#         print( "test = ", test ):            #####################
      #-----------------------------------------------------------------
      # Remark: Replacement of the following line in ’LSolveSub’.
      #-----------------------------------------------------------------
      #  s := solve( { eqn_set[j] }, { v[i] } ):
      #-----------------------------------------------------------------
#         print( "v[i] = ", v[i] ):
         s_1 := -(lhs(eqn_set[j]) -test*v[i])/test:
         s_1 := normal(s_1):
         s   := {v[i]=s_1}:
#         print( "s = ", s ):
      #-----------------------------------------------------------------
      # End of replacement.
      #-----------------------------------------------------------------
         sol := s[1]:
      fi:
      if test<>0 then break fi:
   od:

#   print( "LSolveSub_A: 1400000" ):

   eqn_list_tri := [ op(eqn_list_tri), sol ]:
   eqn_set := eqn_set minus { eqn_set[t] }:

   if nops(eqn_set)=0 then break fi:

   eqn_set := map( el -> subs( sol, el ), eqn_set ):
   eqn_set := map( el -> expand( lhs(el) )=0, eqn_set):
   eqn_set := eqn_set minus {0=0}:

   if eqn_set <> {} then
      eqn_set := map( el -> collect( lhs(el), v )=0, eqn_set )
   fi:

   m := nops( eqn_set ):
 od:

 #----------------------------------------------------------------------
 # In terms of matrices, so far an upper triangular matrix is formed.
 # The next step is the back substitutions to solve v.
 #----------------------------------------------------------------------

# print( "LSolveSub_A: 6000000" ):

 m := nops( eqn_list_tri ):
 eqn_list_diag := eqn_list_tri:

 for i from 2 to m do
   list_part := [ op(-(i-1)..-1, eqn_list_diag)]:
   modification := rhs( op( -i, eqn_list_diag ) ):
   modification := subs( list_part, modification ):
   modification := normal( modification ):
   modification := simplify( modification ):
   eqn_list_diag := subsop( [-i,2]=modification, eqn_list_diag ):
 od:

 #----------------------------------------------------------------------
 # consistency check.
 #----------------------------------------------------------------------

# print("LSolveSub_A: 9000000"):

 if check=1 then
    if eqn_set<>{} then
       eqn_set = map( el -> subs( eqn_list_diag,  el), eqn_set ):
       eqn_set = { map( el -> lhs(el)-rhs(el), eqn_set ) }:
         if eqn_set <> {0} then
            print("inconsistent")
            else print("consistent")
         fi:
       else print("consistent")
    fi:
 fi:

 unassign( ’eqn_list_tri’, ’eqn_set’, ’i’, ’j’, ’list_part’,
           ’m’, ’modification’, ’s’, ’s_1’, ’sol’, ’t’, ’test’, ’v’, ’vl’):

 RETURN(eqn_list_diag):
 end:

#-----------------------------------------------------------------------
# SEC. 1.2   Definition of the function ’PolyCongruent’.
#-----------------------------------------------------------------------
# ’PolyCongruent(polynomial, replacememt, variable)’
#   gives the polynomial of minimal degree in ’variable’ that is congruent to ’polynomial’
#   modulo the relation ’replacement’.
#
# Note: The argument ’replacement’ must be of the form:
#
#         variable’^n = polynomial in ’variable’ of degree <= n
#
#-----------------------------------------------------------------------
# Date of completion: November 20, 1999.
# Test: Tested correct for sample examples.
# Date of last revision: November 20, 1999.
#-----------------------------------------------------------------------

 PolyCongruent := proc( polynomial, replacement, variable )
 local d0, d1, dnow, i, relation, relation_set, poly, v:

 poly := polynomial:
 relation := replacement:
 v := variable:
 d0 := degree( lhs(relation), v ):
 d1 := degree( poly, v ):

 relation_set :=
   { seq( v^(i+d0)=collect( v^i*rhs(relation), v ), i=0..d1-d0 ) }:

 dnow := d1:
 for i from 1 to d1-d0+1 do
   if dnow < d0 then break fi:
   poly := subs( relation_set, poly ):
   poly := expand( poly ):
   poly := simplify( poly ):
   poly := collect( poly, v ):
   dnow := degree( poly, v ):
 od:

 unassign( ’d0’, ’d1’, ’dnow’, ’i’, ’relation’, ’relation_set’, ’v’ ):
 RETURN(poly):
 end:

#-----------------------------------------------------------------------
# SEC. 1.3  Definition of the function ’Q1K1’.
#-----------------------------------------------------------------------
# ’Q1K1(n, splitting_type, s_diff_0, opt_1)’
#    gives the first term in the $Omega$-Euler data and the first Kontsevich number for a concavex
#    bundle $V$ over ${\Bbb C}P^n$, where $Omega$ is the Chern polynomial.
#
# Note.1: The argument ’splitting_type’ must be of the form "[[_, _, ...],[_, _, ...]]", where the
#         first [_, _, ...] comes from the convex summand and the second [_, _, ...] comes from the
#         concave summand of the concavex bundle $V$.
#
# Note.2: The argument ’opt_1’ takes only values 0 and 1.
#         If ’opt_1’ = 0, then only $K_1$ will be computed.
#         If ’opt_1’ = 1, then exact $Q_1$ will also be computed.
#-----------------------------------------------------------------------
# Date of completion: November 19, 1999.
# Test: The value K1 are correct for nine known cases: Cases 1 - 5, 7-10 in SEC. 3.
# Date of last revision: November 19, 1999.
#----------------------------------------------------------------------

 Q1K1 := proc(n, splitting_type, s_diff_0, opt_1)
 local  i, inst1, k, k1, k1a, l1, l2, poly, poly1,
        q1poly0, q1poly01, q1poly02, q1poly10, q1poly11, q1poly110, q1poly111,
        q1summand1, q1summand2, q1value, q1value1, q1value2,
        q1, q10, q10a, q11, q11a, s1, s2, v, y:

 l1 := splitting_type[1]:
 l2 := splitting_type[2]:
 s1 := nops(l1):
 s2 := nops(l2):

 print("l1 = ", l1):
 print("l2 = ", l2):
 print("s1 = ", s1):
 print("s2 = ", s2):

 print("Q1K1, 1000000"):

 q1value1 := proc(v, y)
   local a, m:
   if s1<>0 then
        mul( mul(x+l1[a]*v-m*y, m=0..l1[a]), a=1..s1 )
      else 1
   fi:
 end:

 q1value2 := proc(v, y)
   local b, m:
   if s2<>0 then
        mul( mul(x+l2[b]*v+m*y, m=1..-l2[b]-1), b=1..s2 )
      else 1
   fi:
 end:

 q1value := (v, y) -> q1value1(v, y)*q1value2(v, y):

 q1summand1 := proc(i, j, alpha)
   local factor1, factor2, k:
   factor1 := 1:
   for k from 0 to n do
      if k<>i and k<>j then
         factor1 := factor1*( alpha-lambda(i)+lambda(k) )
         else factor1 := factor1
      fi:
   od:
   factor2 := 1:
   for k from 0 to n do
      if k<>i and k<>j then
         factor2 := factor2*( lambda(k)-lambda(j) )
         else 1
      fi:
   od:
   q1value( lambda(i), lambda(i)-lambda(j) )*factor1/factor2:
 end:

 q1summand2 := (i, j, alpha) ->
               normal( q1summand1(i, j, alpha) ):

 #---------------------------------------------------------------------
 # THEORY: ’q1poly01(i, alpha)’ = $i^{\ast}_{p_{i,0}}(Q_1)$
 #---------------------------------------------------------------------

 q1poly01 := proc(i, alpha)
   local j, t:
   t := 0:
   for j from 0 to n do
     if j<>i then
        t := t + q1summand2(i, j, alpha)
        else t := t
     fi:
   od:
 end:

 q1poly02 := (i, alpha) -> normal( q1poly01(i, alpha) ):
 q1poly0 := (i, alpha) -> simplify( q1poly02(i, alpha) ):

 q1poly10 := (i, alpha) -> normal( q1poly0(i, alpha) ):
 q1poly110 := (i, alpha) -> simplify( q1poly10(i,alpha) ):
 q1poly11 := (i, alpha) -> q1poly10(i,-alpha):
 q1poly111 := (i, alpha) -> simplify( q1poly11(i,alpha) ):

 #---------------------------------------------------------------------
 # definition of q10
 #---------------------------------------------------------------------

 q10a := proc(n)
   local i, q10_factor2, q10_factor3, total:

   q10_factor2 := proc(i, n)
     local j, k, t:
     t := 1:
     for j from 0 to n do
       for k from 0 to 1 do
         if j<>i or k<>0 then
            t := t*(kappa-lambda(j)-k*alpha)
            else t:= t
         fi:
       od:
     od:
   end:

   q10_factor3 := proc(i, n)
     local j, k, t:
     t := 1:
     for j from 0 to n do
       for k from 0 to 1 do
         if j<>i or k<>0 then
            t := t*( lambda(i)-lambda(j)-k*alpha )
            else t := t
         fi:
       od:
     od:
   end:

   total := add( q1poly110(i,alpha)*q10_factor2(i,n)/q10_factor3(i,n),
                 i=0..n ):
 end:

 q10 := normal( q10a(n) ):
 q10 := simplify( q10 ):

 #---------------------------------------------------------------------
 # defintion of q11
 #---------------------------------------------------------------------
 print("Q1K1, 4000000"):

 q11a := proc(n)
   local i, q11_factor2, q11_factor3, total:
   q11_factor2 := proc(i, n)
     local j, k, t:
     t := 1:
     for j from 0 to n do
       for k from 0 to 1 do
         if j<>i or k<>1 then
            t := t*( kappa-lambda(j)-k*alpha )
            else t := t
         fi:
      od:
     od:
   end:

   q11_factor3 := proc(i, n)
     local j, k, t:
     t := 1:
     for j from 0 to n do
       for k from 0 to 1 do
         if j<>i or k<>1 then
            t := t*( lambda(i)-lambda(j)+(1-k)*alpha )
            else t := t
         fi:
       od:
     od:
   end:

   total := add( q1poly111(i,alpha)*q11_factor2(i, n)/q11_factor3(i,n),
               i=0..n ):
 end:

 q11 := normal( q11a(n) ):
 q11 := simplify( q11 ):

 print("Q1K1, "):

 #----------------------------------------------------------------------
 # The first term of Euler data : Q1.
 #----------------------------------------------------------------------

 q1 := q10+q11:
 q1 := normal(q1):
 q1 := simplify(q1):

 print("Q1K1, 8000000"):

 #----------------------------------------------------------------------
 # Computation of K1 from Q1, using the formula in Lian, Liu, and Yau’s "Mirror Principle I, II"
 # and [Cox-Katz] "Mirror symmetry and algebraic geometry".
 #----------------------------------------------------------------------

 poly := q1:
 if opt_1=0 then
    poly := subs( u=0, q1 )
    else
      for i from 0 to n do
        poly :=  subs( lambda(i)=0, poly )
      od:
 fi:

 poly := subs( kappa=h, poly ):

 #----------------------------------------------------------------------
 # Extra manipulation for noncritical bundles with Omega=the Chern polynomial.
 #----------------------------------------------------------------------

 if s_diff_0(1) <> 0 then
    poly := diff( poly, x$s_diff_0(1) ):   #( Cf. Mirror Principle II, p. 36. )
    poly := subs( x=0, poly )
 fi:

 #----------------------------------------------------------------------

 poly1 := add( (-h*t/alpha)^k/(k!), k=0..n )*(-1)^(n+1)/(alpha^(n+1))*
            (add( (h/alpha)^k, k=0..n))^(n+1)*poly:
 poly1 := simplify(poly1):

 k1    := alpha^3/(2-t)*coeff(poly1,h^n):
 k1    := normal(k1):
 inst1 := k1:

 #----------------------------------------------------------------------
 # Extra manipulation with Omega=the Chern polynomial
 #----------------------------------------------------------------------

 if s_diff_0(1) <> 0 then
    inst1 := k1/(s_diff_0(1)!):
    k1 := x^(s_diff_0(1))*k1/(s_diff_0(1)!)
 fi:

 print("Routine: Q1K1"):
 print("k1 = ", k1):
 print("inst1 = ", inst1):

 #----------------------------------------------------------------------
 # k1a := alpha^2*coeff(h*poly1, h^n):
 # k1a := normal(k1a):
 #----------------------------------------------------------------------

 unassign(’i’, ’k’, ’l1’, ’l2’, ’poly’, ’poly1’, ’q1poly0’, ’q1poly01’,
          ’q1poly02’, ’q1poly10’, ’q1poly11’, ’q1poly110’, ’q1poly111’,
          ’q1summand1’, ’q1summand2’, ’q1value’, ’q1value1’, ’q1value2’,
          ’q10’, ’q10a’, ’q11’, ’q11a’, ’s1’, ’s2’, ’v’, ’y’ ):

 RETURN( [q1, k1, inst1] ):
# RETURN([q1, k1, k1a]):
 end:

#-----------------------------------------------------------------------
# SEC. 2  The MAIN ROUTINE.
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# Definition of the function ’EulerData’.
#-----------------------------------------------------------------------
# ’EulerData(n, splitting_type, Omega_0, s_diff_0, dmax, opt_1, opt_2, check)’
#    computes $Q_1,..., Q_d$ with $Q_0=\Omega_0$ and $K_1,..., K_d$ for a convex bundle $V$ over $CP^n$
#    of splitting type ’splitting_type’.
#
# Note.1: The argument ’splitting_type’ must be in the form of lists "[[_, _, ...],[_, _, ...]]", where
#         the first [_, _, ...] comes from the convex summand and the second [_, _, ...] comes from the
#         concave summand of the concavex bundle $V$.
#
# Note.2: The argument ’s_diff_0’ is the differnce: rank(U_d)-dim(\bar{\cal M}_{0,0}(CP^n, d));
#         (cf. [L-L-Y1, 2] for notations).
#
# Note.3: The argument ’opt_1’ takes only values 0 and 1.
#         If ’opt_1’ = 0, then only $K_d$, $d=1, .., dmax$, will be computed.
#         If ’opt_1’ = 1, then exact $Q_d$ up to $Q_{dmax}$ will also be computed.
#
# Note.4: The argument ’opt_2’ takes only values 0 and 1.
#         If ’opt_2’ = 0, then ’LSolveSub’ is enmployed;
#         if ’opt_2’ = 1, then ’LSolveSub_A’ is employed.
#
# Note.5: The argument ’check’ takes only values 0 and 1.
#         If ’check’ =0 (resp. 1), then consistency check of the linear system will not (resp. will)
#         be performed.
#-----------------------------------------------------------------------
# Date of completion: November 21, 1999.
# Test: See SEC. for details.
# Date of last revision: December 8, 1999.
#-----------------------------------------------------------------------

 EulerData := proc(n, splitting_type, Omega_0, s_diff_0, dmax, opt_1, check)
 local d, eqn_set, inhomogen11, inhomogen12, inhomogen13, inhomogen1,
       inhomogen3, inhomogen31, inhomogen32, instanton_list,
       k, k1, k1a, ka, kd, kda, kdn, l1, l2, n1,
       poly, poly1, poly_set, poly_set1, poly_set11, poly_set21,
       poly_set2, poly_set3, poly_set4, q, q0, q1, q1_difference,
       qd, qd11, qd111, qd112,
       qd113, qd114, qd12, qd13, qd21, qd22, qd23, qd31, qd311, qd312, qd313,
       qd32, qdr, qdr1, qd_value, qd_value1, qd_value2, qk1, qk1_linear,
       rel, s1, s2, s_diff, substitution, variable_list:

 qk1 := Q1K1(n, splitting_type, s_diff_0, opt_1):

 print("d=1"):
 print("k1 = ", qk1[2]):
# print("k1 =", qk1[2], qk1[3]):

 print("x = ", x):
 print("Routine: EulerData; Omega = ", Omega):

 if dmax=1 then RETURN(qk1) fi:

 #----------------------------------------------------------------------
 # Computations of $Q_d$ and $K_d$ for $d>=2$.
 #----------------------------------------------------------------------

 l1 := splitting_type[1]:
 l2 := splitting_type[2]:
 s1 := nops(l1):
 s2 := nops(l2):

 q0_inverse := 1/Omega_0:
 print("Routine: EulerData; q0_inverse = ", q0_inverse):

 q1 := qk1[1]:
 q := [ q1 ]:
 k1 := qk1[2]:
 k := [ k1 ]:
# k1a := qk1[3]:
# ka := [ k1a ]:
 instanton_list := [ qk1[3] ]:

 print("000000000000000"):
 print("k = ", k):
# print("ka = ", ka):
 print("instanton_list = ", instanton_list):

 for d from 2 to dmax do
   print("d = ", d):
   n1 := (n+1)*d+n-3:
   qd := add( add( w(mu,nu)*alpha^mu*kappa^nu, nu=0..n1-mu ), mu=0..n1 ):
   variable_list := [ seq( seq( w(mu, nu), nu=0.. n1-mu ), mu=0..n1 ) ]:

   #--------------------------------------------------------------------
   # Linear system from the 1st set of equations.
   #--------------------------------------------------------------------
   print("MAIN: 1000000; I am now working out the first set of equations."):

   qd111 := (i, r) ->  subs( kappa=lambda(i)+r*alpha, qd ):
   qd112 := (i, r) ->  expand( qd111(i, r) ):
   qd113 := (i, r) ->  simplify( qd112(i, r) ):
   qd114 := (i, r) ->  collect( qd113(i,r), alpha ):

   inhomogen11 := (i, r) ->
     subs( { kappa=lambda(i), alpha=-alpha}, q[r] )*
     subs( kappa=lambda(i), q[d-r] )*subs( h=lambda(i), q0_inverse ):
   inhomogen12 := (i, r) -> normal( inhomogen11(i, r) ):
   inhomogen13 := (i, r) -> simplify( inhomogen12(i, r) ):
   inhomogen1  := (i, r) -> collect( inhomogen13(i, r), alpha ):

   qd11 := (i, r) -> qd114(i, r)-inhomogen1(i, r):
   qd12 := (i, r) -> simplify( qd11(i, r) ):
   qd13 := (i, r) -> collect( qd12(i, r), alpha ):
   poly_set11 := (i, r) -> coeffs( qd13(i, r), alpha ) :
   poly_set1  := { seq( seq( poly_set11(i, r), r=1..d-1 ), i=0..n ) }:
   poly_set1  := map( el -> collect( el, variable_list ), poly_set1 ):

   #--------------------------------------------------------------------
   # Linear system from the 2nd set of equations.
   #--------------------------------------------------------------------
   print("MAIN: 2000000; I am now working the second set of equations."):

   qd21 := i ->  subs( kappa=lambda(i)+d*alpha, qd )-
                 subs( { kappa=lambda(i), alpha=-alpha }, qd ):
   qd22 := i -> simplify( qd21(i) ):
   qd23 := i -> collect( qd22(i), alpha ):
   poly_set21 := i -> coeffs( qd23(i), alpha ):
   poly_set2 := { seq( poly_set21(i), i=0..n ) }:
   poly_set2 := map( el -> collect(el, variable_list ), poly_set2 ):

   #--------------------------------------------------------------------
   # Linear system from the 3rd set of equations:
   # the special values $Q_d(\lambda_i, (\lambda_i-\lambda_j)/d )$
   #--------------------------------------------------------------------
   print("MAIN: 3000000; I am now working out the third set of equations."):

   qd_value1 := proc(v, y)
   local a, m, t:
   if s1<>0 then
      t := mul( mul( x+l1[a]*v-m*y, m=0..l1[a]*d ), a=1..s1 )
      else t := 1
   fi:
   RETURN(t):
   end:

   qd_value2 := proc(v, y)
   local b, m, t:
   if s2<>0 then
      t := mul( mul( x+l2[b]*v+m*y, m=1..-l2[b]*d-1 ), b=1..s2 )
      else t := 1
   fi:
   RETURN(t):
   end:

   qd_value := (v, y) -> qd_value1(v, y)*qd_value2(v, y):
   inhomogen31 := (i, j) -> qd_value( lambda(i), (lambda(i)-lambda(j))/d ):
   inhomogen32 := (i, j) -> normal( inhomogen31(i,j) ):
   inhomogen3  := (i, j) -> simplify( inhomogen32(i, j) ):
   qd311 := (i, j) ->
            subs( { kappa=lambda(i), alpha=( lambda(i)-lambda(j) )/d }, qd):
   qd312 := (i, j) -> expand( qd311(i, j) ):
   qd313 := (i, j) -> simplify( qd312(i, j) ):
   qd31  := (i, j) -> qd313(i, j)-inhomogen3(i, j):
   qd32  := (i, j) -> simplify( qd31(i, j) ):
   poly_set3 :=  { seq( seq( qd32(i, j), j=i+1..n), i=0..n ) }:
   poly_set3 := map( el-> collect( el, variable_list ), poly_set3 ):

   #--------------------------------------------------------------------
   # Linear equations from the 4th set of equations:
   # $\alpha$-degree bound: $\deg_{\alpha} I^{\ast}_d(Q_d) \le (n+1)d-2$.
   #--------------------------------------------------------------------
   print("MAIN: 4000000; I am now working out the fourth set of equations."):

   rel := mul( kappa-lambda(i), i=0..n ):
   rel := expand( rel )-kappa^(n+1):
   rel := collect( rel, kappa ):
   rel := kappa^(n+1)=rel:

   qdr := PolyCongruent( qd, rel, kappa ):
   qdr := collect( qdr, alpha ):
   poly_set4 := { seq( coeff( qdr, alpha^i ), i=(n+1)*d-1..n1 ) }:
   poly_set4 := map( el -> collect( el, kappa ), poly_set4 ):
   poly_set4 := map( el -> coeffs( el, kappa ), poly_set4 ):

   #--------------------------------------------------------------------
   # Combination of the four linear systems and solve the system.
   #--------------------------------------------------------------------
   print("MAIN: 6000000; I am now combining the four systems of equations."):

   poly_set := ‘union‘( poly_set1, poly_set2, poly_set3, poly_set4);
   eqn_set := map( el -> el=0, poly_set );

   unassign(’poly_set’, ’poly_set1’, ’poly_set2’, ’poly_set3’, ’poly_set4’):

     ##-----------------------------------------------------------------
     ## Added for testing the consistency check routine.
     ##
     ## print( "op(-1, eqn_set) = ", op(-1, eqn_set) ):
     ### eqn_set :=  { op( eqn_set ), lhs( op(-1, eqn_set) )=100 }: # or
     ### eqn_list :=  { op( eqn_set ), 2*lhs( op(-1, eqn_set) )=0 }:
     ##
     ## End of testing lines
     ##-----------------------------------------------------------------

   if opt_2 = 0 then
        print("I am now solving the system of linear equations using ’LSolveSub’."):
        substitution := LSolveSub( eqn_set, variable_list, check )
      else
        print("I am now solving the system of linear equation using ’LSolveSub_A’."):
        substitution := LSolveSub_A( eqn_set, variable_list, check )
   fi:

   print("substitution = ", substitution):
   qd := subs( substitution, qd );
   qd := normal(qd);
   qd := simplify(qd);
   q := [ op(q), qd ];
   print("The system of linear equations is now solved."):
   print("q = ", q):

   #--------------------------------------------------------------------
   # The nonequivariant limit of $I_d^{\ast}(Q_d)$.
   #--------------------------------------------------------------------
   print("I am now turning to compute Q_d, K_d, and n_d."):

   qdr1 := PolyCongruent( qd, rel, kappa ):

   if opt_1=0 then poly := subs( u=0, qdr1 )
      else poly := qdr1:
           for i from 0 to n do
               poly := subs( lambda(i)=0, poly )
           od:
   fi:
   poly := subs( kappa=h, poly ):

   #--------------------------------------------------------------------
   # Extra manipulation for noncritical bundles with Omega=the Chern polynomial.
   # (Cf. Mirror principle, I: p. 37.)
   #--------------------------------------------------------------------

   if s_diff_0(d) <> 0 then
      poly := diff( poly, x$s_diff_0(d) ):
      poly := subs( x=0, poly )
   fi:

   #--------------------------------------------------------------------
   # Computation of $K_d$ via $Q_d$, using the formula in
   # [Lian-Liu-Yau] "Mirror principle I", "Mirror principle II".
   #--------------------------------------------------------------------

   poly1 := add( (-h*t/alpha)^r/(r!), r=0..n )*
            mul( ( add( (h/(m*alpha))^r, r=0..n ) )^(n+1), m=1..d )*
            poly/( (d!)^(n+1)*(-alpha)^(d*(n+1)) ):
   poly1 := normal(poly1):
   poly1 := simplify(poly1):
   poly1 := collect(poly1, h):
   kd    := alpha^3/(2-d*t)*coeff(poly1, h^n):
   kd    := normal(kd):
   kdn   := kd:

   #--------------------------------------------------------------------
   # Extra manipulation for noncritical bundles with Omega=the Chern polynomial.
   #--------------------------------------------------------------------

   if s_diff_0(d) <> 0 then
      kdn := kd/(s_diff_0(d)!):
      kd  := x^(s_diff_0(d))*kd/(s_diff_0(d)!):
      kd  := normal(kd)
   fi:

   print("kdn = ", kdn):
   print("kd = ", kd):

   #--------------------------------------------------------------------

   k  := [ op(k), kd ]:
   print("k = ", k):

   #--------------------------------------------------------------------
   # Computation of $K_d$ via $Q_d$, using a formula in
   # Cox and Katz: Mirror symmetry and algebraic geometry
   #--------------------------------------------------------------------
   #
   # kda := alpha^2*coeff( h*poly1, h^n )/d:
   # kda := normal(kda):
   # ka  := [ op(ka), kda ]:
   # print("ka = ", ka):

   #--------------------------------------------------------------------
   # Computation of instanton numbers from intersection numbers.
   #--------------------------------------------------------------------

   InstantonN := proc( inst_list, k_d )
   local i, l, nd, new_inst_list, s:

   l  := nops( inst_list ):
   nd := k_d:

   for i from 2 to l+1 do
       if irem(l+1, i)=0 then
          s := iquo(l+1, i):
          nd := nd - inst_list[s]/i^3:
       fi:
   od:

   new_inst_list := [ op(inst_list), nd ]:

   unassign( ’i’, ’l’, ’nd’, ’s’ ):
   RETURN(new_inst_list):
   end:

   instanton_list := InstantonN( instanton_list, kdn):
   print("instanton_list = ", instanton_list):

 od:

 unassign( ’d’, ’eqn_set’, ’inhomogen11’, ’inhomogen12’, ’inhomogen13’,
           ’inhomogen1’, ’inhomogen3’, ’inhomogen31’, ’inhomogen32’,
           ’k1’, ’k1a’, ’kd’, ’kda’, ’kdn’, ’l1’, ’l2’, ’n1’, ’poly’, ’poly1’,
           ’poly_set’, ’poly_set1’, ’poly_set11’, ’poly_set21’, ’poly_set2’,
           ’poly_set3’, ’poly_set4’, ’q0_inverse’, ’q1’, ’q1_difference’,
           ’qd’, ’qd11’, ’qd111’, ’qd112’, ’qd113’, ’qd114’, ’qd12’, ’qd13’,
           ’qd21’, ’qd22’, ’qd23’, ’qd31’, ’qd311’, ’qd312’, ’qd313’, ’qd32’,
           ’qdr’, ’qdr1’, ’qd_value’, ’qd_value1’, ’qd_value2’, ’qk1’,
           ’qk1_linear’, ’rel’, ’s1’, ’s2’, ’s_diff’, ’screen’, ’substitution’,
           ’variable_list’ ):

 RETURN([q, k, instanton_list]):
# RETURN([q, k, ka, instanton_list]):
 end:

#----------------------------------------------------------------------
# SEC. 3  TEST ROUTINES and CASES OF STUDY.
# EulerData(n, splitting_type, Omega_0, s_diff_0, dmax, opt_1, opt_2, check)
#----------------------------------------------------------------------
# REMARK. Machine used: Dell PC, Hard Drive 7 GB,
#         with Pentium II 400 MH, Cache 512 KB, and RAM 128 MB, upgrated to 384 MB on Dec. 26, 1999.
#----------------------------------------------------------------------

##----------------------------------------------------------------------
## INSTRUCTION: For a bundle V of splitting type [[l_1, l_2, ...],[k_1, k_2, ...]] over CP^n :
##
##  (1) Omega:  the Chern polynomial of the bundle V over CP^n. The indeterminate is denoted by x
##              and the hyperplane class of CP^n is denoted by h  .
##  (2) s_diff: the diffrence rank(U_d)-dim(M_{0,0}(CP^n, d)); see Sec. 2 of these notes for details.
##              it is a FUNCTION OF d .
##              E.g.\ ’s_diff := d -> 3*d’ is the function in usual notation ’s_diff(d)=3d’.
##  (3) x     : the indeterminate of the Chern polynomial.
##              x HAS TO BE SET TO ZERO IF s_diff IS A CONSTANT ZERO FUNCTION.
##              (Compare: Case 1 and Case 11.)
##  (4) opt_1 : set to 0 if only K_d and n_d are required; set to 1 if exact Q_d is required.
##  (5) opt_2 : if set to 0 then ’LSolveSub’ will be employed; if set to 1 then ’LSolveSub_A’ will be
##              employed. Either is a subroutine to solve a system of linear equations.
##  (6) check : set to 1 if one wants to make sure that the system of linear equation is truely
##              consistent, thoughthe theory says it must be. Otherwise set to 0.
##  (7) dmax  : the maximal degree one wants to compute.
##  (8) specialization: take Case 1 for example; the line ’lambda := i -> (i^2+7*i+1)*u’ can be
##              replaced by e.g. ’lambda := i -> (i^3+17*i+2)*u’ or even ’lambda := i-> i^3*u’
##              as long as making sure that at least visually that none of lambda(i)-lambda(j) for
##              $0\le i<j \le n$ is zero and that, when u=0, all lambda(i) must be zero.
##              Usually more complicated specialization has to be used for bigger dmax value.
##  (9) the first two argument of EulerData: n and splittingtype in the form [[...],[...]].
##      Browse through the given examples below and the pattern should be clear.
##
##  OUTPUT: To distinguish the two sets of numbers, the output contains built-in indications of
##          intersection numbers, "kd", and instanton numbers, "instanton_list".
##----------------------------------------------------------------------
## FOR NON-MAPLE-USER:
##  Note that the symbol ’#’ de-activates all the commands or words of the same line behind this symbol.
##  If you run the code as put here, it will compute only the case Case 1 since the command lines for
##  all other cases are de-activated by putting a ’#’ at the start. (Notice the difference with Mathematica)
##  To activate other cases, simply remove these ’#’ at the start of lines.
##
##  Note, however, some of the lines are really meant to be titles or remarks and hence should be kept
##  de-activated; please compare Case 1 to keep these lines de-activated.
##----------------------------------------------------------------------
## CAUTION: While the numerals can be changed, all the variable names have to remain as given here
##          for the compatibility with the code.
##----------------------------------------------------------------------

##----------------------------------
## Case 1 : O(5) -> CP^4
##----------------------------------
 restart:
 print("Case 1: O(5) -> CP^4."):
 Omega  := x+5*h:
 s_diff := d -> 0:
 x      := 0:
 opt_1  := 0:    ###### 0 or 1
 opt_2  := 0:    ###### 0 or 1
 check  := 1:    ###### 0 or 1
 dmax   := 3:
#----------------------------------------------------------------------
# specialization:
# --------------
 if opt_1=0 then
    lambda := i -> (i^2+7*i+1)*u
 fi:
#----------------------------------------------------------------------
 qk := EulerData( 4, [[5], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
 print( "Answer known n_d: 2875, 609250, 317206375, 242467530000, 229305888887625." ):
 print( "Case: QK(4, [[5], []]) = [", qk[2], ", ", qk[3], "]." ):
# print(qk): #######  Re: This is de-activated for the output could be huge.
 unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’,
           ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        November 25, 1999.
## Specialization:              lambda := i -> (i^4+3*i+1)*u
## Answer obtained K_d (d<=3):  2875, 4876875/8, 8564575000/27.
## K_d converted to n_d:        2875, 609250, 317206375.
## Time consumed:               52,034.1 sec.
##----------------------------------------------------------------------

##----------------------------------
## Case 2: O(2)\oplus(4) -> CP^5
##----------------------------------
# restart:
# print("Case 2: O(2)+O(4) -> CP^5."):
# Omega  := x^2+6*h*x+8*h^2:
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+7*i+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 5, [[2,4], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known n_d: 1280, 92288." ):
# print( "Case: QK(5, [[2,4],[]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        November 24, 1999.
## Specialization:              lambda := i-> (i^2+1)*u
## Answer obtained K_d (d<=2):  1280, 92448.
## K_d converted to n_d:        1280, 92288.
## Consistency check:           consistent.
## Time consumed:               6,337.1 sec.
##----------------------------------------------------------------------

##----------------------------------
## Case 3: O(3)\oplus O(3) -> CP^5
##----------------------------------
# restart:
# print("Case 3: O(3)\oplus O(3) -> CP^5."):
# Omega  := x^2+6*h*x+9*h^2:
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 5, [[3,3], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known n_d: 1053, 52812." ):
# print( "Case: QK(5, [[3,3],[]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’):
##----------------------------------------------------------------------
## Date:                    November 24, 1999.
## Specialization:          lambda := i -> (i^2+1)*u
## Answer obtained (d<=2):  1053, 423549/8.
## K_d converted to n_d:    1053, 52812.
## Consistency check:       consistent.
## Time consumed:           5,693.4 sec.
##----------------------------------------------------------------------

##---------------------------------------------
## Case 4: O(2)\oplus O(2)\oplus O(3) -> CP^6
##---------------------------------------------
# restart:
# print("Case 4: O(2)\oplus O(2) \oplus O(3) -> CP^6."):
# Omega  := x^3+7*h*x^2+16*h^2*x+12*h^3:
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 6, [[2,2,3], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known n_d: 720, 22428." ):
# print( "Case: QK(6, [[2,2,3],[]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        November 24, 1999.
## Specialization:              lambda := i-> (i^2+1)*u
## Answer obtained K_d (d<=2):  720, 22518.
## K_d converted to n_d:        720, 22428.
## Consistency check:           consistent.
## Time consumed:               50,205.2 sec.
##----------------------------------------------------------------------

##----------------------------------------------------------
## Case 5: O(2)\oplus O(2) \oplus O(2) \oplus O(2) -> CP^7
##----------------------------------------------------------
# restart:
# print("Case 5: O(2)\oplus O(2)\oplus O(2)\oplus O(2) -> CP^7."):
# Omega  := x^4+8*h*x^3+24*h^2*x^2+32*h^3*x+16*h^4:
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 7, [[2,2,2,2], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known n_d: 512, 9728." ):
# print( "Case: QK(7, [[2,2,2,2],[]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                       January 8, 2000
## Specialization:             lambda := i -> (i^2+13*i+1)*u
## Answer obtained K_d (d=1):  512, ---.
## K_d converted to n_d      : 512.
## Consistency check:          ---.
## Time consumed:              91.3 sec
## Bytes used:                 22.7 MB
##----------------------------------------------------------------------
## Remark. The computaion of K_2 exceeds the capacity of Maple V, Release 5.1.
##----------------------------------------------------------------------

##------------------------
## Case 6: T_{\ast}CP^2
##------------------------
# restart:
# print("Case 6: T_{\ast}CP^2."):
# Omega  := x^2+3*h*x+3*h^2:
# s_diff := d -> 3:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 1:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 3:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^3+17*i+1)*u
# fi:
#-----------------------------------------------------------------------
# qk := EulerData( 2, [[1,2], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known: Unknown."):
# print( "Case: QK(2, [[1,2],[]]) = [", qk[2], ", ", qk[3], "]." ):
## print("qk = ", qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’,
#           ’s_diff’, ’x’ ):
##-----------------------------------------------------------------------
## Date:                       December 8, 1999.
## Specialization:             lambda := i -> (i^2+3*i+1)*u
## Answer obtained K_d (d=1):  10*x^3
## Consistency check:          ???
## Time consumed:              ??? sec.
## Bytes consumed:             ??? MB
## Remark: For the computation of d=2, the complexity involved seems to surpass the capacity of Maple V.
##----------------------------------------------------------------------
## Date:                       January 7, 2000.
## Specialization:             lambda := i -> (i^3+17*i+1)*u
## Time consumed:              ???
## Bytes consumed:             ??? > 150 MB
## -------
## Remarks: So far, the job has been thrown out constantly at d=2. After pinning down exact what line
##          that cause an error message to appear and the job thrown out, it is found that, in the
##          computation for d=2, a coeffiecent (which is a rational function of variable ’x’ and ’u’)
##          that takes nearly 900 lines for the display in the Maple window appears. This seems to beat
##          the current capacity of Maple. Finding a way to go around this will be one of the major
##          improvements of the current code.
##----------------------------------------------------------------------

##-----------------------------------
## Case 7: O(-1)\oplus O(-1) -> CP^1
##----------------------------------
# restart:
# print("Case 7: O(-1)\oplus O(-1) -> CP^1"):
# Omega  := 1/(x-h)^2:
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 5:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 1, [[], [-1, -1]], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known: K_d = 1/(d^3)." ):
# print( "Case: QK(1, [[],[-1,-1]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’,
#           ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## $K_d$ tested correct for d<=5.
##----------------------------------------------------------------------

##----------------------------------
## Case 8: O(-3) -> CP^2
##----------------------------------
# restart:
# print("Case 8: O(-3) -> CP^2"):
# Omega  := 1/(x-3*h):
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 5:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^3+i^2+3*i+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 2, [[], [-3]], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Answer known K_d: 3, -45/8, 244/9, -12333/64, 211878/125." ):
# print( "Case: QK(2, [[],[-3]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        November 26, 1999.
## Specialization:              lambda := i -> (i^3+i^2+3*i+1)*u
## Answer obtained K_d (d<=5):  same as the known ones.
## Consistency check:           consistent.
## Time consumed:               48,120 sec.
##----------------------------------------------------------------------

##----------------------------------
## Case 9: O(2)\oplus O(-2) -> CP^3
##----------------------------------
# restart:
# print("Case 9: O(2)\oplus O(-2) -> CP^3."):
# Omega  := (x+2*h)/(x-2*h):
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 3:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+7*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 3, [[2], [-2]], Omega, s_diff, dmax, opt_1, check ):
# print( "Answer known K_d: -4, -9/2, -328/27." ):
# print( "Case: QK(3, [[2],[-2]]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## $K_d$ tested correct for d<=3.
##----------------------------------------------------------------------

##-----------------------------------------------
## Case 10: O(2)\oplus O(2)\oplus O(-1) -> CP^4
##-----------------------------------------------
# restart:
# print("Case 10: O(2)\oplus O(2)\oplus O(-1) -> CP^4."):
# Omega  := (x+2*h)^2/(x-h):
# s_diff := d -> 0:
# x      := 0:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##---------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[2,2], [-1]], Omega, s_diff, dmax, opt_1, check ):
# print( "Answer known K_d: 16, -18, 1312/27." ):
# print( "Case: QK(4, [[2,2],[-1]]) = [", qk[2], ", ", qk[3], ",", qk[4], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## $K_d$ tested correct for d<=2
##----------------------------------------------------------------------

##------------------------
## Case 11: O(2) -> CP^1
##------------------------
# restart:
# print("Case 11: O(2) -> CP^1."):
# Omega  := x+2*h:
# s_diff := d -> 3:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 2:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 1, [[2], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(1, [[2], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                       December 8, 1999.
## Specialization:             lambda := i -> (i^2+1)*u
## Answer obtained K_d (d<=5): x^3, (1/8)*x^3, (1/27)*x^3, (1/64)*x^3, (1/125)*x^3
## K_d converted to n_d      : x^3, 0, 0, 0, 0.
## Consistency check:          consistent.
## Time consumed:              134.5 sec.
## Bytes used:                 3.25 MB
##----------------------------------------------------------------------

##---------------------------
## Case 12: O(3) -> CP^2
##---------------------------
# restart:
# print("Case 12: O(3) -> CP^2."):
# Omega  := x+3*h:
# s_diff := d -> 2:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 6:
##-----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+7*i+1)*u
# fi:
##-----------------------------------------------------------------------
# qk := EulerData( 2, [[3], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(2, [[3], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                       ???, (Recording date: December 23, 1999).
## Specialization:             lambda := i -> (i^2+7*i+1)*u
## Answer obtained K_d (d<=6):
##    21*x^2, (189/8)*x^2, (169/9)*x^2, (1533/64)*x^2, (2646/125)*x^2, (169/8)*x^2, ---
## K_d converted to n_d:       21*x^2, 21*x^2, 18*x^2, 21*x^2, 21*x^2, 18*x^2, ---
## Consistency check:          consistent.
## Time consumed:              1,047,896.9 sec.
## Bytes used:                 116 MB
##----------------------------------------------------------------------

##----------------------------
## Case 13: O(4) -> CP^3
##----------------------------
# restart:
# print("Case 13: O(4) -> CP^3."):
# Omega  := x+4*h:
# s_diff := 1:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 5:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+7*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 3, [[4], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(3, [[4], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                       December 8, 1999.
## Specialization:             lambda := i -> (i^2+7*i+1)*u
## Answer obtained K_d (d<=4): 320*x, 5056*x, (3893504/27)*x, 5490624*x, ---.
## K_d converted to n_d      : 320*x, 5016*x, 144192*x, 5489992*x. ---.
## Consistency check:          consistent.
## Time consumed:              55,290.4 sec
## Bytes used:                 30.2 M
##----------------------------------------------------------------------

##---------------------------
## Case 14: O(6) -> CP^4
##---------------------------
# restart:
# print("Case 14: O(6) -> CP^4"):
# Omega  := x+6*h:
# s_diff := d -> d:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 1:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 10:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 =0 then
#    lambda := i -> (i^2+7*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[6], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(4, [[6], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                       December 28, 1999.
## Specialization:             lambda := i -> (i^2+7*i+1)*u
## Answer obtained K_d (d<=3): 50400*x, (752729895/4)*x^2, (433244745198080/243)*x^3, ---.
## K_d converted to n_d      : 50400, 752704695/4, 433244744744480/243, ---.
## Consistency check:          consistent.
## Time consumed:              49,842.4 sec
## Bytes used:                 30.5 M
##----------------------------------------------------------------------

##----------------------------
## Case 15: O(7) -> CP^4
##----------------------------
# restart:
# print("Case 15: O(7) -> CP^4."):
# Omega  := x+7*h:
# s_diff := d -> 2*d:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 10:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+11*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[7], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(4, [[7], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        December 29, 1999.
## Specialization:              lambda := i -> (i^2+11*i+1)*u
## Answer obtained K_d (d<=3):  451570*x^2, (403985396325/32)*x^4, (15755269694706695755/17496)*x^6, ---.
## K_d converted to n_d :       451570, 403983590045/32, 15755269694414078395/17496, ---
## Consistency check:           consistent.
## Time consumed:               72,086.1 sec.
## Bytes used:                  45.2 MB.
##----------------------------------------------------------------------

##----------------------------
## Case 16: O(8) -> CP^4
##----------------------------
# restart:
# print("Case 16: O(8) -> CP^4."):
# Omega  := x+8*h:
# s_diff := d -> 3*d:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 10:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+11*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[8], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(4, [[8], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        December 30, 1999.
## Specialization:              lambda := i -> (i^2+11*i+1)*u
## Answer obtained K_d (d<=3):
##    2773820*x^3, (3178734062035/8)*x^6, (46028387589557254161275/314928)*x^9, ---.
## K_d converted to n_d :       2773820, 3178731288215/8, 46028387589524900324795/314928, ---.
## Consistency check:           consistent.
## Time consumed:               80,553.2 sec.
## Bytes used:                  49.8 MB.
##----------------------------------------------------------------------

##----------------------------
## Case 17: O(9) -> CP^4
##----------------------------
# restart:
# print("Case 17: O(9) -> CP^4."):
# Omega  := x+9*h:
# s_diff := d -> 4*d:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 10:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+11*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[9], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(4, [[9], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        December 31, 1999.
## Specialization:              lambda := i -> (i^2+11*i+1)*u
## Answer obtained K_d (d<=3):
##    13198850*x^4, (243281907041715/32)*x^8, (197802281929974511821535/17496)*x^12, ---.
## K_d converted to n_d :       13198850, 243281854246315/32, 197802281929965958966735/17496, ---.
## Consistency check:           consistent.
## Time consumed:               93,665.7 sec.
## Bytes used:                  53.2 MB.
##----------------------------------------------------------------------

##----------------------------
## Case 18: O(10) -> CP^4
##----------------------------
# restart:
# print("Case 18: O(10) -> CP^4."):
# Omega  := x+10*h:
# s_diff := d -> 5*d:
# opt_1  := 0:    ###### 0 or 1
# opt_2  := 0:    ###### 0 or 1
# check  := 1:    ###### 0 or 1
# dmax   := 10:
##----------------------------------------------------------------------
## specialization:
## --------------
# if opt_1 = 0 then
#    lambda := i -> (i^2+11*i+1)*u
# fi:
##----------------------------------------------------------------------
# qk := EulerData( 4, [[10], []], Omega, s_diff, dmax, opt_1, opt_2, check ):
# print( "Case: QK(4, [[10], []]) = [", qk[2], ", ", qk[3], "]." ):
## print(qk):
# unassign( ’check’, ’dmax’, ’lambda’, ’Omega’, ’opt_1’, ’opt_2’, ’qk’, ’s_diff’, ’x’ ):
##----------------------------------------------------------------------
## Date:                        January 2, 2000.
## Specialization:              lambda := i -> (i^2+11*i+1)*u
## Answer obtained K_d (d<=3):
##    52040450*x^5, (25908993204089625/256)*x^10, (71418501571607082433686025/139968)*x^15, ---.
## K_d converted to n_d :       52040450, 25908991538795225/256, 71418501571606812655993225/139968, ---.
## Consistency check:           consistent.
## Time consumed:               80,874.0 sec.
## Bytes used:                  49.6 MB.
#----------------------------------------------------------------------

#========================(    End of the code.    )========================

```