# uniform -- whether all elements of a list are the same class

## Synopsis

• Usage:
uniform L
• Inputs:
• Outputs:
• , whether all elements of L are of the same class

## Description

 i1 : uniform {2, 5, 0} o1 = true i2 : uniform {2*0.5, 5*0.5, 0/2} o2 = false

The second list is not uniform because 0/2 is represented as a rational number (of class QQ), while 2*0.5 and 5*0.5 are represented as real numbers (of class RR).

 i3 : uniform {hi, "hello"} o3 = false i4 : uniform {"hi", "hello"} o4 = true i5 : R = QQ[x,y,z]; i6 : uniform {x^2*y*z, 5*y, 12/7} o6 = false i7 : uniform {x^2*y*z, 5*y, (12/7)_R} o7 = true i8 : S = ZZ[t]; i9 : uniform {monomialIdeal(x), monomialIdeal(t)} o9 = true i10 : uniform {monomialIdeal(t), ideal(t)} o10 = false i11 : uniform {S/monomialIdeal(t), S/ideal(t)} o11 = true

## See also

• all -- whether all elements satisfy a specified condition
• any -- whether any elements satisfy a specified condition
• instance -- whether something has a certain type
• same -- whether everything in a list is the same
• select -- select from a list, hash table, or string
• lists and sequences -- a detailed overview of lists and sequences in Macaulay2

## For the programmer

The object uniform is .