# isHomogeneous -- whether something is homogeneous (graded)

## Synopsis

• Usage:
isHomogeneous x
• Inputs:
• Outputs:
• , whether x is homogeneous.

## Description

 ```i1 : isHomogeneous(ZZ) o1 = true``` ```i2 : isHomogeneous(ZZ[x,y]) o2 = true``` ```i3 : isHomogeneous(ZZ[x,y]/(x^3-x^2*y+3*y^3)) o3 = true``` ```i4 : isHomogeneous(ZZ[x,y]/(x^3-y-3)) o4 = false```

Quotients of multigraded rings are homogeneous, if the ideal is homogeneous.

 `i5 : R = QQ[a,b,c,Degrees=>{{1,1},{1,0},{0,1}}];` ```i6 : I = ideal(a-b*c); o6 : Ideal of R``` ```i7 : isHomogeneous I o7 = true``` ```i8 : isHomogeneous(R/I) o8 = true``` ```i9 : isHomogeneous(R/(a-b)) o9 = false```

Polynomial rings over polynomial rings are multigraded.

 ```i10 : A = QQ[a] o10 = A o10 : PolynomialRing``` ```i11 : B = A[x] o11 = B o11 : PolynomialRing``` ```i12 : degree x o12 = {1, 0} o12 : List``` ```i13 : degree a_B o13 = {0, 1} o13 : List``` ```i14 : isHomogeneous B o14 = true```

A matrix is homogeneous if each entry is homogeneous of such a degree that the matrix has a well-defined degree.

 `i15 : S = QQ[a,b];` ```i16 : F = S^{-1,2} 2 o16 = S o16 : S-module, free, degrees {1, -2}``` ```i17 : isHomogeneous F o17 = true``` ```i18 : G = S^{1,2} 2 o18 = S o18 : S-module, free, degrees {-1, -2}``` ```i19 : phi = random(G,F) o19 = {-1} | 8a2+ab+3b2 0 | {-2} | 7a3+8a2b+3ab2+3b3 7 | 2 2 o19 : Matrix S <--- S``` ```i20 : isHomogeneous phi o20 = true``` ```i21 : degree phi o21 = {0} o21 : List```

Modules are homogeneous if their generator and relation matrices are homogeneous.

 ```i22 : M = coker phi o22 = cokernel {-1} | 8a2+ab+3b2 0 | {-2} | 7a3+8a2b+3ab2+3b3 7 | 2 o22 : S-module, quotient of S``` ```i23 : isHomogeneous(a*M) o23 = true``` ```i24 : isHomogeneous((a+1)*M) o24 = false```

Note that no implicit simplification is done. Consider the following cautionary example.

 ```i25 : R = QQ[x] o25 = R o25 : PolynomialRing``` ```i26 : isHomogeneous ideal(x+x^2, x^2) o26 = false```

For developers: isHomogeneous also has a method for EngineRings.

## Caveat

No computation on the generators and relations is performed. For example, if inhomogeneous generators of a homogeneous ideal are given, then the return value is false.

## Ways to use isHomogeneous :

• isHomogeneous(ChainComplex)
• isHomogeneous(ChainComplexMap)
• isHomogeneous(EngineRing)
• isHomogeneous(Ideal)
• isHomogeneous(Matrix)
• isHomogeneous(Module)
• isHomogeneous(Ring)
• isHomogeneous(RingElement)
• isHomogeneous(RingMap)
• isHomogeneous(Vector)
• isHomogeneous(Number) (missing documentation)