length w
The length of a permutation is the size of its inversion set.
i1 : p = permutation {3,1,2,5,4} o1 = Permutation{3, 1, 2, 5, 4} o1 : Permutation
i2 : length p o2 = 3
The source of this document is in Permutations/Documentation/mainDocs.m2:493:0.