Changeset 430001 in git for Singular/LIB/ring.lib
- Timestamp:
- Apr 1, 2005, 1:53:51 PM (19 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- b35957136da5112ff808d992650669df3de03943
- Parents:
- 24beed45804e9298a0238cd2373865d057e1f77e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/ring.lib
r24beed r430001 1 1 //(GMG, last modified 03.11.95) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: ring.lib,v 1.1 8 2004-04-20 15:55:22Singular Exp $";3 version="$Id: ring.lib,v 1.19 2005-04-01 11:53:31 Singular Exp $"; 4 4 category="General purpose"; 5 5 info=" … … 20 20 ringtensor(\"R\",s,t,..);create ring R, tensor product of rings s,t,... 21 21 ringweights(r); intvec of weights of ring variables of ring r 22 preimageLoc(R,phi,Q) computes preimage for non-global orderings 22 23 (parameters in square brackets [] are optional) 23 24 "; … … 786 787 } 787 788 /////////////////////////////////////////////////////////////////////////////// 789 proc preimageLoc(string R_name,string phi_name,string Q_name ) 790 "SYNTAX: @code{preimageLoc (} ring_name, map_name, ideal_name @code{)} 791 all input parameters of type string 792 TYPE: ideal 793 PURPOSE: computes the preimage of an ideal under a given map for non-global 794 orderings. 795 The second argument has to be the name of a map from the basering to 796 the given ring (or the name of an ideal defining such a map), and 797 the ideal has to be an ideal in the given ring. 798 SEE ALSO: preimage 799 KEYWORDS: 800 EXAMPLE: example preimageLoc ; shows an example" 801 { 802 def S=basering; 803 int i; 804 string newRing,minpoly_string; 805 if(attrib(S,"global")!=1) 806 { 807 if(typeof(S)=="qring") 808 { 809 ideal I=ideal(S); 810 newRing="ring S0=("+charstr(S)+"),("+varstr(S)+"),dp;"; 811 minpoly_string=string(minpoly); 812 execute(newRing); 813 execute("minpoly="+minpoly_string+";"); 814 ideal I=imap(S,I); 815 list pr=primdecGTZ(I); 816 newRing="ring SL=("+charstr(S)+"),("+varstr(S)+"),("+ordstr(S)+");"; 817 execute(newRing); 818 execute("minpoly="+minpoly_string+";"); 819 list pr=imap(S0,pr); 820 ideal I0=std(pr[1][1]); 821 for(i=2;i<=size(pr);i++) 822 { 823 I0=intersect(I0,std(pr[i][1])); 824 } 825 setring S0; 826 ideal I0=imap(SL,I0); 827 qring S1=std(I0); 828 } 829 else 830 { 831 def S1=S; 832 } 833 } 834 else 835 { 836 def S1=S; 837 } 838 def @R=`R_name`; 839 setring @R; 840 def @phi=`phi_name`; 841 ideal phiId=ideal(@phi); 842 def Q=`Q_name`; 843 if(attrib(@R,"global")!=1) 844 { 845 if(typeof(@R)=="qring") 846 { 847 ideal J=ideal(@R); 848 newRing="ring R0=("+charstr(@R)+"),("+varstr(@R)+"),dp;"; 849 minpoly_string=string(minpoly); 850 execute(newRing); 851 execute("minpoly="+minpoly_string+";"); 852 ideal J=imap(@R,J); 853 list pr=primdecGTZ(J); 854 newRing="ring RL=("+charstr(@R)+"),("+varstr(@R)+"),("+ordstr(@R)+");"; 855 execute(newRing); 856 execute("minpoly="+minpoly_string+";"); 857 list pr=imap(R0,pr); 858 ideal J0=std(pr[1][1]); 859 for(i=2;i<=size(pr);i++) 860 { 861 J0=intersect(J0,std(pr[i][1])); 862 } 863 setring R0; 864 ideal J0=imap(RL,J0); 865 qring R1=std(J0); 866 ideal Q=imap(@R,Q); 867 map @phi=S1,imap(@R,phiId); 868 } 869 else 870 { 871 def R1=@R; 872 } 873 } 874 else 875 { 876 def R1=@R; 877 } 878 setring S1; 879 ideal preQ=preimage(R1,@phi,Q); 880 setring S; 881 ideal prQ=imap(S1,preQ); 882 return(prQ); 883 } 884 example 885 { "EXAMPLE:"; echo=2; 886 ring S =0,(x,y,z),dp; 887 ring R0=0,(x,y,z),ds; 888 qring R=std(x+x2); 889 map psi=S,x,y,z; 890 ideal null; 891 setring S; 892 ideal nu=preimageLoc("R","psi","null"); 893 nu; 894 } 895
Note: See TracChangeset
for help on using the changeset viewer.