Top
Back: module
Forward: module expressions
FastBack: matrix
FastForward: number
Up: module
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.12.1 module declarations

Syntax:
module name = list_of_vector_expressions ;
module name = module_expression ;

Purpose:
defines a module.

Default:
[0]

Example:
 
  ring r=0,(x,y,z),(c,dp);
  vector s1 = [x2,y3,z];
  vector s2 = [xy,1,0];
  vector s3 = [0,x2-y2,z];
  poly   f  = xyz;
  module m = s1, s2-s1,f*(s3-s1);
  m;
==> m[1]=[x2,y3,z]
==> m[2]=[-x2+xy,-y3+1,-z]
==> m[3]=[-x3yz,-xy4z+x3yz-xy3z]
  // show m in matrix format (columns generate m)
  print(m);
==> x2,-x2+xy,-x3yz,          
==> y3,-y3+1, -xy4z+x3yz-xy3z,
==> z, -z,    0               


Top Back: module Forward: module expressions FastBack: matrix FastForward: number Up: module Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4-0-3, 2016, generated by texi2html.