Changeset 331fd0 in git for libpolys/polys/ext_fields/algext.cc
- Timestamp:
- Sep 27, 2011, 2:50:46 PM (12 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 6f6b9df159c9c68abfcfe9d2008f357892b7191a
- Parents:
- 7f10dcde67f050fefbfeef12ce8d0108889fb6cc
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-09-27 14:50:46+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:37+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/ext_fields/algext.cc
r7f10dc r331fd0 45 45 46 46 #include "ext_fields/algext.h" 47 #define TRANSEXT_PRIVATES 1 48 #include "ext_fields/transext.h" 47 49 48 50 #ifdef LDEBUG … … 562 564 } 563 565 566 number naCopyExt(number a, const coeffs src, const coeffs dst) 567 { 568 fraction fa=(fraction)a; 569 return (number)p_Copy(NUM(fa),src->extRing); 570 } 571 564 572 /* assumes that src = Q, dst = Z/p(a) */ 565 573 number naMap0P(number a, const coeffs src, const coeffs dst) … … 603 611 int h = 0; /* the height of the extension tower given by dst */ 604 612 coeffs bDst = nCoeff_bottom(dst, h); /* the bottom field in the tower dst */ 613 coeffs bSrc = nCoeff_bottom(src, h); /* the bottom field in the tower src */ 605 614 606 615 /* for the time being, we only provide maps if h = 1 and if b is Q or 607 616 some field Z/pZ: */ 617 if (h==0) 618 { 619 if (nCoeff_is_Q(src) && nCoeff_is_Q(bDst)) 620 return naMap00; /// Q --> Q(a) 621 if (nCoeff_is_Zp(src) && nCoeff_is_Q(bDst)) 622 return naMapP0; /// Z/p --> Q(a) 623 if (nCoeff_is_Q(src) && nCoeff_is_Zp(bDst)) 624 return naMap0P; /// Q --> Z/p(a) 625 if (nCoeff_is_Zp(src) && nCoeff_is_Zp(bDst)) 626 { 627 if (src->ch == dst->ch) return naMapPP; /// Z/p --> Z/p(a) 628 else return naMapUP; /// Z/u --> Z/p(a) 629 } 630 } 608 631 if (h != 1) return NULL; 609 632 if ((!nCoeff_is_Zp(bDst)) && (!nCoeff_is_Q(bDst))) return NULL; 610 611 if (nCoeff_is_Q(src) && nCoeff_is_Q(bDst))612 return naMap00; /// Q --> Q(a)613 614 if (nCoeff_is_Zp(src) && nCoeff_is_Q(bDst))615 return naMapP0; /// Z/p --> Q(a)616 617 if (nCoeff_is_Q(src) && nCoeff_is_Zp(bDst))618 return naMap0P; /// Q --> Z/p(a)619 620 if (nCoeff_is_Zp(src) && nCoeff_is_Zp(bDst))621 {622 if (src->ch == dst->ch) return naMapPP; /// Z/p --> Z/p(a)623 else return naMapUP; /// Z/u --> Z/p(a)624 }625 626 coeffs bSrc = nCoeff_bottom(src, h); /* the bottom field in the tower src */627 if (h != 1) return NULL;628 633 if ((!nCoeff_is_Zp(bSrc)) && (!nCoeff_is_Q(bSrc))) return NULL; 629 634 … … 632 637 if (strcmp(rRingVar(0, src->extRing), 633 638 rRingVar(0, dst->extRing)) == 0) 634 return naCopyMap; /// Q(a) --> Q(a) 639 { 640 if (src->type==n_algExt) 641 return naCopyMap; /// Q(a) --> Q(a) 642 else 643 return naCopyExt; 644 } 635 645 else 636 return NULL; 646 return NULL; /// Q(b) --> Q(a) 637 647 } 638 648 … … 641 651 if (strcmp(rParameter(src->extRing)[0], 642 652 rParameter(dst->extRing)[0]) == 0) 643 return naCopyMap; /// Z/p(a) --> Z/p(a) 653 { 654 if (src->type==n_algExt) 655 return naCopyMap; /// Z/p(a) --> Z/p(a) 656 else 657 return naCopyExt; 658 } 644 659 else 645 return NULL; 660 return NULL; /// Z/p(b) --> Z/p(a) 646 661 } 647 662
Note: See TracChangeset
for help on using the changeset viewer.