This question is inspired by [this one](https://mathoverflow.net/questions/61615/). In that thread, it's established that there are uncountably many cube-free infinite binary strings (where $x \in 2^{\omega}$ is *cube-free* iff $\forall \sigma \subset x,\ \sigma \sigma \sigma \not \subset x$). Here $\subset$ denotes "substring" which should be distinguished from "initial segment" which I'll denote by $\sqsubset$ if the need arises. 


So let $C \subset 2^{\omega}$ be the subset of Cantor space consisting of all cube-free sequences. It's uncountable, and easily seen to be closed, hence it contains a perfect set.


**Question 1. Is $C$ perfect?**


Let's define: 


$T\_C = \{ \sigma \in 2^{<\omega} : (\exists x \in C)(\sigma \sqsubset x)\}$  

$\ \ \ \ \ = \{ \sigma \in 2^{<\omega} : (\forall n > |\sigma|)( \exists \tau \in 2^n )(\sigma \sqsubset \tau,\ \tau$ cube-free$)\}$  

$T\_P = \{\sigma \in 2^{<\omega} : (\forall \tau \sqsupset \sigma, \tau \in T\_C)(\exists \rho\_1, \rho\_2 \sqsupset \tau$ both in $T\_C)(\rho\_1 \perp \rho\_2)\}$


**Question 2. $T\_C$ is evidently $\Pi ^0 \_1$, but is it in fact recursive?** 


If we let $P$ denote the maximal perfect subset of $C$ obtained by iteratively removing isolated points of $C$ until this procedure stabilizes (taking intersections at limit stages), then $P$ determines a tree which I believe would be the tree $T\_P$ defined above.


**Question 3. What is the complexity of the tree determined by $P$?**


If $T\_P$ is indeed the tree determined by $P$, then the tree determined by $P$ is at worst $\Pi ^0 \_3$, but can we do better?




---


UPDATE: The answers are:


1. Yes
2. Yes
3. Since $C$ is perfect, $P = C$ and so by the answers to 1 and 2, the tree determined by $P$ is just the tree determined by $C$, which is recursive.


I've learnt this after discussing it with Robert Shelton, one of the authors of the paper Gjergji linked to in his response below. In fact, what I've gathered is that there's a function $f$, better than being on the order of $n^2$, such that to determine whether an arbitrary finite string $\sigma$ has a cube-free infinite extension, it suffices to check whether it has one of length $f(|\sigma|)$ (where $|\sigma|$ is the length of $\sigma$). I suppose this would mean furthermore that the tree $T\_C$ is not merely recursive, i.e. $\Delta\_1$, but in fact $\Delta\_0$.



Is the set of cube-free binary sequences perfect?
I found an article of J.D. Currie and R.O. Shelton that answers the first question. ["The set of k-power free words over Σ is empty or perfect"](http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6WDY-48CFJJV-2&_user=10&_coverDate=07%2F31%2F2003&_rdoc=1&_fmt=high&_orig=gateway&_origin=gateway&_sort=d&_docanchor=&view=c&_rerunOrigin=scholar.google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=a0fc8f71bebd6f802462df45997ced52&searchtype=a).


Added:
Note that Currie has a number of papers on power free words, and many of them are on the [arxiv](http://arxiv.org/find/math/1/au:+Currie_J/0/1/0/all/0/1).


