Changeset bc3e5a in git


Ignore:
Timestamp:
Sep 22, 2017, 12:46:54 PM (7 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
06f6f87f253cbeb1fece75e020f77e15e61f1330
Parents:
0df229bac1ef9979a85245a23e9616eec85c07af
Message:
Add optional ideal to lpSubstitute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpadim.lib

    r0df229 rbc3e5a  
    28282828/*}*/
    28292829
    2830 proc lpSubstitute(poly f, list s1, list s2) {
     2830proc lpSubstitute(poly f, list s1, list s2, ideal G) {
    28312831  poly fs;
    28322832  for (int i = 1; i <= size(f); i++) {
     
    28372837      int subindex = indexof(s1, varindex);
    28382838      if (subindex > 0) {
     2839        s2[subindex] = lpNF(s2[subindex],G);
    28392840        fis = lpMult(fis, s2[subindex]);
    28402841      } else {
    2841         fis = lpMult(fis, iv2lp(varindex));
    2842       }
     2842        fis = lpMult(fis, lpNF(iv2lp(varindex),G));
     2843      }
     2844      fis = lpNF(fis,G);
    28432845    }
    28442846    fs = fs + fis;
    28452847  }
     2848  fs = lpNF(fs, G);
    28462849  return (fs);
    28472850}
     
    28522855  setring R;
    28532856
     2857  ideal G = x(1)*y(2); // optional, can be 0
     2858
    28542859  poly f = 3*x(1)*x(2)+y(1)*x(2);
    28552860  list s1 = x(1), y(1);
    28562861  list s2 = y(1)*z(2)*z(3), x(1);
    28572862
    2858   int minDegBound = calcSubstDegBound(f,s1,s2);
     2863  int minDegBound = calcSubstDegBounds(f,s1,s2);
    28592864  setring r;
    28602865  def R1 = makeLetterplaceRing(minDegBound);
    28612866  setring R1;
    28622867
    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));
    28642869}
    28652870example {
     
    28852890  list s2 = imap(R,s2);
    28862891  for (int i = 1; i <= size(L); i++) {
    2887     lpSubstitute(L[i], s1, s2);
     2892    lpSubstitute(L[i], s1, s2, 0);
    28882893  }
    28892894}
Note: See TracChangeset for help on using the changeset viewer.