# CoCoA:Gin, Gin5

From ApCoCoAWiki

## Gin, Gin5

generic initial ideal

### Description

These functions return the [probabilistic] gin (generic initial ideal)

of the ideal I. It is obtained by computing the leading term ideal of

g(I), where g is a random change of coordinates.

While `Gin` uses integer coefficients in [-Range, Range], with

default value [-100, 100] (repeated until 4 consecutive random changes

of coordinates give the same result), the function `Gin5` uses
the special TwinFloat implementation in CoCoAServer to allow a much
wider range of coefficients (and then performs the computation only twice).
The latter is faster, but needs you to start the server!

#### Example

Use R ::= Q[x,y,z], DegRevLex; Gin(Ideal(y^2-xz, x^2z-yz^2)); Ideal(x^2, xy^2, y^4) ------------------------------- Use R ::= Q[x,y,z], Lex; Gin(Ideal(y^2-xz, x^2z-yz^2), 10); -- coeffs in [-10, 10] Ideal(x^2, xy^2, xyz^2, xz^4, y^6) ------------------------------- Use R ::= Q[x,y,z], DegRevLex; -- default range [10000, 10000] Gin5(Ideal(y^2-xz, x^2z-yz^2)); Ideal(x^2, xy^2, y^4) ------------------------------- Use R ::= Q[x,y,z], Lex; Gin5(Ideal(y^2-xz, x^2z-yz^2), 2); -- coeffs in [-2,2], dangerously small: -- ==> answer might be wrong

### Syntax

Gin(I: IDEAL): IDEAL Gin(I: IDEAL, Range: INT): IDEAL Gin5(I: IDEAL): IDEAL Gin5(I: IDEAL, Range: INT): IDEAL

<type>ideal</type> <type>cocoaserver</type>