ApCoCoA-1:MatlabCoCoAIdeal
Introduction
The CoCoAIdeal class represents an ideal of polynomials over a given polynomial ring (See <a href="MatlabCoCoAPoly.html">Poly class</a>).
Constructor
The constructor for a CoCoAIdeal can have two arguments:
- Generators: Array of polynomials
- Optional: 1/0 : 1 = Compute Groebner-Basis of Ideal
If no input is given the default ideal (1) over Q[x[1]] is returned Generators should be a 1xn CoCoAPoly array. A nx1 array is transposed.
Attributes
basering | A CoCoARing | |
gens | an array of polynomials | |
gBasis | the Groebner-Basis of an Ideal | |
numBasisElements | The number of basis elements. If gBasis is not yet computed the number of generators is stored. |
Methods
Method | Operator | Description | |
computeGBasis | computes the GBasis of the given Ideal and returns a new ideal with the same set of generators and the computed GBasis. | ||
computeLT | computes the leading term of the ideal. Returns a CoCoAPoly. | ||
display | Is used by Matlab to print a CoCoAIdeal to the command window. E.g. when a command is not terminated by a ';'. | ||
eq | == | Compares two ideals. Returns 1 if all generators are equal. | |
ge | >= | Compares two ideals according to their leading term. Returns 1 if first ideal is greater equal the second ideal. | |
get | Returns the attributes of an ideal. Syntax: get(idealVar, 'Keyword'), where idealVar is a CoCoAIdeal and 'Keyword' is one of the keywords: |
||
gt | > | Compares two ideals according to their leading term. Returns 1 if first ideal is greater than the second ideal. | |
isContained | Returns 1 if the first ideal is contained in the second ideal. | ||
isElem | Returns 1 if the polynomial (2. argument) is in the ideal (1. argument) | ||
le | <= | Compares two ideals according to their leading term. Returns 1 if first ideal is less equal the second ideal. | |
lt | < | Compares two ideals according to their leading term. Returns 1 if first ideal is less than the second ideal. | |
ne | ~= | returns NOT eq. |
Examples
A collection of examples is provided in the file TestCoCoAIdeal.m. This file defines the function TestCoCoAIdeal which will run and display many examples. A few common examples are presented below.
- Ideal generated by two polynomials.
<matlab> p1 = CoCoAPoly('x^2-1'); p2 = CoCoAPoly('y+x'); myIdeal = CoCoAIdeal([p1 p2]); </matlab>