Home Online Manual
Top
Back: tolessvars
Forward: sortandmap
FastBack: ffsolve_lib
FastForward: solve_lib
Up: presolve_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.8.2.10 solvelinearpart

Procedure from library presolve.lib (see presolve_lib).

Usage:
solvelinearpart(id [,n] ); id=ideal/module, n=integer (default: n=0)

Return:
(interreduced) generators of id of degree <=1 in reduced triangular form if n=0 [non-reduced triangular form if n!=0]

Assume:
monomial ordering is a global ordering (p-ordering)

Note:
may be used to solve a system of linear equations, see gauss_row from 'matrix.lib' for a different method

Warning:
the result is very likely to be false for 'real' coefficients, use char 0 instead!

Example:
 
LIB "presolve.lib";
// Solve the system of linear equations:
//         3x +   y +  z -  u = 2
//         3x +  8y + 6z - 7u = 1
//        14x + 10y + 6z - 7u = 0
//         7x +  4y + 3z - 3u = 3
ring r = 0,(x,y,z,u),lp;
ideal i= 3x +   y +  z -  u,
13x +  8y + 6z - 7u,
14x + 10y + 6z - 7u,
7x +  4y + 3z - 3u;
ideal j= 2,1,0,3;
j = matrix(i)-matrix(j);        // difference of 1x4 matrices
// compute reduced triangular form, setting
solvelinearpart(j);             // the RHS equal 0 gives the solutions!
==> _[1]=u-4
==> _[2]=z-4
==> _[3]=y+1
==> _[4]=x-1
solvelinearpart(j,1); "";       // triangular form, not reduced
==> _[1]=u-4
==> _[2]=2z-u-4
==> _[3]=11y+5z-8u+23
==> _[4]=3x+y+z-u-2
==>