SymbolicWords 1.01

documentation notebook

Eric Rowland
https://ericrowland.github.io/packages.html

Introduction

SymbolicWords is a collection of tools for manipulating run-length encodings of words and morphisms with symbolic exponents.
This introduction gives an overview of the main features of the package; the next section provides a complete list of package symbols along with their usage messages and further examples.

To use SymbolicWords, first you will need to load the package by evaluating the following cell. (If you need help, see loading a package.)

<<SymbolicWords`

Syntax and basic manipulation of symbolic words

SymbolicWord encodes a sequence of expressions in its run-length encoding.  Each block is of the form Superscript[symbol_,length_] so that the lengths are formatted as superscripts in TraditionalForm:

SymbolicWord[Superscript[x,5],Superscript[y,0],Superscript[z,3]]

If the run lengths are integers, then SymbolicWordCharacters gives the list of expressions:

SymbolicWordCharacters[SymbolicWord[(Superscript[x, 5]),(Superscript[y, 0]),(Superscript[z, 3])]]

The main purpose of the package is to compute with symbolic run lengths.  A number of basic list and string manipulation functions have been implemented for symbolic words.  For example, SymbolicWordLength computes the length:

SymbolicWordLength[SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]]

SymbolicWordJoin joins two symbolic words, merging the blocks at the boundary if possible:

SymbolicWordJoin[SymbolicWord[(Superscript[0, a-b]),(Superscript[1, 4])],SymbolicWord[(Superscript[1, a]),(Superscript[0, 2 b-a])]]

Eventually periodic symbolic words are also supported:

SymbolicWordJoin[SymbolicWord[(Superscript[0, a-b])],EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[1, a])],SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]]]

Application to (a/b)-power-free morphisms and words

SymbolicWordUnequal can prove inequality of symbolic words:

SymbolicWordUnequal[SymbolicWord[(Superscript[0, -1+5 a-6 b-i]),(Superscript[1, 1]),(Superscript[0, -7 a+9 b+i])],SymbolicWord[(Superscript[0, -1-2 a+3 b-j]),(Superscript[2+n, 1]),(Superscript[0, j])],n≥0]

Detecting fractional powers in a word is equivalent to determining equality of certain factors.  PowerFreeMorphismObstructions uses SymbolicWordUnequal to prove that certain symbolic morphisms preserve the property of being (a/b)-power-free and hence generate infinite (a/b)-power-free words:

PowerFreeMorphismObstructions[n_:>SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1]),(Superscript[0, a-b-1]),(Superscript[n+1, 1])],(a/b),n≥0&&(a|b)∈Integers&&GCD[a,b]==1&&GCD[b,2]==1&&(5/3)<(a/b)<2]

Package symbols

EventuallyPeriodicSymbolicWord

?EventuallyPeriodicSymbolicWord

EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[Superscript[0,a],Superscript[1,b]]]

SymbolicWordPartitionAt[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]],a,a≥0]

EventuallyPeriodicSymbolicWordQ

?EventuallyPeriodicSymbolicWordQ

EventuallyPeriodicSymbolicWordQ[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, 4]),(Superscript[1, 2])]]]

EventuallyPeriodicSymbolicWordQ[EventuallyPeriodicSymbolicWord[(Superscript[0, 4]),(Superscript[1, 2])]]

EventuallyPeriodicSymbolicWordQ does not check that the block lengths are non-negative:

EventuallyPeriodicSymbolicWordQ[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, a])]]]

EventuallyPeriodicSymbolicWordQ[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, -1])]]]

PowerFreeMorphismObstructions

?PowerFreeMorphismObstructions

There are no (8/5)-powers in the word (φ^∞)(0) for this morphism:

PowerFreeMorphismObstructions[n_:>SymbolicWord[(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 2]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[2, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 2]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[2, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 2]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 5]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[1, 1]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 2]),(Superscript[2+n, 1])],(8/5),n≥0]

There are no (a/b)-powers in the word (φ^∞)(0) for this morphism:

PowerFreeMorphismObstructions[n_:>SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1]),(Superscript[0, a-b-1]),(Superscript[n+1, 1])],(a/b),n≥0&&(a|b)∈Integers&&GCD[a,b]==1&&GCD[b,2]==1&&(5/3)<(a/b)<2]

However, the word (φ^∞)(0) generated by this morphism contains (a/b)-powers for (a/b)==(11/9) and (a/b)==(17/14):

PowerFreeMorphismObstructions[n_:>SymbolicWord[(Superscript[0, -1+6 a-7 b]),(Superscript[1, 1]),(Superscript[0, -1-3 a+4 b]),(Superscript[1, 1]),(Superscript[0, -1-8 a+10 b]),(Superscript[1, 1]),(Superscript[0, -1+6 a-7 b]),(Superscript[1+n, 1])],(a/b),n≥0&&(a|b)∈Integers&&GCD[a,b]==1&&(6/5)<(a/b)<(5/4),Information->True,Monitor->True]

Use LocatingLength to specify a locating length and avoid searching for one:

?LocatingLength

PowerFreeMorphismObstructions[n_:>SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1]),(Superscript[0, a-b-1]),(Superscript[n+1, 1])],(a/b),n≥0&&(a|b)∈Integers&&GCD[a,b]==1&&GCD[b,2]==1&&(5/3)<(a/b)<2,Information->True,LocatingLength->2a-2b]

PowerFreeWordTransientObstructions

?PowerFreeWordTransientObstructions

PowerFreeWordTransientObstructions[EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[0, 3]),(Superscript[1, 3]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[1, 3]),(Superscript[0, 3]),(Superscript[2, 1])],SymbolicWord[(Superscript[1, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[1, 2]),(Superscript[0, 3]),(Superscript[1, 2]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[1, 3]),(Superscript[0, 3]),(Superscript[1, 1]),(Superscript[2, 1]),(Superscript[1, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[1, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[0, 1]),(Superscript[2, 1]),(Superscript[1, 2]),(Superscript[0, 3]),(Superscript[1+n, 1])]],(4/3),n,n==0||n≥2]

PowerFreeWordTransientObstructions checks for (a/b)-powers beginning in positions up to (and not including) the longest common suffix of the prefix and the repetition period.

SymbolicWord

?SymbolicWord

SymbolicWord[Superscript[0,a],Superscript[1,b]]

SymbolicWordLength[%]

SymbolicWordAppend

?SymbolicWordAppend

SymbolicWordAppend[SymbolicWord[],(Superscript[0, a])]

SymbolicWordAppend[SymbolicWord[(Superscript[0, b])],(Superscript[0, a])]

SymbolicWordAppend[SymbolicWord[(Superscript[0, b])],(Superscript[1, a])]

SymbolicWordBlockDrop

?SymbolicWordBlockDrop

SymbolicWordBlockDrop[SymbolicWord[(Superscript[2, a]),(Superscript[1, a+b]),(Superscript[0, b])],1]

Column[Table[SymbolicWordBlockDrop[EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[0, c])],SymbolicWord[(Superscript[2, a]),(Superscript[1, a+b]),(Superscript[0, b])]],n],{n,0,5}]]

SymbolicWordBlockTake

?SymbolicWordBlockTake

SymbolicWordBlockTake[SymbolicWord[(Superscript[2, a]),(Superscript[1, a+b]),(Superscript[0, b])],2]

Column[Table[SymbolicWordBlockTake[EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[0, c])],SymbolicWord[(Superscript[2, a]),(Superscript[1, a+b]),(Superscript[0, b])]],n],{n,0,5}]]

SymbolicWordCharacters

?SymbolicWordCharacters

SymbolicWordCharacters[SymbolicWord[(Superscript[x, 5]),(Superscript[y, 0]),(Superscript[z, 3])]]

SymbolicWordFactorList

?SymbolicWordFactorList

Compute symbolic representatives of all factors of length a in a fairly simple periodic word:

TraditionalForm[Grid[SymbolicWordFactorList[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, a]),(Superscript[1, 2]),(Superscript[0, 2 a-1]),(Superscript[2, 1])]],a,a∈Integers&&a≥2,GeneratedParameters->i]/. SymbolicWord->(Row[{##1}]&),Dividers->All]]

Partition each factor into subfactors of prescribed lengths:

TraditionalForm[Grid[Append@@@SymbolicWordFactorList[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1]),(Superscript[0, a-b-1]),(Superscript[(n+1), 1])]],{a-b,2 b-a,a-b},(a|b)∈Integers&&((5 b)/3)≤a<2 b&&b≥3,GeneratedParameters->i]/. SymbolicWord->(Row[{##1}]&),Dividers->All]]

Use the option TransientOnly to limit the factors to those overlapping the transient (nonperiodic prefix):

?TransientOnly

TraditionalForm[Grid[SymbolicWordFactorList[EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1]),(Superscript[0, 2a-1]),(Superscript[1, 1])],SymbolicWord[(Superscript[0, 3a-1]),(Superscript[1, 1])]],a,a∈Integers&&a≥2,TransientOnly->True]/. SymbolicWord->(Row[{##1}]&),Dividers->All]]

SymbolicWordFirstBlockCharacter

?SymbolicWordFirstBlockCharacter

SymbolicWordFirstBlockCharacter[SymbolicWord[(Superscript[2, a]),(Superscript[1, a+b]),(Superscript[0, b])]]

SymbolicWordFirstBlockCharacter does not check that first block length is non-negative:

SymbolicWordFirstBlockCharacter[SymbolicWord[(Superscript[2, 0]),(Superscript[1, a+b]),(Superscript[0, b])]]

To assure that the result is first character, use SymbolicWordFirstCharacter and provide assumptions on symbols as necessary:

SymbolicWordFirstCharacter[SymbolicWord[(Superscript[2, 0]),(Superscript[1, a+b]),(Superscript[0, b])],a≥1&&b≥0]

SymbolicWordFirstCharacter

?SymbolicWordFirstCharacter

SymbolicWordFirstCharacter[SymbolicWord[(Superscript[v, 0]),(Superscript[w, 0]),(Superscript[x, 5]),(Superscript[y, 0]),(Superscript[z, 3])]]

Symbolic run lengths should be accompanied by assumptions, so that positivity can be determined:

SymbolicWordFirstCharacter[SymbolicWord[(Superscript[2, 0]),(Superscript[1, a+b]),(Superscript[0, b])],a≥1&&b≥0]

SymbolicWordJoin

?SymbolicWordJoin

SymbolicWordJoin[SymbolicWord[(Superscript[0, a-b]),(Superscript[1, 4])],SymbolicWord[(Superscript[1, a]),(Superscript[0, 2 b-a])]]

SymbolicWordJoin[SymbolicWord[(Superscript[0, a-b]),(Superscript[1, 4])],SymbolicWord[(Superscript[0, a]),(Superscript[1, 2 b-a])]]

The final symbolic word can be eventually periodic:

SymbolicWordJoin[SymbolicWord[(Superscript[0, a-b])],SymbolicWord[(Superscript[1, a])],EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[1, 2 b-a])],SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]]]

SymbolicWordLength

?SymbolicWordLength

SymbolicWordLength[SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]]

SymbolicWordLength does not check that the block lengths are non-negative:

SymbolicWordLength[SymbolicWord[(Superscript[0, a]),(Superscript[1, -a])]]

SymbolicWordPartitionAt

?SymbolicWordPartitionAt

SymbolicWordPartitionAt[EventuallyPeriodicSymbolicWord[SymbolicWord[],SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]],a,a≥0]

SymbolicWordPartitionAt[EventuallyPeriodicSymbolicWord[SymbolicWord[(Superscript[0, -1+2 a-3 b]),(Superscript[1, 1])],SymbolicWord[(Superscript[0, a-1]),(Superscript[1, 1])]],a-b,(5/3)≤(a/b)<2&&b≥3]
SymbolicWordLength[First[%]]

SymbolicWordPower

?SymbolicWordPower

SymbolicWordPower[SymbolicWord[(Superscript[0, a]),(Superscript[1, b])],3]

A symbolic exponent is simplified if the symbolic word contains a single block:

SymbolicWordPower[SymbolicWord[(Superscript[0, a])],n]

SymbolicWordQ

?SymbolicWordQ

SymbolicWordQ[SymbolicWord[(Superscript[0, 4]),(Superscript[1, 2])]]

SymbolicWordQ[(Superscript[0, 4])]

SymbolicWordQ does not check that the block lengths are non-negative:

SymbolicWordQ[SymbolicWord[(Superscript[0, a])]]

SymbolicWordQ[SymbolicWord[(Superscript[0, -1])]]

SymbolicWordSimplified

?SymbolicWordSimplified

SymbolicWordSimplified[SymbolicWord[(Superscript[0, 4]),(Superscript[1, 2])]]

SymbolicWordSimplified[SymbolicWord[(Superscript[0, a]),(Superscript[1, b]),(Superscript[0, c])],a≥1&&b≥1&&c≥1]

If SymbolicWordSimplified cannot determine that the word is simplified, it returns unevaluated:

SymbolicWordSimplified[SymbolicWord[(Superscript[0, a]),(Superscript[0, b])]]

SymbolicWordSimplify

?SymbolicWordSimplify

SymbolicWordSimplify[SymbolicWord[(Superscript[0, a]),(Superscript[1, b]),(Superscript[1, c]),(Superscript[1, d]),(Superscript[0, e]),(Superscript[0, f])]]

SymbolicWordUnequal

?SymbolicWordUnequal

SymbolicWordUnequal[SymbolicWord[(Superscript[0, -1+5 a-6 b-i]),(Superscript[1, 1]),(Superscript[0, -7 a+9 b+i])],SymbolicWord[(Superscript[0, -1-2 a+3 b-j]),(Superscript[2+n, 1]),(Superscript[0, j])],n≥0]

SymbolicWordUnequal[SymbolicWord[(Superscript[0, 1-C]),(Superscript[1, 2]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[1+n, 1]),(Superscript[0, 7]),(Superscript[1, 2]),(Superscript[0, 6]),(Superscript[1, 1+C])],SymbolicWord[(Superscript[0, 1-C]),(Superscript[1, 1]),(Superscript[1+n, 1]),(Superscript[0, 7]),(Superscript[1, 2]),(Superscript[0, 6]),(Superscript[1, 2]),(Superscript[0, 7]),(Superscript[1, 1]),(Superscript[1+n, C])],1≤C≤1&&n≥0]

SymbolicWordUnequal[SymbolicWord[(Superscript[0, a]),(Superscript[1, b])],SymbolicWord[(Superscript[0, a]),(Superscript[1, b])]]

ToSymbolicWord

?ToSymbolicWord

ToSymbolicWord[{x,x,y,x,z,z,z}]

Compute the run-length encoding of the first several bits of π:

Most[ToSymbolicWord[First[RealDigits[π,2,21]]]]

$PowerFreeMorphismList

?$PowerFreeMorphismList

Here is the data for the first morphism:

Grid[List@@@First[$PowerFreeMorphismList],Dividers->All]

LocatingLengthExceptionalRationals make the morphism a perfect power.
PowerFreenessExceptionalRationals are obstructions to power-freeness.
WordAdditionalRationals are exceptional rationals that aren’t governed by the morphism but that lie in the interval and nonetheless have the predicted value of k.

Length[$PowerFreeMorphismList]