345{
346#if OUTPUT
347 Print(
"ncSA_1xy0x0yG(var(%d)^{%d}, var(%d)^{%d}, G, r)!\n",
j,
m,
i, n);
348 number t = n_Copy(m_g, r->cf);
349 PrintS(
"Parameter G: "); n_Write(t, r->cf);
350 n_Delete(&t, r->cf);
351#endif
352
353 int kn = n;
355
356 number c = n_Init(1, r->cf);
357
359
360 p_SetExp(
p,
j, km--, r);
361 p_SetExp(
p,
i, kn--, r);
362
364
365
368
369 int min = si_min(
m, n);
370
372
374 {
375 number t = n_Init(km + 1, r->cf);
376 n_InpMult(t, m_g, r->cf);
377 n_InpMult(c, t, r->cf);
378 n_Delete(&t, r->cf);
379
380 t = n_Init(kn + 1, r->cf);
381 n_InpMult(c, t, r->cf);
382 n_Delete(&t, r->cf);
383
384 t = n_Init(
k, r->cf);
385 c = n_Div(c, t, r->cf);
386 n_Delete(&t, r->cf);
387
388
389
390 t = n_Copy(c, r->cf);
391
393
394 p_SetExp(
p,
j, km--, r);
395 p_SetExp(
p,
i, kn--, r);
396
398
401 }
402
404 assume((km == 0) || (kn == 0) );
405
406 {
407 n_InpMult(c, m_g, r->cf);
408
409 if( km > 0 )
410 {
411 number t = n_Init(km + 1, r->cf);
412 n_InpMult(c, t, r->cf);
413 n_Delete(&t, r->cf);
414 }
415
416 if( kn > 0 )
417 {
418 number t = n_Init(kn + 1, r->cf);
419 n_InpMult(c, t, r->cf);
420 n_Delete(&t, r->cf);
421 }
422
423 number t = n_Init(
k, r->cf);
424 c = n_Div(c, t, r->cf);
425 n_Delete(&t, r->cf);
426 }
427
429
430 p_SetExp(
p,
j, km, r);
431 p_SetExp(
p,
i, kn, r);
432
434
436
438
439 return pResult;
440}
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
static poly pLast(poly a, int &length)
returns the length of a polynomial (numbers of monomials) respect syzComp