next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: uniform

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

Synopsis

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