# isPrimary -- determine whether a submodule is primary

## Synopsis

• Usage:
isPrimary Q
isPrimary(Q, P)
isPrimary(M, Q)
• Inputs:
• Q, an ideal or , the submodule or ideal to be checked for being primary
• P, an ideal, the radical of Q
• M, , the ambient module
• Optional inputs:
• Outputs:
• , true if Q is primary, false otherwise

## Description

Checks to see if a given submodule Q of a module M is primary, i.e. whether or not M/Q has exactly one associated prime (which is equivalent for finitely generated modules over Noetherian rings). If the input is a single ideal, then the ambient module is taken to be the ring (i.e. the free module of rank 1), and does not need to be specified.

 i1 : Q = ZZ/101[x,y,z] o1 = Q o1 : PolynomialRing i2 : isPrimary ideal(y^6) o2 = true i3 : isPrimary(ideal(y^6), ideal(y)) o3 = true i4 : isPrimary ideal(x^4, y^7) o4 = true i5 : isPrimary ideal(x*y, y^2) o5 = false