source: git/Singular/dyn_modules/gfanlib/lift.cc @ eacb781

spielwiese
Last change on this file since eacb781 was 06d5774, checked in by Yue Ren <ren@…>, 10 years ago
fix: rebase errors
  • Property mode set to 100644
File size: 777 bytes
Line 
1#include <witness.h>
2
3/***
4 * Suppose r and s are the same ring but with two adjacent orderings,
5 * w is a weight vector in the relative interior of their common facet.
6 * Given a standard basis of an ideal I with respect to the ordering of r,
7 * a standard basis of its w-initial ideal inI with respect to
8 * the ordering of s, computes a standard basis of I with respect to
9 * the ordering of s.
10 **/
11ideal lift(const ideal I, const ring r, const ideal inI, const ring s)
12{
13  nMapFunc identity = n_SetMap(r->cf,s->cf);
14  int k = idSize(I); ideal Is = idInit(k);
15  for (int i=0; i<k; i++)
16    Is->m[i] = p_PermPoly(I->m[i],NULL,r,s,identity,NULL,0);
17  ideal J = idInit(k);
18  for (int i=0; i<k; i++)
19    J->m[i] = witness(inI->m[i],Is,inI,s);
20  id_Delete(&Is,s);
21  return J;
22}
Note: See TracBrowser for help on using the repository browser.