Changeset bc3e5a in git
- Timestamp:
- Sep 22, 2017, 12:46:54 PM (7 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 06f6f87f253cbeb1fece75e020f77e15e61f1330
- Parents:
- 0df229bac1ef9979a85245a23e9616eec85c07af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
r0df229 rbc3e5a 2828 2828 /*}*/ 2829 2829 2830 proc lpSubstitute(poly f, list s1, list s2 ) {2830 proc lpSubstitute(poly f, list s1, list s2, ideal G) { 2831 2831 poly fs; 2832 2832 for (int i = 1; i <= size(f); i++) { … … 2837 2837 int subindex = indexof(s1, varindex); 2838 2838 if (subindex > 0) { 2839 s2[subindex] = lpNF(s2[subindex],G); 2839 2840 fis = lpMult(fis, s2[subindex]); 2840 2841 } else { 2841 fis = lpMult(fis, iv2lp(varindex)); 2842 } 2842 fis = lpMult(fis, lpNF(iv2lp(varindex),G)); 2843 } 2844 fis = lpNF(fis,G); 2843 2845 } 2844 2846 fs = fs + fis; 2845 2847 } 2848 fs = lpNF(fs, G); 2846 2849 return (fs); 2847 2850 } … … 2852 2855 setring R; 2853 2856 2857 ideal G = x(1)*y(2); // optional, can be 0 2858 2854 2859 poly f = 3*x(1)*x(2)+y(1)*x(2); 2855 2860 list s1 = x(1), y(1); 2856 2861 list s2 = y(1)*z(2)*z(3), x(1); 2857 2862 2858 int minDegBound = calcSubstDegBound (f,s1,s2);2863 int minDegBound = calcSubstDegBounds(f,s1,s2); 2859 2864 setring r; 2860 2865 def R1 = makeLetterplaceRing(minDegBound); 2861 2866 setring R1; 2862 2867 2863 lpSubstitute(imap(R,f), imap(R,s1), imap(R,s2) );2868 lpSubstitute(imap(R,f), imap(R,s1), imap(R,s2), imap(R,G)); 2864 2869 } 2865 2870 example { … … 2885 2890 list s2 = imap(R,s2); 2886 2891 for (int i = 1; i <= size(L); i++) { 2887 lpSubstitute(L[i], s1, s2 );2892 lpSubstitute(L[i], s1, s2, 0); 2888 2893 } 2889 2894 }
Note: See TracChangeset
for help on using the changeset viewer.