Closure of trajectory for parallel flow on torus with frequency relations (Arnold's mechanics book) Consider the constant flow
$$\dot{\theta}_1 = \omega_1$$
$$\vdots$$
$$\dot{\theta}_n = \omega_n$$
on the $n$-torus $\mathbb{T}^n$. In the first problem on p. 290 of Arnold's Mathematical Methods of Classical Mechanics (2nd ed.), it is stated that if there exist $0 \leq r \leq n$ linearly independent$^{1}$  vectors $k_i \in \mathbb{Z}^n$ such that 
$$\forall 1 \leq i\leq r: k_i\cdot \omega = 0$$
(dot products), then it follows that the closure of any trajectory is diffeomorphic to $\mathbb{T}^{n-r}$. Why is this true? I've been trying to think of how to prove this, but I'm still not sure how to get started. 
I understand the special case of such a flow on $\mathbb{T}^2$ where the existence of one such vector $k_1\in \mathbb{Z}^2$ implies that all trajectories are periodic, hence diffeomorphic to $\mathbb{T}^1 = S^1$.


*

*Note to future self: for the case of $\mathbb{Z}^n$, linear independence over $\mathbb{Z}$ implies linear independence over $\mathbb{R}$. Here is a proof sketch. Assume that the $r$ vectors are linearly independent over the integers. Taking integer linear combinations of vectors and swapping, you can put the matrix of vectors in row echelon form (not reduced row echelon form!) and this matrix has an $r\times r$ submatrix with nonzero determinant. Thus the same is true of the original matrix of vectors, and hence these vectors are linearly independent over the reals. 

 A: Based on my personal understanding of the wording, the precise statement you make is not quite correct, whereas Arnold's formulation is correct (but subject to misreading). The statement should be:
If there exist $r$ linearly independent vectors $k_i \in \mathbb{Z}^n$ (with $1 \le i \le r$) such that $k_i \cdot \omega = 0$, then (the closure of) any orbit of the linear flow $\dot{\theta} = \omega$ on the torus $\mathbb{T}^n = \mathbb{R}^n / \mathbb{Z}^n$ lies in a $(n-r)$-dimensional subtorus. Moreover, if $R$ is the maximal number of such vectors $k_i$'s, then the closure of any orbit is a $(n-R)$-dimensional subtorus.
I sketch here a possible proof of this statement.
Proof of the first sentence:
1) Work on the universal cover $\mathbb{R}^n$ and suppose without lost of generality that the (lift of the) orbit goes through the origin. Suppose that there are $r$ linearly independent vectors $k_i \in \mathbb{R}^n$ such that $k_i \cdot \omega = 0$. Then the (closure of the) orbit lies in the $(n-r)$-dimensional vector subspace orthogonal $\Pi$ to those vectors.
2) Supplement $n-r$ vectors $t_{r+1}, \dots, t_n$ such that $\{k_1, \dots, k_r, t_{r+1}, \dots, t_n\}$ form a $\mathbb{R}$-basis of $\mathbb{R}^n$; notice that without lost of generality, we can take $t_j \in \mathbb{Q}^n$.
3) Suppose now that $k_1, \dots, k_r \in \mathbb{Z}^n \subset \mathbb{Q}^n$. The Gram-Schmidt algorithm allows us to get a new $\mathbb{R}$-basis $\{k_1, \dots, k_r, t'_{r+1}, \dots, t'_n\}$ such that each $t'_j \in \Pi \cap \mathbb{Q}^n$.
4) For $r+1 \le j \le n$, there are nonzero integers $n_j$ such that each $t''_j := n_j t'_j \in \mathbb{Z}^n$. The set $\{t''_{r+1}, \dots, t''_n\} \subset \Pi \cap \mathbb{Z}^{n}$ is a $\mathbb{R}$-basis of $\Pi$.
5) If $p : \mathbb{R}^n \to \mathbb{T}^n$ denotes the quotient map, then $T:= p(\Pi)$ is a $(n-r)$-dimensional torus. This is precisely because if we move in the direction of $t''_j$ (with $j \ge r+1$) over a distance $\|t''_j\|$, then we come back to the same place.
6) $T$ certainly contains the orbit we started with. Since $T$ is closed, it contains the closure of that orbit too. This proves the first sentence.
Proof of the second sentence:
1) Take $r=R$ above. Then every nonzero vector $v \in \Pi \cap \mathbb{Z}^n$ satisfies $v \cdot \omega \neq 0$, hence also any nonzero $v \in \Pi \cap \mathbb{Q}^n$.
2) Since the vectors $t''_j$ form a $\mathbb{Q}$-basis of $\Pi \cap \mathbb{Q}^n$, it follows that the frequencies $\omega''_j := \omega \cdot t''_j$ for $R+1 \le j \le n$ are rationally independent.
3) Expressing everything with respect to the basis given by the $t''_j$, we can think that we are considering the orbit in $\mathbb{T}^{n-R} = \mathbb{R}^{n-R}/\mathbb{Z}^{n-R}$ of the flow given by the vector $\omega'' = (\omega''_1, \dots, \omega''_{n-R})$.
4) The problem is reduced to prove that since the frequencies $\omega''_j$ are rationally independent, then any orbit of $\dot{\theta''} = \omega''$ is dense in $\mathbb{T}^{n-R}$, which is a standard problem in number theory which could be proved by induction for instance.
