-- -*- M2-comint -*- hash: 11308206304772488807

i1 : p = permutation {3,5,1,2,4}

o1 = Permutation{3, 5, 1, 2, 4}

o1 : Permutation

i2 : q = permutation {4,5,1,2,3}

o2 = Permutation{4, 5, 1, 2, 3}

o2 : Permutation

i3 : strongBruhatOrder(p, q)

o3 = true

i4 : p = permutation {1,3,2}

o4 = Permutation{1, 3, 2}

o4 : Permutation

i5 : q = permutation {3,1,2}

o5 = Permutation{3, 1, 2}

o5 : Permutation

i6 : weakBruhatOrder(p, q)

o6 = true

i7 : weakBruhatOrder(p, q, Side=>"left")

o7 = false

i8 : P = symmetricGroupPoset(4, strongBruhatOrder)

o8 = P

o8 : Poset

i9 : Q = symmetricGroupPoset(4, weakBruhatOrder)

o9 = Q

o9 : Poset

i10 : rankPoly = rankGeneratingFunction Q

       6     5     4     3     2
o10 = q  + 3q  + 5q  + 6q  + 5q  + 3q + 1

o10 : ZZ[q]

i11 : coeffs = apply(flatten entries (coefficients rankPoly)#1, k -> sub(k, ZZ))

o11 = {1, 3, 5, 6, 5, 3, 1}

o11 : List

i12 : d = (degree rankPoly)#0

o12 = 6

i13 : all(apply(#coeffs // 2, i -> coeffs#i == coeffs#(d-i)))

o13 = true

i14 : isSperner P

o14 = true

i15 : 
