ApCoCoA-1:MatlabCoCoAModule

From ApCoCoAWiki

Introduction

The CoCoAModule class represents a module of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).

Constructor

The constructor for a CoCoAModule takes an array of polynomials. If no input is given the default module (1) over Q[x[1]] is returned Generators should be a MxN CoCoAPoly array.

Attributes

basering A CoCoARing
gens an array of polynomials
gBasis the Groebner-Basis of a Module (Currently computation is not implemented)
numBasisElements The number of basis elements. If gBasis is not yet computed the number of generators is stored.
numComponents The number of components = size(Basis,2)

Methods

MethodDescription
display Is used by Matlab to print a CoCoAModule to the command window. E.g. when a command is not terminated by a ';'.
get Returns the attributes of a module. Syntax:

get(moduleVar, 'Keyword'), where moduleVar is a CoCoAModule and 'Keyword' is one of the keywords:
'BaseRing': Returns the ring over which the polynomials in the generator list are defined.
'Gens': returns the generator array of CoCoAPoly's
'GBasis': returns the GBasis of the Module if it has been computed. Otherwise [] is returned.
'NumElements': Returns the number of basis elements. If gBasis is not yet computed the number of generators is returned.
'NumComponents': Returns the number of components = size(Gens,2)
'String': Returns the polynomial as a string.

'Latex' will return a string using Latex syntax.

Examples

A collection of examples is provided in the file TestCoCoAModule.m. This file defines the function TestCoCoAModule which will run and display many examples. A few common examples are presented below.

  • Module generated by four polynomials.

<matlab> p1 = CoCoAPoly('x^2-1'); p2 = CoCoAPoly('y+x'); p3 = CoCoAPoly('x^2y'); p4 = CoCoAPoly('y'); myModule = CoCoAModule([p1 p2 ; p3 p4]); </matlab>