The setting
In the study of Banach space geometry and superreflexivity via Markov type, finite words over a four-letter alphabet act on the real line by order automorphisms and produce integer-valued cocycles. Extracting quantitative separation from these cocycles depends on evaluating them on the integer lattice and on a translate of determined by the image of under the corresponding order automorphism. The relevant invariant of a word is its reduced form, obtained by canceling adjacent inverse letters, and the counts of positive and negative letters that remain.
Reduced words
Let be the four-letter alphabet of signed generator letters, where each letter pairs a generator index in with a sign: the positive letters are and , and the negative letters are and .✦ The inverse letter of a signed generator letter is the letter with the same generator index and the opposite sign, so that and are inverses of each other, as are and .✦
A word over is a finite sequence of signed generator letters, with length ; the empty word is denoted by . For a word over and a natural number , the prefix is the word consisting of the first letters of , or all of when . The positive letter count is the number of positive letters in ✦, and the negative letter count is the number of negative letters in .✦
For a signed generator letter and a word over , the stack cancellation step is the word defined by (1): (1)✦ For words and over , the word reduction scan processes the letters of from left to right starting from the stack , defined recursively by (2): (2)✦ for every letter and every word over . The reduced form of a word over is the reversal of , obtained by running the word reduction scan on from the empty stack and reversing the resulting word.✦
The word cocycle
Assign each signed generator letter its rank , , , , its endpoints and , and its periodic arc . Let be the -periodic order automorphism lifted from the two-slope order isomorphism fixing and . For each positive letter , define its letter order automorphism by , and for each negative letter set . Define the letter cocycle by for positive letters and for negative letters . The word order automorphism of a word over is the order automorphism of defined recursively by (3): (3)✦ for every letter and every word over .
The word cocycle of a word over is the integer-valued function defined recursively by (4): (4)✦ for every letter , every word over , and every .
The claim
Lemma 4.2. For every word over , every natural number , and every integer , the word cocycle of the prefix takes the two constant integer values (5)✦ Moreover, for every word over , the difference between these two levels equals the length of the reduced form of : (6)✦
What is checked
In the Lean library, Lemma 4.2 states (5) and (6) over finite words in the signed generator alphabet , using the stack cancellation step, the word reduction scan, the reduced form with its positive and negative letter counts, the word order automorphism, and the word cocycle.