Top
Back: D.2.3.3 pmat
Forward: D.2.3.5 show
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.4 rMacaulay

Procedure from library inout.lib (see inout_lib).

Usage:

rMacaulay(s[,n]); s string, n integer

Return:

A string which should be readable by Singular if s is a string which was produced by Macaulay. If a second argument is present the first n lines of the file are deleted (which is useful if the file was produced e.g. by the putstd command of Macaulay).

Note:

This does not always work with ’cut and paste’ since the character \ is treated differently

Example:

 
LIB "inout.lib";
// Assume there exists a file 'Macid' with the following ideal in
// Macaulay format:"
// x[0]3-101/74x[0]2x[1]+7371x[0]x[1]2-13/83x[1]3-x[0]2x[2] \
//     -4/71x[0]x[1]x[2]
// Read this file into Singular and assign it to the string s1 by:
// string s1 = read("Macid");
// This is equivalent to";
string s1 =
"x[0]3-101/74x[0]2x[1]+7371x[0]x[1]2-13/83x[1]3-x[0]2x[2]-4/71x[0]x[1]x[2]";
rMacaulay(s1);
→ x(0)^3-101/74*x(0)^2*x(1)+7371*x(0)*x(1)^2-13/83*x(1)^3-x(0)^2*x(2)-4/71*\
   x(0)*x(1)*x(2)
// You may wish to assign s1 to a Singular ideal id:
string sid = "ideal id =",rMacaulay(s1),";";
ring r = 0,x(0..3),dp;
execute(sid);
id; "";
→ id[1]=x(0)^3-101/74*x(0)^2*x(1)+7371*x(0)*x(1)^2-13/83*x(1)^3-x(0)^2*x(2)\
   -4/71*x(0)*x(1)*x(2)
→ 
// Now treat a matrix in Macaulay format. Using the execute
// command, this could be assinged to a Singular matrix as above.
string s2 = "
0  0  0  0  0
a3 0  0  0  0
0  b3 0  0  0
0  0  c3 0  0
0  0  0  d3 0
0  0  0  0  e3 ";
rMacaulay(s2);
→ 0, 0, 0, 0, 0,
→ a3,0, 0, 0, 0,
→ 0, b3,0, 0, 0,
→ 0, 0, c3,0, 0,
→ 0, 0, 0, d3,0,
→ 0, 0, 0, 0, e3

Top Back: D.2.3.3 pmat Forward: D.2.3.5 show 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.