Difference between locally testable and it's boolean closure A language $L$ is called

i) locally testable in the strict sense iff there exists $P, S, I \subseteq X^*$ such that
$$
 w \in L \mbox{ iff } pref^k(w) \in P, suffix^k(w) \in S, infix^k(w) \subseteq I.
$$
for some $k &gt; 0$.

ii) locally testable iff for $u,v \in X^*$ the following holds:

If $pref^k(u) = pref^k(v), suffix^k(u) = suffix^k(v), infix^k(u) = infix^k(v)$ then
$$
 u \in L \mbox{ iff } v \in L.
$$
Meaning if two words coincide in there infixes, suffix and prefix up to a specific length $k &gt; 0$ then they are either both in the language or they are both not.

iii) the class of locally testable events with order is defined as the smallest class of languages containing the locally testable languages and closed under the boolean operations union, intersection and complementation. (this could be equivalently defined with locally testable in the strict sense instead of locally testable)

In what sense do they differ, that iii) contains more languages is clear, for example the language which contains for example $00$ followed by $01$ is in iii) but not in ii) or i) I think (because it involves some kind of order in requiring that $01$ need to follow $00$), but in what sense are ii) and i) different, what is a languge contained in ii) but no in i)?
In ii), you say that $u$ being in $L$ can be deduced only by knowing $pref^k(u)$, $inf^k(u)$ and $suff^k(u)$.

This mean that $L$ can be given by a set $E\subseteq (X^*\times 2^{X^*}\times X^*)$, namely $u\in L$ iff $(pref^k(u),inf^k(u),suff^k(u))\in E$.

The reason why condition i) is stronger is because it forces $E$ to be of the form $P\times 2^I\times S$.

An example of a language which is in ii) but not i) is therefore given by $E=\{ (a,X^*,a),  a\in X\}$. This means that $L$ is just the language of words whose last letter is equal to the first. $L$ is locally testable with $k=1$ for condition ii), but it is not for any $k$ for condition i).