Physlib

PhyslibAlpha.AlgebraicFramework.JordanOrderUnit.ShirshovWords

Alternating-block words in two letters

Infrastructure for formalizing A.I. Shirshov's proof that the free Jordan algebra on two generators is special (`On special J-rings`, Mat. Sbornik 38 (1956), 149–166; English translation by M.R. Bremner and M.V. Kochetov in *Selected Works of A.I. Shirshov*, Birkhäuser, 2009).

Shirshov's proof works with associative words in two letters `a`, `b`, organized by their **height**: `aˢ`/`bʳ` have height 1, `aˢbʳ`/`bʳaˢ` have height 2, and in general a word `a^{n₁}b^{m₁}a^{n₂}b^{m₂}⋯` (or the same starting with `b`) has height equal to its number of maximal same-letter blocks. Rather than recovering this block structure from a raw `List (Fin 2)` by a run-length-encoding pass (needing its own correctness lemmas before anything else can start), a word is represented *directly* as its block list: an alternating list of `(letter, positive multiplicity)` pairs, `BWord`. This is the same data with none of the decoding work, since every construction in Shirshov's paper builds words block-by-block already.

Main definitions

- `BWord` : an associative word in the letters `Fin 2`, as an alternating list of `(letter, positive run length)` pairs. - `BWord.height` : the number of blocks, `Shirshov`'s notion of height. - `BWord.bar` : Shirshov's reduction `α ↦ ᾱ` (his overline, defined just before his equation (5)): peel the trailing block off and move it to the front, merging it into the new front block if the two share a letter. **Not an involution** and **not full word-reversal** — it strictly drops height on words of height `≥ 3`, which is exactly what makes it usable as the base case of a recursion on height in Shirshov's construction of the `*`-map (his equation (5), not yet formalized here).

16 declarations

theorem

Equality of `BWord`s via block sequences (w1.blocks=w2.blocks  ⟹  w1=w2w_1.\text{blocks} = w_2.\text{blocks} \implies w_1 = w_2)

For any two alternating-block words w1w_1 and w2w_2 (represented as the type `BWord`), if their sequences of blocks w1.blocksw_1.\text{blocks} and w2.blocksw_2.\text{blocks} are equal, then the words w1w_1 and w2w_2 are equal. Here, the block list is the alternating sequence of letters and their positive multiplicities that uniquely defines the word.

definition

Shirshov's height of a word ww

For a word ww represented as an alternating sequence of blocks (maximal runs of the same letter), its height is defined as the total number of these blocks. For instance, a word such as an1bm1an2bm2…a^{n_1}b^{m_1}a^{n_2}b^{m_2}\dots has a height equal to the number of terms in the sequence of its constituent blocks.

definition

Total degree of a word ww

For a word ww represented as a sequence of alternating blocks (li,mi)(l_i, m_i) (where each lil_i is a letter and mim_i is its positive multiplicity), the degree of ww is the sum of the multiplicities of all its blocks, ∑mi\sum m_i. This value represents the total length of the word as a string of letters.

definition

Single-block word dmd^m

Given a letter d∈{0,1}d \in \{0, 1\} and a positive natural number mm, the function constructs a word consisting of a single block of mm copies of the letter dd. This results in a word of height 1, represented by the block list [(d,m)][(d, m)], corresponding to the associative word dmd^m.

theorem

The block list of the word dmd^m is [(d,m)][(d, m)]

For any letter d∈{0,1}d \in \{0, 1\} and any positive natural number mm, the list of blocks representing the single-run word dmd^m (constructed via `ofRun`) is exactly the singleton list containing the pair (d,m)(d, m).

theorem

Height of the single-block word dmd^m is 1

For any letter d∈{0,1}d \in \{0, 1\} and any positive natural number m>0m > 0, the height of the word consisting of a single block of mm copies of the letter dd (denoted dmd^m) is equal to 11.

instance

Default element of BWord\text{BWord} is the empty word

The type BWord\text{BWord}, which represents words in two letters as alternating lists of blocks, is an inhabited type. Its default instance is the empty word, which is represented by an empty list of blocks [][ ] and has a height of 00 and a degree of 00.

definition

Prepend and merge a block (d,m)(d, m) to a list LL

The function `consMerge` takes a letter d∈Fin 2d \in \text{Fin } 2, a positive multiplicity m∈Nm \in \mathbb{N}, and a list LL of blocks (where each block is a pair consisting of a letter and its multiplicity). It prepends the block (d,m)(d, m) to the list LL with the following logic: - If LL is empty, it returns the list containing only the block [(d,m)][(d, m)]. - If LL starts with a block (d′,m′)(d', m'), and d=d′d = d', it merges the two blocks into a single block with the same letter and the sum of the multiplicities, returning (d,m+m′)::tail(L)(d, m + m') :: \text{tail}(L). - If LL starts with a block (d′,m′)(d', m'), and d≠d′d \neq d', it simply prepends the new block to the list, returning (d,m)::L(d, m) :: L.

