Our teacher gave us the following statement and we were wondering what is wrong with it.

Consider an array A of n distinct numbers. Since there are n! permutations of A, we cannot check for each permutation whether it is sorted, in a total time which is polynomial in n. Therefore, sorting A cannot be in P.

obviously this is wrong. my friend thought it should just be: therefore sorting A cannot be in NP. is this correct or are we thinking about it to easily?