Changeset 8c4ee5d in git for Singular/LIB/deform.lib
- Timestamp:
- Jan 24, 1998, 2:06:00 PM (26 years ago)
- Branches:
- (u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
- Children:
- c9567bfac5f32486500c38100e3dcb22da219bb4
- Parents:
- f1201aeda3c936a00561052557964a012e827d7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/deform.lib
rf1201a r8c4ee5d 1 // $Id: deform.lib,v 1. 4 1998-01-23 15:44:59Singular Exp $1 // $Id: deform.lib,v 1.5 1998-01-24 13:06:00 Singular Exp $ 2 2 //(bm, last modified 12/97) 3 3 /////////////////////////////////////////////////////////////////////////////// … … 9 9 lift_rel_kb(N,M[,kbM,p]) lifting N into a kbase of M 10 10 kill_rings(["prefix"]) kills the exported rings from above 11 lift_kbase(N,M); coef-matrix expressing N as lin. comb. of k-basis of M 11 12 12 13 SUB-PROCEDURES used by main procedure: … … 892 893 return(dv); 893 894 } 895 896 897 /////////////////////////////////////////////////////////////////////////////// 898 899 proc lift_kbase (N, M) 900 USAGE: lift_kbase(N,M); N,M=poly/ideal/vector/module 901 RETURN: matrix A, coefficient matrix expressing N as linear combination of 902 k-basis of M. Let the k-basis have k elements and size(N)=c columns. 903 Then A satisfies: 904 matrix(reduce(N,std(M)),k,c) = matrix(kbase(std(M)))*A 905 ASSUME: dim(M)=0 and the monomial ordering is a well ordering or the last 906 block of the ordering is c or C 907 EXAMPLE: example lift_kbase; shows an example 908 { 909 //---------- initialisation ------------------------------------------------- 910 string ords = ordstr(basering); 911 int d,col,k,l; 912 module kb; 913 matrix testm; 914 vector v,p,q; 915 //------- check wether ordering is correct ------------------------------------ 916 k=1; 917 for( l=1;l<=nvars(basering);l=l+1 ) { k=k*(lead(1+var(l))==var(l)); } 918 if( k==0 ) 919 { 920 if( ords[size(ords)]!="c" and ords[size(ords)]!="C" ) 921 { 922 "// change ordering!"; 923 "// ordering "+ordstr(basering)+" not implemented for this proc"; 924 return(); 925 } 926 } 927 //---------- check assumtions ----------------------------------------------- 928 if( typeof(N)=="poly" ) { ideal J=ideal(N); kill N; module N=J; kill J; } 929 if( typeof(M)=="poly" ) { ideal J=ideal(M); kill M; module M=J; } 930 M = std(M); 931 d = vdim(M); 932 if( d<1 ) 933 { "// second argument in `lift_kbase` has vdim",d; return(); } 934 //---------- compute kbase and reduce(N,M) ----------------------------------- 935 kb = kbase(M); 936 col = ncols(N); 937 N = reduce(N,M); 938 N = matrix(N,nrows(N),col); 939 //---------- collecting coefficients of reduce(N,M) -------------------------- 940 matrix result[d][col]; 941 for( l=1;l<=col;l=l+1 ) 942 { 943 v = N[l]; 944 if( size(v)>0 ) 945 { 946 for( k=1;k<=d;k=k+1 ) 947 { 948 p = kb[k]; 949 q = lead(v); 950 if( size(p-q)<2 ) 951 { 952 result[k,l] = leadcoef(q); 953 v = v-q; 954 if( size(v)<1 ) { k=d+1; } 955 else { k=0; } 956 } 957 } 958 } 959 } 960 //--------- final test ------------------------------------------------------- 961 testm = matrix(N,nrows(kb),ncols(result))- matrix(kb)*result; 962 if( size(module(testm))!=0 ) 963 { 964 "// proc `lift_kbase` did'nt work correctly!"; 965 "// Please inform tthe authors"; 966 return(); 967 } 968 return(result); 969 } 970 example 971 {"EXAMPLE:"; echo=2; 972 ring R=0,(x,y),ds; 973 module M=[x2,xy],[y2,xy],[0,xx],[0,yy]; 974 module N=[x3+xy,x],[x,x+y2]; 975 print(M); 976 module kb=kbase(std(M)); 977 print(kb); 978 print(N); 979 matrix A=lift_kbase(N,M); 980 print(A); 981 matrix(reduce(N,std(M)),nrows(kb),ncols(A)) - matrix(kbase(std(M)))*A; 982 }
Note: See TracChangeset
for help on using the changeset viewer.