Changeset 879c5ff in git for Singular/LIB/dmod.lib
- Timestamp:
- May 8, 2009, 6:02:23 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a5075a7d32535b7c43e10e87abb25bf2c6bc89f2
- Parents:
- a2e297661483537b015225dc3602180d4df607c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/dmod.lib
ra2e2976 r879c5ff 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="$Id: dmod.lib,v 1.4 2 2009-04-15 11:11:34 seelischExp $";2 version="$Id: dmod.lib,v 1.43 2009-05-08 16:02:23 levandov Exp $"; 3 3 category="Noncommutative"; 4 4 info=" … … 48 48 @* annfsOT, annfsLOT, annfs2, annfsRB etc. 49 49 @* - all the relevant data to F^s (LD, LD0, bs, PS) are computed by operatorBM 50 @* - operator PS can be computed via operatorModulo or operatorBM 50 51 @* 51 52 @* - annihilator of F^{s1} for a number s1 is computed with annfspecial … … 65 66 bernsteinBM(F[,eng]); compute global Bernstein polynomial for a polynomial F (algorithm of Briancon-Maisonobe) 66 67 operatorBM(F[,eng]); compute Ann F^s, Ann F^s0, BS and PS for a polynomial F (algorithm of Briancon-Maisonobe) 68 operatorModulo(F, I, b); compute PS via the modulo approach 67 69 annfsParamBM(F[,eng]); compute the generic Ann F^s (algorithm by Briancon and Maisonobe) and exceptional parametric constellations for a polynomial F with parametric coefficients 68 70 annfsBMI(F[,eng]); compute Ann F^s and Bernstein ideal for a polynomial F=f1*..*fP (multivariate algorithm of Briancon-Maisonobe) … … 96 98 97 99 LIB "matrix.lib"; // for submat 98 LIB "nctools.lib"; 100 LIB "nctools.lib"; // makeModElimRing etc. 99 101 LIB "elim.lib"; // for nselect 100 102 LIB "qhmoduli.lib"; // for Max … … 1913 1915 // poly F = x^3+y^3+z^2*w; 1914 1916 1915 // TODO: 1 has to appear in the 1nd column of transp. matrix1916 // this does not happen automatically1917 // for this, do special modulo with emphasis on the 1comp (c,<)1918 // of the transp matrix, there must appear 1 in the GB1919 // then use lift to get the expression...1920 1917 // need: (c,<) ordering for such comp's 1921 1918 1922 /*1923 1919 proc operatorModulo(poly F, ideal I, poly b) 1924 1920 "USAGE: operatorModulo(f,I,b); f a poly, I an ideal, b a poly 1925 1921 RETURN: poly 1926 PURPOSE: compute the B-operator from the polynomial f, ideal I = Ann f^s and Bernstein-Sato 1927 polynomial b using modulo i.e. kernel of module homomorphism 1928 NOTE: The computations take place in the ring, similar to the one returned by Sannfs procedure. 1929 @* If printlevel=1, progress debug messages will be printed, 1930 @* if printlevel>=2, all the debug messages will be printed. 1922 PURPOSE: compute the B-operator from the polynomial f, 1923 @* ideal I = Ann f^s and Bernstein-Sato polynomial b 1924 @* using modulo i.e. kernel of module homomorphism 1925 NOTE: The computations take place in the ring, similar to the one 1926 @* returned by Sannfs procedure. 1927 @* Note, that operator is not completely reduced wrt Ann f^{s+1}. 1928 @* If printlevel=1, progress debug messages will be printed, 1929 @* if printlevel>=2, all the debug messages will be printed. 1931 1930 EXAMPLE: example operatorModulo; shows examples 1932 1931 " 1933 1932 { 1934 // with hom_kernel; 1935 matrix AA[1][2] = F,-b; 1936 // matrix M = matrix(subst(I,s,s+1)*freemodule(2)); // ann f^{s+1} 1933 int ppl = printlevel-voice+2; 1934 def save = basering; 1935 // change the ordering on the currRing 1936 def mering = makeModElimRing(save); 1937 setring mering; 1938 poly b = imap(save, b); 1939 poly F = imap(save, F); 1940 ideal I = imap(save, I); 1937 1941 matrix N = matrix(I); // ann f^s 1938 1942 // matrix K = hom_kernel(AA,M,N); 1939 matrix K = modulo(AA,N); 1940 K = transpose(K); 1941 print(K); 1942 ideal J; 1943 int i; 1944 poly t; number n; 1945 for(i=1; i<=nrows(K); i++) 1946 { 1947 if (K[i,2]!=0) 1948 { 1949 if ( leadmonom(K[i,2]) == 1) 1943 // option(noreturnSB)? 1944 /// matrix K = modulo(AA,N); // too slow: do it with slim! 1945 module M = b,-F; 1946 dbprint(ppl,"starting modulo computation"); 1947 module K = moduloSlim(M,N); 1948 dbprint(ppl,"finished modulo computation"); 1949 // K = transpose(K); 1950 // matrix M[3][s+2] = F,-b,I[1..s], 1,0:(s+1),0,1,0:(s); 1951 // module GM = slimgb(M); 1952 // module GMT = transpose(G); 1953 // GMT = GMT[2],GMT[3]; // modulo matrix 1954 // module K = GMT[2]; 1955 // GMT = transpose(GMT); 1956 // K = transpose(K); 1957 // matrix K = GMT; 1958 ////////////////////////////////////////////////// 1959 // now select those elts whose 0's entry is nonzero 1960 // if there is constant => done 1961 // if not => compute GB and get it 1962 module L; 1963 ideal J; 1964 int i; 1965 poly t; number n; 1966 for(i=1; i<=ncols(K); i++) 1967 { 1968 if (K[1,i]!=0) 1950 1969 { 1951 t = K[i,1]; 1952 n = leadcoef(K[i,2]); 1953 t = t/n; 1954 // J = J, K[i][2]; 1955 break; 1970 L = L,K[i]; 1971 if ( leadmonom(K[1,i]) == 1) 1972 { 1973 t = K[2,i]; 1974 n = leadcoef(K[1,i]); 1975 t = t/n; 1976 break; 1977 // return(t); 1978 } 1956 1979 } 1957 1980 } 1958 } 1959 ideal J = groebner(subst(I,s,s+1)); // for NF 1960 t = NF(t,J); 1961 "candidate:"; t; 1962 J = subst(J,s,s-1); 1963 // test: 1964 if ( NF(t*F-b,J) !=0) 1965 { 1966 "Problem: PS does not work on F"; 1967 } 1968 return(t); 1981 if (n!=0) 1982 { 1983 // constant found 1984 setring save; poly t = imap(mering,t); kill mering; 1985 return(t); 1986 } 1987 dbprint(ppl,"no explicit constant. Start one more GB computation"); 1988 // else: compute GB and do the same 1989 L = L[2..ncols(L)]; 1990 K = slimgb(L); 1991 dbprint(ppl,"finished GB computation"); 1992 for(i=1; i<=ncols(K); i++) 1993 { 1994 if (K[1,i]!=0) 1995 { 1996 if ( leadmonom(K[1,i]) == 1) 1997 { 1998 t = K[2,i]; 1999 n = leadcoef(K[1,i]); 2000 t = t/n; 2001 // break; 2002 setring save; poly t = imap(mering,t); kill mering; 2003 return(t); 2004 } 2005 } 2006 } 2007 2008 // we are here if no constant found 2009 "ERROR: must never get here!"; 2010 return(0); 2011 // for(i=1; i<=nrows(K); i++) 2012 // { 2013 // if (K[i,2]!=0) 2014 // { 2015 // if ( leadmonom(K[i,2]) == 1) 2016 // { 2017 // t = K[i,1]; 2018 // n = leadcoef(K[i,2]); 2019 // t = t/n; 2020 // // J = J, K[i][2]; 2021 // break; 2022 // } 2023 // } 2024 // } 2025 // ideal J = groebner(subst(I,s,s+1)); // for NF 2026 // t = NF(t,J); 2027 // "candidate:"; t; 2028 // J = subst(J,s,s-1); 2029 // // test: 2030 // if ( NF(t*F-b,J) !=0) 2031 // { 2032 // "Problem: PS does not work on F"; 2033 // } 2034 // return(t); 1969 2035 } 1970 2036 example 1971 2037 { 1972 2038 "EXAMPLE:"; echo = 2; 1973 // ring r = 0,(x,y,z),Dp; 1974 // poly F = x^3+y^3+z^3; 1975 LIB "dmod.lib"; option(prot); option(mem); 2039 // LIB "dmod.lib"; option(prot); option(mem); 1976 2040 ring r = 0,(x,y),Dp; 1977 // poly F = x^3+y^3+x*y^2; 1978 poly F = x^4 + y^4 + x*y^4; 2041 poly F = x^3+y^3+x*y^3; 1979 2042 def A = Sannfs(F); // here we get LD = ann f^s 1980 2043 setring A; 1981 2044 poly F = imap(r,F); 1982 2045 def B = annfs0(LD,F); // to obtain BS polynomial 1983 list BS = imap(B,BS); 1984 poly b = fl2poly(BS,"s");2046 list BS = imap(B,BS); poly bs = fl2poly(BS,"s"); 2047 poly PS = operatorModulo(F,LD,bs); 1985 2048 LD = groebner(LD); 1986 poly PS = operatorModulo(F,LD,b); 1987 PS; // the operator, s.t. PS*F^{s+1} = bs*F^s mod LD 1988 reduce(PS*F-bs,LD); // check the property of PS 1989 } 1990 */ 1991 1992 2049 PS = NF(PS,subst(LD,s,s+1));; // reduction modulo Ann s^{s+1} 2050 size(PS); 2051 lead(PS); 2052 reduce(PS*F-bs,LD); // check the defining property of PS 2053 } 1993 2054 1994 2055 proc annfsParamBM (poly F, list #)
Note: See TracChangeset
for help on using the changeset viewer.