ideal

© 2005-2016 John Abbott, Anna M. Bigatti

GNU Free Documentation License, Version 1.2

CoCoALib Documentation Index

Examples

User documentation

The class ideal is for representing values which are ideals of some ring. There are several ways to create an ideal:

NOTE: THIS SYNTAX WILL PROBABLY CHANGE

  • ideal I(r) -- I is the principal ideal generated by r (a RingElem) in the ring owner(r)
  • ideal I(r1, r2) -- RingElems in the same ring
  • ideal I(r1, r2, r3) -- RingElems in the same ring
  • ideal I(r1, r2, r3, r4) -- RingElems in the same ring
  • ideal I(R, gens) -- I is the ideal of R generated by the RingElems of the C++ vector<RingElem> gens, (all in the ring R)
  • ideal I(gens) -- gens must be a non-empty vector<RingElem> all in the same ring; equivalent to I(owner(gens[0]), gens). If gens is empty, throws ERROR.

If you want to make an ideal in R with no generators use this syntax ideal(R, vector<RingElem>() )

Operations

The permitted operations on ideals are: let I and J be two ideals of the same ring

  • I+J -- the sum of two ideals
  • I += J -- equivalent to I = I+J
  • intersection(I, J) -- intersection of two ideals
  • colon(I, J) -- the quotient of two ideals
  • RingOf(I) -- the ring in which the ideal I resides
  • NumGens(I) -- length of list of generators of I
  • gens(I) -- a C++ vector<> of RingElems which generate I
  • TidyGens(I) -- see also GBasis (below); returns a C++ vector of RingElems which generate I (this generating set is in some way "reduced", and will never contain a zero element)

    It is also possible to store some information about an ideal: (NOTE: making an incorrect assertion using these functions may lead to a program crash, wrong result, or poorer run-time performance)
     I->UserAssertsIsPrime()       to specify that I is known to be prime
     I->UserAssertsIsNotPrime()    to specify that I is known not to be prime
     I->UserAssertsIsMaximal()     to specify that I is known to be maximal
     I->UserAssertsIsNotMaximal()  to specify that I is known not to be maximal
    

Queries

  • IsZero(I) -- true iff the ideal is a zero ideal
  • IsOne(I) -- true iff the ideal is the whole ring
  • IsMaximal(I) -- true iff the ideal is maximal in its ring (i.e. iff the quotient ring is a field)
  • IsPrime(I) -- true iff the ideal is prime (i.e. quotient ring has no zero-divisors)

  • IsContained(I, J) -- true iff the ideal I is a subset of the ideal J
  • I == J -- true iff the ideals are equal (their generating sets may be different)
  • IsElem(r, I) -- true iff r is an element of the ideal I

Additional operations for ideals in a SparsePolyRing

  • GBasis(I) -- returns a Groebner basis for I using the term-ordering of the polynomial ring in which I resides; the basis is stored inside I, so will not be recomputed in the future); equivalent to TidyGens.
  • ReducedGBasis(I) -- like GBasis but guarantees that the result is a reduced basis.
  • GBasisTimeout(I, Tmax) -- like GBasis but will throw an InterruptedByTimeout object if computation takes longer than Tmax seconds.

  • LT(I) -- returns a monomial ideal, being the leading term ideal (also known as initial ideal)
  • LF(I) -- returns a homogeneous ideal, being the leading form ideal (forms of maximum degree)
  • IdealOfGBasis(I) -- returns a new ideal generated by the GBasis of I
  • IdealOfMinGens(I) -- returns a new ideal equal to I but generated by a minimal set of gens (only for homogeneous ideals)
  • PrimaryDecomposition(I) -- returns vector<ideal> only for square free monomial ideals or zero-dim ideals(for now)
  • QuotientBasis(I) -- basis of the quotient as a K-vector space
  • QuotientBasisSorted(I) -- same as QuotientBasis(I) but elements are sorted into increasing order.
  • AlexanderDual(I) -- only for square free monomial ideals (for now)

  • homog(h, I) -- returns the homogenized ideal, with homogenization with the indeterminate h, a RingElem, indeterminate in RingOf(I)
  • MinPowerInIdeal(f, I) -- returns the smallest integer n such that power(f,n) is in I; returns -1 if polynomial f is not in the radical.

Additional queries

  • IsZeroDim(I) -- true iff I is zero-dimensional (and not the whole ring!)
  • IsHomog(I) -- true iff I is homogeneous
  • AreGensMonomial(I) -- true iff given gens(I) are all monomial. NB 0 is NOT monomial
  • AreGensSqFreeMonomial(I) -- true iff given gens(I) are all monomial and radical. NB 0 is NOT monomial
  • HasGBasis(I) -- true iff GBasis(I) has been computed and is stored

  • IsInRadical(f, I) -- true iff RingElem f is in the radical of I (generally faster than IsElem(f, radical(I)))

Using Frobby library

  • PrimaryDecompositionFrobby(I)
  • AlexanderDual(I), AlexanderDual(I, pp)
  • and more...

Writing new types of ideal

Anyone who writes a new type of ring class will have to consider writing a new type of ideal class to go with that ring. The ideal class must be derived from the abstract class IdealBase (and to be instantiable must offer implementations of all pure virtual functions). Be especially careful to update the data members IamPrime and IamMaximal in the non-const member functions (add, intersection, and colon).

Some guidance may be obtained from looking at the FieldIdealImpl class which implements ideals in a field (there are only two: ideal(0) and ideal(1)). See the file FieldIdeal.

Maintainer documentation for the classes ideal, IdealBase

The class ideal is little more than a reference counting smart pointer class pointing to an object of type derived from IdealBase. This approach allows many different implementations of ideals to be manipulated in a convenient and transparent manner using a common abstract interface.

The abstract class IdealBase specifies the interface which every concrete ideal class must offer. It is more complicated than one might expect partly because we want to allow the advanced user to tell the ideal whether it has certain important properties (which might be computationally expensive to determine automatically).

RadicalMembership: The implementation is straightforward (once you have learned the theory about "Rabinowitch's Trick"). We can be slightly clever when the ideal is homogeneous. (Can be terribly slow: see in test-RadicalMembership1.C for some commented out cases.)

Bugs, Shortcomings and other ideas

The maintainer documentation is still quite incomplete.

Shouldn't ideals be created by a function called NewIdeal???

I am not at all sure about the wisdom of having implemented IamPrime and IamMaximal. It seems to be terribly easy to forget to update these values when ideal values are modified (e.g. in IdealBase::add). It has also led to rather more complication that I would have liked. BUT I don't see how to allow the user to state that an ideal is maximal/prime without incurring such complication.

Functions to examine the bool3 flags could be handy for heuristic short-cuts when an ideal is already known to have a certain property.

Is it worth having a constructor for principal ideals generated by a number rather than a RingElem? e.g. NewIdeal(R,5) or NewIdeal(R,BigInt(5)).

Several member functions have names not in accordance with the coding conventions.

Main changes

2022

  • March (v0.99800): added IsInRadical, MinPowerInIdeal; reorganized

2017

  • February (v0.99543): added examples ex-ideal1 and ex-ideal2

2016

  • November (v0.99543):
    • added HasGBasis
    • renamed AreGensSquareFreeMonomial into AreGensSqFreeMonomial -