I was reading "A Concise Course in Algebraic Topology" by J.P.May (page 52) and found the proof of the following theorem incomprehensible:

Let $p:E\rightarrow B$ be a map and let $\mathcal{O} $ be a numerable open cover of B. Then $p$ is a fibration if and only if $p:p^{-1} (U) \rightarrow U$ is a fibration for every $U\in \mathcal O$.

The only if part is clear. To check the if part, May tries to patch together path lifting functions of $p|p^{-1} (U)$ to construct a path lifting function. To do this, he defines some complicated functions, which I could not easily understand.

He starts by choosing maps $\lambda_U : B\rightarrow I$ such that $\lambda _U ^{-1} (0,1]=U$. For each finite ordered subset $T=\{U_1 , \cdots , U_n \}$ of $\mathcal O$, he defines $c(T)=n$, and $\lambda _T : B^I \rightarrow I$ as $$\lambda_T (\beta ) = \inf \{(\lambda_{U_i} \circ \beta ) (t) : (i-1)/n \le t \le i/n , 1\le i\le n \}$$ and let $W_T = \lambda _T ^{-1} (0,1]$. I understand that $\{W_T\}$ is an open cover of $B^I$, and that $\{W_T : c(T)<n\}$ is locally finite for each $n$. Then he defines $\lambda _T : B^I \rightarrow I $ as $$\lambda_T (B) = \max \{ 0,\lambda_T (B) - n \sum _{c(S)<c(T)} \lambda_S (\beta )\}, V_T = \{\beta : \gamma_T (\beta)>0\} \subset W_T.$$ I understand that $\{V_T\}$ is a locally finite open cover of $B^I$.

Now, he chooses path lifting functions $$s_U : p^{-1} (U) \times _p U^I \rightarrow p^{-1} (U) ^I $$ for each $U\in \mathcal O $, and he constructs a global path lifting function by the following steps.

First, choose a total order on the sets of finite ordered subsets of $\mathcal O $. For a given $T=\{U_1, \cdots , U_n \}$, he defines $s_T (e,\beta [u,v]):[u,v]\rightarrow E $ for each $\beta \in V_T$, $u,v\in [0,1]$, $e\in p^{-1} (\beta (u))$ canonically, by lifting $\beta[u,v]$ by letting its starting point be $e$. ($\beta [u,v]$ is defined as the restriction of $\beta$ to $[u,v]$.)

Now here is the part where I don't understand at all. For each $e,\beta$ such that $\beta(0)=e$, he defines $s(e,\beta)$ to be the concatenation of the parts $s_{T_j} (e_{j-1} , \beta [u_{j-1} ,u_j ])$, $1\le j \le q$ where the $T_i $ run through the set of all $T$ such that $\beta \in V_T$, and $$u_0 =0, \ u_j = \sum _{i=1} ^j \gamma _{T_i } (\beta ).$$

He asserts that $s$ is well defined and continuous, thus a path lifting function for $p$.

I could not understand at all why the definition of $s$ makes sense. For this to make sense, I believe that $u_q$ should be $1$, which I cannot get at all. For me, this definition seems completely random. Can someone please kindly explain why this definition makes sense?