Changeset abde36 in git
- Timestamp:
- May 9, 2014, 11:10:57 AM (10 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
- Children:
- ec04e88299a064f7c80c463bcdcf43e9db165e5b
- Parents:
- b17fa5fc9eda365fb2095c16d40c59a2c1e4db02
- git-author:
- Martin Lee <martinlee84@web.de>2014-05-09 11:10:57+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2014-05-12 14:35:03+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facAlgFunc.cc
rb17fa5 rabde36 360 360 CanonicalForm & R) 361 361 { 362 CFList Returnlist, Bstar= Astar;363 CanonicalForm s, g, ra, rb, oldR, h, denra, denrb= 1;362 CFList Returnlist, Bstar= Astar; 363 CanonicalForm s, g, ra, rb, oldR, h, denra, denrb= 1; 364 364 Variable alpha; 365 365 CFList tmp; … … 516 516 if (!isRat && getCharacteristic() == 0) 517 517 On (SW_RATIONAL); 518 numinv= QuasiInverse (Rstar, alg_LC (f, algExtLevel), Rstar.mvar());518 numinv= QuasiInverse (Rstar, alg_LC (f, algExtLevel), Rstar.mvar()); 519 519 520 520 f *= numinv; … … 533 533 } 534 534 535 sqrf_norm (f, Rstar, vminpoly, s, g, R);535 sqrf_norm (f, Rstar, vminpoly, s, g, R); 536 536 537 537 Variable X; 538 if (hasFirstAlgVar (R,X))538 if (hasFirstAlgVar (R, X)) 539 539 { 540 540 // factorize R over alg.extension with X 541 Factorlist = factorize( R, X);541 Factorlist= factorize (R, X); 542 542 } 543 543 else 544 544 { 545 545 // factor R over k 546 Factorlist = factorize (R);547 } 548 549 if ( !Factorlist.getFirst().factor().inCoeffDomain())550 Factorlist.insert (CFFactor(1,1));551 if ( 552 { // irreduzibel (first entry is a constant)546 Factorlist = factorize (R); 547 } 548 549 if (!Factorlist.getFirst().factor().inCoeffDomain()) 550 Factorlist.insert (CFFactor (1, 1)); 551 if (Factorlist.length() == 2 && Factorlist.getLast().exp()== 1) 552 { 553 553 f= backSubst (f, backSubsts, Astar); 554 554 f *= bCommonDen (f); … … 590 590 // we are not interested in a 591 591 // constant (over K_r, which can be a polynomial!) 592 if (degree(g, f.mvar())>0){ L.append(CFFactor(g,1)); } 592 if (degree (g, f.mvar()) > 0) 593 L.append (CFFactor (g, 1)); 593 594 } 594 595 CFFList LL; 595 if (getCharacteristic() >0)596 if (getCharacteristic() > 0) //do I really need this part? 596 597 { 597 598 CFFListIterator i=L; … … 905 906 if (vf.level() <= as.getLast().level()) 906 907 { 907 // ||( (as.length()==1) && (degree(f,vf)==3) && (degree(as.getFirst()==2)) )908 908 if (!isRat && getCharacteristic() == 0) 909 909 Off (SW_RATIONAL); … … 911 911 } 912 912 913 // 2) List of variables: 914 // 2a) Setup list of those polys in AS having degree(AS[i], AS[i].mvar()) > 1 915 // 2b) Setup variableordering 913 // 2) Setup list of those polys in AS having degree > 1 916 914 CFList Astar; 917 915 Variable x; 918 916 CanonicalForm elem; 919 917 Varlist ord, uord; 920 for ( int ii=1; ii< level(vf) ; ii++ ) { uord.append(Variable(ii)); } 921 922 for ( i=as; i.hasItem(); i++ ){ 918 for (int ii= 1; ii < level (vf); ii++) 919 uord.append (Variable (ii)); 920 921 for (i= as; i.hasItem(); i++) 922 { 923 923 elem= i.getItem(); 924 924 x= elem.mvar(); 925 if ( degree(elem,x) > 1){ // otherwise it's not an extension 926 Astar.append(elem); 927 ord.append(x); 928 } 929 } 930 uord= Difference(uord,ord); 925 if (degree (elem, x) > 1) // otherwise it's not an extension 926 { 927 Astar.append (elem); 928 ord.append (x); 929 } 930 } 931 uord= Difference (uord, ord); 931 932 932 933 // 3) second trivial cases: we already proved irr. of f over no extensions 933 if ( Astar.length() == 0 ){ 934 if (Astar.length() == 0) 935 { 934 936 if (!isRat && getCharacteristic() == 0) 935 937 Off (SW_RATIONAL); 936 return CFFList(CFFactor(f,1)); 937 } 938 939 // 4) Try to obtain a partial factorization using prop2 and prop3 940 // Use with caution! We have to proof these propositions first! 941 // Not yet implemented 942 943 // 5) Look if elements in uord actually occure in any of the minimal 938 return CFFList (CFFactor (f, 1)); 939 } 940 941 // 4) Look if elements in uord actually occur in any of the minimal 944 942 // polynomials. If no element of uord occures in any of the minimal 945 // polynomials, we don't have transzendentals.943 // polynomials the field is an alg. number field not an alg. function field 946 944 Varlist newuord= varsInAs (uord, Astar); 947 945 948 946 CFFList Factorlist; 949 Varlist gcdord= Union (ord,newuord);950 gcdord.append (f.mvar());947 Varlist gcdord= Union (ord, newuord); 948 gcdord.append (f.mvar()); 951 949 bool isFunctionField= (newuord.length() > 0); 952 950 953 // T his is for now. we need alg_sqrfree implemented!951 // TODO alg_sqrfree? 954 952 CanonicalForm Fgcd= 0; 955 953 if (isFunctionField) … … 969 967 } 970 968 971 Fgcd= pp(Fgcd); Ggcd= pp(Ggcd); 969 Fgcd= pp (Fgcd); 970 Ggcd= pp (Ggcd); 972 971 if (!isRat && getCharacteristic() == 0) 973 972 Off (SW_RATIONAL); … … 975 974 } 976 975 977 if ( getCharacteristic() > 0 ) 978 { 979 // First look for extension! 976 if (getCharacteristic() > 0) 977 { 980 978 IntList degreelist; 981 979 Variable vminpoly; 982 for (i=Astar; i.hasItem(); i++){degreelist.append(degree(i.getItem()));} 983 int extdeg= getDegOfExt (degreelist, degree(f)); 984 985 // Now the real stuff! 986 if ( newuord.length() == 0 ) // no transzendentals 987 { 988 if ( extdeg > 1 ){ 980 for (i= Astar; i.hasItem(); i++) 981 degreelist.append (degree (i.getItem())); 982 983 int extdeg= getDegOfExt (degreelist, degree (f)); 984 985 if (newuord.length() == 0) // no parameters 986 { 987 if (extdeg > 1) 988 { 989 989 CanonicalForm MIPO= generateMipo (extdeg); 990 990 vminpoly= rootOf(MIPO); … … 993 993 return Factorlist; 994 994 } 995 else if (isInseparable(Astar) || derivZero) // Look if extensions are separable996 { 997 Factorlist= SteelTrager (f, Astar);995 else if (isInseparable(Astar) || derivZero) // inseparable case 996 { 997 Factorlist= SteelTrager (f, Astar); 998 998 return Factorlist; 999 999 } 1000 else{ // we are on the save side: Use trager 1001 if (extdeg > 1 ){ 1000 else // separable case 1001 { 1002 if (extdeg > 1) 1003 { 1002 1004 CanonicalForm MIPO=generateMipo (extdeg); 1003 vminpoly= rootOf (MIPO);1004 } 1005 Factorlist= Trager (f, Astar, vminpoly, as, isFunctionField);1005 vminpoly= rootOf (MIPO); 1006 } 1007 Factorlist= Trager (f, Astar, vminpoly, as, isFunctionField); 1006 1008 return Factorlist; 1007 1009 } 1008 1010 } 1009 else{ // char=0 apply trager directly 1011 else // char 0 1012 { 1010 1013 Variable vminpoly; 1011 Factorlist= Trager (f, Astar, vminpoly, as, isFunctionField);1014 Factorlist= Trager (f, Astar, vminpoly, as, isFunctionField); 1012 1015 if (!isRat && getCharacteristic() == 0) 1013 1016 Off (SW_RATIONAL); … … 1031 1034 Factors.removeFirst(); 1032 1035 1033 if ( as.length() == 0)1036 if (as.length() == 0) 1034 1037 { 1035 1038 if (!isRat && getCharacteristic() == 0) … … 1044 1047 } 1045 1048 1046 for ( CFFListIterator i=Factors; i.hasItem(); i++)1049 for (CFFListIterator i=Factors; i.hasItem(); i++) 1047 1050 { 1048 1051 if (i.getItem().factor().level() > as.getLast().level()) 1049 1052 { 1050 output=facAlgFunc2(i.getItem().factor(), as); 1051 for ( CFFListIterator j=output; j.hasItem(); j++) 1052 Output = append(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 1053 output= facAlgFunc2 (i.getItem().factor(), as); 1054 for (CFFListIterator j= output; j.hasItem(); j++) 1055 Output= append (Output, CFFactor (j.getItem().factor(), 1056 j.getItem().exp()*i.getItem().exp())); 1053 1057 } 1054 1058 }
Note: See TracChangeset
for help on using the changeset viewer.