Changeset a4f5ce in git
 Timestamp:
 Feb 9, 2005, 8:06:35 PM (18 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '7725b5cfc1eaf99630826ecc59f559d3b6831c24')
 Children:
 33d87254b9d1883fe8b32ec87df6614827559310
 Parents:
 6582b896a376689038f2f0222fceeac87b3c7075
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/control.lib
r6582b8 ra4f5ce 1 version="$Id: control.lib,v 1. 19 20041222 18:03:16levandov Exp $";1 version="$Id: control.lib,v 1.20 20050209 19:06:35 levandov Exp $"; 2 2 category="Applications"; 3 3 info=" … … 16 16 autonom(module R); analysis of autonomyrelated properties of R (using Ext modules), 17 17 autonom2(module R); analysis of autonomyrelated properties of R (using dimension), 18 18 19 LeftKernel(module R); a left kernel of R, 19 20 RightKernel(module R); a right kernel of R, 20 21 LeftInverse(module R) a left inverse of matrix (module), 21 22 22 smith(module M); a Smith form of a module M. 23 smith(module M); a Smith form of a module M, 24 25 genericity(module M); analysis of the genericity of parameters, 26 27 canonize(list L); Groebnerification for modules in the output of control/autonomy procs. 23 28 24 29 AUXILIARY PROCEDURES: 25 30 declare(string NameOfRing, Variables[,string Parameters, Ordering]); defines the ring, optional parametes are strings of parameters and ordering, 26 view(); Wellformatted output of lists, modules and matri xes31 view(); Wellformatted output of lists, modules and matrices 27 32 28 33 NOTE (EXAMPLES): In order to use examples below, execute the commands … … 774 779 775 780 proc genericity(matrix M) 776 "USAGE: genericity(M), M is a m atrix781 "USAGE: genericity(M), M is a module/matrix 777 782 RETURN: list of strings with expressions, which have been assumed to be nonzero in the process of computing the Groebner basis 778 NOTE: effective with the liftstd procedure for modules with parameters 783 NOTE: we strongly recommend to switch on the redSB and redTail options; 784 the procedure is effective with the lift procedure for modules with parameters 785 EXAMPLE: example genericity; shows an example 779 786 " 780 787 { 781 788 // M is a matrix over a ring with params and vars; 782 789 ideal I = ideal(M); // a list of entries 783 I = simplify(I,2); // throw 0's away784 // decompose every coeff 785 int i; int cl=1;790 I = simplify(I,2); // delete 0's 791 // decompose every coeff in every poly 792 int i; 786 793 int s = size(I); 787 listNM;794 ideal NM; 788 795 poly p; 796 number num; 797 int cl=1; 798 intvec ZeroVec; ZeroVec[nvars(basering)] = 0; 799 intvec W; 789 800 for (i=1; i<=s; i++) 790 801 { 791 p = I[i]; 802 // remove contents and add them as polys 803 p = I[i]; 804 W = leadexp(p); 805 if (W == ZeroVec) // i.e. just a coef 806 { 807 num = denominator(leadcoef(p)); // from poly.lib 808 p = p*num; 809 NM[cl] = p; 810 cl++; 811 NM[cl] = num; 812 cl++; 813 p = p  lead(p); // for the next cycle 814 } 815 if ( p!= 0) 816 { 817 num = content(p); 818 p = p/num; 819 NM[cl] = denominator(num); 820 cl++; 821 NM[cl] = numerator(num); 822 cl++; 823 } 792 824 while( p != 0) 793 825 { 794 NM[cl] = leadcoef(p); 826 NM[cl] = leadcoef(p); // should be all integer 795 827 cl++; 796 828 p = p  lead(p); 797 }; 798 }; 829 } 830 } 831 NM = simplify(NM,4); // delete identical 799 832 string newvars = parstr(basering); 800 833 def save = basering; … … 803 836 // get params as variables 804 837 // create a list of nonmonomials 805 ideal L;838 ideal @L; 806 839 ideal F; 807 list NM = imap(save,NM); 840 ideal NM = imap(save,NM); 841 NM = simplify(NM,8); //delete multiples 808 842 poly p,q; 809 843 cl = 1; … … 824 858 if (q!=0) 825 859 { 826 L[cl] = F[j];860 @L[cl] = F[j]; 827 861 cl++; 828 862 } … … 831 865 } 832 866 // return the result [in stringformat] 833 L = simplify(L,2+4); // skip zeroes and double entries867 @L = simplify(@L,2+4); // skip zeroes and double entries 834 868 list SL; 835 for (j=1; j<=size( L);j++)836 { 837 SL[j] = string( L[j]);869 for (j=1; j<=size(@L);j++) 870 { 871 SL[j] = string(@L[j]); 838 872 } 839 873 setring save; … … 849 883 [0, m2*L2^2*Dt^2m2*L2*g, 0, m2*L2*Dt^2]; 850 884 module R = transpose(RR); 851 m atrix T;852 m odule SR = liftstd(R,T);885 module SR = std(R); 886 matrix T = lift(R,SR); 853 887 genericity(T); 854 // The result isdifferent when computing reduced bases:888 // The result might be different when computing reduced bases: 855 889 matrix T2; 856 890 option(redSB); 857 891 option(redTail); 858 module SR2 = liftstd(R,T2); 892 module SR2 = std(R); 893 T2 = lift(R,SR2); 859 894 genericity(T2); 860 895 } … … 862 897 proc canonize(list L) 863 898 "USAGE: canonize(L), L a list 864 ASSUME: L is the output of control/autonomy proc s899 ASSUME: L is the output of control/autonomy procedures 865 900 RETURN: a canonized list, where modules are canonized by computing 866 their reduced minimal Groebner bases 901 their reduced minimal (= unique in the given ordering) Groebner bases 902 EXAMPLE: example canonize; shows an example 867 903 " 868 904 {
Note: See TracChangeset
for help on using the changeset viewer.