I am reading "Lambda Calculi with Types" by Henk Barendregt.
According to the definitions, $\lambda\underline{\omega}$ (types depending on types) allows us to assign types to type constructors such as $(\lambda \alpha : *. \alpha \to \alpha) : * \to *$ or $(\lambda \alpha : *. \lambda x : * \to *. x\alpha) : * \to (* \to *) \to * $. But the definitions are unclear whether something like this would be also be a valid term:
$(\lambda k: \square. k \to k) : \square \to \square$, where $\square$ is the sort of all kinds (a "kind constructor")
What about even higher order abstractions? The book doesn't even define "the sort of all sorts", but if I would define $\square_2$ such that $\square \to \square : \square_2$, $(\square \to \square) \to \square : \square_2$, etc, I could type even higher order abstractions such as:
$(\lambda k_2: \square_2. k_2 \to k_2) : \square_2 \to \square_2$
Is this valid in $\lambda\underline{\omega}$? (The $\omega$ in the name is what makes me believe it is) If not, is there an extension of $\lambda\underline{\omega}$ in which this is?