m.ensure(x.sum() == n * (n + 1) / 2, "the sum of the elements of x is not correct")