splits a frame (e.g. x(1)*y(5)) m1 into m1 and m2 (e.g. m1=x(1) and m2=y(1)) at is the number of the block to split at, starting at 1
| 598 | // splits a frame (e.g. x(1)*y(5)) m1 into m1 and m2 (e.g. m1=x(1) and m2=y(1)) |
| 599 | // at is the number of the block to split at, starting at 1 |
| 600 | void k_SplitFrame(poly &m1, poly &m2, int at, const ring r) |
| 601 | { |
| 602 | assume(at >= 1); |
| 603 | assume(at <= r->N/r->isLPring); |
| 604 | int lV = r->isLPring; |
| 605 | int split = (lV * (at - 1)); |
| 606 | |
| 607 | m2 = p_GetExp_k_n(m1, 1, split, r); |
| 608 | p_SetComp(m2, 0, r); // important, otherwise both m1 and m2 have a component set, this leads to problems later |
| 609 | p_Setm(m2, r); // p_mLPunshift also implicitly calls p_Setm(), but just for the case this changes in future. |
| 610 | p_mLPunshift(m2, r); |
| 611 | |
| 612 | m1 = p_Head0(m1, r); |
| 613 | for(int i = split + 1; i <= r->N; i++) |
| 614 | { |
| 615 | p_SetExp(m1, i, 0, r); |
| 616 | } |
| 617 | p_Setm(m1, r); |
| 618 | |
| 619 | assume(p_FirstVblock(m1,r) <= 1); |
| 620 | assume(p_FirstVblock(m2,r) <= 1); |
| 621 | } |
| 622 | |
| 623 | BOOLEAN _p_mLPNCGenValid(poly p, const ring r) |
| 624 | { |
no test coverage detected