I need help proving the Church-Rosser theorem for combinatory logic. I will break down my post in three parts: part I will establish the notation required to state the Church-Rosser theorem as well as my attempted proof (the notation is essentially the same as introduced in Chapter 2 of Hindley & Seldin's Lambda-Calculus and Combinators, an Introduction (Cambridge University Press 2008)), part II will state the theorem, and part III will describe an attempt I've made to prove the theorem and where I've become stuck.
Part I: Background
A Combinatory Logic (CL) consists of
$C,V,T, T_1, T_2, \dots$ - sets (atomic constants, variables, terms, terms of length $\leq n$, respectively) such that
a. $T = \bigcup_{n=1}^\infty T_n$.
b. $T_1 = C\cup V$.
c. $C\cap V=\emptyset$.
d. $C,V$ are countable.
e. $V$ is infinite.
$I, K, S \in C$ - constants
$\varphi:T\times T\rightarrow (T\setminus T_1)$ - an injective function that satisfies: $$ \forall n\in\{1, 2, \dots\}\big(T_{n+1} = T_n \cup \{\varphi(s,t)\ :|\ s,t\in T_n\}\big) $$
Whenever $s, t\in T$ we write $(st)$ for $\varphi(s,t)$. Parentheses may be omitted if the original expression can be unambiguously reconstructed under the assumption of left associativity. For instance, if $s,t,u\in T$, then $stu = ((st)u) = \varphi(\varphi(s,t),u)$.
We define the length of a term, $\ell:T\rightarrow\{1,2,\dots\}$, as follows: $$ \ell(t) := \min_{n\in\{1,2,\dots\}} t\in T_n $$
For every term $t$ we define the set $t_w\subseteq T$ recursively as follows. $$ t_w := \begin{cases} \emptyset &, t \in T_1\\ \{\hat ab\ :|\ \hat a\in a_w\}\cup \{a\hat b\ :|\ \hat b\in b_w\}\cup \Gamma_{a,b}&, t = ab \end{cases} $$ where $$ \Gamma_{a,b} := \begin{cases} \{b\} &,a=I\\ \{c\} &,\exists c\in T(a=Kc)\\ \{cb(db)\} &,\exists c,d\in T(a=Scd)\\ \emptyset &,\text{otherwise} \end{cases} $$
For every $n\in\{0,1,2,\dots\}$ we define the relation $\rhd_{w^n}\subseteq T\times T$ recursively as follows. For every $s,t\in T$, $$ s\rhd_{w^n}t \iff \begin{cases} \{t\} &, n = 0\\ \bigcup_{s\in t_{w^{n-1}}}s_w &, n > 0 \end{cases} $$ We define the relation $\rhd_w\subseteq T\times T$ as follows. For every $s,t\in T$, $$ s\rhd_w t \iff t\in \bigcup_{n=0}^\infty t_{w^n} $$
A binary relation $R\subseteq T\times T$ is said to be confluent iff the following property holds. $$ \forall s,t,u\in T\Big((s,t),(s,u)\in R\implies \exists z\in T\big((t,z),(u,z)\in R\big)\Big) $$
Part II: The Church-Rosser theorem
I wish to prove the Church-Rosser theorem:
$\rhd_w$ is confluent.
Part III: My attempted proof
Firstly I reformulated the theorem as follows.
For every $i\in\{0,1,\dots\}$ and for every $j\in \{0,1,\dots\}$ we have: $$ \forall s, t, u\in T,\ \big(s\rhd_{w^i} t\wedge s\rhd_{w^j} u\big)\implies \exists z\in T(t\rhd_w z\wedge u\rhd_w z) $$
Then I considered proving the reformulated theorem by induction on $i$ and on $j$. But here's the rub: suppose I manage to show that the statement holds in the following cases:
a. $i=0$,
b. $i=1, j\in\{0,1\}$,
and now I wish to show that the statement holds for $i=1$ and for $j=j^*+1\in\{2,3,\dots\}$, under the assumption that it holds for $i=1$ and for all $j\in\{1, 2, \dots, j^*\}$. My proof would proceed as follows.
Let $a\in T$ be such that $s\rhd_{w^{j^*}}a\rhd_{w^1}u$. Then, by assumption, there is some $b\in T$ such that $a\rhd_w b$ and $t\rhd_w b$. If it is the case that $a\rhd_{w^k} b$, for some $k\in\{1,2,\dots,j^*\}$, then, by assumption, there is some $z\in T$ such that $b\rhd_w z$ and $u\rhd_w z$, so that $t\rhd_w b\rhd_w z$ and $u\rhd_w z$, as desired.
But what if it is not the case that $a\rhd_{w^k} b$ for some $k\in\{1,2,\dots,j^*\}$? This is where I got stuck.