theorem

`consMerge` preserves alternating letters in block lists

Let d∈Fin 2d \in \text{Fin } 2 be a letter and mm be a positive natural number. Let LL be a list of blocks, where each block is a pair consisting of a letter and a multiplicity. If LL satisfies the condition that any two adjacent blocks have distinct letters, then the list resulting from prepending and merging the block (d,m)(d, m) into LL (using `consMerge`) also satisfies the condition that any two adjacent blocks have distinct letters.

theorem

`consMerge` preserves positive multiplicities in block words

Let d∈Fin 2d \in \text{Fin } 2 be a letter and mm be a positive natural number (m>0m > 0). Let LL be a list of blocks, where each block pp is a pair consisting of a letter and a multiplicity p.2∈Np.2 \in \mathbb{N}. If every block p∈Lp \in L has a positive multiplicity (p.2>0p.2 > 0), then every block qq in the list produced by prepending and merging the block (d,m)(d, m) into LL (using `consMerge`) also has a positive multiplicity (q.2>0q.2 > 0).

theorem

Multiplicities in the `dropLast` of a block word are positive

Let ww be a block word (BWordBWord), which is represented as a list of blocks where each block pp consists of a letter and a multiplicity p.2∈Np.2 \in \mathbb{N}. For every block pp in the list w.blocks.dropLastw.\text{blocks}.\text{dropLast} (the list of blocks of ww excluding the last one), the multiplicity p.2p.2 is strictly positive (p.2>0p.2 > 0).

theorem

Dropping the last block of a `BWord` preserves the alternation of letters

For any `BWord` ww, the list of blocks obtained by removing the last element, denoted as `w.blocks.dropLast`, remains alternating. That is, for any two consecutive blocks pp and qq in the shortened list, the letters (the first components of the pairs) are distinct: p.1≠q.1p.1 \neq q.1.

definition

Shirshov's reduction map α↦αˉ\alpha \mapsto \bar{\alpha}

Given an alternating-block word ww represented as a list of kk blocks [(d1,m1),(d2,m2),…,(dk,mk)][(d_1, m_1), (d_2, m_2), \dots, (d_k, m_k)], where each block consists of a letter di∈{0,1}d_i \in \{0, 1\} and a positive multiplicity mi∈Nm_i \in \mathbb{N}, Shirshov's reduction map α↦αˉ\alpha \mapsto \bar{\alpha} (denoted here as `bar w`) is defined as follows: - If the height kk of the word is less than or equal to 1, then wˉ=w\bar{w} = w. - If k>1k > 1, the trailing block (dk,mk)(d_k, m_k) is removed from the end and moved to the front of the remaining sequence [(d1,m1),…,(dk−1,mk−1)][(d_1, m_1), \dots, (d_{k-1}, m_{k-1})]. - If the letter of the trailing block matches the letter of the first block (i.e., dk=d1d_k = d_1), the two are merged into a single block with multiplicity mk+m1m_k + m_1. - Otherwise, (dk,mk)(d_k, m_k) is prepended as a new distinct block. This map is non-increasing on the height of the word and strictly height-decreasing for words of height k≥3k \ge 3, making it suitable as a recursion measure. Note that this operation is not an involution and does not correspond to a full reversal of the word.

theorem

wˉ=w\bar{w} = w for Words of Height ≤1\le 1

For any alternating-block word ww, if its height (the number of blocks in its representation, denoted as `w.blocks.length`) is less than or equal to 1, then Shirshov's reduction map wˉ\bar{w} (denoted as `bar w`) is equal to ww.

theorem

length(consMerge d m L)≤length(L)+1\text{length}(\text{consMerge } d\ m\ L) \le \text{length}(L) + 1

For any letter d∈Fin 2d \in \text{Fin } 2, any positive multiplicity m∈Nm \in \mathbb{N} (where m>0m > 0), and any list LL of blocks (where each block is a pair consisting of a letter and its multiplicity), the length of the list resulting from prepending and potentially merging the block (d,m)(d, m) into LL via the `consMerge` operation is at most the length of LL plus one. That is, length(consMerge(d,m,L))≤length(L)+1.\text{length}(\text{consMerge}(d, m, L)) \le \text{length}(L) + 1. The `consMerge` function prepends the block (d,m)(d, m) as a new element if LL is empty or if its first block has a different letter than dd; otherwise, it merges (d,m)(d, m) into the first block of LL by adding the multiplicities, which preserves the list length.

theorem

height(wˉ)≤height(w)\text{height}(\bar{w}) \le \text{height}(w)

Let ww be an alternating-block word in two letters, and let height(w)\text{height}(w) denote the number of its constituent blocks (maximal runs of the same letter). Let wˉ\bar{w} denote Shirshov's reduction of ww, which is obtained by moving the trailing block to the front and merging it with the original first block if they share the same letter. Then the height of the reduced word is less than or equal to the height of the original word: height(wˉ)≤height(w).\text{height}(\bar{w}) \le \text{height}(w).