Top
Back: D.2.3.1 allprint
Forward: D.2.3.3 pmat
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.2.3 inout_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.2.3.2 lprint

Procedure from library inout.lib (see inout_lib).

Usage:

lprint(id[,n]); id poly/ideal/vector/module/matrix, n integer

Return:

string of id in a format fitting into lines of size n, such that no monomial is destroyed, i.e. the new line starts with + or -; (default: n = pagewidth).

Note:

id is printed columnwise, each column separated by a blank line; hence lprint(transpose(id)); displays a matrix id in a format which can be used as input.

Example:

 
LIB "inout.lib";
ring r= 0,(x,y,z),ds;
poly f=((x+y)*(x-y)*(x+z)*(y+z)^2);
lprint(f,40);
→   x3y2-xy4+2x3yz+x2y2z-2xy3z-y4z+x3z2
→ +2x2yz2-xy2z2-2y3z2+x2z3-y2z3
module m = [f*(x-y)],[0,f*(x-y)];
string s=lprint(m); s;"";
→   x4y2-x3y3-x2y4+xy5+2x4yz-x3y2z-3x2y3z+xy4z+y5z+x4z2+x3yz2-3x2y2z2-xy3z2
→ +2y4z2+x3z3-x2yz3-xy2z3+y3z3,
→   0,
→ 
→   0,
→   x4y2-x3y3-x2y4+xy5+2x4yz-x3y2z-3x2y3z+xy4z+y5z+x4z2+x3yz2-3x2y2z2-xy3z2
→ +2y4z2+x3z3-x2yz3-xy2z3+y3z3
→ 
execute("matrix M[2][2]="+s+";");      //use the string s as input
module m1 = transpose(M);	          //should be the same as m
print(m-m1);
→ 0,0,
→ 0,0 

Top Back: D.2.3.1 allprint Forward: D.2.3.3 pmat FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.2.3 inout_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.