For two given ω-terms α and β, the word problem for ω-terms over a variety V asks whether α = β in all monoids in V. We show that the word problem for ω-terms over each level of the Trotter-Weil Hierarchy is decidable. More precisely, for every fixed variety in the Trotter-Weil Hierarchy, our approach yields an algorithm in nondeterministic logarithmic space (NL). In addition, we provide deterministic polynomial time algorithms which are more efficient than straightforward translations of the NL-algorithms. As an application of our results, we show that separability by the so-called corners of the Trotter-Weil Hierarchy is witnessed by ω-terms (this property is also known as ω-reducibility). In particular, the separation problem for the corners of the Trotter-Weil Hierarchy is decidable. * The final publication is available at Springer via http://dx.doi.org/10.1007/s00224-017-9763-z. † The first author was supported by the German Research Foundation (DFG) under grants DI 435/5-2 and KU 2716/1-1.in a finite monoid is easy: one can simply substitute each variable by all elements of the monoid. For each substitution, this yields a monoid element on the left hand side and one on the right hand side. The equation holds if and only if they are always equal. Often, the question whether an equation holds is not only interesting for a single finite monoid but for a (possibly infinite) class of such monoids. For example, one may ask whether all monoids in a certain class are aperiodic. This is trivially decidable if the class is finite. But what if it is infinite? If the class forms a variety (of finite monoids, sometimes also referred to as a pseudo-variety), i. e. a class of finite monoids closed under (possibly empty) direct products, submonoids and homomorphic images, then this problem is called the variety's word problem for ω-terms. Usually, the study of a variety's word problem for ω-terms also gives more insight into the variety's structure, which is interesting in its own right. McCammond showed that the word problem for ω-terms of the variety A of aperiodic finite monoids is decidable [17]. The problem was shown to be decidable in linear time for J, the class of J -trivial finite monoids, by Almeida [3] and for R, the class of R-trivial monoids, by Almeida and Zeitoun [4]. For the variety DA, Moura adapted and expanded those ideas to show decidability in time O((nk) 5 ) where n is the length of the input ω-terms and k is the maximal nesting depth of the ω-power (which can be linear in n) [18]. Remember that DA is the class of finite monoids whose regular D-classes form aperiodic semigroups. This variety received a lot of attention due to its many different characterizations; see e.g. [5,26]. Most notably is its connection to two-variable first-order logic [27]. This logic is a natural restriction of first-order logic over finite words, which in turn is the logic characterization of A.In this paper, we consider the word problem for ω-terms over the varieties in the Trotter-Weil Hierarchy. It was introduced by Trot...