Changeset 44290e6 in git for Singular/LIB/invar.lib
- Timestamp:
- Sep 10, 1997, 9:52:55 AM (26 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- e4dda1834ffae525b4f3d1fd395264cf974d924b
- Parents:
- 6b76c234fa60b76f7d16f9ba2091e496804852a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/invar.lib
r6b76c2 r44290e6 1 // $Id: invar.lib,v 1. 1 1997-05-01 17:50:42Singular Exp $1 // $Id: invar.lib,v 1.2 1997-09-10 07:52:55 Singular Exp $ 2 2 /////////////////////////////////////////////////////// 3 3 // invar.lib … … 142 142 143 143 144 proc reduction(poly p, ideal mo d, list #)145 USAGE: reduction(p,mo d,q); p poly, modideal, q (optional) monomial144 proc reduction(poly p, ideal mo, list #) 145 USAGE: reduction(p,mo,q); p poly, mo ideal, q (optional) monomial 146 146 RETURN: poly= (p-H(f1,...,fr))/q^a, if Lt(p)=H(Lt(f1),...,Lt(fr)) for 147 147 some polynomial H in r variables over the base field, 148 148 a maximal such that q^a devides p-H(f1,...,fr), 149 mo d=(f1,...,fr)149 mo =(f1,...,fr) 150 150 NOTE: 151 151 EXAMPLE: example reduction; shows an example 152 152 { 153 153 int i; 154 int z=size(mo d);154 int z=size(mo); 155 155 def bsr=basering; 156 156 … … 165 165 execute "ring s="+charstr(basering)+",("+varstr(basering)+",@(0..z)),dp;"; 166 166 167 //costructes the ideal mo d=(p-@(0),mod[1]-@(1),...,mod[z]-@(z))168 ideal mo d=imap(bsr,mod);167 //costructes the ideal mo=(p-@(0),mo[1]-@(1),...,mo[z]-@(z)) 168 ideal mo=imap(bsr,mo); 169 169 for (i=1;i<=z;i++) 170 170 { 171 mo d[i]=lead(mod[i])-var(nvars(bsr)+i+1);172 } 173 mo d=lead(imap(bsr,p))-@(0),mod;171 mo[i]=lead(mo[i])-var(nvars(bsr)+i+1); 172 } 173 mo=lead(imap(bsr,p))-@(0),mo; 174 174 175 175 //eliminates the variables of the basering bsr 176 //i.e. computes mo dintersected with K[@(0),...,@(z)]177 ideal kern=eliminate(mo d,imap(bsr,v));176 //i.e. computes mo intersected with K[@(0),...,@(z)] 177 ideal kern=eliminate(mo,imap(bsr,v)); 178 178 179 179 // test wether @(0)-h(@(1),...,@(z)) is in ker for some poly h … … 186 186 { 187 187 h=(1/h)*kern[i]; 188 // defines the map psi : s ---> bsr defined by @(i) ---> p,mo d[i]188 // defines the map psi : s ---> bsr defined by @(i) ---> p,mo[i] 189 189 setring bsr; 190 map psi=s,maxideal(1),p,mo d;190 map psi=s,maxideal(1),p,mo; 191 191 poly re=psi(h); 192 192 … … 210 210 ring q=0,(x,y,z,u,v,w),dp; 211 211 poly p=x2yz-x2v; 212 ideal mo d=x-w,u2w+1,yz-v;213 reduction(p,mo d);214 reduction(p,mo d,w);215 } 216 217 /////////////////////////////////////////////////////////////////////////////// 218 219 proc completeReduction(poly p, ideal mo d, list #)220 USAGE: completeReduction(p,mo d,q); p poly, modideal,212 ideal mo =x-w,u2w+1,yz-v; 213 reduction(p,mo); 214 reduction(p,mo,w); 215 } 216 217 /////////////////////////////////////////////////////////////////////////////// 218 219 proc completeReduction(poly p, ideal mo, list #) 220 USAGE: completeReduction(p,mo,q); p poly, mo ideal, 221 221 q (optional) monomial 222 RETURN: poly= the polynomial p reduced with mo dvia the procedure222 RETURN: poly= the polynomial p reduced with mo via the procedure 223 223 reduction as long as possible 224 224 NOTE: … … 226 226 { 227 227 poly p1=p; 228 poly p2=reduction(p,mo d,#);228 poly p2=reduction(p,mo,#); 229 229 while (p1!=p2) 230 230 { 231 231 p1=p2; 232 p2=reduction(p1,mo d,#);232 p2=reduction(p1,mo,#); 233 233 } 234 234 return(p2); … … 238 238 ring q=0,(x,y,z,u,v,w),dp; 239 239 poly p=x2yz-x2v; 240 ideal mo d=x-w,u2w+1,yz-v;241 completeReduction(p,mo d);242 completeReduction(p,mo d,w);243 } 244 /////////////////////////////////////////////////////////////////////////////// 245 246 proc inSubring(poly p, ideal mo d)247 USAGE: inSubring(p,mo d); p poly, modideal248 RETURN: list= 1,string(@(0)-h(@(1),...,@(size(mo d)))) :if p = h(mod[1],...,mod[size(mod)])249 0,string(h(@(0),...,@(size(mo d)))) :if there is only a nonlinear relation250 h(p,mo d[1],...,mod[size(mod)])=0.240 ideal mo =x-w,u2w+1,yz-v; 241 completeReduction(p,mo); 242 completeReduction(p,mo,w); 243 } 244 /////////////////////////////////////////////////////////////////////////////// 245 246 proc inSubring(poly p, ideal mo) 247 USAGE: inSubring(p,mo); p poly, mo ideal 248 RETURN: list= 1,string(@(0)-h(@(1),...,@(size(mo)))) :if p = h(mo[1],...,mo[size(mo)]) 249 0,string(h(@(0),...,@(size(mo)))) :if there is only a nonlinear relation 250 h(p,mo[1],...,mo[size(mo)])=0. 251 251 NOTE: 252 252 EXAMPLE: example inSubring; shows an example 253 253 { 254 int z=size(mo d);254 int z=size(mo); 255 255 int i; 256 256 def gnir=basering; … … 262 262 } 263 263 string eli=string(mile); 264 // the intersection of ideal nett=(p-@(0),mo d[1]-@(1),...)264 // the intersection of ideal nett=(p-@(0),mo[1]-@(1),...) 265 265 // with the ring k[@(0),...,@(n)] is computed, the result is ker 266 266 execute "ring r1="+charstr(basering)+",("+varstr(basering)+",@(0..z)),dp;"; 267 ideal nett=imap(gnir,mo d);267 ideal nett=imap(gnir,mo); 268 268 poly p; 269 269 for (i=1;i<=z;i++) … … 299 299 ring q=0,(x,y,z,u,v,w),dp; 300 300 poly p=xyzu2w-1yzu2w2+u4w2-1xu2vw+u2vw2+xyz-1yzw+2u2w-1xv+vw+2; 301 ideal mo d=x-w,u2w+1,yz-v;302 inSubring(p,mo d);301 ideal mo =x-w,u2w+1,yz-v; 302 inSubring(p,mo); 303 303 } 304 304
Note: See TracChangeset
for help on using the changeset viewer.