Singular Manual: rMacaulay

| #### D.2.5.4 rMacaulay Procedure from library `inout.lib` (see inout_lib). Usage: rMacaulay(s[,n]); s string, n integer Return: A string denoting a file which should be readable by Singular and it should be produced by Macaulay Classic. 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 assigned 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

User manual for Singular version 4.4.1, 2025, generated by texi2html.