arXiv reader

Logical isomorphism and logical limit laws for small permutation classes and regular languages

Klas Marström and Eero Räty

arXiv
2610.22218v1 · PDF · 15 October 2026
Categories
math.CO
Licence
CC BY 4.0 The site shows the text.

Abstract

In this paper we show that for each small permutation class \mathcal{F} there exists a regular language L_\mathcal{F} such that the monadic second-order TOTO logic on \mathcal{F} is isomorphic to classical monadic second-order logic on L_\mathcal{F}. Thanks to the fact that regular languages are closed under monadic second-order restrictions this shows that many subsets of \mathcal{F} have a well-behaved structure. In particular, this allows us to show that random permutations from any small permutation class satisfies convergence laws for both first-order logic and monadic second-order logic. In the latter case, the law is modular. Our proofs introduce a way of using the automaton description of regular languages to prove properties of generating functions which may be of independent interest. Potential applications include first-order limit laws for random words in some regular languages.

Items 119

Remark

Remark 1

5F9W

Let \mathcal{F} be a small permutation class.

  1. Then there exists a regular language L_{\mathcal{F}} and a length-preserving bijection

    f_{\mathcal{F}}: L_{\mathcal{F}} \rightarrow \mathcal{F}

    satisfying the following property: for every first-order logic sentence \Psi on \mathcal{F} there exists a first-order logic sentence \Phi on L_{\mathcal{F}} so that

    \{w \in L_\mathcal{F}: w \models \Phi\} = \{w \in L_\mathcal{F}: f_\mathcal{F}(w) \models \Psi\}.

    The same conclusion also holds for sentences in monadic second-order logic.

  2. (sketched) The bijection f_\mathcal{F} is in fact a monadic second-order isomorphism: that is, for every sentence \Phi in monadic second-order logic on L_\mathcal{F} there exists a corresponding sentence in monadic second-order logic on \mathcal{F} for which the conclusion above holds. In addition, it is also possible to construct a regular language L_\mathcal{F}' and a length-preserving bijection f'_\mathcal{F}: L_\mathcal{F}' \rightarrow \mathcal{F} which is a first-order isomorphism.

  3. For the last three assertions, suppose that \mathcal{F} is not finite. There exist a positive real number \alpha, a real number \beta \geq 1, and a non-negative integer c so that

    \vert \mathcal{F}_n\vert = (\alpha+o(1))\cdot \beta ^n\cdot n^c.
  4. Given a monadic second-order sentence \Psi on \mathcal{F}, write

    \mathcal{F}^\Psi_n := \{\sigma \in \mathcal{F}_n: \sigma \models \Psi\}.

    Then the sets \mathcal{F}^\Psi_n have a rational generating function.

  5. For every first-order \mathrm{TOTO} sentence \Phi the limit \lim_{n\rightarrow \infty} \mathbb{P} (\pi \models \Phi) exists, where \pi is taken uniformly at random from \mathcal{F}_n.

Proof of Remark 1

Let d and k be positive integers and let M be a multiplicative \star-isolated forest matrix chosen so that \mathcal{F} \subseteq \mathrm{Geom}(M)_{d,k}. Note that such M exists by Proposition 9. Since \mathcal{F} is a small permutation class, Proposition 23 implies that there exists a first-order sentence \hat{\upsilon}_{\mathcal{F}} so that \sigma \models \hat{\upsilon}_\mathcal{F} if and only if \sigma \in \mathcal{F}.

Let \chi_{\mathcal{F}} be the first-order sentence in \Sigma_M^* obtained by applying Theorem 36 to the sentence \hat{\upsilon}_{\mathcal{F}}, and set L_{\mathcal{F}} = \{w \in \Sigma_M^*: w \models \Delta_M \land \chi_{\mathcal{F}}\}. Thus Theorem 4 implies that L_{\mathcal{F}} is a regular language, and Theorem 36 implies that the restriction f_\mathcal{F} of f_M on L_{\mathcal{F}} is both a first-order and a monadic second-order homomorphism. Finally, since the restriction of f_M on \{w\in \Sigma_M^*: w\models \Delta_M\} induces a bijection whose image is \mathrm{Geom}(M)_{d,k}, it follows that f_\mathcal{F} induces a bijection from L_{\mathcal{F}} to \mathcal{F}. This completes the proof of the first part.

Let \mathcal{A'}_\mathcal{F} denote the automaton obtained by removing the unproductive states from the automaton \mathcal{A}_\mathcal{F} constructed in Theorem 62. Thus by Theorem 62 all the dominant strongly connected components of \mathcal{A}_\mathcal{F} are aperiodic, and at least one such component must exist as \mathcal{F} is not finite. Hence Lemma 52 implies that there exists positive constant c, non-negative integer k and \lambda \geq 1 so that

a_n:=|\mathcal{F}_n| = (c+o(1))\cdot \lambda^n \cdot n^k

as n\rightarrow \infty. This completes the proof of the third part.

Let \Psi be a monadic second-order sentence on \mathcal{F}, and let \Phi denote the first-order sentence on words for which we have

\{w\in L_{\mathcal{F}}:w\models \Phi\}=\{w \in L_\mathcal{F}:f_{\mathcal{F}}(w) \models \Psi\}.

Define L_\mathcal{F}^\Phi := \{w \in L_{\mathcal{F}}: w\models \Phi\}. Then L_\mathcal{F}^\Phi is a monadic second-order restriction of a regular language, and thus itself a regular language by Theorem 4. Hence the sets (L_\mathcal{F}^\Phi)_n has a rational generating function by Theorem 5, and thus \mathcal{F}^\Psi_n also have rational generating function, which completes the proof of the fourth part.

Let \Psi be a first-order sentence on permutations, and again we write \Phi for the corresponding first-order sentence on words. Let \mathcal{B}_\Phi denote the automaton chosen to satisfy the conclusion of Lemma 7, and set \mathcal{A}_\Psi := \mathcal{A}_\mathcal{F} \times B_\Phi. Then \mathcal{A}_\Psi accepts precisely those w \in L_{\mathcal{F}} with w \models \Phi.

Define b_n = |\mathcal{F}_n^\Psi|. If b_n = 0 for sufficiently large n, then the limit is clearly 0. Otherwise, let \mathcal{A}_\Psi' denote the automaton obtained from \mathcal{A}_\Psi by removing all the unproductive states. Then \mathcal{A}_\Psi' accepts the same words as \mathcal{A}_\Psi, and since it accepts infinitely many words, it contains at least one directed cycle.

Let \mu denote the largest spectral radius of a strongly connected component in \mathcal{A}_\Psi', and let r+1 denote the largest number of strongly connected components with spectral radius \mu along any walk from the initial state to an accepting state. Then standard properties of regular languages imply that |\mathcal{F}_n^\Psi| \leq C\cdot n^{r}\mu^n for some constant C.

If \mu < \lambda, then

\limsup_{n\rightarrow \infty} \mathbb{P}\left(\boldsymbol{\sigma_n} \in \mathcal{F}_n: \boldsymbol{\sigma_n} \models \Psi\right) = \limsup_{n \rightarrow \infty} \frac{b_n}{a_n} \leq \lim_{n\rightarrow \infty} \frac{C\cdot n^r \cdot \mu^n}{c\cdot n^k \cdot \lambda^n} = 0,

and thus in particular the limit exists. If \mu \geq \lambda, let C be a strongly connected component in \mathcal{A}_\Psi' with spectral radius \mu, and let D be the strongly connected component in \mathcal{A'}_{\mathcal{F}} containing its projection. Write A and B for the transition matrices of \mathcal{A'}_\mathcal{F} and \mathcal{A}_\Psi' respectively. By Lemma 51 we have \rho(B_C) \leq \rho(A_D), and thus

\lambda \leq \mu = \rho(B_C) \leq \rho(A_D) \leq \lambda.

Thus we must have \rho(B_C) = \rho(A_D) = \lambda, and hence D must be a dominant component, and hence D is aperiodic by Theorem 62. Since \rho(B_C) = \rho(A_D), Lemma 51 in turn implies that C must be aperiodic.

Thus every dominant component in \mathcal{A}_\Psi must be aperiodic, and thus Lemma 52 implies that there exits c'>0 for which b_n =(c'+o(1))\cdot n^r \cdot \lambda^n as n \rightarrow \infty. Thus

\lim_{n\rightarrow \infty} \mathbb{P}\left(\boldsymbol{\sigma_n} \in \mathcal{F}_n: \boldsymbol{\sigma_n} \models \Psi\right) = \lim_{n \rightarrow \infty} \frac{b_n}{a_n} = \lim_{n \rightarrow \infty} \frac{c'\cdot n^r}{c \cdot n^k}.

If r = k, the limit exists and equals \frac{c'}{c}. If r < k, the limit exists and equals 0. Since b_n \leq a_n for every n, we cannot have r > k. This completes the proof of the final part.

Remark

Remark 2

JKEP

Let \mathcal F be an infinite small permutation class, and let \boldsymbol\sigma_n denote a permutation chosen uniformly at random from \mathcal F_n. For every \mathrm{MSO}-\mathrm{TOTO} sentence \Psi there exists an integer \ell\geq1 such that for every 0\leq r<\ell, the limit

\lim_{n\rightarrow \infty} \mathbb{P}\left( \mathbf{\sigma_{n\ell+r}}\models \Psi\right)

exists.

Remark

Remark 3

VQB9

Given a monadic second-order sentence \Psi, there exists a monadic second-order sentence \Psi_{DNF} that is written in disjunctive normal form, and for which \Psi and \Psi_{DNF} are logically equivalent.

Remark

Remark 4 (Büchi-Elgot-Trakhtenbrot)

ON7H

A language L is a regular language iff there exists a monadic second-order sentence \Psi such that L is the set of words from \Sigma^* satisfying \Psi. That is, L:= \left\{w \in \Sigma^*: w \models \Psi\right\}.

Used by Proof, Proof
Remark

Remark 5

41MV

Every regular language has a rational generating function.

Used by Proof
Remark

Remark 6

YIAS

Let \Sigma_{1} and \Sigma_2 be two finite sets, and let \pi: \Sigma_{1} \rightarrow \Sigma_2 be any function. Then, for any subset A \subseteq \Sigma_2, the condition \pi(w_i) \in A can be expressed as a first-order formula.

Used by Proof
Proof of Remark 6

Since \Sigma_1 is a finite set, the pre-image B = \pi^{-1}(A) is also a finite set. The claim follows by observing that \pi(w_i) \in A is clearly equivalent to

\bigvee_{b \in B} (w_i = b),

which is a first-order formula.

Remark

Remark 7

YUOB

Let \Phi be a first-order sentence on words over \Sigma. There are a complete finite deterministic automaton \mathcal B recognizing \{w:w\models\Phi\} and an integer N\geq1 such that

\delta_{\mathcal B}(r,v^N)=\delta_{\mathcal B}(r,v^{N+1}) \qquad(r\in Q_{\mathcal B},\ v\in\Sigma^*).
Used by Proof, Proof, Proof
Remark

Remark 1

DETX

An \ell\times m gridded figure \left(F,G_{\ell\times m}\right) consists of the standard \ell\times m gridding G_{\ell\times m} together with a finite set of points F\subseteq\left[0, \ell\right]\times\left[0,m\right] such that no two points of F lie on the same horizontal or vertical line, and no point of F lies on the grid-lines of G_{\ell\times m}.

Remark

Remark 2

9OG7

We say that an \ell\times m gridded figure \left(F,G_{\ell\times m}\right) is compatible with a matrix M if M is an \ell \times m matrix with entries in \{-1,0,1\} such that for each \left(i,j\right)\in\left[\ell \right]\times\left[m\right] we have

\begin{aligned} F\cap C_{i,j} \textrm{ is }\left\{\begin{array}{ll} \text{empty } & \text{if }M_{i,j}=0,\\ \text{a (possibly empty) increasing segment} & \text{if }M_{i,j}=1,\\ \text{a (possibly empty) decreasing segment} & \text{if }M_{i,j}=-1. \end{array}\right. \end{aligned}

Here we say that a set of points \{(x_i, y_i): i \in [t]\} in \mathbb{R}^2 with x_1<x_2<\ldots <x_t forms an increasing segment if y_1<y_2<\ldots <y_t, and a decreasing segment if y_1>y_2>\ldots > y_t.

Remark

Remark 3

R5HY

Let M be an \ell\times m matrix and let G denote the standard \ell\times m gridding. We write \textrm{Geom}^{\#}\left(M\right) for the set of equivalence classes in \textrm{Grid}^{\#}\left(M\right) which contain a gridded figure \left(F,G\right) as a representative for which F is a finite subset of the standard figure of M. The geometric grid class of M, denoted by \textrm{Geom}\left(M\right), is the collection of all permutations \sigma induced by the equivalence classes in \textrm{Geom}^{\#}\left(M\right).

Remark

Remark 8 (Albert, Atkinson, Bouvel, Ruškuc and Vatter)

JM6T

If H_M is a forest, then \textrm{Grid}^{\#}\left(M\right)=\mathrm{Geom}^{\#}\left(M\right) (and thus \textrm{Grid}\left(M\right)=\mathrm{Geom}\left(M\right)).

Used by Proof
Remark

Remark 4

WLGN

Given a permutation \sigma and a gridding G, we define the left-greedy order <_{LG} on equivalence classes of gridded figures with gridding G that induce \sigma by letting (F, G)<_{LG}(F', G') if one of the following occurs:

  1. there exists an index i_0 such that for all i<i_0 and for all j, the number of points of F and F' in the (i,j)-th cells of their respective griddings are equal, but there are strictly more points of F than of F' in the cells located in the i_0-th column;

  2. there exist indices i_0 and j_0 so that for every (i,j) with either i < i_0, or i = i_0 and j < j_0, the number of points of F and F' in the (i,j)^{th} cell of their respective griddings are equal, the number of points of F and F' in the cells located in the i_0-th column are equal, but there are strictly more points of F than of F' in the (i_0,j_0)-th cell.

Used by Proof
Remark

Remark 5

EXWH

Given a permutation \tau \in \mathfrak{S}_k and permutations \sigma_{1},\dots,\sigma_{k}, we define the inflation \tau\left[\sigma_{1},\dots,\sigma_{k}\right] of \tau by the k-tuple of permutations (\sigma_{1},\ldots,\sigma_{k}) to be the permutation obtained by replacing each entry \tau\left(i\right) by an interval that is order-isomorphic to the permutation \sigma_{i}.

Remark

Remark 6

BCEM

Given two permutation classes \mathcal{P} and \mathcal{Q}, we define the inflation \mathcal{P}\left[\mathcal{Q}\right] of \mathcal{P} by \mathcal{Q} to be:

\mathcal{P}\left[\mathcal{Q}\right]:=\left\{ \tau\left[\sigma_{1},\dots,\sigma_{k}\right]:\ \tau\in\mathcal{P}_{k}, \ \sigma_{1},\ldots,\sigma_{k}\in\mathcal{Q}\right\} .

Given an inflation of the form \sigma=\tau\left[\sigma_{1},\dots,\sigma_{k}\right]\in\mathcal{P}\left[\mathcal{Q}\right] where \tau \in \mathcal{P} and \sigma_1, \ldots, \sigma_k \in \mathcal{Q}, we say that \tau\left[\sigma_{1},\dots,\sigma_{k}\right] is a \mathcal{Q}-decomposition of \sigma, and we call \tau a \mathcal{P}-profile of the expression \sigma = \tau\left[\sigma_{1},\dots,\sigma_{k}\right].

Remark

Remark 7

ZB89

Let \mathcal{P} and \mathcal{Q} be two permutation classes. Let \tau\left[\sigma_{1},\dots,\sigma_{k}\right] and \tau'\left[\sigma'_{1},\dots,\sigma'_{k'}\right] be two \mathcal{Q}-decompositions of the same permutation in \mathcal{P}[\mathcal{Q}], we say that \tau\left[\sigma_{1},\dots,\sigma_{k}\right]<_L\tau'\left[\sigma'_{1},\dots,\sigma'_{k'}\right] if one of the following holds:

  1. \vert \tau \vert =k <k' =\vert \tau'\vert; or

  2. k=k' and there exists i_0\in [k] such that for all i\in [i_0-1] we have \vert \sigma_{i}\vert =\vert \sigma'_{i} \vert but \vert \sigma_{i_0}\vert >\vert \sigma'_{i_0}\vert.

Remark

Remark 8

O2LW

Given a permutation class \mathcal{P}, we define the sequence of permutation classes \left(\mathcal{P}^{\left[d\right]}\right)_{d\in \mathbb{Z}_{\geq1}} inductively by setting \mathcal{P}^{\left[1\right]}:=\mathcal{P} and \mathcal{P}^{\left[d+1\right]}:=\mathcal{P}\left[\mathcal{P}^{\left[d\right]}\right].

Remark

Remark 9

J68Q

Given permutations \sigma_1, \ldots, \sigma_k, their direct sum is the permutation \sigma_1 \oplus \sigma_2\oplus \cdots \oplus \sigma_k:= 123\ldots k[\sigma_1, \sigma_2, \ldots , \sigma_k].

Remark

Remark 10

C54P

The increasing oscillating sequence is the integer sequence (s_n)_{n\in \mathbb{Z}_{\geq 0}} defined by s_{n}=n+4 if n is even and s_n=n otherwise; thus its first few terms are 4, 1, 6, 3, 8, 5, \ldots. We let F_k:=\{(i, s_i): \ 0 \leq i < k\}, and denote by \omega_k the permutation associated to F_k. We define decreasing oscillating sequence analogously as G_k = \{(i,-s_i): 0 \leq i < k\}, and denote \varpi_k the permutation associated to G_k.

We let \mathcal{O}_k denote the finite permutation class consisting of all subpermutations of \omega_k and \varpi_k, and let \widetilde{\mathcal{O}}_{k} denote the permutation class that is the union of \mathcal{O}_k, and the set containing all monotone increasing and decreasing permutations of finite length. That is, we set

\widetilde{\mathcal{O}}_{k} = \mathcal{O}_{k} \cup \mathrm{Av}(21) \cup \mathrm{Av}(12).
Remark

Remark 11

0TCK

Given a \ell\times m \star-isolated forest matrix M, the standard \ell \times m gridding G and integers d,k\in \mathbb{Z}_{+}, we define \mathrm{Geom}^{\#}(M)_{d,k} to be the collection of all equivalence classes which contain a gridded figure (F,G) satisfying the following:

  1. if M_{i,j}=0 then F\cap C_{i,j}=\emptyset;

  2. if M_{i,j}=+1, we have F\cap C_{i,j} \subseteq \left\{(i-1, j-1)+(t,t): \ t\in (0,1)\right\}, while if M_{i,j}=-1 we have F\cap C_{i,j} \subseteq \left\{(i-1, j-1)+(t,1-t): \ t\in (0,1)\right\};

  3. if M_{i,j}=\star, then F\cap C_{i,j} induces a permutation from {\widetilde{\mathcal{O}}_{k}}^{[d]}.

Finally we let \mathrm{Geom}(M)_{d,k} denote the collection of all permutations induced by an equivalence class in \mathrm{Geom}^{\#}(M)_{d,k}.

Remark

Remark 9 (Vatter)

7SZ0

Let \mathcal{F} be a small permutation class. Then there exists a \star-isolated forest matrix M and integers d,k\in \mathbb{Z}_{+} such that \mathcal{F}\subseteq \mathrm{Geom}(M)_{d,k}.

Used by Proof
Remark

Remark 10

4AHD

Let M be a multiplicative forest matrix with entries in \{-1,0,1\}. There exist regular languages L_1 and L_2 and order preserving bijections g_M:L_1 \rightarrow \mathrm{Geom}^\#(M) and f_M:L_2\rightarrow \mathrm{Geom}(M).

Remark

Remark 11

OC20

Let d and k be positive integers. There exists a regular language L_{d,k} and a bijection f_{d,k}:L_{d,k} \rightarrow \tilde{\mathcal{O}}_{\textit{k}}^{\left[\textit{d}\right]} so that for every first-order or monadic second-order sentence \Psi on \tilde{\mathcal{O}}_{\textit{k}}^{\left[\textit{d}\right]} there exists a first-order or a monadic second-order sentence \Phi on L_{d,k} for which

\{w \in L_{d,k}: w \models \Phi\} = \{w \in L_{d,k}: f_{d,k}(w) \models \Psi\}.
Used by Proof
Proof of Remark 11

We construct the sentences \Delta_d by induction. As the base case, note that \Delta_1=\Gamma_1 satisfies the required property. Suppose that d\geq2 and that \Delta_{d-1} satisfies the conditions of the Theorem. For each \tau\in\mathcal{Q}_k, let \Delta_{\tau,d} denote the first-order sentence obtained by applying Lemma 25 with \hat\Delta:=\Delta_{d-1}, and attaching \exists-quantifier with every free variable.

To handle with words whose profile is \mathrm{inc} or \mathrm{dec}, we let \delta(x,y) be the formula

\begin{aligned} x\leq y\ \land\ \forall c:\Bigl((x\leq c\land c\leq y) \implies\bigl((L\in\rho_4(w_c)\iff c=x) \land(R\in\rho_4(w_c)\iff c=y)\bigr)\Bigr). \end{aligned}

Note that \delta(x,y) corresponds to detecting whether the sub-word w_x\dots w_y corresponds to one of the words u_i in the proper decomposition of w. We also write \delta_2(a_1,b_1,a_2,b_2) for

\delta(a_1,b_1)\land\delta(a_2,b_2)\land b_1<a_2 \land\neg\exists c:\ b_1<c<a_2,

which similarly corresponds to identifying that w_{a_1}\dots w_{b_1} and w_{a_2}\dots w_{b_2} correspond to two consecutive such sub-words u_i and u_{i+1}.

Recall that we write (\Delta_{d-1})_{a,b} for \Delta_{d-1} applied to the projected sub-word \rho_1(w_a\dots w_b). For s\in\{\mathrm{inc},\mathrm{dec}\} define

\begin{aligned} \Delta_{s,d}:={}& \forall a\forall b:\bigl(\delta(a,b) \implies(\Delta_{d-1})_{a,b}\bigr)\\ &\land\ \forall a_1\forall b_1\forall a_2\forall b_2: \bigl(\delta_2(a_1,b_1,a_2,b_2) \implies\psi_s(a_1,b_1,a_2,b_2)\bigr). \end{aligned}

Finally, we define

\begin{aligned} \Delta_d:={}&\Gamma_d \land\bigl(\rho_2(w_1)=\mathrm{inc}\implies\Delta_{\mathrm{inc},d}\bigr)\\ &\land\bigl(\rho_2(w_1)=\mathrm{dec}\implies\Delta_{\mathrm{dec},d}\bigr)\\ &\land\bigwedge_{\tau\in\mathcal{Q}_k} \bigl(\rho_2(w_1)=\tau\implies\Delta_{\tau,d}\bigr). \end{aligned}

Given w with w\models\Gamma_d, suppose that w has profile \tau and properly decomposes as w=u_1\dots u_\ell. Write \sigma_i=f_{d-1}(\rho_1(u_i)), and we choose \tau' so that \tau' = \tau when \tau\in\mathcal{Q}_k, and otherwise \tau' is the monotone permutations of length \ell whose direction is given by \tau.

Claim.

We have w\models\Delta_d if and only if

  1. for every i we have \rho_1(u_i)\models\Delta_{d-1},

  2. the expression \tau'[\sigma_1,\dots,\sigma_\ell] is the left-greedy decomposition of the respective permutation, and

  3. \tau\neq \mathrm{dec} when \ell=1.

Proof.

For \tau\in\mathcal{Q}_k the statement follows immediately from Lemma 25. For \tau=\mathrm{inc}, the second line of \Delta_{\mathrm{inc},d} ensures that for every i, we cannot write \sigma_i \oplus \sigma_{i+1} = \theta_1 \oplus \theta_2 with |\theta_1| > |\sigma_i| (with all these permutations contained in \widetilde{\mathcal{O}}_{k}^{[d-1]}), and thus Lemma 26 ensures that the expression given in the second condition indeed corresponds to the left-greedy decomposition. Finally, the first line of \Delta_{\mathrm{inc},d} ensures that for each i, the sub-word u_i is uniquely determined for the given unique \sigma_i. An analogous argument applies when \tau= \mathrm{dec}; in this case the third condition follows from the last line of \Gamma_d.

Claim ? implies the uniqueness and existence of w \in \Sigma_d^* with w \models \Delta_d and f_d(w) = \sigma for any \sigma \in \widetilde{\mathcal{O}}_k^{[d]}. Set L_{d} = \{w \in \Sigma_{d}^*: w \models \Delta_{d}\}. This language is regular by Theorem 4, and Theorem 15 gives the required logical correspondences for the restriction of f_{d} to L_{d}.

Remark

Remark 12

U9KM

Given positive integers d and k, there exists \Gamma_{d,k} \in \mathrm{FOS} for which we have w \models \Gamma_{d,k} if and only if g_{d,k}(w) \neq \star.

Proof of Remark 12

Let k be a fixed positive integer. As the base case d = 1, consider the first-order sentence \Gamma_{1} given by

\begin{aligned} &\ \bigl( (\exists x:w_x=a_{\mathrm{inc}})\land (\forall x\colon w_x=a_{\mathrm{inc}})\bigr)\\ &\lor\bigl( (\exists x \exists y: (x < y) \land (w_x=a_{\mathrm{dec}})\land w_y = a_{\mathrm{dec}}) \land (\forall x\colon w_x=a_{\mathrm{dec}})\bigr)\\ &\lor\bigvee_{\tau\in\mathcal Q_k}\bigl(\Gamma_\tau\land\forall x\colon\rho_2(w_x)=\tau\bigr), \end{aligned}

where \Gamma_{\tau} is the first-order sentence given by

\begin{aligned} & \bigwedge_{i=1}^{|\tau|} \left(\exists j_1 \forall j_2: w_{j_1} = a_{\tau,i} \land (w_{j_2} = a_{\tau,i} \implies j_1 = j_2)\right) \\& \land \left(\forall j_1 \forall j_2: (j_1 < j_2 \implies \rho_3(w_{j_1}) < \rho_3(w_{j_2}))\right). \end{aligned}

In order to check that \Gamma_{1} satisfies the required properties. we start by observing that when w_1 = a_{\mathrm{inc}} the first line of \Gamma_1 ensures that we have w \models \Gamma_1 if and only if w = a_{\mathrm{inc}}^n for any n \in \mathbb{Z}_+. Similarly, whenever w_1 = a_{\mathrm{dec}}, the second line ensures that we have w \models \Gamma_1 if and only if w = a_{\mathrm{dec}}^n for any n \in \mathbb{Z}_{\geq 2}. In both instances, these two conditions are equivalent to the condition g_{1}(w) \neq \star.

Finally, consider the case when \rho_2(w_1) = \tau for some \tau \in \mathcal{Q}_k. In this case, we have g_1(w) \neq \star if and only if w = w^{(\tau)}, where w^{(\tau)} := a_{\tau,1} \dots a_{\tau,|\tau|}. Now suppose that w \models \Gamma_{1} and \rho_2(w_1) = \tau. Then, (i) the first part of the top line of \Gamma_\tau ensures that each a_{\tau,i} for i \in [|\tau|] occurs at least once in w, (ii) the second part of the top line of \Gamma_\tau ensures that each letter a_{\tau,i} occurs exactly once in w, and (iii) the second line ensures that the letter a_{\tau,i} occurs before a_{\tau,j} in w whenever i < j. It is evident that the only word satisfying all three of these conditions is w^{(\tau)}, which completes the proof of the base case.

Suppose that d \geq 2 and that \Gamma_{d-1} satisfies the required conditions for d-1. Define auxiliary first order formulae \psi_{\neq}(i,j,t) and \psi_{=}(i,j) as

\begin{aligned} (i\neq j) \implies \left(\rho_{4}\left(w_{i}\right)=\left\{ L\right\} \land\rho_{4}\left(w_{j}\right)=\{R\}\land\left(i<t<j\implies\rho_{4}\left(w_{t}\right)=\emptyset\right) \land (\Gamma_{d-1})_{i,j}\right) \end{aligned}

and

\begin{aligned} (i=j) \implies \left(\rho_{4}\left(w_{i}\right)=\left\{ L,R\right\} \land(\Gamma_{d-1})_{i,j}\right) \end{aligned}

respectively. Note that both of them are first-order formulae by Lemma 13. Define \Gamma_{d} to be the first-order sentence

\begin{aligned} & \forall i: (\rho_2(w_i) = \rho_2(w_1)) \\& \land \bigwedge_{\tau \in \mathcal{Q}_k} \left((\rho_2(w_1) = \tau )\implies (\forall i \forall j:i < j \implies \rho_3(w_i) \leq \rho_3(w_j))\right) \\& \land \bigwedge_{\tau\in\mathcal{Q}_{k}}\left(\left(\rho_{2}\left(w_{1}\right)=\tau\right)\implies\left(\bigwedge_{j=1}^{\left|\tau\right|}\left(\exists i: \rho_3(w_i) = j \land (\Gamma_{d-1})_{j}\right)\right)\right) \\& \land \left(\rho_2(w_1) \in \{\mathrm{inc},\mathrm{dec}\} \implies \left(\forall s \exists i \exists j\forall t: \left(i\leq s\leq j\right)\land \psi_{\neq}(i,j,t) \land \psi_{=}(i,j)\right)\right) \\& \land \left(\rho_2(w_1) = \mathrm{dec} \implies \exists a\exists b:\left(a<b\land L\in\rho_4(w_a)\land L\in\rho_4(w_b)\right)\right). \end{aligned}

We start by checking that for every w with w \models \Gamma_d we have g_d(w) \neq \star. The first line of \Gamma_d ensures that w is consistent. Let \tau \in \mathcal{Q}_k\cup\{\mathrm{inc},\mathrm{dec}\} be the profile \tau of w, and first consider the case when \tau \in \mathcal{Q}_k. Thus, only the second and third line of \Gamma_d are relevant in this case.

Let u_j denote the sub-word of w consisting of those w_i with \rho_3(w_i) = j. The condition \exists i: \rho_3(w_i) = j ensures that u_j is non-empty for every 1\leq j \leq |\tau|, and the second line ensures that w coincides with the concatenation u_1\dots u_{|\tau|}. Finally, the condition w \models (\Gamma_{d-1})_j is equivalent to having \rho_1(u_j) \models \Gamma_{d-1} for every 1 \leq j \leq |\tau|, which by induction implies that g_{d-1}(\rho_1(u_i)) \neq \star for every 1 \leq i\leq |\tau|. In particular, we must have g_d(w) \neq \star, as required.

Now suppose that \tau \in \{\mathrm{inc},\mathrm{dec}\}. For each s, let i(s) and j(s) denote the indices chosen so that the fourth line is satisfied for this particular value of s, and write u^{(s)} for the sub-word w_{i(s)}\dots w_{j(s)}.

Claim.

For each s, the sub-word u^{(s)} satisfies the conditions (?), (?) and (?), (?). In particular, the word w can be expressed as a concatenation w = u_1\dots u_\ell for some u_1,\dots,u_\ell chosen so that for every j we have u_j = u^{(s_j)} for some s_j.

Proof.

Given an index s, we start with the case when i(s) = j(s) = s. In this case, we must have w \models \psi_{=}(i(s),j(s)), which in turn implies that \rho_4(w_{i(s)}) = \{L,R\}. Thus, the word u^{(s)} that consists of a single letter w_{i(s)} trivially satisfies both of the conditions (?), (?) and (?), (?).

Now suppose that i(s) \neq j(s), and thus we must have i(s) < j(s). Thus the fourth line ensures that w \models \forall t: \psi_{\neq}(i(s),j(s),t), which by construction of \psi_{\neq} implies

  1. (i) \rho_4(w_{i(s)}) = \{L\},

  2. (ii) \rho_4(w_{j(s)}) = \{R\}, and

  3. (iii) \rho_4(w_t) = \emptyset for every i(s) < t < j(s).

These conditions together are clearly equivalent to the fact that u^{(s)} satisfies both of the conditions (?), (?) and (?), (?), which proves the first part of the claim.

To prove the second part, observe that the sub-words u^{(s)} cover w as each w_s is trivially contained in u^{(s)}. In addition, recall that each u^{(s)} consists of a set of contiguous letters. Hence, it suffices to prove that for each s \neq s', the sub-words u^{(s)} and u^{(s')} are either identical or disjoint.

Suppose that s \neq s' are chosen so that u^{(s)} and u^{(s')} are neither identical nor disjoint. Since both of them consists of a contiguous set of letters, we must have i(s) \in [i(s'),j(s')] or i(s')\in [i(s),j(s)]. By symmetry, we may assume that the first case occurs.

Since u^{(s')} satisfies property (?), (?) and L \in \rho_4(w_{i(s)}), we must have i(s) = i(s'). As u^{(s)} and u^{(s')} are not identical, we must have j(s) \neq j(s'), and by symmetry, we may assume that j(s) < j(s'). Since R \in \rho_4(w_{j(s)}) and j(s) \in [i(s),j(s')] this contradicts the fact that u^{(s')} satisfies property (?), (?). This completes the proof of Claim ?, ?.

Claim ?, ? implies that any w with w \models \Gamma_d and whose profile is in \{\mathrm{inc},\mathrm{dec}\} decomposes as a concatenation w = u_1\dots u_\ell, where the sub-words u_i satisfy properties (?), (?) and (?), (?). In addition, the last part of both \psi_{\neq} and \psi_{=} implies that we must also have \rho_1(u_i) \models \Gamma_{d-1} for each i, whence the inductive assumption implies that g_{d-1}(\rho_1(u_i)) \neq \star for each i. When \tau = \mathrm{dec}, the last line of \Gamma_d ensures that \ell\geq 2: as the letters marked with L coincide with the first letters in the sub-words u_i and there must be at least two such letters L, we indeed have \ell \geq 2. Thus we conclude that g_d(w) \neq \star. The proof of the converse direction follows similarly, we omit the details.

Remark

Remark 13

EO8C

Given \Psi \in \mathrm{FOS} (resp. \psi(x_1,\dots,x_\ell) \in \mathrm{FO}), then we have \Psi_i, \Psi_{i,j} \in \mathrm{FOS} (resp. \psi_i(x_1,\dots,x_\ell), \psi_{i,j}(x_1,\dots,x_\ell) \in \mathrm{FO}) for all i and j.

Used by Proof
Proof of Remark 13

The proof is an easy application of Lemma 6, we omit the details.

Remark

Remark 15

UES7

Let v^{(f)}_1,\dots,v^{(f)}_{c_1},v^{(b)}_1,\dots,v^{(b)}_{c_2} denote variables (either first- or second-order variables), with v^{(f)}_i’s corresponding to free and v^{(b)}_i’s corresponding to bound variables. Let \psi(v^{(f)}_1,\dots,v^{(f)}_{c_1}) denote a monadic second-order formula in \mathrm{TOTO} given in disjunctive normal form, i.e.

\begin{aligned} \psi(v^{(f)}_1,\dots,v^{(f)}_{c_1}) = Q_1 v^{(b)}_1\dots Q_{c_2} v^{(b)}_{c_2}: \left[\left(p_{1,1} \land \dots \land p_{1,a_1}\right) \lor \dots \lor \left(p_{b,1} \land \dots \land p_{b,a_b}\right)\right], \end{aligned}

where each p_{i,j} is an atomic formula or its negation involving variables in v^{(f)}_1,\dots,v^{(f)}_{c_1},
v^{(b)}_1,\dots,v^{(b)}_{c_2}. There exists a monadic second-order formula \phi of the form

\begin{aligned} \phi(\nu^{(f)}_1,\dots,\nu^{(f)}_{c_1}) = Q_1 \nu^{(b)}_1 \dots Q_{c_2} \nu^{(b)}_{c_2}: \left[\left(q_{1,1} \land \dots \land q_{1,a_1}\right) \lor \dots \lor \left(q_{b,1} \land \dots \land q_{b,a_b}\right)\right] \end{aligned}

satisfying the following properties:

  1. (i) each variable \nu^{(f)}_i or \nu^{(b)}_j has the same order as the respective variable v^{(f)}_i or v^{(b)}_j;

  2. (ii) each formula q_{i,j} depends only on the formula p_{i,j}; and

  3. (iii) for each a_1,\dots,a_{c_1} and w \in \Sigma_d^* satisfying w \models \Gamma_d, we have w \models \phi(a_1,\dots,a_{c_1}) if and only if f_d(w) \models \psi(\alpha_w(a_1),\dots,\alpha_w(a_{c_1})).

In addition, if \psi is a first-order formula, then so is \phi.

Used by Proof, Proof, Proof, Proof
Proof of Remark 15

For each variable v_i^{(\beta)} with \beta \in \{f,b\} occurring in \psi either as a bound or free variable, we define \nu_i^{(\beta)} to be a variable of the same order, and we say that \nu_i^{(\beta)} is the corresponding variable in \phi. Given a variable x_{\psi} occurring in \psi, we write x_{\phi} for the corresponding variable in \phi. Define the formulae q_{i,j} as follows:

  1. (i) if p_{i,j} := (x_\psi = y_\psi), we set q_{i,j} := (x_{\phi} = y_\phi);

  2. (ii) if p_{i,j} := (x_\psi \in y_\psi), we set q_{i,j} := (x_\phi \in y_\phi);

  3. (iii) if p_{i,j} := (x_\psi \leq_s y_\psi) for s \in \{1,2\}, we set q_{i,j} := \xi_{s,d}(x_\phi, y_\phi); and

  4. (iv) if p_{i,j} is a negation of an atomic formula, we define q_{i,j} to be the negation of the appropriate formula constructed as above.

Having defined the formulae q_{i,j}, define \phi(\nu_{1}^{(f)},\dots,\nu_{c_1}^{(f)}) to be the formula given by equation (15). For convenience, write \psi'(v^{(f)}_1,\dots,v^{(f)}_{c_1},v^{(b)}_1,\dots,v_{c_2}^{(b)}) for the quantifier-free part of \psi, i.e.

\psi'(v^{(f)}_1,\dots,v^{(f)}_{c_1},v^{(b)}_1,\dots,v_{c_2}^{(b)}) := (p_{1,1} \land \dots \land p_{1,a_1}) \lor \dots \lor (p_{b,1} \land \dots \land p_{b,a_b}),

and similarly write \phi'(\nu ^{(f)}_1,\dots,\nu ^{(f)}_{c_1},\nu ^{(b)}_1,\dots,\nu_{c_2}^{(b)}) for the quantifier-free part of \phi. Given an integer t \in \{0,\dots,c_2\} and constants a_1,\dots,a_{c_1} and b_{1},\dots,b_{t}, define

\begin{aligned} \psi_t(a_1,\dots,a_{c_1},b_1,\dots,b_t) := Q_{t+1} v_{t+1}^{(b)} \dots Q_{c_2} v^{(b)}_{c_2}: \psi'(a_1,\dots,a_{c_1},b_1,\dots,b_t,v_{t+1},\dots,v_{c_2}), \end{aligned}

and similarly define

\begin{aligned} \phi_t(a_1,\dots,a_{c_1},b_1,\dots,b_t) := Q_{t+1} \nu_{t+1}^{(b)} \dots Q_{c_2} \nu^{(b)}_{c_2}: \phi'(a_1,\dots,a_{c_1},b_1,\dots,b_t,\nu_{t+1},\dots,\nu_{c_2}). \end{aligned}

Write X \subseteq \{1,\dots,c_2\} for the set of indices t for which we have Q_t = \forall. Finally, we say that a constant c_i chosen as the value of the variable x_i has correct order if c_i and x_i are first-order constant and variable respectively, or they are second-order constant and variable respectively.

Having defined the necessary notation, we move on to the main part of the proof. We only prove the reverse direction of the statement as the proof of the other direction follows analogously. That is, we prove that whenever f_d(w) \models \psi(b_1,\dots,b_{c_1}) for some constants b_1,\dots,b_{c_1}, then w \models \phi(\alpha_w^{-1}(b_1),\dots,\alpha_w^{-1}(b_{c_1})).

Claim.

Let \underline{s} be a [c_1]-tuple of constants in f_d(w) with correct orders with respect to the variables v^{(f)}_i chosen so that f_d(w) \models \psi(s_1,\dots,s_{c_1}). Let \underline{t} denote the [c_1]-tuple of constants in w chosen so that t_i = \alpha_w^{-1}(s_i) for each i \in [c_1], and let \hat{\underline{u}} = (\hat{u}_i: i \in X) denote an arbitrary X-tuple of constants in w of the correct orders. There exists a [c_2]-tuple of constants \underline{u} for which the following properties hold for every j \in \{0,1,\dots,c_2\}:

  1. (i) if j \in X, we have u_j = \hat{u}_j;

  2. (ii) if j \not \in X and j > 0, the choice of u_j only depends on the tuple \underline{t}, and on the values of the constants in the tuple (\hat{u}_i: i \in X, i < j); and

  3. (iii) we have f_d(w) \models \psi_j(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_j)).

Before proving the claim, we note that the choice of t_i = \alpha_w^{-1}(s_i) in the statement exists and is unique as \alpha_w is a bijection.

Proof.

We construct the sequence \underline{u} by induction on j. The base case j = 0 follows immediately from the assumption that f_d(w) \models \psi(s_1,\dots,s_{c_1}) as \psi_0 = \psi, and since only the third condition is applicable in this case. Suppose that the statement holds for some j = i with i \in \{0,\dots,c_2-1\}. We split the proof into cases based on whether we have i + 1 \in X or i + 1\not \in X.

Case 1, i + 1 \in X: In this case, we set u_{i+1} = \hat{u}_{i+1}, and thus the first condition is automatically satisfied. Applying the inductive assumption with the third condition we conclude that

\begin{aligned} f_d(w) \models \forall v_{i+1} Q_{i+2} v_{i+2} \dots Q_{c_2} v_{c_2}: \psi'(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_i),v_{i+1},\dots,v_{c_2}). \end{aligned}

Here, we are using the fact that Q_{i+1} = \forall, which follows from i+1 \in X. By choosing v_{i+1} := \alpha_w(u_{i+1}), we conclude that

\begin{aligned} f_d(w) \models Q_{i+2} v_{i+2} \dots Q_{c_2} v_{c_2}: \psi'(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_{i+1}),v_{i+2},\dots,v_{c_2}). \end{aligned}

This coincides with the statement f_d(w) \models \psi_{i+1}(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_{i+1})), and thus completes the proof of Case 1.

Case 2, i + 1 \not \in X: In this case, the inductive assumption implies that

\begin{aligned} f_d(w) \models \exists v_{i+1} Q_{i+2} v_{i+2} \dots Q_{c_2} v_{c_2}: \psi'(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_i),v_{i+1},\dots,v_{c_2}). \end{aligned}

Let \gamma denote a constant chosen so that

\begin{aligned} f_d(w) \models Q_{i+2} v_{i+2} \dots Q_{c_2} v_{c_2}: \psi'(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_i),\gamma, v_{i+2},\dots,v_{c_2}). \end{aligned}

Note that \gamma only depends on the tuple \underline{s}, and the choices of \alpha_w(u_1),\dots,\alpha_w(u_i). Let u_{i+1} = \alpha_w^{-1}(\gamma), and note that \alpha_w^{-1}(\gamma) is well-defined since \alpha_w is a bijection. Since \alpha_w is a bijection, the inductive assumption implies that the tuple (\alpha_w(u_1),\dots,\alpha_w(u_{i})) only depends on the tuple \underline{t} and the values of (\underline{\hat{u}}_j: j \in X, j \leq i). Thus u_{i+1} chosen in this way satisfies both the second and the third condition, as required.

Fix a sequence s_1,\dots,s_{c_1} and a X-tuple \hat{\underline{u}} = (\hat{u}_i: i \in X) for which we have f_d(w) \models \psi(s_1,\dots,s_{c_1}), and let \underline{t} and \underline{u} be constructed as in the statement of Claim ?. Applying Claim ? with j = c_2 yields that

f_d(w) \models \psi'(s_1,\dots,s_{c_1},\alpha_w(u_1),\dots,\alpha_w(u_{c_2})).

Recall that s_i = \alpha_w(t_i) for each i. Given i and j, let x_\psi and y_\psi denote the variables occurring in the formula p_{i,j} := p_{i,j}(x_\psi,y_\psi). By construction, we have q_{i,j} := q_{i,j}(x_\phi,y_\phi), and depending on the type of the atomic formula used to construct p_{i,j}, Lemma 16 or Lemma 18 respectively implies that for all a and b we have w \models q_{i,j}(a,b) if and only if f_d(w) \models p_{i,j}(\alpha_w(a),\alpha_w(b)). Since \alpha_w is a bijection, it follows that

w \models \phi'(t_1,\dots,t_{c_1},u_1,\dots,u_{c_2}).

Since the conclusion holds for an arbitrary X-tuple \hat{\underline{u}}, and the values of u_j with j \not \in X only depend on the values of \hat{\underline{u}}_i with i < j, we may use these values to assign correct choices for the variables attached with \exists-quantifiers. Hence, we conclude that

w \models \phi(t_1,\dots,t_{c_1}).

Since t_i = \alpha_w^{-1}(s_i) and \alpha_w is a bijection, this completes the proof. Proof of the other direction, i.e. of the fact that w \models \phi(a_1,\dots,a_{c_1}) implies f_d(w) \models \psi(\alpha_w(a_1),\dots,\alpha_w(a_{c_1})) follows analogously - we omit the details.

If \psi is a first-order formula, then all bound and free variables in \psi are first-order variables, and none of the p_{i,j}’s is of the form x_\psi \in y_\psi or its negation for some variables x_\psi and y_\psi. Thus the same must be true for the variables and formulae q_{i,j} in \phi, whence \phi must be a first-order formula as well. This completes the proof of Theorem 15.

Remark

Remark 16

07XF

Let w \in \Sigma_d^* be chosen so that w \models \Gamma_d.

  1. Let \psi(x,y) denote the \mathrm{TOTO}-formula given by x = y, and \phi(x',y') \in \mathrm{FO}(\Sigma_{d}^*) given by x' = y'. We have w \models \phi(a,b) if and only if f_d(w) \models \psi(\alpha_w(a), \alpha_w(b)).

  2. Let \psi(x,z) denote the \mathrm{MSO}-\mathrm{TOTO} formula given by x \in z, and \phi(x',z') be the monadic second-order formula given by x' \in z'. We have w \models \phi(a,b) if and only if f_d(w) \models \psi(\alpha_w(a), \alpha_w(b)). Here, we write \alpha_w(b) = \{\alpha_w(c): c \in b\}.

Used by Proof, Proof, Proof
Proof of Remark 16

Suppose that w, a and b are chosen so that w \models \Gamma_d and w \models \phi(a,b). Since the condition w \models \phi(a,b) is equivalent to a = b, it immediately follows that \alpha_w(a) = \alpha_w(b), whence we have f_d(w) \models \psi(\alpha_w(a),\alpha_w(b)).

Now suppose that w \models \Gamma_d and f_d(w) \models \psi(\alpha_w(a),\alpha_w(b)). This is equivalent to the fact that the points \alpha_w(a) and \alpha_w(b) are the same point. Since \alpha_w is an injection, we conclude that a = b, which in turn implies that w \models \phi(a,b). The proof of the second statement follows analogously.

Remark

Remark 17

UHFP

For every w with w \models \Gamma_1 we have w \models \xi_{s,1}(a,b) if and only if \alpha_w(a) \leq_s \alpha_w(b).

Used by Proof
Proof of Remark 17

We start with the case when the profile of w, which we denote by \tau, satisfies \tau \in \mathcal{Q}_k. Since d = 1, it follows that w = a_{\tau,1}\dots a_{\tau,|\tau|}, and thus \alpha_{w}(i) corresponds to the point (i,\tau(i)) in the canonical drawing of the permutation \tau = f_d(w). In particular, we have \alpha_w(a) \leq_1 \alpha_w(b) if and only if a \leq b, which by definition is equivalent to the condition \tau_1(a) \leq \tau_1(b). Thus, the first line of \xi_{1,1} guarantees that this condition is equivalent to w \models \xi_{1,1}(a,b), as required. When s = 2, the condition \alpha_w(i) \leq_2 \alpha_w(j) is equivalent to \tau(i) \leq \tau(j). Thus an analogous argument completes the proof in this case.

We now move on to the case when \tau = \mathrm{dec}. As f_d(w) is a decreasing permutation, the construction of the function \alpha_w ensures that we have \alpha_w(a) \leq_1 \alpha_w(b) if and only if a \leq b, and \alpha_w(a) \leq_2 \alpha_w(b) if and only if b \leq a. These two conditions clearly match the third and fourth lines in the definition of \xi_{s,1}. The case when \tau = \mathrm{inc} follows analogously.

Remark

Remark 18

807V

Let d be a positive integer. For every w with w \models \Gamma_d we have w \models \xi_{s,d}(a,b) if and only if \alpha_w(a) \leq_s \alpha_w(b).

Used by Proof, Proof, Proof
Proof of Remark 18

The proof is by induction on d, with the base case d = 1 covered by Lemma 17. Suppose that the statement holds for d -1, and let w\in \Sigma_d^* be chosen so that w \models \Gamma_d. Thus w is consistent and decomposes properly. Let u_1,\dots,u_m be chosen so that w decomposes as w = u_1\dots u_m. For each i \in \{1,\dots,m\} write \sigma_i = f_{d-1}(\rho_1(u_i)), and let \tau' be chosen so that f_d(w) = \tau'[\sigma_1,\dots,\sigma_m], and write \tau for the profile of w. We split the proof into three cases based on whether we have \tau \in \mathcal{Q}_k, \tau = \mathrm{dec} or \tau = \mathrm{inc}.

Case 1, \tau \in \mathcal{Q}_k: Since \tau \in \mathcal{Q}_k, we have \tau' = \tau. From the expression of \xi_{s,d} it immediately follows that the condition w \models \xi_{s,d}(a,b) is equivalent to w \models P_{s,\tau}(a,b). For convenience, write p = \alpha_w(a), q = \alpha_w(b), i_p = \rho_3(w_a) and i_q = \rho_3(w_b). Thus p belongs to the interval \sigma_{i_p} and q belongs to the interval \sigma_{i_q} in the inflation

\begin{aligned} f_d(w) = \tau'[\sigma_1,\dots,\sigma_m]. \end{aligned}

First suppose that i_p \neq i_q. As p and q belong to different intervals in inflation (?), the relative order of p and q can be determined using the indices i_p and i_q. Indeed, the condition p \leq_1 q is equivalent to i_p < i_q, and the condition p \leq_2 q is equivalent to \tau(i_p) < \tau(i_q). These conditions are clearly equivalent to the condition on the top line of P_{s,\tau}.

Now suppose that i_p = i_q = i. In this case, both p and q belong to the same interval \sigma_{i}, and the indices a and b belong to the same sub-word u_i, for which we have f_{d-1}(\rho_1(u_i)) = \sigma_i and \sigma_i \in \widetilde{\mathcal{O}}_k^{[d-1]}. Thus the inductive assumption implies that \xi_{s,d} satisfies the required properties.

Case 2, \tau =\mathrm{dec}: Note that the equation (?) remains valid, but the permutation \tau' is a monotone decreasing permutation, whose (unknown) length we denote by \ell. As before, we write p = \alpha_w(a) and q = \alpha_w(b), and choose i_p and i_q to be the indices in \{1,\dots,\ell\} so that w_a and w_b are contained in u_{i_p} and u_{i_q} respectively. In particular, i_p and i_q play the same role as the corresponding indices in the previous case (however, in this case we cannot define them using the function \rho_3 as it does not apply to words whose type is \mathrm{inc} or \mathrm{dec}).

Claim.

We have w \models P_{2}(a,b) if and only if i_p < i_q, and we have w \models P_{3}(a,b) if and only if i_q < i_p

Proof.

First suppose that w \models P_2(a,b), and let i = i_* be chosen so that a \leq i_*, i_* < b and R \in \rho_4(w_{i_*}). Let s be chosen so that w_{i_*} is contained in u_s. Hence, the condition a \leq i_* implies that i_p \leq s, and the conditions i_* < b and R \in \rho_4(w_{i_*}) imply that s < i_q. Note that in the second conclusion, the fact R \in \rho_4(w_{i_*}) ensures that w_{i_*} is the last letter in the sub-word u_s, which in turn ensures that w_b cannot be contained in u_s as b > i_*. Hence, it follows that i_p \leq s < i_q, as required.

If i_p < i_q, we may simply choose the value of i in P_2 to be the index of the last letter in u_{i_p}, which proves the converse. The second assertion follows analogously.

Claim.

We have w \models P_{4,s}(a,b) if and only if i_p = i_q, and the sub-word u_{i_p} satisfies \rho_1(u_{i_p}) \models \xi_{s,d-1}(a,b).

Proof.

First suppose that w \models P_{4,s}(a,b), and let i = i_* and j = j_* be chosen so that the remaining formula is satisfied for all values of \ell. The third and fourth lines of P_{4,s} imply that i_* and j_* are the first and last index of some u_t, and the first line implies that w_a and w_b must both belong to u_t. In particular, we must have t = i_p = i_q. Finally, the last line implies that \rho_1(u_t) \models \xi_{s,d-1}(a,b), as required. In order to prove the converse direction, choose the values of i and j to be the indices of the left and right endpoints of the sub-word u_{i_p}.

Suppose that a and b are chosen so that p \leq_s q. Our aim is to show that we have w \models \xi_{s,d}(a,b). First consider the case when s = 1 and i_p \neq i_q. In this case, p \leq_s q is equivalent to i_p < i_q, as p belongs to the interval corresponding to \sigma_{i_p} and q belongs to the interval corresponding to \sigma_{i_q}. By Claim ?, this is equivalent to having w\models P_2(a,b), which in turn implies that w \models \xi_{1,d}(a,b) by considering the third line of \xi_{1,d}.

Now suppose that s = 2 and i_p \neq i_q. In this case, p \leq_s q is equivalent to i_q < i_p, as \tau' is a monotone decreasing permutation. By Claim ?, this is equivalent to having w \models P_3(a,b), which due to the last line of \xi_{s,d} implies that w \models \xi_{2,d}(a,b).

Finally, suppose that i_p = i_q = t. In this case, both p and q belong to the same inflated block \sigma_{t}, and both letters w_a and w_b belong to the same sub-word u_t. Since p \leq_s q, the inductive hypothesis implies that \rho_1(u_t) \models \xi_{s,d-1}(a,b). In particular, Claim ? implies that w \models P_{4,s}(a,b). Thus, by considering the appropriate line in the construction of \xi_{s,d} it is easy to verify that we have w \models \xi_{s,d}(a,b), as required.

Proving that w \models \xi_{s,d}(a,b) implies that p \leq_s q follows by using a similar argument, we omit the details.

Case 3, \tau = \mathrm{inc}: The analysis is similar to the one presented in Case 2. We omit the details.

Remark

Remark 22

ALCY

[Theorem 6.2 in [vatter2011small]] Let \mathcal{F} be a small permutation class. Then \mathcal{F} is finitely based, i.e. there exists a finite collection of permutations \varphi_{1},\dots,\varphi_{L} so that \mathcal{F}=\bigcap_{i=1}^{L}\mathrm{Av}\left(\varphi_{i}\right).

Remark

Remark 23

XNUY

Let \mathcal{F} be a finitely based permutation class. There exists a first-order formula \upsilon_{\mathcal{F}}(x_1,x_2,y_1,y_2) for which \sigma \models \upsilon_{\mathcal{F}}(a_1,a_2,b_1,b_2) if and only if the sub-permutation \tau of \sigma is contained in \mathcal{F}, where \tau is induced by the points p in \sigma which satisfy the condition p \in [a_1,b_1]_1 \times [a_2,b_2]_2.

In particular, there exists a first-order sentence \hat{\upsilon}_{\mathcal{F}} for which we have \sigma \models \hat{\upsilon}_{\mathcal{F}} if and only if \sigma \in \mathcal{F}.

Used by Proof, Proof, Proof, Proof
Proof of Remark 23

Choose \varphi_1,\dots,\varphi_L so that \mathcal{F} = \bigcap_{i=1}^{L} \mathrm{Av}(\varphi_i). For each i \in [L], let A_i(x_1,x_2,y_1,y_2) denote the first-order formula given by

\begin{aligned} \exists z_1,\dots,z_{|\varphi_i|} :& \bigwedge_{j=1}^{|\varphi_i|} \left(z_j \in [x_1,y_1]_1 \times [x_2,y_2]_2\right)\\ & \land \bigwedge_{j = 1}^{|\varphi_i| - 1} \bigwedge_{\ell = j + 1}^{|\varphi_i|} \left(z_j <_1 z_\ell \land \left(z_j <_2 z_\ell \iff \varphi_i(j) < \varphi_i(\ell)\right)\right), \end{aligned}

and set

\upsilon_{\mathcal{F}}(x_1,x_2,y_1,y_2) := \bigwedge_{i=1}^{L} \left(\neg A_i(x_1,x_2,y_1,y_2)\right).

To check that \upsilon_\mathcal{F}(x_1,x_2,y_1,y_2) satisfies the required properties, suppose that we have \sigma \models A_i(a_1,a_2,b_1,b_2) for some i. The top line of A_i implies that each of the points z_1,\dots,z_{|\varphi_i|} is contained in [a_1,b_1]_1 \times [a_2,b_2]_2, while the second line implies that they form a sub-permutation that coincides with \varphi_i. Thus we have \sigma \models \upsilon_{\mathcal{F}}(x_1,x_2,y_1,y_2) if and only if the sub-permutation \tau of \sigma consisting of the points in [x_1,y_1]_1 \times [x_2,y_2]_2 does not contain \varphi_i as a sub-permutation for any 1 \leq i \leq L, as required. The second part of the statement follows by defining A_i to be the first-order sentence obtained from A_i(x_1,x_2,y_1,y_2) by deleting the second part of the top line, and setting \hat{\upsilon}_\mathcal{F} := \bigwedge_{i=1}^L \left(\neg A_i\right).

Remark

Remark 24

I67I

Let \tau be a permutation of length \ell. There exists a first-order formula \psi_{\tau}(x_{i,u,v}) with variables x_{i,u,v} for i \in \{1,\dots,\ell\} and u,v \in \{1,2\} which satisfies the following conditions. We have \sigma \models \psi_{\tau}(a_{i,u,v}) for some constants a_{i,u,v} if and only if \sigma = \tau[\sigma_1,\dots,\sigma_\ell] for some non-empty permutations \sigma_i \in \widetilde{\mathcal{O}}_k^{[d-1]}, and for each 1 \leq i\leq \ell, the points a_{i,u,1} and a_{i,u,2} are respectively the least and greatest points of \sigma_i in the order \leq_u for u \in \{1,2\}, and the sub-interval corresponding to \sigma_i consists of those points p which satisfy the condition p \in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2.

Proof of Remark 24

Let \upsilon_{d-1,k}(x_1,x_2,y_1,y_2) denote the first-order formula constructed in the statement of Proposition 23 with \mathcal{F} = \widetilde{\mathcal{O}}_k^{[d-1]}. We claim that one can take \psi_{\tau}(x_{i,u,v}) to be the formula

\begin{aligned} &\forall z: \bigvee_{i=1}^{\ell} \left(z \in [x_{i,1,1},x_{i,1,2}]_1 \times [x_{i,2,1},x_{i,2,2}]_2\right) \\ & \land \bigwedge_{i,i'=1}^{\ell} \bigwedge_{u,u'=1}^{2} \bigwedge_{v,v'=1}^{2} \left((i < i' \implies x_{i,u,v} <_1 x_{i',u',v'}) \land (\tau(i) < \tau(i') \implies x_{i,u,v} <_2 x_{i',u',v'})\right) \\ & \land \bigwedge_{i=1}^{\ell} \upsilon_{d-1,k}(x_{i,1,1},x_{i,2,1},x_{i,1,2},x_{i,2,2}) \\ &\land\bigwedge_{i=1}^{\ell}\bigwedge_{u,v=1}^{2} \left(x_{i,u,v}\in [x_{i,1,1},x_{i,1,2}]_1\times [x_{i,2,1},x_{i,2,2}]_2\right). \end{aligned}

Suppose that \sigma \models \psi_{\tau}(a_{i,u,v}), and for each i \in \{1,\dots,\ell\} let \sigma_i denote the sub-permutation induced by the points in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2. The second last line of \psi_{\tau} implies that we have \sigma_i \in \widetilde{\mathcal{O}}_k^{[d-1]} for each i, and the last line implies that the points a_{i,u,v} are chosen consistently so that each \sigma_i is indeed non-empty. The first line implies that each point p \in \sigma belongs to some \sigma_i. In addition, the second line implies that each \sigma_i forms a sub-interval of \sigma, and these intervals are ordered so that \sigma = \tau[\sigma_1,\dots,\sigma_\ell]. The converse direction follows analogously, we omit the details.

Remark

Remark 25

33MU
  1. Let \tau be a permutation in \widetilde{\mathcal{O}}_k. There exists a first-order formula \psi_{\tau,<_L}(x_{i,u,v}) with variables x_{i,u,v} for i \in \{1,\dots,|\tau|\} and u,v \in \{1,2\} so that \sigma \models \psi_{\tau,<_L}(a_{i,u,v}) if and only if the left-greedy decomposition of \sigma is given by \tau[\sigma_1,\dots,\sigma_{|\tau|}], where the points a_{i,u,1} and a_{i,u,2} are respectively the least and greatest points of \sigma_i in the order \leq_u for u \in \{1,2\}, and each \sigma_i consists of the points in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2.

  2. Let \hat{\Delta} be a first-order sentence in \Sigma_{d-1}^*. Given \tau \in \mathcal{Q}_k, there exists a first-order formula \Delta_\tau(\nu_{i,u,v}) with i \in \{1,\dots,|\tau|\}, and u,v\in\{1,2\} for which w \models \Delta_\tau(c_{i,u,v}) if and only if the following conditions hold:

    1. f_d(w) \neq \star and w has profile \tau;

    2. if w decomposes as w = u_1\dots u_{|\tau|}, then we have \rho_1(u_i) \models \hat{\Delta} for each i; and

    3. the left-greedy decomposition of f_d(w) is given by \tau[f_{d-1}(\rho_1(u_1)),\dots,f_{d-1}(\rho_1(u_{|\tau|}))], and we have f_d(w) \models \psi_{\tau,<_L}(\alpha_w(c_{i,u,v})).

In [ourotherpaper], we also require an analogous version of Lemma 25 to determine the end-points of the first B blocks when the profile \tau is a monotone permutation of arbitrary length. As the construction is somewhat similar to the proof of Lemma 25, we state and prove this result in the Appendix.

Proof.

Proof of statement 1: Given a positive integer t, define the auxiliary first-order formula \psi_{\geq,t}(x_1,\dots,x_t,y_1,\dots,y_t) as

\begin{aligned} \bigwedge_{j = 1}^{t} \left(\left(\bigwedge_{i=1}^{j-1} x_i = y_i\right) \implies y_j \leq_1 x_j\right). \end{aligned}

Note that the first term corresponding to j = 1 is simply y_1 \leq_1 x_1. Let S_{\tau} = \{\tau' \in \widetilde{\mathcal{O}}_k: |\tau'| < |\tau|\}. Define \psi_{\tau,<_L}(x_{i,u,v}) to be the formula

\begin{aligned} & \psi_{\tau}(x_{i,u,v}) \\ & \land \bigwedge_{\tau' \in S_{\tau}} \left(\forall_{i \in [|\tau'|], u,v\in \{1,2\}} y_{i,u,v}: (\neg \psi_{\tau'}(y_{i,u,v}))\right) \\ & \land \left(\forall_{i \in [|\tau|], u,v\in \{1,2\}} y_{i,u,v}: \psi_{\tau}(y_{i,u,v}) \implies \psi_{\geq, |\tau|}(x_{i,1,2},y_{i,1,2})\right). \end{aligned}

Suppose that \sigma \models \psi_{\tau,<_L}(a_{i,u,v}). For each i, let \sigma_i denote the sub-permutation of \sigma consisting of points p in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2. The first line of \psi_{\tau,<_L} implies that \sigma = \tau[\sigma_1,\dots,\sigma_{|\tau|}], and our goal is to show that \tau[\sigma_1,\dots,\sigma_{|\tau|}] is the left-greedy decomposition of \sigma.

Suppose that \tau' \in \widetilde{\mathcal{O}}_k and \sigma_1',\dots,\sigma'_{|\tau'|} \in \widetilde{\mathcal{O}}_k^{[d-1]} are chosen so that \sigma = \tau'[\sigma_1',\dots,\sigma'_{|\tau'|}], and suppose for the sake of contradiction we have \tau'[\sigma'_1,\dots,\sigma'_{|\tau'|}]<_{L}\tau[\sigma_1,\dots,\sigma_{|\tau|}]. First consider the case when |\tau'|< |\tau|. Let b_{i,u,v} be chosen so that \sigma'_i consists of the points in [b_{i,1,1},b_{i,1,2}]_1\times[b_{i,2,1},b_{i,2,2}]_2. Note that such b_{i,u,v} exist, as each \sigma_i' is a sub-interval of \sigma. Choosing y_{i,u,v} = b_{i,u,v} for this particular choice of \tau' for each i \in [|\tau'|] on the second line of \psi_{\tau,<_L} gives the desired contradiction.

Now suppose that |\tau'| = |\tau|. Proposition 2.3 in [albert2015inflations] implies that for any \sigma \in \widetilde{\mathcal{O}}_{k}^{[d]}, the set T(\sigma) of possible profiles \tau' of decompositions of \sigma as \sigma = \tau'[\sigma_1,\dots,\sigma_\ell] with \sigma_i \in \widetilde{\mathcal{O}}_{k}^{[d-1]} has a unique minimum element under sub-pattern containment. In particular, since \tau is an element of minimal size in T(\sigma), we must have \tau \leq \tau' and thus \tau = \tau'.

Let t be chosen so that |\sigma_i| = |\sigma_i'| for every i \leq t-1 and |\sigma_t'| > |\sigma_t|. Let b_{i,u,v} be chosen as above, and choose y_{i,u,v} = b_{i,u,v} on the last line of \psi_{\tau, <_L}. Since \sigma \models \psi_{\tau}(b_{i,u,v}), we must have \psi_{\geq,|\tau|}(a_{i,1,2},b_{i,1,2}). In particular, we have

\begin{aligned} \sigma \models \left(\left(\bigwedge_{i=1}^{t-1} a_{i,1,2} = b_{i,1,2}\right) \implies b_{t,1,2} \leq_1 a_{t,1,2}\right). \end{aligned}

Note that for each i, a_{i,1,2} is the largest point in \sigma_i with respect to \leq_1, and analogously b_{i,1,2} is the largest point in \sigma_i'. Thus, the condition a_{i,1,2} = b_{i,1,2} is equivalent to

\begin{aligned} \sum_{j=1}^{i} |\sigma_j| = \sum_{j=1}^i |\sigma_j'| \end{aligned}

and the condition b_{i,1,2} \leq_1 a_{i,1,2} is equivalent to

\begin{aligned} \sum_{j=1}^{i} |\sigma_j| \geq \sum_{j=1}^i |\sigma_j'|. \end{aligned}

In particular, the equation (?) implies that |\sigma_i| = |\sigma_i'| for every i \leq t-1 and |\sigma_t'| \leq |\sigma_t|, which gives the required contradiction. Proving the converse direction follows analogously, we omit the details.

Proof of statement 2: Given \tau \in \mathcal{Q}_k we write \ell = |\tau|. Define the first-order formula \chi_{\tau}(x_{i,u,v},x_i) involving the variables x_{i,u,v} and x_i for i\in [\ell], u,v \in \{1,2\} by setting

\begin{aligned} \psi_{\tau,<_L}(x_{i,u,v}) \land \bigwedge_{i=1}^\ell \left(x_i \in [x_{i,1,1},x_{i,1,2}]_1\times [x_{i,2,1},x_{i,2,2}]_2\right). \end{aligned}

Let \hat{\Delta}_{\tau}(\nu_{i,u,v},\nu_i) denote the first-order formula in \Sigma_{d}^* obtained by applying Theorem 15 to \chi_{\tau}(x_{i,u,v},x_i), where \nu_i and \nu_{i,u,v} are the variables corresponding to x_i and x_{i,u,v} respectively. Let \Delta_{\tau}(\nu_{i,u,v}) denote the first-order formula in \Sigma_{d}^* given by

\begin{aligned} &\Gamma_d\land(\forall\nu:\rho_2(w_\nu)=\tau)\land\bigwedge_{i=1}^{\ell}\hat\Delta_i\\ &\land\forall\nu_1\cdots\forall\nu_\ell: \left(\left(\bigwedge_{i'=1}^{\ell}\rho_3(w_{\nu_{i'}})=i'\right) \implies\hat\Delta_\tau(\nu_{i,u,v},\nu_i)\right), \end{aligned}

where, as before, \hat{\Delta}_i denotes the first-order sentence \hat{\Delta} applied to \rho_1(u_i), where u_i denotes the sub-word of w which consists of those letters w_j which satisfy \rho_3(w_j) = i.

To check that \Delta_\tau satisfies the required properties, suppose that w\models \Delta_\tau(c_{i,u,v}). As the first two conditions in the expression of \Delta_\tau imply that w \models \Gamma_d and \rho_2(w_i) = \tau for all i, it follows that w decomposes as w = u_1\dots u_\ell, where u_i is the sub-word of w which consists of all letters w_j with \rho_3(w_j) = i. In addition, the condition \hat{\Delta}_i ensures that for each i we have \rho_1(u_i) \models \hat{\Delta}. Thus the conditions (a) and (b) are satisfied.

For each i \in \{1,\dots,\ell\} and u,v\in \{1,2\} write b_{i,u,v} = \alpha_w(c_{i,u,v}), set \sigma_i := f_{d-1}(\rho_1(u_i)), and choose \tau' \in \widetilde{\mathcal{O}}_k and \sigma_1',\dots,\sigma_{|\tau'|}' so that the left-greedy decomposition of f_d(w) is given by \tau'[\sigma_1',\dots,\sigma_{|\tau'|}']. Since each u_i is non-empty, we may choose \nu_i in u_i for every i. The last condition of \Delta_\tau and Theorem 15 imply that f_d(w) \models \psi_{\tau,<_L}(b_{i,u,v}). Hence we must have \tau' = \tau, and for each i \in \{1,\dots,\ell\}, the permutation \sigma_i' consists of points in [b_{i,1,1},b_{i,1,2}]_1 \times [b_{i,2,1},b_{i,2,2}]_2. On the other hand, varying a single \nu_i over the indexes of u_i while keeping the other choice of \nu_j fixed, it is easy to see that the second condition in the construction (?), the condition \rho_3(w_{\nu_i})= i in the construction (?) and Theorem 15 together imply that every point corresponding to the letters of u_i belongs to the rectangular block corresponding to \sigma_i'. Since \alpha_w is a bijection, the blocks B_i consisting of points corresponding to the letters of the word u_i partition f_d(w). Since the blocks corresponding to \sigma_i' also partition f_d(w), the inclusions must be equalities, and thus B_i = \sigma_i' for every i.

Thus, we conclude that \alpha_w(j) \in [b_{i,1,1},b_{i,1,2}]_1 \times [b_{i,2,1},b_{i,2,2}]_2 if and only if \rho_3(w_j) = i. Equivalently, the letter w_j belongs to the sub-word u_i if and only if the corresponding point \alpha_w(j) belongs to \sigma_i'. By the recursive construction of the functions \alpha_w we have f_{d-1}(\rho_1(u_i)) = \sigma_i' for each i \in \{1,\dots,\ell\}. This verifies that the final condition (c) is also satisfied.

Proof of the converse direction follows analogously.

Used by Proof, Proof, Proof
Proof

Proof

F3VL

Proof of statement 1: Given a positive integer t, define the auxiliary first-order formula \psi_{\geq,t}(x_1,\dots,x_t,y_1,\dots,y_t) as

\begin{aligned} \bigwedge_{j = 1}^{t} \left(\left(\bigwedge_{i=1}^{j-1} x_i = y_i\right) \implies y_j \leq_1 x_j\right). \end{aligned}

Note that the first term corresponding to j = 1 is simply y_1 \leq_1 x_1. Let S_{\tau} = \{\tau' \in \widetilde{\mathcal{O}}_k: |\tau'| < |\tau|\}. Define \psi_{\tau,<_L}(x_{i,u,v}) to be the formula

\begin{aligned} & \psi_{\tau}(x_{i,u,v}) \\ & \land \bigwedge_{\tau' \in S_{\tau}} \left(\forall_{i \in [|\tau'|], u,v\in \{1,2\}} y_{i,u,v}: (\neg \psi_{\tau'}(y_{i,u,v}))\right) \\ & \land \left(\forall_{i \in [|\tau|], u,v\in \{1,2\}} y_{i,u,v}: \psi_{\tau}(y_{i,u,v}) \implies \psi_{\geq, |\tau|}(x_{i,1,2},y_{i,1,2})\right). \end{aligned}

Suppose that \sigma \models \psi_{\tau,<_L}(a_{i,u,v}). For each i, let \sigma_i denote the sub-permutation of \sigma consisting of points p in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2. The first line of \psi_{\tau,<_L} implies that \sigma = \tau[\sigma_1,\dots,\sigma_{|\tau|}], and our goal is to show that \tau[\sigma_1,\dots,\sigma_{|\tau|}] is the left-greedy decomposition of \sigma.

Suppose that \tau' \in \widetilde{\mathcal{O}}_k and \sigma_1',\dots,\sigma'_{|\tau'|} \in \widetilde{\mathcal{O}}_k^{[d-1]} are chosen so that \sigma = \tau'[\sigma_1',\dots,\sigma'_{|\tau'|}], and suppose for the sake of contradiction we have \tau'[\sigma'_1,\dots,\sigma'_{|\tau'|}]<_{L}\tau[\sigma_1,\dots,\sigma_{|\tau|}]. First consider the case when |\tau'|< |\tau|. Let b_{i,u,v} be chosen so that \sigma'_i consists of the points in [b_{i,1,1},b_{i,1,2}]_1\times[b_{i,2,1},b_{i,2,2}]_2. Note that such b_{i,u,v} exist, as each \sigma_i' is a sub-interval of \sigma. Choosing y_{i,u,v} = b_{i,u,v} for this particular choice of \tau' for each i \in [|\tau'|] on the second line of \psi_{\tau,<_L} gives the desired contradiction.

Now suppose that |\tau'| = |\tau|. Proposition 2.3 in [albert2015inflations] implies that for any \sigma \in \widetilde{\mathcal{O}}_{k}^{[d]}, the set T(\sigma) of possible profiles \tau' of decompositions of \sigma as \sigma = \tau'[\sigma_1,\dots,\sigma_\ell] with \sigma_i \in \widetilde{\mathcal{O}}_{k}^{[d-1]} has a unique minimum element under sub-pattern containment. In particular, since \tau is an element of minimal size in T(\sigma), we must have \tau \leq \tau' and thus \tau = \tau'.

Let t be chosen so that |\sigma_i| = |\sigma_i'| for every i \leq t-1 and |\sigma_t'| > |\sigma_t|. Let b_{i,u,v} be chosen as above, and choose y_{i,u,v} = b_{i,u,v} on the last line of \psi_{\tau, <_L}. Since \sigma \models \psi_{\tau}(b_{i,u,v}), we must have \psi_{\geq,|\tau|}(a_{i,1,2},b_{i,1,2}). In particular, we have

\begin{aligned} \sigma \models \left(\left(\bigwedge_{i=1}^{t-1} a_{i,1,2} = b_{i,1,2}\right) \implies b_{t,1,2} \leq_1 a_{t,1,2}\right). \end{aligned}

Note that for each i, a_{i,1,2} is the largest point in \sigma_i with respect to \leq_1, and analogously b_{i,1,2} is the largest point in \sigma_i'. Thus, the condition a_{i,1,2} = b_{i,1,2} is equivalent to

\begin{aligned} \sum_{j=1}^{i} |\sigma_j| = \sum_{j=1}^i |\sigma_j'| \end{aligned}

and the condition b_{i,1,2} \leq_1 a_{i,1,2} is equivalent to

\begin{aligned} \sum_{j=1}^{i} |\sigma_j| \geq \sum_{j=1}^i |\sigma_j'|. \end{aligned}

In particular, the equation (?) implies that |\sigma_i| = |\sigma_i'| for every i \leq t-1 and |\sigma_t'| \leq |\sigma_t|, which gives the required contradiction. Proving the converse direction follows analogously, we omit the details.

Proof of statement 2: Given \tau \in \mathcal{Q}_k we write \ell = |\tau|. Define the first-order formula \chi_{\tau}(x_{i,u,v},x_i) involving the variables x_{i,u,v} and x_i for i\in [\ell], u,v \in \{1,2\} by setting

\begin{aligned} \psi_{\tau,<_L}(x_{i,u,v}) \land \bigwedge_{i=1}^\ell \left(x_i \in [x_{i,1,1},x_{i,1,2}]_1\times [x_{i,2,1},x_{i,2,2}]_2\right). \end{aligned}

Let \hat{\Delta}_{\tau}(\nu_{i,u,v},\nu_i) denote the first-order formula in \Sigma_{d}^* obtained by applying Theorem 15 to \chi_{\tau}(x_{i,u,v},x_i), where \nu_i and \nu_{i,u,v} are the variables corresponding to x_i and x_{i,u,v} respectively. Let \Delta_{\tau}(\nu_{i,u,v}) denote the first-order formula in \Sigma_{d}^* given by

\begin{aligned} &\Gamma_d\land(\forall\nu:\rho_2(w_\nu)=\tau)\land\bigwedge_{i=1}^{\ell}\hat\Delta_i\\ &\land\forall\nu_1\cdots\forall\nu_\ell: \left(\left(\bigwedge_{i'=1}^{\ell}\rho_3(w_{\nu_{i'}})=i'\right) \implies\hat\Delta_\tau(\nu_{i,u,v},\nu_i)\right), \end{aligned}

where, as before, \hat{\Delta}_i denotes the first-order sentence \hat{\Delta} applied to \rho_1(u_i), where u_i denotes the sub-word of w which consists of those letters w_j which satisfy \rho_3(w_j) = i.

To check that \Delta_\tau satisfies the required properties, suppose that w\models \Delta_\tau(c_{i,u,v}). As the first two conditions in the expression of \Delta_\tau imply that w \models \Gamma_d and \rho_2(w_i) = \tau for all i, it follows that w decomposes as w = u_1\dots u_\ell, where u_i is the sub-word of w which consists of all letters w_j with \rho_3(w_j) = i. In addition, the condition \hat{\Delta}_i ensures that for each i we have \rho_1(u_i) \models \hat{\Delta}. Thus the conditions (a) and (b) are satisfied.

For each i \in \{1,\dots,\ell\} and u,v\in \{1,2\} write b_{i,u,v} = \alpha_w(c_{i,u,v}), set \sigma_i := f_{d-1}(\rho_1(u_i)), and choose \tau' \in \widetilde{\mathcal{O}}_k and \sigma_1',\dots,\sigma_{|\tau'|}' so that the left-greedy decomposition of f_d(w) is given by \tau'[\sigma_1',\dots,\sigma_{|\tau'|}']. Since each u_i is non-empty, we may choose \nu_i in u_i for every i. The last condition of \Delta_\tau and Theorem 15 imply that f_d(w) \models \psi_{\tau,<_L}(b_{i,u,v}). Hence we must have \tau' = \tau, and for each i \in \{1,\dots,\ell\}, the permutation \sigma_i' consists of points in [b_{i,1,1},b_{i,1,2}]_1 \times [b_{i,2,1},b_{i,2,2}]_2. On the other hand, varying a single \nu_i over the indexes of u_i while keeping the other choice of \nu_j fixed, it is easy to see that the second condition in the construction (?), the condition \rho_3(w_{\nu_i})= i in the construction (?) and Theorem 15 together imply that every point corresponding to the letters of u_i belongs to the rectangular block corresponding to \sigma_i'. Since \alpha_w is a bijection, the blocks B_i consisting of points corresponding to the letters of the word u_i partition f_d(w). Since the blocks corresponding to \sigma_i' also partition f_d(w), the inclusions must be equalities, and thus B_i = \sigma_i' for every i.

Thus, we conclude that \alpha_w(j) \in [b_{i,1,1},b_{i,1,2}]_1 \times [b_{i,2,1},b_{i,2,2}]_2 if and only if \rho_3(w_j) = i. Equivalently, the letter w_j belongs to the sub-word u_i if and only if the corresponding point \alpha_w(j) belongs to \sigma_i'. By the recursive construction of the functions \alpha_w we have f_{d-1}(\rho_1(u_i)) = \sigma_i' for each i \in \{1,\dots,\ell\}. This verifies that the final condition (c) is also satisfied.

Proof of the converse direction follows analogously.

Remark

Remark 26 (Special case of Proposition 2.4)

V1BU

Given \sigma \in \widetilde{\mathcal{O}}_k^{[d]}, the expression \sigma_1 \oplus \dots \oplus \sigma_\ell with \sigma_i \in \widetilde{\mathcal{O}}_k^{[d-1]} is not the left-greedy decomposition of \sigma if and only if there exists i \in \{1,\dots,\ell-1\} for which \sigma_i \oplus \sigma_{i+1} = \theta_1 \oplus \theta_2 for some \theta_1,\theta_2 \in \widetilde{\mathcal{O}}_k^{[d-1]} with |\theta_1| > |\sigma_{i}| (allowing the possibility that \theta_2 is the empty permutation).

An analogous statement holds when all the instances of \oplus are replaced with \ominus.

Used by Proof, Proof
Remark

Remark 27

VOQR

There exists a first-order formula \psi_{\oplus}(x_{i,u,v}) with variables x_{i,u,v} for i,u,v \in \{1,2\} which satisfies the following conditions. For i \in \{1,2\}, let \theta_i denote the sub-permutation consisting of the points in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2.

  1. (i) Whenever \sigma \models \psi_{\oplus}(a_{i,u,v}), we have \sigma = \theta_1 \oplus \theta_2, and \theta_i \in \widetilde{\mathcal{O}}_k^{[d-1]}

  2. (ii) Given any decomposition of \sigma as \sigma = \theta_1 \oplus \theta_2 for non-empty \theta_i \in \widetilde{\mathcal{O}}_k^{[d-1]}, let a_{i,u,v} denote the extremal points in \theta_i chosen as above. Then \sigma \models \psi_{\oplus}(a_{i,u,v}).

Similarly, there exists a first-order formula \psi_{\ominus}(x_{i,u,v}) satisfying the appropriate conditions with each instance of \oplus replaced with \ominus.

Used by Proof, Proof
Proof of Remark 27

We claim that we may take \psi_{\oplus}(x_{i,u,v}) to be the first-order formula

\begin{aligned} & \left( \forall z: (z \in [x_{1,1,1},x_{1,1,2}]_1 \times [x_{1,2,1},x_{1,2,2}]_2 \lor z \in [x_{2,1,1},x_{2,1,2}]_1 \times [x_{2,2,1},x_{2,2,2}]_2) \right) \\ \land & \left( \forall z_1 \forall z_2: \left( \bigwedge_{i=1}^2 z_i \in [x_{i,1,1},x_{i,1,2}]_1 \times [x_{i,2,1},x_{i,2,2}]_2\right) \implies \left((z_1 <_1 z_2) \land (z_1 <_2 z_2)\right)\right) \\ \land & \bigwedge_{i=1}^2 \upsilon_{d-1,k}(x_{i,1,1},x_{i,2,1},x_{i,1,2},x_{i,2,2})\\ \land &\bigwedge_{i,u,v=1}^{2} \left(x_{i,u,v}\in[x_{i,1,1},x_{i,1,2}]_1 \times[x_{i,2,1},x_{i,2,2}]_2\right). \end{aligned}

Indeed, suppose that \sigma \models \psi_{\oplus}(a_{i,u,v}). Let \theta_1 and \theta_2 denote the sub-permutations defined as in the statement of the Lemma. The first line of \psi_\oplus implies that every point p \in \sigma belongs to at least one of \theta_1 or \theta_2, the second line implies that we have \sigma = \theta_1\oplus \theta_2, and the third line implies that we have \theta_1,\theta_2 \in \widetilde{\mathcal{O}}_k^{[d-1]}. Finally, the last line ensures that each of these rectangles is non-empty, and its specified endpoints are indeed its extremal points. Proving the converse follows similarly, we omit the details.

Remark

Remark 28

7GV1

There exists a first-order formula \psi_{\mathrm{inc}}(k_{1},\ell_1,k_2,\ell_2) \in \mathrm{FO}(\Sigma_{d}^*) so that w \models \psi_{\mathrm{inc}}(a_{1},b_1,a_2,b_2) if and only if the following conditions hold:

  1. w \models \Gamma_d, \rho_2(w_1) = \mathrm{inc}, and there exists j so that u_j and u_{j+1} coincide with the sub-words w_{a_1}\dots w_{b_1} and w_{a_2} \dots w_{b_2} respectively; and

  2. if f_{d-1}(\rho_1(u_j)) \oplus f_{d-1}(\rho_1(u_{j+1})) = \theta_1 \oplus \theta_2 for such choice of j as above, and for some (possibly empty) permutations \theta_1, \theta_2 \in \widetilde{\mathcal{O}}_k^{[d-1]}, we have |\theta_1| \leq |f_{d-1}(\rho_1(u_j))|.

Similarly, there exists a first-order formula \psi_{\mathrm{dec}}(k_1,\ell_1,k_2,\ell_2) which satisfies analogous conditions with \oplus replaced by \ominus.

Proof of Remark 28

Let \chi_{\square}(\nu,\nu_{u,v}) \in \mathrm{FO}(\Sigma_{d}^*) with u,v\in \{1,2\}denote the formula obtained by applying Theorem 15 to the formula x \in [x_{1,1},x_{1,2}]_1 \times [x_{2,1},x_{2,2}]_2. Write \chi_{\oplus}(\nu_{i,u,v}) for the first-order formula which corresponds to the formula \psi_{\oplus}(x_{i,u,v}) constructed in Lemma 27. In addition, recall that \upsilon_{d-1,k}(x_1,x_2,y_1,y_2) is the first-order formula constructed in Proposition 23, and let \chi_v denote the corresponding formula on words provided by Theorem 15.

Set \psi_{\mathrm{inc}}(k_1,\ell_1,k_2,\ell_2) to be the first-order formula

\begin{aligned} &\exists_{i,u,v\in \{1,2\}} \nu_{i,u,v}: \forall_{i\in \{1,2\}} \nu_i \text{ }\forall_{i,u,v\in \{1,2\}} \nu'_{i,u,v}\text{ } \forall t:\Bigl[ \\ & \Gamma_d \land \rho_2(w_1) = \mathrm{inc} \land k_1\leq\ell_1<k_2\leq\ell_2\land(t\leq\ell_1\lor k_2\leq t) \\ &\land\bigwedge_{i=1}^{2}\left((k_i\leq t\land t\leq\ell_i)\implies \left((L\in\rho_4(w_t)\iff t=k_i)\land(R\in\rho_4(w_t)\iff t=\ell_i)\right)\right)\\ &\land\bigwedge_{i=1}^{2}\left(\left(\bigwedge_{u,v=1}^{2}k_i\leq\nu_{i,u,v}\leq\ell_i\right) \land\left((k_i\leq\nu_i\land\nu_i\leq\ell_i)\iff\chi_\square(\nu_i,\nu_{i,u,v})\right)\right)\\ & \land \left(\neg \chi_{\upsilon}(\nu_{1,1,1},\nu_{1,2,1},\nu_{2,1,2},\nu_{2,2,2})\right)\\ &\land\left((\chi_\oplus(\nu'_{i,u,v}))_{k_1,\ell_2} \implies\xi_{1,d}(\nu'_{1,1,2},\nu_{1,1,2})\right)\Bigr]. \end{aligned}

Here (\chi_\oplus(\nu'_{i,u,v}))_{k_1,\ell_2} is the first-order formula on words obtained by applying Theorem 15 to the formula \chi_{\oplus}(\nu_{i,u,v}), and including the restriction that for every bound and free variable z must satisfy k_1 \leq z \leq \ell_2. Since L \in \rho_4(w_{k_1}) and R \in \rho_4(w_{\ell_2}), the points corresponding to the letters of the sub-word w_{k_1}\dots w_{\ell_2} form a union of blocks in the decomposition. In particular, the condition k_1 \leq z \leq \ell_2 simply implies that \alpha_w(z) belongs to the union of these blocks.

In order to check that \psi_{\mathrm{inc}} satisfies the required properties, suppose that we have w\models \psi_{\mathrm{inc}}(a_1,b_1,a_2,b_2). The second line implies that the profile of w is \mathrm{inc}, and w decomposes as w = u_1\dots u_\ell with each u_i satisfying the conditions described by (?), (?) and  (?), (?). The third line implies that both sub-words w_{a_i} \dots w_{b_i} must coincide with some u_j for both i \in \{1,2\}, and the condition b_1 < a_2 \land (\forall k: k \leq b_1 \lor a_2 \leq k) implies that there exists j so that w_{a_1}\dots w_{b_1} = u_j and w_{a_2} \dots w_{b_2} = u_{j+1} - that is, these two subwords in fact correspond to consecutive subwords u_j and u_{j+1}. Thus the first condition of Lemma is satisfied.

Fix values of \nu_{i,u,v} which realize the fact that w \models \psi_{\mathrm{inc}}(a_1,b_1,a_2,b_2). As usual, write \sigma = f_d(w) and \sigma_i = f_{d-1}(\rho_1(u_i)). In addition, write \tau for the monotone increasing permutation of length \ell.

Theorem 15 implies that the condition on the fourth line is equivalent to the following condition: the letter w_{\nu_i} is contained in the sub-word u_s for s \in \{j,j+1\} if and only if the corresponding point \alpha_w(\nu_i) is contained in the set [\alpha_w(\nu_{s',1,1}),\alpha_w(\nu_{s',1,2})]_1 \times [\alpha_w(\nu_{s',2,1}), \alpha_w(\nu_{s',2,2})]_2, where s' = s - j +1. Equivalently, when viewing \sigma as an inflation of the form \sigma = \tau[\sigma_1,\dots,\sigma_\ell], the points in \sigma_s are those in [\alpha_w(\nu_{s',1,1}),\alpha_w(\nu_{s',1,2})]_1 \times [\alpha_w(\nu_{s',2,1}), \alpha_w(\nu_{s',2,2})]_2 for both s \in \{j,j+1\}, where s' = s - j +1.

Suppose that \theta_1, \theta_2 \in \widetilde{\mathcal{O}}_k^{[d-1]} are chosen so that \sigma_{j} \oplus \sigma_{j+1} = \theta_1 \oplus \theta_2. The fifth line is equivalent to the condition that \sigma_j \oplus \sigma_{j+1} \not \in \widetilde{\mathcal{O}}_k^{[d-1]}, thus implying that both \theta_1 and \theta_2 must be non-empty. Note that the condition \chi_{\oplus}(\nu'_{i,u,v})_{k_1,\ell_2} is satisfied exactly when the values of the variables \nu'_{i,u,v}’s are chosen so that p \in \theta_i if and only if p \in [\alpha_w(\nu'_{i,1,1}),\alpha_w(\nu'_{i,1,2})]_1 \times [\alpha_w(\nu'_{i,2,1}),\alpha_w(\nu'_{i,2,2})]_2. This follows from the additional restriction imposed on the variable occurring in \chi_{\oplus}(\nu'_{i,u,v})_{k_1,\ell_2}, which ensures that the formula \chi_\oplus is applied to the sub-permutation \sigma_j \oplus \sigma_{j+1} (which consists of the points \alpha_w(s) for s \in [a_1,b_2]).

For any such choice of variables the condition \xi_{1,d}(\nu'_{1,1,2},\nu_{1,1,2}) must be satisfied. By Theorem 15, this is equivalent to having \alpha_w(\nu'_{1,1,2})\leq_1\alpha_w(\nu_{1,1,2}), which is equivalent to |\theta_1|\leq|\sigma_j|, as these points are the largest points in their respective blocks with respect to \leq_1. The proof of the converse direction and the construction for profile \mathrm{dec} follow analogously.

Remark

Remark 30

76Z7

For each d \geq 1 there exists a unique letter v \in \Sigma_d for which g_d(v) \neq \star.

Used by Proof
Proof of Remark 30

For the base case d = 1, we note that v = a_{\mathrm{inc}} is the unique such letter. For the inductive step, suppose that g_d(v) \neq \star. Note that \tau:= \rho_2(v) \in \mathcal{Q}_k is impossible, as then v (viewed as a word) must contain a letter with \rho_3-value i for each 1 \leq i \leq |\tau|. This is clearly impossible as |\tau| \geq 2 as v consists of just a single letter. If \rho_2(v) = \mathrm{dec}, then v viewed as a word must contain at least 2 distinct positions whose \rho_4-image contains L, which is again impossible.

Finally, if \rho_2(v) = \mathrm{inc}, we must have \rho_4(v) =\{L,R\}. Thus g_d(v) \neq \star if and only if g_{d-1}(\rho_1(v)) \neq \star by the construction of g_d. Thus \rho_1(v) is uniquely determined, and given that \rho_2(v) = \mathrm{inc} and \rho_4(v) = \{L,R\}, the letter v itself is uniquely determined.

Remark

Remark 31

JHU3

The automaton \mathcal A_d accepts exactly those w with g_d(w) \neq \star.

Proof of Remark 31

It is easy to check that the statement is true for d = 1; in particular, note that the state q_{\mathrm{dec}}^* ensures that a_{\mathrm{dec}}^n is accepted only when n \geq 2.

When d \geq 2, the inductive structure ensures that every w accepted by the automaton must decompose properly. If the type of w coincides with \tau, the statement follows easily: note that each sub-word u_i must be non-empty as the states in B_{\tau,i} have only directed edges to states in B_{\tau,j} with j \in \{i,i+1\}, and in both of these cases these edges are labelled with letters v satisfying \rho_3(v) = j. If the type of w equals \mathrm{inc} or \mathrm{dec}, then \mathcal{A}_d accepts w if and only if w decomposes as w = u_1\dots u_s into non-empty sub-words u_i which satisfy the following properties:

  1. \rho_1(u_t) is accepted by \mathcal{A}_{d-1} for every t,

  2. the only letter in u_i whose \rho_4-image contains L is its left end-point, and the only letter in u_i whose \rho_4-image contains R is its right end-point.

In addition, the block H_{\mathrm{dec}}^* guarantees that we must have s \geq 2 when the type of w is \mathrm{dec}. This completes the proof.

Remark

Remark 12

1VIL

An iterative sequence of depth j \in \{1,\dots,d\} is a sequence \underline{\tau} = (\tau_s,i_s)_{s = j}^d with \tau_s \in \mathcal{Q}_k \cup \{\mathrm{inc},\mathrm{dec},\mathrm{dec}^*\} for all j +1 \leq s \leq d, \tau_j \in \{\mathrm{inc},\mathrm{dec}\}, and i_s \in \{1,\dots,|\tau_s|\} for every s with \tau_s \in \mathcal{Q}_k, and with i_s otherwise undefined.

Remark

Remark 13

LQRV

Let \underline{\tau} = (\tau_s,i_s)_{s = j}^d denote an iterative sequence of depth j. We define the set H_{\underline{\tau}} of states in Q_d' by induction on d as follows. If d = 1, \underline{\tau} only consists of \tau_1 \in \{\mathrm{inc},\mathrm{dec}\} as i_1 is undefined. In this case, we define H_{\underline{\tau}} to be the set \{q_{\tau_1}\} in \mathcal{A}_1.

If d \geq 2 and j = d, we define H_{\underline{\tau}} = H_{\tau_d}. Note that this is well-defined as \tau_d \in \{\mathrm{inc},\mathrm{dec}\}. If j < d, let \underline{\tau}'=(\tau_s,i_s)_{s = j}^{d-1} denote the sequence obtained by deleting the last element of \underline{\tau}.

Let Q be the copy of Q_{d-1}' given by B_{\tau_d,i_d} if \tau_d \in \mathcal{Q}_k, by B_{\tau_d,\emptyset} if \tau_d \in \{\mathrm{inc},\mathrm{dec}\}, and by B^*_{\mathrm{dec},\emptyset} if \tau_d = \mathrm{dec}^*. We then define H_{\underline{\tau}} to be the set of states H_{\underline{\tau'}} obtained when we apply the definition to the sequence \underline{\tau}' in Q.

Remark

Remark 32

BQ38

Let C be a strongly connected set of states in Q'_d which is located along some directed walk from the initial state to an accepting state, and which either contain at least 2 states or a self-loop. Then there exists an iterative sequence \underline{\tau} of depth j so that C \subseteq H_{\underline{\tau}} and C \not \subseteq H_{\underline{\tau},\emptyset}.

Proof of Remark 32

We prove the statement by induction on d. When d = 1, the only strongly connected sets C satisfying the conditions are \{q_{\mathrm{inc}}\} and \{q_{\mathrm{dec}}\}, and both clearly satisfy the statement of the Lemma.

Since C either contains a self-loop or at least 2 states, it must contain a directed cycle. Note that a simple inductive argument proves that any directed edge in \mathcal{A}_d which does not end at \star is labelled with a unique letter.

Let v be letter attached as a label of an edge in C, and let \tau = \rho_2(v). First consider the case when \tau \in \mathcal{Q}_k. Then C must be clearly contained in H_{\tau}. Furthermore, since all the directed edges whose starting point is in B_{\tau,i} have their end-point in B_{\tau,i} \cup B_{\tau,i+1}, we conclude that all the states in C must belong to a single B_{\tau,i}. Since B_{\tau,i} corresponds to a copy of Q'_{d-1}, the inductive hypothesis implies that there exists an \underline{\tau}' =(\tau_s,i_s)_{s = j}^{d-1} satisfying the conclusion of the Lemma. Thus we may choose \underline{\tau} to be the sequence obtained by appending the sequence \underline{\tau}' by (\tau,i).

Now suppose that \tau = \mathrm{inc}. Since all the directed edges whose starting point is in H_{\mathrm{inc}} have their end-point in H_{\mathrm{inc}}\cup \{\star\}, we conclude that C \subseteq H_{\mathrm{inc}}. If C \subseteq B_{\mathrm{inc},\emptyset}, we may apply the inductive hypothesis as above to complete the proof (and by setting \tau_d = \mathrm{inc}). If C \not \subseteq B_{\mathrm{inc},\emptyset}, we may simply choose j = d and \tau_d = \mathrm{inc}. An analogous argument applies when \tau = \mathrm{dec} and C \subseteq H_{\mathrm{dec}}.

Finally, suppose that C \subseteq H_{\mathrm{dec}}^*. Recall that all the directed edges whose starting point is in B_{\mathrm{dec},\{R\}}^* or B_{\mathrm{dec},\{L,R\}}^* have their end-point in H_{\mathrm{dec}}. Similarly, all the directed edges whose end-point is in B_{\mathrm{dec},\{L\}}^* must have e_d as their starting point - and note that e_d is not contained in any directed cycle. Thus C cannot contain vertices from any of these sets, and thus we must have C \subseteq B_{\mathrm{dec},\emptyset}^*. Thus we may set \tau_d = \mathrm{dec}^*, and again an analogous argument completes the proof.

Remark

Remark 33

BU77

There exists a first-order sentence \Gamma_M so that w \models \Gamma_M if and only if f_M(w) \neq \star.

Proof of Remark 33

Let \Gamma_M be the first-order sentence

\begin{aligned} &\forall i\forall j\,\Bigl[ \bigwedge_{(a_1,b_1)\in\mathcal S_\pm} \bigwedge_{(a_2,b_2)\in\mathcal S_\star} ((\rho_6(w_i)=(a_1,b_1)\land\rho_6(w_j)=(a_2,b_2))\implies i<j) \Bigr]\\ &\land\forall i\forall j\,\Bigl[ \bigwedge_{(a_1,b_1),(a_2,b_2)\in\mathcal S_\star} ((\rho_6(w_i)=(a_1,b_1)\land\rho_6(w_j)=(a_2,b_2)\land i<j) \implies a_1\leq a_2)\Bigr]\\ &\land\bigwedge_{(a,b)\in\mathcal S_\star} \Bigl((\exists u\colon\rho_6(w_u)=(a,b)) \implies(\Gamma_d)_{(a,b)}\Bigr). \end{aligned}

As before, (\Gamma_d)_{(a,b)} denotes the first-order sentence \Gamma_d applied to the word \rho_5(u_{(a,b)}). In order to check that \Gamma_M satisfies the required properties, suppose that w \models \Gamma_M. The first line of \Gamma_M implies that w is of the form w = u_0w' for some w' \in \left(\Sigma_M \setminus \Sigma_{M,\pm}\right)^*, and the second line implies that each letter in u_{(i,j)} must precede the letters of u_{(i',j')} for every (i,j),(i',j') \in \mathcal{S}_\star with i < i'. In particular, we must have w = u_0u_{(i_1,j_1)}\dots u_{(i_r,j_r)}. Finally, the last line implies that for every 1 \leq s \leq r, either u_{(i_s,j_s)} is empty or \rho_5(u_{(i_s,j_s)}) \models \Gamma_{d}. The proof that for every w \in \Sigma_M^* with f_M(w) \neq \star we have w \models \Gamma_M follows analogously.

Remark

Remark 34

QAWV

Let w \in \Sigma_M^* be chosen so that w \models \Gamma_M.

  1. Let \psi(x,y) denote the \mathrm{MSO}-\mathrm{TOTO} formula given by x = y, and \phi(x',y') denote the formula in \mathrm{MSO}(\Sigma_M^*) given by x' = y'. We have w \models \phi(a,b) if and only if f_M(w) \models \psi(\alpha_{w,M}(a), \alpha_{w,M}(b)).

  2. Let \psi(x,z) denote the \mathrm{MSO}-\mathrm{TOTO} -formula given by x \in z, and \phi(x',z') denote the formula in \mathrm{MSO}(\Sigma_M^*) given by x' \in z'. We have w \models \phi(a,c) if and only if f_M(w) \models \psi(\alpha_{w,M}(a), \alpha_{w,M}(c)). Here, we define \alpha_{w,M}(c) := \{\alpha_{w,M}(t): t\in c\}.

Used by Proof
Proof of Remark 34

The proof is identical to the proof of Lemma 16.

Remark

Remark 35

QH3T

For every w \in \Sigma_M^* with w \models \Gamma_M we have w \models \xi_{s,M}(c_1,c_2) if and only if \alpha_{w,M}(c_1) \leq_s \alpha_{w,M}(c_2).

Used by Proof
Proof of Remark 35

Suppose that w, c_1 and c_2 are chosen so that w \models \Gamma_M and w \models \xi_{1,M}(c_1,c_2). Note that the condition \alpha_{w,M}(c_1) \leq_1 \alpha_{w,M}(c_2) is trivially equivalent to the condition \beta_{w,M}(c_1) \leq_1 \beta_{w,M}(c_2).

First consider the case when the formula on the first line is satisfied for x = c_1, y= c_2 and for some (a_1,b_1) and (a_2,b_2) \in \mathcal{S}. Using observation (?), \beta_{w,M}(c_1) belongs to the a_1-th column and \beta_{w,M}(c_2) belongs to the a_2-th column of the gridded permutation g_M(w). Since a_1 < a_2, we must have \beta_{w,M}(c_1) \leq_1 \beta_{w,M}(c_2), as required.

We now consider the case when the formula on the second line is satisfied for some (a_1,b_1) and (a_2,b_2), and write a_* = a_1 = a_2. Thus, the points \beta_{w,M}(c_1) and \beta_{w,M}(c_2) belong to the same column of g_M(w), whose index we denote by a_*, and every non-zero entry in the column is a \pm 1-entry. First suppose that \delta_{a_*} = 1. Since w \models \delta_{=,a_1}(c_1,c_2), it follows that c_1 \leq c_2. By the construction of the function g_M, this is clearly equivalent to \beta_{w,M}(c_1) \leq_1 \beta_{w,M}(c_2). The case \delta_{a_*} = -1 follows analogously from the construction of the formula \delta_{=,a_*}(x,y).

Finally, we consider the case when the formula on the last line is satisfied for some (a',b'). Thus the points \beta_{w,M}(c_1) and \beta_{w,M}(c_2) belong to the same cell C_{a',b'} of g_M(w), which is indexed by a \star-entry, and which contains the permutation f_{d}(\rho_5(u_{(a',b')})). Since w \models \xi_{1,d,(a',b')}(c_1,c_2), Lemma 18 implies that \beta_{w,M}(c_1) \leq_1 \beta_{w,M}(c_2), as required. The proof of the converse direction and the proof for \xi_{2,M} follow analogously.

Remark

Remark 36

XVCW

Let v^{(f)}_1,\dots,v^{(f)}_{c_1},v^{(b)}_1,\dots,v^{(b)}_{c_2} denote variables (either first or second-order variables), with v^{(f)}_i’s corresponding to free and v^{(b)}_i’s corresponding to bound variables. Let \psi(v^{(f)}_1,\dots,v^{(f)}_{c_1}) denote a monadic second-order formula in \mathrm{TOTO} given in disjunctive normal form, i.e.

\begin{aligned} \psi(v^{(f)}_1,\dots,v^{(f)}_{c_1}) = Q_1 v^{(b)}_1\dots Q_{c_2} v^{(b)}_{c_2} \left(\left(p_{1,1} \land \dots \land p_{1,a_1}\right) \lor \dots \lor \left(p_{b,1} \land \dots \land p_{b,a_b}\right)\right), \end{aligned}

where each p_{i,j} is an atomic formula or its negation using variables in v^{(f)}_1,\dots,v^{(f)}_{c_1},v^{(b)}_1,\dots,v^{(b)}_{c_2}. There exists a monadic second-order formula \phi in \Sigma_M^* of the form

\begin{aligned} \phi(\nu^{(f)}_1,\dots,\nu^{(f)}_{c_1}) = Q_1 \nu^{(b)}_1 \dots Q_{c_2} \nu^{(b)}_{c_2}: \left(q_{1,1} \land \dots \land q_{1,a_1}\right) \lor \dots \lor \left(q_{b,1} \land \dots \land q_{b,a_b}\right) \end{aligned}

satisfying the following properties:

  1. each variable \nu^{(f)}_i and \nu^{(b)}_j has the same order as the respective variable v^{(f)}_i and v^{(b)}_j;

  2. each formula q_{i,j} depends only on the formula p_{i,j}; and

  3. for each a_1,\dots,a_{c_1} and w \in \Sigma_M^* satisfying w \models \Gamma_M, we have w \models \phi(a_1,\dots,a_{c_1}) if and only if f_M(w) \models \psi(\alpha_{w,M}(a_1),\dots,\alpha_{w,M}(a_{c_1})).

In addition, if \psi is a first-order formula, then so is \phi.

Proof of Remark 36

The proof of Theorem 36 is identical to the proof of Theorem 15, apart from the following trivial modifications. The constructions of the formulae q_{i,j} are identical except for using the formulae \xi_{s,M} in place of \xi_{s,d}. In addition, Lemmas 34 and 35 are used instead of Lemmas 16 and 18 respectively. We omit the details.

Remark

Remark 37

GIM6

There exists a first-order sentence \Delta_M so that for every \sigma \in \mathrm{Geom}(M)_{d,k}, there exists a unique w \in \Sigma_M^* with w \models \Delta_M and f_M(w) = \sigma.

Proof of Remark 37

Define \Delta_M := \hat{\Delta}_M \land \Delta_{M,\#}, where \hat{\Delta}_M is the first-order sentence constructed in Proposition 46 and \Delta_{M,\#} is the first-order sentence constructed in Lemma 40. We claim that \Delta_M satisfies the required properties.

Given \sigma \in \mathrm{Geom}(M)_{d,k}, let \sigma_\# be the left-greedy representation of \sigma, and let w be the unique word chosen so that w \models \Delta_{M,\#} and g_M(w) =\sigma_{\#}. Since \sigma_\# is the left-greedy representation of \sigma, Proposition 46 implies that w \models \hat{\Delta}_M. Hence w \models \Delta_M, as required.

If f_M(w) = f_M(w') = \sigma and w, w' \models \Delta_M for some \sigma \in \mathrm{Geom}(M)_{d,k}, then the fact that w,w' \models \hat{\Delta}_M implies that g_M(w) = g_M(w'), as both g_M(w) and g_M(w') coincide with the (unique) left-greedy representation of \sigma. Since w,w' \models \Delta_{M,\#}, Lemma 40 implies that w = w', which completes the proof.

Remark

Remark 38

WPEB

[albert2013geometric, Proposition 7.1] For every w,w' \in \Sigma_{M,\pm}^* we have g_M(w) = g_M(w') if and only if w \sim w'.

Remark

Remark 39

WQYU

Suppose that M is a multiplicative matrix whose entries are in \{-1,0,1\}. For every \sigma_\# \in \mathrm{Geom}^\#(M) there exists a unique w for which g_M(w) = \sigma_\#, and for every pair of letters w_{\ell_1} = a_{i,j} and w_{\ell_2} = a_{i',j'} with \ell_1 < \ell_2 at least one of the following conditions holds: (i) i = i', (ii) j = j', or (iii) if for every \ell_3 \in (\ell_1,\ell_2) \cap \mathbb{Z} the letter w_{\ell_3} is unrelated with w_{\ell_2}, then (i,j) <_{lex} (i',j'). We call such w the lexicographically minimal w.

Used by Proof, Proof
Remark

Remark 40

A8KN

There exists a first-order sentence \Delta_{M,\#} so that for every \sigma_\# \in \mathrm{Geom}(M)^\#_{d,k}, there exists a unique w \in \Sigma_M^* with w \models \Delta_{M,\#} and g_M(w) = \sigma_\#.

Used by Proof
Proof of Remark 40

Write u(a,b) as a shorthand for the statement that is true if and only if the letters a and b are unrelated. Recall that \mathcal{S}_\pm denotes the indexes of the \pm 1 entries of M. For simplicity, for variables x, y and z we write x' = \rho_6(w_x), y' = \rho_6(w_y) and z' = \rho_6(w_z). Let \eta denote the first-order sentence

\neg \exists x \exists y \left(x' \in \mathcal{S}_\pm \land y' \in \mathcal{S}_\pm \land x < y \land x' >_{lex} y'\land \forall z\left(x \leq z < y \implies u\left(w_z,w_y\right)\right) \right).

It is easy to check that \eta matches the condition of Lemma 39.

Let \Delta_{M,\#} be the first-order sentence defined by

\begin{aligned} \Delta_{M,\#} = \Gamma_M \land \eta \land \bigwedge_{(i,j)\in\mathcal{S}_\star} \left( \left(\exists x\colon \rho_6(w_x)=(i,j)\right) \implies (\Delta_d)_{(i,j)} \right). \end{aligned}

It is easy to check that \Delta_{M,\#} satisfies the required properties. Indeed, \eta (and \Gamma_M) ensure that whenever u_0 is non-empty, the word u_0 corresponds to the unique representative word in the trace monoid by Lemma 39.

For each (i,j) \in \mathcal{S}_\star, if the respective permutation in C_{i,j} is non-empty, then it has a unique left-greedy representative by Theorem 11. Thus the second line ensures that either the respective sub-word u_{(i,j)} is empty, or is the unique word which satisfies \Delta_d and whose image coincides with (\sigma_\#)_{i,j}. This completes the proof.

Remark

Remark 41

04FO

Let A \subseteq \mathcal{S} be a collection of non-zero entries of M. There exists a first-order formula \psi_A(x_{(i,j),u,v}) involving variables x_{(i,j),u,v} for (i,j) \in A, u,v\in \{1,2\} so that \sigma \models \psi_A(c_{(i,j),u,v}) for some constants c_{(i,j),u,v} if and only if there exists a gridded permutation \sigma_\# \in G(\sigma) so that the following conditions are satisfied:

  1. (i) the non-empty cells of \sigma_\# are indexed exactly by A; and

  2. (ii) for every (i,j) \in A, we have p \in \sigma_\# \cap C_{i,j} if and only if p \in [c_{(i,j),1,1},c_{(i,j),1,2}]_1 \times [c_{(i,j),2,1},c_{(i,j),2,2}]_2. Moreover, each c_{(i,j),u,v} belongs to the cell \sigma_\# \cap C_{i,j}.

Proof of Remark 41

Given variables x_{(i,j),u,v} for (i,j) \in A and u,v\in \{1,2\}, write (\upsilon_{d,k})_{i,j} for the first-order formula \upsilon_{d,k}(x_{(i,j),1,1},x_{(i,j),2,1},x_{(i,j),1,2},x_{(i,j),2,2}), which can be used to check whether the sub-permutation induced by the points in the rectangle [x_{(i,j),1,1},x_{(i,j),1,2}]_1\times[x_{(i,j),2,1},x_{(i,j),2,2}]_2 is contained in \widetilde{\mathcal O}_k^{[d]}. Let \psi_A(x_{(i,j),u,v}) denote the first-order formula

\begin{aligned} & \forall p: \left(\bigvee_{(i,j) \in A} \left(p \in [x_{(i,j),1,1}, x_{(i,j),1,2}]_1 \times [x_{(i,j),2,1}, x_{(i,j),2,2}]_2\right)\right) \\ & \land \left(\bigwedge_{(i,j) \in A, u,v\in \{1,2\}} \left(x_{(i,j),u,v} \in [x_{(i,j),1,1}, x_{(i,j),1,2}]_1 \times [x_{(i,j),2,1}, x_{(i,j),2,2}]_2\right)\right) \\ & \land \bigwedge_{(i,j) \in \mathcal{S}_\star \cap A} (\upsilon_{d,k})_{i,j} \\ & \land \bigwedge_{(i,j) \in \mathcal{S}_+ \cap A} \left(\forall p\forall q: \left(p,q \in [x_{(i,j),1,1}, x_{(i,j),1,2}]_1 \times [x_{(i,j),2,1}, x_{(i,j),2,2}]_2 \right) \implies (p \leq_1 q \iff p \leq_2 q)\right)\\ & \land \bigwedge_{(i,j) \in \mathcal{S}_- \cap A} \left(\forall p\forall q: \left(p,q \in [x_{(i,j),1,1}, x_{(i,j),1,2}]_1 \times [x_{(i,j),2,1}, x_{(i,j),2,2}]_2 \right) \implies (p \leq_1 q \iff q \leq_2 p)\right)\\ & \land \bigwedge_{(i,j),(i',j') \in A} \left(i < i' \implies x_{(i,j),1,2} <_1 x_{(i',j'),1,1}\right) \\ & \land \bigwedge_{(i,j),(i',j') \in A} \left(j < j' \implies x_{(i,j),2,2} <_2 x_{(i',j'),2,1}\right). \end{aligned}

Here, we use shorthand p,q \in [x,y]_1\times [z,w]_2 for the formula (p \in [x,y]_1 \times [z,w]_2) \land (q \in [x,y]_1 \times [z,w]_2). In order to check that \psi_A satisfies the required properties, suppose that \sigma \models \psi_{A}(c_{(i,j),u,v}). For each (i,j) \in A, let \theta_{i,j} denote the set of points p \in [c_{(i,j),1,1}, c_{(i,j),1,2}]_1 \times [c_{(i,j),2,1}, c_{(i,j),2,2}]_2. Note that at this stage we have not verified that \theta_{i,j}’s are disjoint nor that they are sub-intervals of \sigma.

The first line implies that every p belongs to at least one \theta_{i,j}, and the second line implies that c_{(i,j),u,v}’s are the smallest and largest points in \theta_{i,j} under both orders respectively. In addition, the last two lines imply that whenever i < i', every point p \in \theta_{i,j} and every point p' \in \theta_{i',j'} satisfy the condition p <_1 p', and an analogous condition holds for the \leq_2-order whenever j < j'. In particular, every point p belongs to exactly one \theta_{i,j}.

The third line implies that \theta_{i,j} \in \widetilde{\mathcal{O}}_k^{[d]} for each (i,j) with M_{i,j} = \star, and the fourth and fifth lines imply that the points in \theta_{i,j}’s with M_{i,j} \in \{\pm 1\} form a monotone sub-permutation of correct direction. As these points are only guaranteed to form a monotone sub-permutation, but they do not necessarily lie on the main diagonal, it follows that there exists \sigma_{\#} \in \mathrm{Grid}^\#(M)_{d,k} which satisfies the conditions of the Lemma. To complete the proof, recall the result of Albert et. al. [albert2013geometric] (stated earlier as Proposition 8), which states that \mathrm{Grid}^\#(M)_{d,k} = \mathrm{Geom}^\#(M)_{d,k} whenever M is a forest, and thus applies to M_{\pm 1}. Thus we may insert the points in the monotone cells on appropriate diagonals, which completes the proof. The proof of the converse direction follows analogously, we omit the details.

Remark

Remark 42

LMOR

Let \phi_A^{(1)}(\boldsymbol\nu) be the first-order formula on words that is obtained by applying Theorem 36 to \psi_A, where \boldsymbol{\nu} = (\nu_{(i,j),u,v}: (i,j) \in A,\ u,v \in \{1,2\}). Set

\phi_A(\boldsymbol\nu):= \Gamma_M\land\phi_A^{(1)}(\boldsymbol\nu) \land\bigwedge_{(i,j)\in A}\forall t\,\bigl(\lambda_\Box(t;\nu_{(i,j),u,v}) \iff\rho_6(w_t)=(i,j)\bigr).

We have w \models \phi_A(c_{(i,j),u,v}) if and only if

  1. (i) the non-empty cells of g_M(w) are exactly those indexed by A; and

  2. (ii) for each (i,j) \in A, the g_M(w) \cap C_{i,j} consists of those points p that are contained in [\beta_{w,M}(c_{(i,j),1,1}),\beta_{w,M}(c_{(i,j),1,2})]_1 \times [\beta_{w,M}(c_{(i,j),2,1}),\beta_{w,M}(c_{(i,j),2,2})]_2. Moreover, each
    \beta_{w,M}(c_{(i,j),u,v}) belongs to g_M(w) \cap C_{i,j}.

Proof of Remark 42

The proof follows easily from Theorem 36 and Lemma 41, and by noticing that the last part of the formula \phi_A ensures that the points \beta_{w,M}(c_{(i,j),u,v}) are always contained in g_M(w) \cap C_{i,j} for every (i,j) \in A, and u,v\in \{1,2\}.

Remark

Remark 43

WKTY

Let A, B \subseteq \mathcal{S}. There exists a first-order formula \lambda_{A,B}(x_{(i,j),u,v}, y_{(i',j'),u',v'}) with variables x_{(i,j),u,v} for (i,j) \in A, u,v \in \{1,2\} and y_{(i',j'),u',v'} for (i',j')\in B, u',v' \in \{1,2\} so that \sigma \models \lambda_{A,B}(a_{(i,j),u,v},b_{(i',j'),u',v'}) for some constants a_{(i,j),u,v} and b_{(i',j'),u',v'} if and only if both of the following conditions are satisfied:

  1. (i) there exist gridded permutations \sigma_{\#,a}, \sigma_{\#,b} \in G(\sigma) so that \sigma_{\#,a} satisfies the conditions of Lemma 41 for the set A and for constants a_{(i,j),u,v}, and \sigma_{\#,b} satisfies the conditions for the set B and for constants b_{(i,j),u,v}; and

  2. (ii) we have \sigma_{\#,a} \leq_{LG} \sigma_{\#,b}.

Uses Remark 41 · Used by Proof
Proof of Remark 43

Write A_i = \{(i,j): (i,j) \in A\} and define B_i analogously. For notational convenience, write \underline{x}_A : = (x_{(i,j),u,v}: (i,j) \in A, u,v \in \{1,2\}) and \underline{y}_B = (y_{(i,j),u,v}: (i,j) \in B, u,v\in \{1,2\}). Given a finite set of variables x_1,\dots,x_k write y = \max_1(x_1,\dots,x_k) for the point y \in \{x_1,\dots,x_k\} chosen so that x_i \leq_1 y for all i \in [k]. It is easy to prove that y can be expressed as a first-order formula. We also write m_i(\underline{x}_A) and m_i(\underline{y}_B) as shorthands for \max_1(x_{(i,j),1,2}: j \text{ chosen so that } (i,j) \in A) and \max_1(y_{(i,j),1,2}: j\text{ chosen so that } (i,j) \in B) respectively. Note that we define m_i(\cdot) only when the maximum is taken over a non-empty set.

For each pair (t,s), writeA_{<(t,s)} = \{(i,j)\in A: i < t, \text{ or } i=t\text{ and } j<s\}, and define B_{<(t,s)} analogously. For convenience, we slightly abuse the notation by allowing s = \infty, whence A_{<(t,\infty)} = \{(i,j) \in A: i \leq t\}.

Given sets A and B with A_{<(t,s)} = B_{<(t,s)} define auxiliary formula \omega_{<(t,s),A,B}(\underline{x}_A,\underline{y}_B) as

\begin{aligned} \bigwedge_{(i,j) \in A_{<(t,s)}} \bigwedge_{u,v\in \{1,2\}} (x_{(i,j),u,v} = y_{(i,j),u,v}). \end{aligned}

For an integer i' with A_{<(i',\infty)} = B_{<(i',\infty)}, define \lambda_{i',A,B}(\underline{x}_A,\underline{y}_B) to be the formula

\begin{aligned} & \bigvee_{\substack{1\leq i\leq i'\\ A_i=B_i\ne\emptyset}} \left(\omega_{<(i-1,\infty),A,B}(\underline{x}_A, \underline{y}_B) \land \left(m_i(\underline{y}_B) <_1 m_i(\underline{x}_A)\right)\right)\\ & \lor \bigvee_{\substack{1\leq i\leq i'\\ A_i=B_i\ne\emptyset}}\left(\omega_{<(i-1,\infty),A,B}(\underline{x}_A, \underline{y}_B) \land \left(m_i(\underline{y}_B) = m_i(\underline{x}_A)\right)\right.\\ &\qquad\left.\land \bigvee_{j: (i,j) \in A} \left(\omega_{<(i,j),A,B}(\underline{x}_A,\underline{y}_B)\land y_{(i,j),2,2}<_2 x_{(i,j),2,2}\right)\right). \end{aligned}

We also use the convention that \lambda_{0,A,B}(\underline{x}_A,\underline{y}_B) is the false sentence. We start by proving the following preliminary claim, which describes how \lambda_{i',A,B} can be used to determine the relative order of \sigma_{\#,a} and \sigma_{\#,b} with respect to <_{LG}.

Claim.

Let i' be chosen so that A_{<(i',\infty)} = B_{<(i',\infty)}. Given constants \underline{a}_A and \underline{b}_B, suppose that we have \sigma \models \psi_A(\underline{a}_A) and \sigma \models \psi_B(\underline{b}_B). Then we have \sigma \models \lambda_{i',A,B}(\underline{a}_A,\underline{b}_B) if and only if \sigma_{\#,a} <_{LG} \sigma_{\#,b}, and if at least one of the following conditions is satisfied:

  1. (i) the relation \sigma_{\#,a} <_{LG} \sigma_{\#,b} is witnessed when condition 1 in Definition 4 is satisfied for some i_* \leq i'; or

  2. (ii) the relation \sigma_{\#,a} <_{LG} \sigma_{\#,b} is witnessed when condition 2 in Definition 4 is satisfied for some (i_*,j_*) with i_* \leq i'.

Proof.

The proof follows by observing that

  1. (i) \sigma satisfying the condition on the first row of \lambda_{i',A,B} with i = i_* is equivalent to the first condition being satisfied in Definition 4 when i = i_*; and

  2. (ii) \sigma satisfying the condition on the second row of \lambda_{i',A,B} with i = i_* and j = j_* is equivalent to the second condition being satisfied in Definition 4 with i = i_* and j = j_*.

We now construct the formulae C_{A,B}(\underline{x}_A, \underline{y}_B). When A = B, we set

\begin{aligned} C_{A,A}(\underline{x}_A, \underline{y}_A) = \lambda_{\ell,A,A}(\underline{x}_A,\underline{y}_A) \lor \omega_{<(\ell,\infty),A,A}(\underline{x}_A,\underline{y}_A). \end{aligned}

By Claim ?, the first part of C_{A,A} is equivalent to the condition that \sigma_{\#,a} <_{LG} \sigma_{\#,b}, while the second part is equivalent to the condition that \sigma_{\#,a} = \sigma_{\#,b}.

Now suppose that A \neq B, and let (i',j') be the lex-minimal element in A \Delta B. In particular, we have A_{<(i',j')} = B_{<(i',j')}. Note that for any choice of constants \underline{a}_A and \underline{b}_B we must have \sigma_{\#,a} \neq \sigma_{\#,b}. In addition, the left-greedy order between \sigma_{\#,a} and \sigma_{\#,b} must be determined in column i_* or cell (i_*,j_*) for some i_* \leq i'. We split the construction into three cases based on the structure of A and B in the i'-th column of M. We write A_{i'} = \{(i',j): (i',j) \in A\}, and define B_{i'} analogously.

Case 1, A_{i'} = \emptyset: Since (i',j') \in A\Delta B, we must have B_{i'} \neq \emptyset. We claim that we may take C_{A,B}(\underline{x}_A, \underline{y}_B) = \lambda_{i'-1,A,B}(\underline{x}_A, \underline{y}_B). Note that whenever the condition \sigma_{\#,a} <_{LG} \sigma_{\#,b} is satisfied, either the first condition in Definition 4 holds in some column i_* with i_* \leq i'-1, or the second condition holds in some cell (i_*,j_*) with i_* \leq i'-1. Indeed, by our previous observation, both of these statements are true when the upper bound on i_* is replaced with i' instead of i'-1. However, the case i_* = i' is impossible as A_{i'} = \emptyset, whence \sigma_{\#,a} cannot contain any points in its i'-th column (while \sigma_{\#,b} is guaranteed to contain at least one point in its i'-th column as B_{i'} \neq \emptyset). Thus Claim ? implies that the formula C_{A,B} satisfies the required properties.

Case 2, B_{i'} = \emptyset: As above, we must have A_{i'} \neq \emptyset. We claim that

\begin{aligned} C_{A,B}(\underline{x}_A,\underline{y}_B) = \lambda_{i'-1,A,B}(\underline{x}_A,\underline{y}_B) \lor \omega_{<(i'-1,\infty),A,B}(\underline{x}_A,\underline{y}_B) \end{aligned}

satisfies the required properties. As above, the first part of C_{A,B} covers the case when \sigma_{\#,a} <_{LG} \sigma_{\#,b} is witnessed when the first or second condition in Definition 4 is satisfied either in column i_* or cell (i_*,j_*) respectively for some i_* < i'. Note that the second part is equivalent to the statement that both \sigma_{\#,a} and \sigma_{\#,b} contain equal number of points in each cell (i,j) with i \leq i'-1, which immediately implies that \sigma_{\#,a} <_{LG} \sigma_{\#,b}, as we have B_{i'} = \emptyset and A_{i'} \neq \emptyset.

Case 3, Both A_{i'}, B_{i'} are non-empty: Since both A_{i'} and B_{i'} are non-empty, both \sigma_{\#,a} and \sigma_{\#,b} must contain a point in their i'-th columns. Define C_{A,B}(\underline{x},\underline{y}) to be the formula

\begin{aligned} & \lambda_{i'-1,A,B}(\underline{x}_A,\underline{y}_B) \\ & \lor \left(\omega_{<(i'-1,\infty),A,B}(\underline{x}_A, \underline{y}_B) \land m_{i'}(\underline{y}_B) <_1 m_{i'}(\underline{x}_A)\right) \\ & \lor \bigvee_{j:\,(i',j)\in A,\ j<j'} \left(\omega_{<(i',j),A,B}(\underline{x}_A, \underline{y}_B) \land m_{i'}(\underline{y}_B) =m_{i'}(\underline{x}_A)\land y_{(i',j), 2,2} <_2 x_{(i',j),2,2}\right) \\ & \lor \left(\omega_{<(i',j'),A,B}(\underline{x}_A, \underline{y}_B) \land m_{i'}(\underline{y}_B) =m_{i'}(\underline{x}_A)\land (i',j') \in A\right), \end{aligned}

where the last line is only included if (i',j') \in A. As before, the first line of C_{A,B} corresponds to the case when \sigma_{\#,a} <_{LG} \sigma_{\#,b} is witnessed either in column i_* or cell (i_*,j_*) with i_* < i'. In addition, the second line corresponds to the case when \sigma_{\#,a} <_{LG} \sigma_{\#,b} is witnessed when the first condition in Definition 4 holds in column i', while the third line corresponds to the case when the second condition holds in cell (i',j) with j < j'. Finally, the last line corresponds to the case when the second condition holds in the cell (i',j'), which may only happen when (i',j') \in A.

Finally, we define

\lambda_{A,B}(\underline{x}_A,\underline{y}_B) = \psi_{A}(\underline{x}_A) \land \psi_{B}(\underline{y}_B) \land C_{A,B}(\underline{x}_A,\underline{y}_B).

Then \lambda_{A,B} satisfies the required properties as \psi_A and \psi_B ensure that there exist gridded permutations associated to the tuples x_A and y_B, and C_{A,B} ensures that ¨\sigma_{\#,a} \leq_{LG} \sigma_{\#,b}. This completes the proof.

Remark

Remark 45

3EBP

Let A \subseteq{\mathcal{S}}. There exists a first-order formula \Delta_{A}(x_{(i,j),u,v}) with variables x_{(i,j),u,v} for (i,j) \in A, u,v \in \{1,2\} for which the following holds. We have \sigma \models \Delta_{A}(a_{(i,j),u,v}) for some constants a_{(i,j),u,v} if and only if \sigma \models \psi_{A}(a_{(i,j),u,v}), where \psi_A is the formula given by Lemma 41, and the gridded permutation \sigma_\# satisfying the conclusions of Lemma 41 is the left-greedy representation of \sigma.

Proof of Remark 45

Given B \subseteq \mathcal{S} and variables y_{(i',j'), u',v'} with (i',j') \in B, u',v' \in \{1,2\}, write

\hat{\Delta}_{B}(x_{(i,j),u,v},y_{(i',j'), u',v'}),

where (i,j) \in A, u,v\in \{1,2\}, for the first-order formula

\begin{aligned} \psi_B\left(y_{(i',j'),u',v'}\right) \implies \lambda_{A,B}\left(x_{(i,j),u,v}, y_{(i',j'),u',v'}\right), \end{aligned}

and set \Delta_A(x_{(i,j),u,v}) to be the formula

\begin{aligned} & \psi_{A}(x_{(i,j),u,v}) \\ & \land \bigwedge_{B \subseteq \mathcal{S}} \left(\forall_{(i',j') \in B, u',v' \in \{1,2\}} \text{ } y_{(i',j'), u',v'}: \psi_{B}(y_{(i',j'), u',v'}) \implies \lambda_{A,B}\left(x_{(i,j),u,v}, y_{(i',j'), u',v'}\right)\right). \end{aligned}

To check that \Delta_A satisfies the required properties, suppose that \sigma \models \Delta_A(a_{(i,j),u,v}). Let \sigma_\# be the gridded permutation satisfying the conclusion of Lemma 41 (whose existence is provided by the top row of \Delta_A). We claim that \sigma_\# is the left-greedy representation of \sigma.

Let \phi_\# be an arbitrary element in G(\sigma), and let B \subseteq \mathcal{S} be chosen so that \phi_\# \cap C_{i,j} \neq \emptyset if and only if (i,j) \in B. For each (i',j') \in B and u',v' \in \{1,2\}, let b_{(i',j'),u',v'} be chosen so that \phi_\# \cap C_{i',j'} = [b_{(i',j'),1,1}, b_{(i',j'),1,2}]_1 \times [b_{(i',j'),2,1}, b_{(i',j'),2,2}]_2.

These choices ensure that \sigma \models \psi_B(b_{(i',j'),u',v'}), and hence the second line of \Delta_A implies that \sigma \models \lambda_{A,B}\left(a_{(i,j),u,v},b_{(i',j'),u',v'}\right). Thus Lemma 43 implies that \sigma_\# \leq_{LG} \phi_\#, and since \phi_\# is an arbitrary member of G(\sigma), it follows that \sigma_\# is the left-greedy representation of \sigma. The converse direction follows analogously, we omit the details.

Remark

Remark 46

72VR

There exists a first-order sentence \hat{\Delta}_M for which w \models \hat{\Delta}_M if and only if g_M(w) is the left-greedy representation of the underlying permutation f_M(w).

Used by Proof
Proof of Remark 46

Recall that \lambda_{\Box}(\nu_{i,j},\nu_{(i,j),u,v}) is defined to be the first-order formula obtained by applying Theorem 36 to the formula x_{i,j} \in [x_{(i,j),1,1},x_{(i,j),1,2}]_1 \times [x_{(i,j),2,1},x_{(i,j),2,2}]_2. We also write \hat{\Delta}_A(\nu_{(i,j),u,v}) for the first-order formula obtained by applying Theorem 36 to the formula \Delta_A(x_{(i,j),u,v}).

Let \Delta_A' denote the first-order sentence

\begin{aligned} \Delta_A':=&\exists_{(i,j)\in A,\ u,v\in\{1,2\}} \nu_{(i,j),u,v}\,\Bigl(\hat\Delta_A(\boldsymbol\nu)\\ &\land\bigwedge_{(i,j)\in A}\forall t\, \bigl(\lambda_\Box(t;\nu_{(i,j),u,v}) \iff\rho_6(w_t)=(i,j)\bigr)\Bigr), \end{aligned}

and set

\begin{aligned} \hat\Delta_M:=&\Gamma_M\land \bigvee_{A\subseteq\mathcal S}\Delta_A'. \end{aligned}

We claim that \hat\Delta_M satisfies the required properties.

Suppose that w \models \Delta_A' \land \Gamma_M for some A \subseteq S. Since w \models \Gamma_M, w decomposes as w = u_0u_{(i_1,j_1)} \dots u_{(i_r,j_r)}. In addition, the second line of \Delta_A' implies that for every i, the letter w_i belongs to the sub-word u_{(i_s,j_s)} if and only if \beta_{w,M}(i) \in g_M(w) \cap C_{i_s,j_s}. Thus for every (i,j) \in A \cap \mathcal{S}_\pm we have \beta_{w,M}(\ell) \in g_M(w) \cap C_{i,j} if and only if \rho_6(w_\ell) = (i,j). In particular, the letter w_\ell must belong to the sub-word u_0.

Thus, for every such w we have g_{M}(w) \cap C_{(i_s,j_s)} = f_d(\rho_5(u_{(i_s,j_s)})) and g_M(w) \setminus \left(\bigcup_{s=1}^r C_{(i_s,j_s)}\right) = g_{M_{\pm 1}}(u_0). Hence the result follows from the first-order correspondence provided by Theorem 36.

Remark

Remark 47

N12F

\mathcal{A}_M accepts precisely those words w for which g_M(w) \neq \star.

Proof of Remark 47

Write B_0 = \{e_M\}. Note that for each i < j, there are only directed edges from B_i to B_j. Thus, it is straightforward to see that any w which is accepted by \mathcal{A}_M decomposes as w = u_0u_{(i_1,j_1)}\dots u_{(i_r,j_r)}, with u_0 and u_{(i_t,j_t)}’s containing the letters of w with appropriate \rho_6-images, allowing any of these sub-words to be empty. Note that any such u_0 is accepted by \mathcal{A}_M, and for w to be accepted, we need each u_{(i_t,j_t)} to be either empty or its \rho_5-image to be accepted by \mathcal{A}_d. This coincides with the condition that g_M(w) \neq \star.

Remark

Remark 48

V58X

\mathcal{A}_{\pm} accepts exactly those words w which correspond to the lexicographically minimal words. In addition, whenever \delta_{\pm}(q_A,v) = q_B, then \delta_\pm(q_B,v) = q_B. Thus every strongly connected component with at least two states contains a vertex with a self-loop.

Used by Proof
Proof of Remark 48

Suppose for the sake of contradiction that there exists w = w_1\dots w_\ell of minimal length that is lexicographically minimal, and for which w is rejected by \mathcal{A}_\pm. Note that every proper prefix of w must also be lexicographically minimal, and hence each proper prefix of w is accepted by \mathcal{A}_\pm by the minimality of w. For each 0 \leq i \leq \ell-1, let P_i denote the set chosen so that q_{P_i} = \delta_{\pm}(q_\emptyset ,w_1\dots w_{i}) with the convention that P_0 = \emptyset. Since w is rejected, we have w_\ell \in P_{\ell-1}.

Note that for each 1 \leq i \leq \ell-1, we have w_\ell \in P_{i}\setminus P_{i-1} only when w_\ell \in U(w_i) and w_\ell < w_i. Let j be the largest index for which we have w_\ell \in U(w_j) and w_\ell < w_j. Thus w_\ell must be contained in each of the sets P_j,\dots,P_{\ell-1}, and thus we must have w_\ell \in U(w_i) for every j \leq i \leq \ell-1. However, this contradicts the third condition of Lemma 39.

Conversely, suppose that w is accepted, and define P_i as above for all the prefixes of w. If w were not lexicographically minimal, then by Lemma 39 there exists indices j<t with w_t < w_j and w_t \in U(w_i) for every j \leq i < t. Thus by the transition rules of \mathcal{A}_\pm we conclude that w_t \in P_{t-1}, which contradicts the fact that \mathcal{A}_\pm accepts w. Thus w must be lexicographically minimal.

Finally, suppose that A, B and v are chosen so that \delta_\pm(q_A,v) = q_B. Then

B= (A \cap U(v)) \cup \{c \in U(v): c < v\},

and thus in particular we have B \subseteq U(v). Note that we also have v \not \in B: indeed, as v \not \in A we have v \not \in A \cap U(v), and clearly v is not lexicographically strictly smaller than v itself, so v is not contained in the second set either.

Let B' = (B \cap U(v)) \cup \{c \in U(v): c < v\}. Since B \subseteq U(v) and \{c \in U(v): c < v\} \subseteq B, we conclude that B' = B. Thus, the rules of the transition function imply that \delta_\pm(q_B,v) = q_B. Since every strongly connected component with at least two states contains a directed edge, the existence of a vertex with a self-loop follows immediately.

Remark

Remark 49 (Perron-Frobenius theorem)

XKQF

Let A be an irreducible matrix with non-negative entries, and let \lambda = \rho(A) denote its spectral radius. Then the following conditions are satisfied.

  1. Both the left and right eigenspace associated with \lambda have dimension 1.

  2. There exists both left and right eigenvectors v and w respectively associated with \lambda which have positive entries.

Furthermore, if A is primitive, then any eigenvalue \mu \neq \lambda satisfies |\mu| < |\lambda|.

Used by Proof, Proof
Remark

Remark 50

FZO0

Let n and m be positive integers, and let A and B be (n+m)\times(n+m) matrices with non-negative entries satisfying the following properties.

  1. A is irreducible,

  2. A_{i,j} \geq B_{i,j} for all i,j, and A_{i,j} = B_{i,j} for every 1\leq i,j \leq n, and

  3. The n \times n sub-matrix of B corresponding to the top-left corner is irreducible, and B_{i,j} = 0 whenever \max(i,j) \geq n+1.

Let \lambda = \rho(A) and \mu = \rho(B). Then \mu < \lambda.

Used by Proof, Proof, Proof
Proof of Remark 50

By Perron-Frobenius (Theorem 49), \lambda is an eigenvalue of A, and A has a corresponding left eigenvector v with positive entries. Let B' denote the top-left corner of B. Since the last m rows and columns of B are identically 0, it is easy to see that \rho(B) = \rho(B'), and all the eigenvectors of B associated with non-zero eigenvalues are of the form (w_1,\dots,w_n,0,\dots,0), where (w_1,\dots,w_n) is an eigenvector of B' associated with the same eigenvalue. Thus, by Perron-Frobenius there exists a right eigenvector w of B corresponding to \mu which satisfies w_i > 0 for every 1 \leq i \leq n, and w_i = 0 for n+1 \leq i\leq n+m.

Since A_{i,j} \geq B_{i,j} for every (i,j), we conclude that

\begin{aligned} (Aw)_i = \sum_{j=1}^{n+m}A_{i,j}w_j \geq \sum_{j=1}^{n+m} B_{i,j}w_j = (Bw)_i = \mu \cdot w_i. \end{aligned}

Hence, we conclude that

\begin{aligned} \lambda \cdot v^Tw = v^TAw =\sum_{i=1}^{n+m} v_i\cdot (Aw)_i \geq \sum_{i=1}^{n+m} \mu \cdot v_i\cdot w_i = \mu\cdot v^Tw, \end{aligned}

where the inequality in the middle follows from (?). Thus, we conclude that \lambda \geq \mu.

If \lambda = \mu, then inequality (?) must be tight. Since v_i > 0 for every i, we conclude that the inequality (?) in turn must be tight for every i. Since w_j > 0 for every 1 \leq j \leq n, this in turn implies that we must have A_{i,j} = B_{i,j} for every 1 \leq j \leq n and every 1 \leq i \leq n+m. In particular, this means that A_{i,j} = 0 for every i \in \{n+1,\dots,n+m\} and j\in \{1,\dots,n\}, which contradicts the fact that A is irreducible. Thus we must have \mu < \lambda.

Remark

Remark 51

KS94

Let \mathcal{A} and \mathcal{B} be finite deterministic automata over the same alphabet so that \mathcal{B} is complete and satisfies (7). Let D be a strongly connected component in the automaton \mathcal{A} \times \mathcal{B} containing at least one edge, and let C be the strongly connected component of \mathcal{A} containing the projection of D.

Write \lambda_C = \rho(A_C) and \lambda_D= \rho(A_D). Then \lambda_D \leq \lambda_C. If equality holds, C contains a cycle and is aperiodic, then D must also be aperiodic.

Used by Proof, Proof
Proof of Remark 51

The proof follows a similar idea to the proof of Lemma 50. Let C be the strongly connected component of \mathcal{A} containing the projection of D, and put \lambda = \rho(A_C). Since D contains at least one directed edge, it follows that C also contains at least one directed edge, and hence A_C is irreducible. Thus Perron-Frobenius (Theorem 49) gives a right eigenvector v associated with \lambda whose all entries are positive.

Write A for the transition matrix of the automaton \mathcal{A} \times \mathcal{B}, and note that (A_D)_{(p,r),(p',r')} = A_{(p,r),(p',r')} for every (p,r),(p',r') \in D Define a vector v' \in \mathbb{R}^D by setting v'_{(p,r)} = v_{p} for each (p,r) \in D. Note that for any (p,r) \in D and p' \in C we have

\begin{aligned} \sum_{r': (p',r') \in D} (A_D)_{(p,r),(p',r')} \leq \sum_{r' \in \mathcal{B}} A_{(p,r),(p',r')} = (A_C)_{(p,p')}, \end{aligned}

as there are exactly (A_C)_{p,p'} possible transitions from the state p to state p' in \mathcal{A}, and thus fixing the initial state r \in \mathcal{B} while allowing the final r' to be arbitrary does not restrict the choice.

Thus for every (p,r) \in D we have

\begin{aligned} (A_Dv')_{(p,r)} = \sum_{(p',r') \in D } (A_D)_{(p,r),(p',r')} \cdot v'_{(p',r')} \leq \sum_{p' \in C} \left(v_{p'} \cdot \sum_{r' \in \mathcal{B}} A_{(p,r),(p',r')} \right) \end{aligned}
\begin{aligned} = \sum_{p' \in C} v_{p'} \cdot (A_C)_{p,p'} = (A_C v)_p = \lambda \cdot v_p = \lambda \cdot v'_{(p,r)}, \end{aligned}

where the inequality between the first and second line follows from (?), and throughout the inequalities we are using the fact that all the entries of the respective matrices are non-negative, and all the entries of the vector v are positive.

Let w be the left eigenvector of A_D corresponding to the eigenvalue \mu = \rho(A_D), i.e. w^T A_D = \mu w^T, and recall that all the entries of w can be chosen to be positive. Then

\begin{aligned} \mu \cdot w^T v' = w^T A_D v' = \sum_{(p,r) \in D} w_{(p,r)} \cdot (A_Dv')_{(p,r)} \leq \sum_{(p,r) \in D} w_{(p,r)} \cdot (\lambda \cdot v'_{(p,r)}) = \lambda \cdot w^T v', \end{aligned}

where the inequality follows from inequality (?) and the fact that all the coordinates of w and A_Dv' are non-negative. In particular, we conclude that \mu \leq \lambda.

Now suppose that \mu = \lambda. Since each coordinate of both v' and w is strictly positive, it follows that inequality (?) is in fact equality for every (p,r) \in D, and hence in turn we conclude that the inequality (?) must be equality for every (p,r) \in D and for every p' \in C. In particular, every labelled directed edge in C must lift to a labelled directed edge in D, as omitting such an edge would make the corresponding sum strictly decrease. Since C is a strongly connected component, we conclude that the projection of D must equal C.

We now prove that D must be aperiodic whenever C is. Suppose that p_1,\dots,p_l are vertices of a closed walk of length l in C. We claim that this lifts to a closed walk of length l in D. Let w = v_1\dots v_l denote a word which witnesses the closed walk p_1,\dots,p_l with respect to \mathcal{A}, i.e. chosen so that p_i = \delta_{\mathcal{A}}(p_1,v_1\dots v_{i-1}) for every 2 \leq i \leq l+1 (with p_{l+1} = p_1). Since \mathcal{B} satisfies the condition (7), it follows that there exists N so that \delta_{\mathcal B}(r,w^N) = \delta_{\mathcal B}(r,w^{N+1}) for every r.

Choose r_1' arbitrarily so that (p_1,r_1') \in D, and let r_1,\dots,r_l be chosen so that r_1 = \delta_{\mathcal{B}}(r_1',w^N) and r_i = \delta_{\mathcal{B}}(r_1',w^Nv_1\dots v_{i-1}) for every 2 \leq i \leq l. Since

\delta_{\mathcal{A}\times \mathcal{B}} \left((p_i,r_i), v_i\right) = (p_{i+1},r_{i+1})

holds trivially for 1 \leq i \leq l-1 by construction, and

\delta_{\mathcal{B}}(r_{l},v_l) = \delta_{\mathcal{B}}(r_1,w) = \delta_{\mathcal{B}}(r_1',w^{N+1}) = \delta_{\mathcal{B}}(r_1',w^N) = r_1,

it follows that \delta_{\mathcal{A}\times \mathcal{B}} \left((p_l,r_l), v_l\right) = (p_1,r_1). Furthermore, as all the relevant inequalities (?) and (?) must hold with equality, we conclude that all of these points are contained in D. Hence D contains a closed walk of length l. Since the same conclusion holds for all the closed walks in C, we conclude that D must be aperiodic as well.

Remark

Remark 52

7FMY

Let \mathcal A be a finite deterministic automaton accepting infinitely many words, and let \mathcal{A'} denote the automaton obtained by deleting those states that are not on any path from the initial state to some accepting state.

Let \lambda be the largest spectral radius of a strongly connected component in \mathcal{A'}, and suppose that every component with spectral radius \lambda is primitive. Let k +1 denote the maximum number of such components along any path from the initial state to an accepting state, where k is a non-negative integer. Then there exists c > 0 so that

a_n=(c+o(1))\lambda^n n^k,

where a_n denotes the number of words accepted by \mathcal{A} of length n.

Used by Proof
Remark

Remark 53

WMY4

Suppose that C is a dominant strongly connected component in \mathcal{A}_{\mathcal{F},\#} which lies in the part corresponding to \mathcal{A}_\pm \times \mathcal{B}_\mathcal{F}. Then C is aperiodic.

Used by Proof
Proof of Remark 53

Choose N \geq 2 as in Lemma 54. The statement follows immediately from this lemma if C contains a directed walk of length N whose edges are labelled with the same fixed letter v. Thus assume that such a directed walk does not exist for any v. Since C is dominant, it contains a directed cycle and thus at least one edge. Fix a letter v for which there exists a directed edge in C labelled with v, and consider the end-point of the longest directed walk in C whose edges are labelled with v. Such a walk must have length at most N by Lemma 54, and thus its endpoint q := (a,b) has an incoming directed edge labelled with v, but no outgoing directed edge labelled with v inside C.

Consider automaton C' whose states are the states in C, together with additional states q_1',\dots,q_{N}', and with the following transition rules.

  1. The transitions between states inside C are inherited by C'.

  2. Writing q_0' = q, we have \delta_{C'}(q_i',v) = q_{i+1}' for every 0 \leq i \leq N-1.

  3. For every letter v and state p with \delta_C(q,v) = p, we set \delta_{C'}(q_N',v) = p.

Since q has no outgoing edge labelled with v inside C, the automaton C' is deterministic. It is also straightforward to check that C' is strongly connected.

Let \mathcal{C} denote the words corresponding to the labels of the closed walks that are contained in C, based at q, and which do not revisit q in the middle. Note that the same directed cycle can contribute multiple words if its edges are attached with several labels. We define \mathcal{C}' analogously.

Let G and G' denote the sets of all the words u_1\dots u_s with u_i \in \mathcal{C} or u_i \in \mathcal{C'} respectively, including the empty word in both cases. Note that

|G_n| = (A_C^n)_{q,q} \qquad\text{and}\qquad |G_n'| = (A_{C'}^n)_{q,q}.

Write g for the function g_{M_\pm}:\Sigma_{M,\pm}^*\rightarrow \mathrm{Geom}^\#(M_\pm), and let \mathcal{G}^\# = \{g(w): w \in G'\}.

Claim.

g restricted to G' induces an injection, and \mathcal{G}^\# \subseteq \mathcal{F}^\#.

Proof.

Given w' \in G', let p_0,\dots,p_l denote the corresponding closed walk based at q in C'. Let a_0,\dots,a_l be chosen so that p_i = (a_i,b_i) whenever p_i \in C, and a_i = a whenever p_i = q_t' for some 1 \leq t \leq N. Thus a_0 = a_l = a, and we claim that

\begin{aligned} \delta_\pm(a_{i-1},w'_i) = a_i \end{aligned}

holds for every 1 \leq i \leq l. Indeed, if both p_{i-1} and p_i are contained in C then (?) follows from the fact that w_i' is a label on the directed edge p_{i-1} \rightarrow p_i.

If p_i = q_t' for some 1 \leq t \leq N, then a_{i-1} = a_i=a and w_i'=v, so the statement follows easily. Indeed, there is an incoming edge inside C to q labelled with v, which implies that there is an incoming edge to the state a labelled with v inside \mathcal{A}_\pm. Thus Lemma 48 implies that the state a has a self-loop labelled with v in \mathcal{A}_\pm, which implies (?). Finally, in the remaining case we must have p_{i-1} = q_N', and the statement follows from the fact that the outgoing edges and their labels from q_N' coincide with those of the state q. Thus (?) holds for all 1 \leq i \leq l. In particular, w' matches the labels of a closed walk in \mathcal{A}_\pm, and hence w' is a contiguous sub-word of a lexicographically minimal word. Thus w' itself must be lexicographically minimal, and hence the restriction of g on G' induces an injection.

Recall from Lemma 10 that the function g is order-preserving, i.e. whenever u is a sub-word of w, then g(u) is a sub-pattern of g(w) as a gridded permutation. Thus, it suffices to prove that for every u \in G' there exists w that is accepted by \mathcal{A}_{\mathcal{F},\#} so that u is a sub-word of w.

Let u_0 be a word labelling a closed walk in C based at q and containing the letter v. Such a word exists since C is strongly connected and contains an edge labelled with v. Given w'\in G', we follow its unique closed walk in C'. Every visit to one of the new states q_i' corresponds to visiting the states q,q_1',\dots,q_N' in this order. Furthermore, the final transition from q_N' onward cannot be labelled with the letter v as q has no outgoing directed edges in C with label v. In particular, such visit corresponds to a contiguous sub-word of the form v^N, and such letters must be the last N instances of the letter v in a contiguous sub-word of the form v^i in w' with i \geq N (and hence we must always have i \leq 2N-1).

Given w' \in G', replace each contiguous block of v^N which is at the end of the word w' or followed by a letter v' \neq v with the word u_0^N, and write w'' for the word obtained as the outcome of this process. By the construction, w'' labels the edges of a closed walk based at q in C, so there exists u_1 and u_2 so that u_1w''u_2 is accepted by \mathcal{A}_{\mathcal{F},\#}. By choosing u_1 and u_2 to be minimal words with such property, we must have u_1w''u_2 \in \Sigma_{M,\pm}^*, and thus g(u_1w''u_2) \in \mathcal{F}^\#. Since u_0 contains the letter v, w' is a sub-word of both w'' and u_1w''u_2, and hence Lemma 10 implies that g(w') \in \mathcal{F}^\#. This completes the proof of Claim ?.

Given Claim ?, the result follows easily. Write \mu = \rho(A_C) and \mu' = \rho(A_{C'}). Order the states of C' so that those in C occur at the first |C| rows and columns in A_{C'}, and let B denote the matrix obtained by adding N zero rows and columns at the end of A_C. Then A:=A_{C'} and B satisfy the conditions of Lemma 50, and thus \mu<\mu'. Hence Claim ? implies that

\mu < \mu' = \limsup_{n \rightarrow \infty} \left((A_{C'}^n)_{q,q}\right)^{1/n} \leq \limsup_{n \rightarrow \infty} |\mathcal{F}_n^\#|^{1/n} = \rho(\mathcal{A}_{\mathcal{F},\#}).

In particular, C cannot be dominant, which gives the required contradiction.

Remark

Remark 54

SJ0V

Let N \geq 2 be an integer satisfying the conclusion of Lemma 7 for \mathcal{B}_\mathcal{F}. Suppose that C is a strongly connected component of \mathcal{A}_{\mathcal{F},\#} which contains a directed walk of length at least N whose edges all have the same fixed letter v among their labels. Then C contains a self-loop, and in particular, is aperiodic.

Used by Proof, Proof, Proof
Proof of Remark 54

Suppose for the sake of contradiction that there exists a directed walk (a_0,b_0),\dots,(a_N,b_N) so that \delta_{\mathcal A_{\mathcal F,\#}}((a_i,b_i),v) = (a_{i+1},b_{i+1}) for every 0 \leq i \leq N-1. Writing (a,b) = (a_N,b_N), we claim that \delta_{\mathcal A_{\mathcal F,\#}}((a,b),v) = (a,b).

Observe that the choice of N implies that

\delta_{\mathcal{B}_{\mathcal{F}}}(b,v) = \delta_{\mathcal{B}_{\mathcal{F}}}(b_0,v^{N+1}) = \delta_{\mathcal{B}_{\mathcal{F}}}(b_0,v^{N}) = b.

First suppose that the projection of C is contained in \mathcal{A}_\pm. Note that there is an incoming directed edge labelled with v to (a,b), and thus the same must be true for the state a in \mathcal{A}_\pm. Thus, by Lemma 48 we must have \delta_{\mathcal{A}_\pm}(a,v) =a.

Now suppose that the projection of C is contained in \mathcal{A}_{d,i',j'} for some (i',j') \in \mathcal{S}_\star. We claim that for every state x in \mathcal{A}_d and for every letter v we have

\delta_{\mathcal{A}_d}(x,v^2)=\delta_{\mathcal{A}_d}(x,v^3).

Indeed, the statement is trivial when d = 1. For d \geq 2, we note that if \rho_2(v) = \tau \in \mathcal{Q}_k, the statement either follows immediately by induction, or both sides equal \star. For \rho_2(v) \in \{\mathrm{inc},\mathrm{dec}\}, we note that if \rho_4(v) = \{L,R\}, then both sides equal the state q_{\rho_2(v), \{L,R\}} or \star. If \rho_4(v) \in \{\{L\},\{R\}\}, then both sides are clearly \star. Finally, if \rho_4(v) = \emptyset, the result follows by induction. Since N \geq 2, this observation implies that \delta_{\mathcal{A}_d}(a,v) = a. In particular, in either case we must have \delta_{\mathcal A_{\mathcal F,\#}}((a,b),v) = (a,b). Thus C contains a self-loop based at the vertex (a,b), and hence is aperiodic.

Remark

Remark 56

80LP

If C is periodic and contains at least one directed cycle, then j\geq 2, and D contains at least one state in each of H_{\underline{\tau},\{L\}} and H_{\underline{\tau},\{R\}}.

Proof of Remark 56

If j=1, then D consists of a single state, which must contain a self-loop with a unique label on it. Similarly, if j\geq 2 and D meets neither H_{\underline{\tau},\{L\}} nor H_{\underline{\tau},\{R\}}, then as D\not\subseteq H_{\underline{\tau},\emptyset}, D must consist of the single state in H_{\underline{\tau},\{L,R\}}, and thus it must also contain the self-loop with unique label on it. Indeed, the first observation follows from the fact that there are no directed edges between H_{\underline{\tau},\emptyset} and H_{\underline{\tau},\{L,R\}}, and the uniqueness of the label on the self-loop follows from Lemma 30. In both cases, C contains arbitrarily long walks whose edges are all labelled with the same letter, and thus Lemma 54 implies that C is aperiodic. This gives the required contradiction.

Thus D must contain a state from at least one of H_{\underline{\tau},\{L\}} or H_{\underline{\tau},\{R\}}. Since any closed walk that visits one of H_{\underline{\tau},\{L\}} and H_{\underline{\tau},\{R\}} must also visit the other, we conclude that D contains a state from both H_{\underline{\tau},\{L\}} and H_{\underline{\tau},\{R\}}. This completes the proof.

Remark

Remark 57

LART
  1. |h(w)| = |w| for every w \in L_\mathcal{C}.

  2. h is an injection.

  3. The image of h is contained in \mathcal F.

Used by Proof
Proof of Remark 57

Note that the first property follows immediately from the fact that f_{j-1} is a length-preserving function. Since C lies on an accepting path, there exist fixed words w_1 and w_2 so that w_1ww_2 is accepted by \mathcal A_{\mathcal F,\#} for every w\in L_{\mathcal C}, and we may choose minimal such w_1 and w_2. If the common \rho_6-image of the letters in w is (i',j'), then minimality implies that the same must be true for all the letters in w_1 and w_2 as well. For each w, define u(w) := \rho_5(w_1ww_2) \in \Sigma_{d}^* and note that u(w) \models \Delta_d. Set h_0(w) = f_d(u(w)), and we note that h_0 is an injection as u(w) \models \Delta_d for every w, and its image is contained in \mathcal{F}.

While the proof of the remaining two statements is rather technical and tedious, in a vague sense our goal is to show that for every w \in L_\mathcal{C}, the expression (?) is the left-greedy \widetilde{\mathcal O}_k^{[j-1]}-decomposition of h(w). We prove this by showing that at depth s > j, the index of the block of u(w) containing the letters of w is independent of the choice of w, and at depth s = j, the blocks correspond to the aforementioned left-greedy decomposition.

When d > j, we start by proving that the letters of w in u(w) must lie in the same iterated block whose index is independent of w. Indeed, if u(w) decomposes properly as u_1(w) \dots u_{s(w)}(w), then the profile is uniquely determined by \tau_d. If \tau_d \in \mathcal{Q}_k, then each letter of w must be contained in the sub-word u_{i_d}(w) for every w\in L_{\mathcal{C}}. If \tau_d = \mathrm{dec}^*, then each letter of w must be contained in the sub-word u_1(w). Finally, if \tau_d \in \{\mathrm{inc},\mathrm{dec}\} and j < d, let n(w_1) denote the number of letters in \rho_5(w_1) whose \rho_4 image contains L. Since \rho_4(\rho_5(w_i)) = \emptyset for each w \in L_\mathcal{C} and for each i, we conclude that each letter of w must be contained in the sub-word u_{n(w_1)}(w).

When d > j, let s be chosen so that the letters of w are always contained in u_s(w). As the words u_i(w) for i \neq s are unaffected by the choice of w, the injectivity of h_0 implies that h_1(w) := f_{d-1}(\rho_1(u_s(w))) induces an injection.

Iterate this process until we reach depth j. Along the process, we have constructed injections h_0,\dots,h_{d-j} as above. Write u_j(w) for the appropriate projected sub-word of u(w) over \Sigma_j. Then u_j(w) decomposes properly as u_j(w) = u_1'(w)\dots u_s'(w), and

h_{d-j}(w) = \tau_{\tau_j,s}[f_{j-1}(\rho_1(u_1'(w))),\dots,f_{j-1}(\rho_1(u_s'(w)))].

For convenience, we suppose that the profile \tau_j in the iterative block \underline{\tau} is monotone increasing.

Recall that w decomposes as u_1''\dots u_{t(w)}'' so that for each i,

  1. The first letter of \pi(u_i'') is the unique letter whose \rho_4-image contains L, and

  2. The last letter of \pi(u_i'') is the unique letter whose \rho_4-image contains R.

In particular, we conclude that there exists t_1 independent of w for which \pi(u_i'') = u_{i+t_1}'(w) for every 1 \leq i \leq t(w). In particular,

h_{d-j}(w) = \sigma_1(w) \oplus \dots \oplus \sigma_{s}(w),

where \sigma_i(w) = f_{j-1}(\rho_1(u_i'(w))), and by the inductive construction of the functions h_{d-j}, the right-hand side also coincides with the left-greedy decomposition of the underlying permutation at depth j.

By construction, we have

h(w) = \sigma_{t_1 + 1}(w) \oplus \dots \oplus \sigma_{t_1 + t(w)}(w),

and note that for w, w' \in L_\mathcal{C} we have \sigma_i(w) = \sigma_i(w') for i \leq t_1, and \sigma_i(w) = \sigma_{i'}(w') for i \geq t_1 + t(w) + 1 and i' = i - t(w) + t(w'). Indeed, this follows by noticing that the blocks u_i'(w) outside this range correspond to the letters of the fixed words w_1 and w_2, whereas the blocks inside this range correspond to the letters of \pi(w). In particular, we conclude that there exist fixed permutations \sigma_1' and \sigma_2' so that for every w \in L_{\mathcal{C}}, we have

\begin{aligned} h_{d-j}(w) = \sigma_1' \oplus h(w) \oplus \sigma_2'. \end{aligned}

Since each h_i(w) is a sub-pattern of h_{i-1}(w), and h_0(w) = f_d(\rho_5(w_1ww_2)), we conclude that h(w) is a sub-pattern of h_{d-j}(w), and hence is a sub-pattern of a permutation in \mathcal{F}. In particular, the image of h is contained in \mathcal{F}. Since h_{d-j} is an injection, and the permutations \sigma_1' and \sigma_2' are independent of w, the equation (?) implies that h is also an injection. Finally, the decomposition (?) is left-greedy by Lemma 26, as any better decomposition of h(w) as a direct sum would also improve the left-greedy decomposition of h_{d-j}(w).

Remark

Remark 58

CQZ6

Let w \in \Sigma_d^* be chosen so that w \models \Delta_d. If f_d(w) contains a monotone interval of length s > 2^{d-1}(d+k), then w contains a contiguous sub-word of length at least \frac{s}{2^{d-1}}-2d which is constant.

Used by Proof
Proof of Remark 58

We prove the statement by induction on d. When d = 1, the fact that |w| > k and w \models \Delta_d implies that w = a_\mathrm{inc}^n or w = a_\mathrm{dec}^n. Thus the claim follows immediately in both cases.

Now suppose that the statement holds for d-1, and suppose that w decomposes properly as w = u_1\dots u_\ell. For each 1 \leq i \leq \ell write \theta_i = f_{d-1}(\rho_1(u_i)). Let I be a monotone sub-interval of length s in f_d(w), and let J \subseteq [\ell] be chosen so that I has non-empty intersection with the block of f_d(w) corresponding to f_{d-1}(\rho_1(u_i)) whenever i \in J. Note that J is clearly a sub-interval \{a,\dots,b\}. For simplicity, we only consider the case when I is monotone increasing.

If b \geq a+2, the block corresponding to f_{d-1}(\rho_1(u_{a+1})) is fully contained in I, and hence f_{d-1}(\rho_1(u_{a+1})) itself must be a monotone increasing permutation. Let \tau be either the profile of w or the increasing(Note that the profile cannot be \mathrm{dec} as I is monotone increasing and b > a.) permutation of length \ell. Since w \models \Delta_d, the left-greedy decomposition of f_d(w) is given as

f_d(w) = \tau[\theta_1,\dots,\theta_\ell].

Since b \geq a+2 and \theta_{a+1} is monotone increasing, we may move the points from I\cap \theta_{a+2} into \theta_{a+1}, and thus obtain a decomposition which is smaller with respect to the left-greedy order. This gives the desired contradiction, and implies that we must have b \leq a+1.

Now suppose that b \in \{a,a+1\}. Thus by the pigeonhole principle we have |I\cap \theta_a|\geq \frac{s}{2} or |I \cap \theta_{a+1}| \geq \frac{s}{2}. Applying the inductive hypothesis with w' = \rho_1(u_t) and to the interval I' = I \cap \theta_t, where t is chosen so that |I'| \geq \frac{s}{2} > 2^{d-2}((d-1)+k), it follows that w' contains a contiguous constant sub-sequence of length N':=\frac{s/2}{2^{d-2}} - 2(d-1). Since this constant contiguous subsequence is contained in one particular sub-word u_t, it can be lifted to a constant contiguous subsequence in w of length at least N'-2; indeed, the \rho_2 and \rho_3-projections (if appropriate) of all the letters in this contiguous subsequence must be equal, but we may have to remove the first and last letter to ensure that their \rho_4-projections are equal (if the type is \mathrm{inc} or \mathrm{dec}). This completes the proof.

Remark

Remark 59

WT7H

If h(w) contains a monotone interval of length s>2^{j-1}(j+k), then w contains a contiguous sub-word of length at least \frac{s}{2^{j-1}}- 2j which uses only a single letter v.

Used by Proof
Proof of Remark 59

Recall that every w \in L_{\mathcal{C}} decomposes as w = u_1 \dots u_m so that

\begin{aligned} h(w) = \sigma_1\oplus \dots \oplus \sigma_m, \end{aligned}

where \sigma_i = f_{j-1}(\rho_1(\pi(u_i))). In addition, recall from the proof of Lemma 57 that the right-hand side of the equation (Proof) also coincides with the left-greedy decomposition of h(w) when viewed as an element of \widetilde{\mathcal{O}}_{k}^{[j]}. Thus \pi(w) \models \Delta_{j}, and hence the result follows from Lemma 58.

Remark

Remark 60

MHJA

Suppose that C is a dominant strongly connected component in \mathcal A_{\mathcal F,\#} which lies in the part corresponding to \mathcal A_{d,i',j'}\times\mathcal B_{\mathcal F}. Then C is aperiodic.

Used by Proof
Proof of Remark 60

Suppose for the sake of contradiction that C is periodic, and let q, L_{\mathcal C} and h be defined as before. Let

\mathcal{G} = \{h(w): w\in L_{\mathcal{C}}\}

and choose an integer s so that s > 2^{j-1}(j+k) and \frac{s}{2^{j-1}} - 2j \geq N, where N \geq 2 is an integer for which the conclusion of Lemma 7 holds for \mathcal{B}_\mathcal{F}.

First suppose that there exists \sigma =h(w) \in \mathcal{G} which contains a monotone sub-interval of length at least s. Then Corollary 59 implies that w contains a contiguous constant sub-word of length at least \frac{s}{2^{j-1}} - 2j \geq N, whence Lemma 54 implies that C is aperiodic. Thus no \sigma \in \mathcal{G} can contain a monotone sub-interval of length at least s.

For notational clarity, we assume that \tau_j = \mathrm{inc}. Define the particular permutation

\mu = 21 \oplus 12\dots s\oplus 21.

Let \Sigma' = \{c_1,\dots,c_{s+4}\} denote an alphabet that is disjoint from \Sigma_{\star,(i',j')}, and define a finite deterministic automaton C' as follows. The initial and the only accepting state in C' is q. The states of C' are the states of C together with \{q_1',\dots,q_{s+3}'\}, the alphabet is \Sigma_{\star,(i',j')}\cup \Sigma', and the transition rules are given as follows.

  1. The transitions between states inside C are inherited by C'.

  2. Writing q_0' = q_{s+4}'= q, we have \delta_{C'}(q_{i-1}',c_i) = q_{i}' for every 1 \leq i \leq s+4.

That is, we add s+3 new states which form a closed cycle based at q which corresponds to the word c':= c_1\dots c_{s+4}. Thus it is easy to see that every word w accepted by C' can be decomposed uniquely as

\begin{aligned} w = u_1c'u_2c'\dots c'u_r, \end{aligned}

where u_1,\dots,u_r\in L_\mathcal{C}, and they are allowed to be empty. Let L_\mathcal{C'} denote the set of words accepted by C', and define h': L_\mathcal{C'} \rightarrow \mathfrak{S} by setting

\begin{aligned} h'(w)= h(u_1) \oplus \mu \oplus h(u_2) \oplus \mu \oplus \dots \oplus \mu \oplus h(u_r), \end{aligned}

where h(\varepsilon) is defined to be the empty permutation. As in the proof of Lemma 53, the following essentially completes the proof of Lemma 60.

Claim.

The following statements are true.

  1. h' is a length-preserving map.

  2. h' is an injection.

  3. h'(w) \in \mathcal{F} for every w \in L_{\mathcal{C'}}.

Proof.

We note that h' is clearly length-preserving by its construction. To prove that h' is an injection, we note by Corollary 59 and by the choice of s, for every w \in L_\mathcal{C'}, any monotone sub-interval of length at least s must be contained in a copy of \mu in the expression of h'(w) via (?), and thus must correspond to the contiguous sub-words of w that are of the form c'. In particular, given \sigma = h'(w), we may recover each copy of \mu in the decomposition (?) from monotone sub-intervals of length s. Deleting such copies of \mu corresponds to deleting all the sub-words c' from w. Thus injectivity of h' follows from the injectivity of h.

Let u_0 \in L_\mathcal{C} be chosen so that |u_0| \geq s. Thus h(u_0) cannot be a monotone permutation, and hence it contains 21 as a sub-permutation. Given w \in L_\mathcal{C'}, suppose w decomposes as

w = u_1c'u_2c'\dots c'u_r,

where u_1,\dots,u_r \in L_{\mathcal{C}} or u_i = \varepsilon. Let u' = (u_0)^{s+2}, and define the particular word w' as

w' = u_1u'u_2u' \dots u'u_r.

Since each u_0,u_1,\dots,u_r corresponds to a closed walk in C based at q, we conclude that w' \in L_\mathcal{C}. Furthermore, we have

h(w') = h(u_1) \oplus h(u') \oplus h(u_2) \oplus \dots \oplus h(u') \oplus h(u_r).

Since u' = (u_0)^{s+2}, we have

h(u') = h(u_0) \oplus \dots \oplus h(u_0),

where the direct sum consists of s+2 copies of h(u_0). We claim that \mu is a sub-permutation of h(u'). Indeed, since h(u_0) is not a monotone increasing permutation, it contains 21 as a sub-permutation. Delete all but two points forming a sub-permutation 21 from the first and last copies of h(u_0), and all but one points from the middle s copies of h(u_0). Then the resulting permutation is

21 \oplus 1 \oplus \dots \oplus 1 \oplus 21 = 21 \oplus 12 \dots s \oplus 21 = \mu,

which verifies the fact that \mu is a sub-permutation of h(u'). Hence

h'(w) = h(u_1) \oplus \mu \oplus h(u_2) \oplus \dots \oplus \mu \oplus h(u_r)

is a sub-permutation of h(w'). Since w' \in L_\mathcal{C}, Lemma 57 implies that h(w') \in \mathcal{F}. Since \mathcal{F} is a closed under sub-patterns, we conclude that h'(w) \in \mathcal{F}. This completes the proof.

Equipped with Claim ?, the rest of the proof follows easily. Set \lambda=\rho(A_C) and \lambda'=\rho(A_{C'}). Since C' can be easily checked to be strongly connected, it follows that the matrix A_{C'} is irreducible. Let B denote the matrix obtained by adding |C'| - |C| rows and columns consisting of 0’s to the matrix A_C. Then A_{C'} and B satisfy the conditions of Lemma 50, and hence we must have \lambda'>\lambda. Since C is dominant, we have

\lambda = \rho(A_C) = \rho(\mathcal{A}_{\mathcal{F},\#}) = \limsup_{n\rightarrow \infty} |\mathcal{F}_n^\#|^{1/n}.

Since Claim ? implies that we have h'(w) \in \mathcal{F} for every w \in L_{\mathcal{C'}}, we conclude that

(A_{C'}^n)_{q,q}\leq |\mathcal F_n|\leq |\mathcal F_n^\#|,

and thus

\lambda' = \limsup_{n \rightarrow \infty}((A_{C'}^n)_{q,q})^{1/n} \leq \limsup_{n \rightarrow \infty}|\mathcal F_n^\#|^{1/n} = \lambda.

This contradicts the fact that \lambda' > \lambda, and completes the proof.

Remark

Remark 62

3TI1

Let C be a dominant strongly connected component in \mathcal{A}_\mathcal{F}. Then C is aperiodic.

Used by Proof
Proof of Remark 62

Write A for the transition matrix of \mathcal{A}_{\mathcal{F},\#} once the non-productive states have been removed, and write A' for the transition matrix of \mathcal{A}_\mathcal{F} once the non-productive states have been removed. Write \mu = \rho(A) and \mu' = \rho(A'), and recall that we have \mu = \limsup_{n \rightarrow \infty} |\mathcal{F}_n^\#|^{1/n} and \mu' = \limsup_{n \rightarrow \infty} |\mathcal{F}_n|^{1/n}. As Lemma 63 implies that

\begin{aligned} \limsup_{n\rightarrow \infty} |\mathcal{F}_n|^{1/n} &\leq \limsup_{n \rightarrow \infty} |\mathcal{F}_n^\#|^{1/n} \leq \limsup_{n\rightarrow \infty} \left(\binom{n+l}{l}\cdot \binom{n+m}{m}\cdot |\mathcal{F}_n| \right)^{1/n} = \limsup_{n\rightarrow \infty} |\mathcal{F}_n|^{1/n}, \end{aligned}

we conclude that

\mu' = \limsup_{n\rightarrow \infty} |\mathcal{F}_n|^{1/n} = \limsup_{n\rightarrow \infty} |\mathcal{F}_n^\#|^{1/n} = \mu.

Let C denote a dominant component in \mathcal{A}_\mathcal{F}, and let D denote the strongly connected component in \mathcal{A}_{\mathcal{F},\#} containing the projection of C. Then Lemma 51 implies that \rho(A'_C) \leq \rho(A_D), and hence

\mu = \rho(A'_C) \leq \rho(A_D) \leq \rho(A) = \mu.

Thus we must have \rho(A'_C) = \rho(A_D) = \mu, and hence D is a dominant component in \mathcal{A}_{\mathcal{F},\#}. Thus D is aperiodic either by Lemma 53 or by Lemma 60. Hence Lemma 51 implies that C must be aperiodic as well, which completes the proof.

Remark

Remark 63

ES3B

Let M be a suitable matrix with \ell columns and m rows, and let \mathcal{F} \subseteq \mathrm{Geom}(M)_{d,k}. We have |\mathcal{F}_n| \leq |\mathcal{F}^\#_n| \leq \binom{n+l}{l}\cdot \binom{n+m}{m}\cdot |\mathcal{F}_n|.

Used by Proof
Remark

Remark 1

TGY2

Let \mathcal{F} be a small permutation class.

  1. Then there exists a regular language L_{\mathcal{F}} and a length-preserving bijection

    f_{\mathcal{F}}: L_{\mathcal{F}} \rightarrow \mathcal{F}

    satisfying the following property: for every first-order logic sentence \Psi on \mathcal{F} there exists a first-order logic sentence \Phi on L_{\mathcal{F}} so that

    \{w \in L_\mathcal{F}: w \models \Phi\} = \{w \in L_\mathcal{F}: f_\mathcal{F}(w) \models \Psi\}.

    The same conclusion also holds for sentences in monadic second-order logic.

  2. (sketched) The bijection f_\mathcal{F} is in fact a monadic second-order isomorphism: that is, for every sentence \Phi in monadic second-order logic on L_\mathcal{F} there exists a corresponding sentence in monadic second-order logic on \mathcal{F} for which the conclusion above holds. In addition, it is also possible to construct a regular language L_\mathcal{F}' and a length-preserving bijection f'_\mathcal{F}: L_\mathcal{F}' \rightarrow \mathcal{F} which is a first-order isomorphism.

  3. For the last three assertions, suppose that \mathcal{F} is not finite. There exist a positive real number \alpha, a real number \beta \geq 1, and a non-negative integer c so that

    \vert \mathcal{F}_n\vert = (\alpha+o(1))\cdot \beta ^n\cdot n^c.
  4. Given a monadic second-order sentence \Psi on \mathcal{F}, write

    \mathcal{F}^\Psi_n := \{\sigma \in \mathcal{F}_n: \sigma \models \Psi\}.

    Then the sets \mathcal{F}^\Psi_n have a rational generating function.

  5. For every first-order \mathrm{TOTO} sentence \Phi the limit \lim_{n\rightarrow \infty} \mathbb{P} (\pi \models \Phi) exists, where \pi is taken uniformly at random from \mathcal{F}_n.

Remark

Remark

760F

Let \mathcal F be an infinite small permutation class, and let \boldsymbol\sigma_n denote a permutation chosen uniformly at random from \mathcal F_n. For every \mathrm{MSO}-\mathrm{TOTO} sentence \Psi there exists an integer \ell\geq1 such that for every 0\leq r<\ell, the limit

\lim_{n\rightarrow \infty} \mathbb{P}\left( \mathbf{\sigma_{n\ell+r}}\models \Psi\right)

exists.

Remark

Remark 64

MOG9

The function f_{\mathcal{F}} constructed in the proof of Theorem 1 is a monadic second-order isomorphism.

Proof (Proof sketch) of Remark 64

For clarity we write \alpha_w : = \alpha_{w,M}. The atomic formulas are of the form w_i = a, i < j, i = j and i \in A, where a is a letter, i and j are first-order variables, and A is a second-order variable. Again, the last two formulas are simple to translate into formulas on permutations.

For the atomic formulas of the form w_i =a, we may use Lemma ?, ? to write down a condition for the corresponding p:=\alpha_w(i) which ensures that p belongs to the cell in the left-greedy representation \sigma_\# of \sigma:=f_M(w) described by (i',j'):=\rho_6(a). If a \in \Sigma_{M,\pm}, this translation on its own suffices. If a \in \Sigma_{\star,(i',j')}, we set b:=\rho_5(a) and write down the appropriate condition inductively.

The base case d = 1 is easy to handle, we omit the details. If \rho_2(b) = \tau \in \mathcal{Q}_k, we may use the first part of Lemma 25 to write down a condition which ensures that p belongs to the \rho_3(b)-th block of (\sigma_\#)_{(i',j')}, and proceed by induction within this block.

If \rho_2(b) \in \{\mathrm{inc},\mathrm{dec}\}, we write u_{i',j'} for the sub-word of w consisting of letters whose \rho_6-projection equals (i',j'), and suppose that \rho_5(u_{i',j'}) decomposes properly as u_1\dots u_s. By using Lemmas  26 and 27 it is easy to construct a second-order variable B which consists of the left-most points in the left-greedy decomposition of the corresponding permutation. We may then apply the inductive hypothesis inside this block. Note that at this step we have to be slightly careful with points whose \rho_4 image is \{L\}, \{R\} or \{L,R\}, but we may again construct a first-order sentence by induction to handle this technicality. We remark that this is the step which does not carry over to the first-order logic: the construction of the second-order variable B is required even if we apply the construction to a first-order sentence.

For atomic formulas i < j, we write p = \alpha_w(i) and q = \alpha_w(j). Note that other parts of the monadic second-order sentence must impose some conditions on the \rho_6-images of w_i and w_j, which correspond to the cells of the left-greedy decomposition of f_M(w) containing p and q respectively. Since the extremal points of the left-greedy decomposition are first-order definable, the translation is trivial if the other conditions force p and q to be contained in different cells. If p and q belong to same cell indexed by \pm 1-entry, we may use \delta_1,\dots,\delta_l to translate the condition i<j to a condition comparing p and q with respect to the order <_1. For \star-entries, we may simply construct such a formula by induction on d, we omit the details as the technique is similar to the one used above.

Remark

Remark 65

IGC6

Let \mathcal{F} be a small permutation class. Then there exist a regular language L_{\mathcal{F}} and a bijection f_\mathcal{F}:L_\mathcal{F}\rightarrow \mathcal{F} for which f_{\mathcal{F}} is both a first-order and a monadic second-order isomorphism.

Remark

Remark 66

172P

Let B,d and k be positive integers with d \geq 2. Then the following statements hold.

  1. For every non-empty \tau\in\widetilde{\mathcal O}_{k,B}, there exists a first-order formula

    \psi_\tau(x_1,\dots,x_{|\tau|},y_1,\dots,y_{|\tau|})

    for which \sigma\models\psi_\tau(a_1,\dots,a_{|\tau|},b_1,\dots,b_{|\tau|}) if and only if the left-greedy decomposition of \sigma\in\widetilde{\mathcal O}_k^{[d]} is

    \sigma=\tau[\theta_1,\dots,\theta_{|\tau|}],

    and each \theta_i consists precisely of the points in [a_i,b_i]_1.

  2. For each s\in\{\mathrm{inc},\mathrm{dec}\}, there exists a first-order formula

    \psi_s(x_1,\dots,x_B,y_1,\dots,y_B)

    for which \sigma\models\psi_s(a_1,\dots,a_B,b_1,\dots,b_B) if and only if the left-greedy decomposition of \sigma\in\widetilde{\mathcal O}_k^{[d]} is

    \sigma=\tau'[\theta_1,\dots,\theta_{|\tau'|}],

    where \tau' is monotone in direction s, |\tau'|\geq B+1, and \theta_i consists precisely of the points in [a_i,b_i]_1 for every 1\leq i\leq B.

Proof of Remark 66

The first assertion follows by considering the first-order formula \exists_{i \in [|\tau|],j\in \{1,2\}} x_{i,2,j}: \psi_{\tau,<_L}(x_{i,u,v}) constructed in Lemma 25, and renaming the variables as x_i :=x_{i,1,1} and y_i := x_{i,1,2}. The second assertion follows analogously for each \alpha\in\{\mathrm{inc},\mathrm{dec}\} by considering the first-order formula \exists_{i \in [B], j\in \{1,2\}} x_{i,2,j} \psi'_{\alpha,B}(x_{i,u,v}) constructed in Lemma 68, and renaming the variables as x_i = x_{i,1,1} and y_i = x_{i,1,2}. This completes the proof of Proposition 66.

Remark

Remark 67

V8EL

Fix \alpha \in \{\mathrm{inc},\mathrm{dec}\} and let s be a positive integer. There exists a first-order formula \psi_{\alpha,s}(x_{i,u,v}) with i \in [s],u,v\in \{1,2\} for which \sigma \models \psi_{\alpha,s}(a_{i,u,v}) if and only if \sigma = \tau_{\alpha,s+1}[\sigma_1,\dots,\sigma_{s+1}], where \tau_{\alpha,s+1} is the monotone permutation of direction \alpha and length s+1, \sigma_i consists of points in [a_{i,1,1},a_{i,1,2}]_1\times [a_{i,2,1},a_{i,2,2}]_2 for each 1 \leq i \leq s, each a_{i,u,v} belongs to \sigma_i, and \sigma_i \in \widetilde{\mathcal O}_k^{[d-1]} for every 1 \leq i \leqs.

Proof

Proof

CB1D

Let \upsilon_{d-1,k}(x_1,x_2,y_1,y_2) denote the first-order formula constructed in the statement of Proposition 23 with \mathcal{F} = \widetilde{\mathcal{O}}_k^{[d-1]}. When \alpha = \mathrm{inc}, we claim that one can take \psi_{\mathrm{inc},s}(x_{i,u,v}) to be the formula

\begin{aligned} &\left(\forall z \left(z \leq_1 x_{s,1,2} \implies \bigvee_{i=1}^{s} \left(z \in [x_{i,1,1},x_{i,1,2}]_1 \times [x_{i,2,1},x_{i,2,2}]_2\right)\right)\right) \\ & \land \bigwedge_{i,i'=1}^{s} \bigwedge_{u,u'=1}^{2} \bigwedge_{v,v'=1}^{2} \left(i < i' \implies \left(x_{i,u,v} <_1 x_{i',u',v'} \land x_{i,u,v} <_2 x_{i',u',v'})\right)\right) \\ & \land \bigwedge_{i=1}^{s} \upsilon_{d-1,k}(x_{i,1,1},x_{i,2,1},x_{i,1,2},x_{i,2,2}) \\ &\land\bigwedge_{i=1}^{s}\bigwedge_{u,v=1}^{2} \left(x_{i,u,v}\in [x_{i,1,1},x_{i,1,2}]_1\times [x_{i,2,1},x_{i,2,2}]_2\right) \\ & \land \left(\forall z_1 \forall z_2: \left(z_1 \leq_1 x_{s,1,2} \land x_{s,1,2} <_1 z_2\right) \implies z_1 <_2 z_2\right) \end{aligned}

Let a_{i,u,v} be chosen so that \sigma \models \psi_{\mathrm{inc},s}(a_{i,u,v}), and for 1 \leq i \leq s , write \sigma_i for the sub-permutation induced by the points in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2. We also write \sigma_{s+1} for the remaining points. Then the first and last lines imply that \sigma = \varphi \oplus \sigma_{s+1}, where \varphi consists of the points in \sigma_{1},\dots,\sigma_{s}. Analogously as in the proof of Lemma 25, we conclude that the remaining lines imply that \varphi = \sigma_1 \oplus \dots \oplus \sigma_s and that for all 1 \leq i \leq s we have \sigma_i \in \widetilde{\mathcal{O}}_k^{[d-1]}.

Analogously, we set \psi_{\mathrm{dec},s}(x_{i,u,v}) to be the formula

\begin{aligned} &\left(\forall z \left(z \leq_1 x_{s,1,2} \implies \bigvee_{i=1}^{s} \left(z \in [x_{i,1,1},x_{i,1,2}]_1 \times [x_{i,2,1},x_{i,2,2}]_2\right)\right)\right) \\ & \land \bigwedge_{i,i'=1}^{s} \bigwedge_{u,u'=1}^{2} \bigwedge_{v,v'=1}^{2} \left(i < i' \implies \left(x_{i,u,v} <_1 x_{i',u',v'} \land x_{i',u',v'} <_2 x_{i,u,v})\right)\right) \\ & \land \bigwedge_{i=1}^{s} \upsilon_{d-1,k}(x_{i,1,1},x_{i,2,1},x_{i,1,2},x_{i,2,2}) \\ &\land\bigwedge_{i=1}^{s}\bigwedge_{u,v=1}^{2} \left(x_{i,u,v}\in [x_{i,1,1},x_{i,1,2}]_1\times [x_{i,2,1},x_{i,2,2}]_2\right) \\ & \land \left(\forall z_1 \forall z_2: \left(z_1 \leq_1 x_{s,1,2} \land x_{s,1,2} <_1 z_2\right) \implies z_2 <_2 z_1\right), \end{aligned}

and we note that checking the details follows similarly.

Remark

Remark 68

3MGO

Let \alpha \in \{\mathrm{inc},\mathrm{dec}\} and let s be a positive integer. Then there exists a first-order formulas \psi'_{\alpha,s}(x_{i,u,v}) with i \in [s], u,v\in \{1,2\} so that for \sigma \in \widetilde{\mathcal{O}}_{k}^{[d]} we have \sigma \models \psi'_{\alpha,s}(a_{i,u,v}) if and only if the left-greedy decomposition of \sigma is given as \tau_r[\theta_1,\dots,\theta_r] for some r \geq s+1, where \tau_r is the monotone permutation of length r and direction \alpha, and for each 1\leq i\leq s the permutation \theta_i consists of the points in [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2, and each a_{i,u,v} belongs to \theta_i.

Used by Proof
Proof of Remark 68

Consider the first-order formula \psi'_{\mathrm{inc},s}(x_{i,u,v}) with i \in [s], u,v\in \{1,2\} given by

\begin{aligned} &\bigwedge_{\tau \in \mathcal{Q}_k\cup(\widetilde{\mathcal O}_{k,s}} \left(\forall_{i \in [|\tau|]} x_i,y_i: \neg \psi_{\tau}(x_1,\dots,x_{|\tau|},y_1,\dots,y_{|\tau|})\right) \\& \land \neg \left(\exists z\exists u\forall x\forall y:(z <_1 u)\land \left((x \leq_1 z\land z<_1y)\implies y<_2x\right)\right) \\& \land \psi_{\mathrm{inc},s}(x_{i,u,v}) \land \left(\forall_{i\in [s],u,v\in \{1,2\}} y_{i,u,v}: \psi_{\mathrm{inc},s}(y_{i,u,v})\implies \bigwedge_{i=1}^s \left(y_{i,2,2} \leq_2x_{i,2,2} \right)\right). \end{aligned}

We check that \psi'_{\mathrm{inc},s} satisfies the required properties. Suppose that \sigma \models \psi'_{\mathrm{inc},s}(a_{i,u,v}), and let \sigma = \tau[\theta_1,\dots,\theta_r] denote the left-greedy decomposition of \sigma. The first line excludes every non-monotone permutation and every monotone permutation of length at most s as the profile \tau of \sigma. Thus \tau must be a monotone permutation of length at least s+1.

Recall that Proposition 2.3 in [albert2015inflations] implies that for any \sigma \in \widetilde{\mathcal{O}}_{k}^{[d]}, the set T(\sigma) of possible profiles \tau' of decompositions of \sigma as \sigma = \tau'[\sigma_1,\dots,\sigma_\ell] with \sigma_i \in \widetilde{\mathcal{O}}_{k}^{[d-1]} has a unique minimum element under sub-pattern containment.

The second line implies that it is impossible to write down \sigma as a skew-sum of two non-empty permutations. Thus, by the observation above, this condition is equivalent to the profile \tau of \sigma being a monotone increasing permutation, and hence a monotone increasing permutation of length at least s+1.

For each 1 \leq i\leq s and u,v\in \{1,2\}, let b_{i,u,v}\in \theta_i be chosen so that \theta_i consists of the points in [b_{i,1,1},b_{i,1,2}]_1 \times [b_{i,2,1},b_{i,2,2}]_2. Let \sigma_1,\dots,\sigma_s be defined as in the proof of Lemma 67.

Since \sigma \models \psi'_{\mathrm{inc},s}, the last line implies that for all 1 \leq j \leq s we have \sum_{i=1}^j|\theta_i| \leq \sum_{i=1}^j |\sigma_i|. If the inequality is strict for some j, pick the least j for which it is strict. Writing \theta_i' = \theta_i for i < j, \theta_j' = \sigma_j and \theta_i' = \theta_i \setminus \sigma_j for i \geq j+1, we have \sigma = \theta_1' \oplus \dots \oplus \theta_r', omitting the empty blocks. This gives a decomposition of \sigma as a direct sum of fewer blocks, or with the same number of blocks and larger j-th block, thus contradicting the fact that \theta_1 \oplus \dots \oplus \theta_r is the left-greedy decomposition of \sigma.

Thus the equality \sum_{i=1}^j|\theta_i| =\sum_{i=1}^j |\sigma_i| must hold for every 1 \leq j \leq s. Hence we conclude that |\theta_i| = |\sigma_i| and hence \sigma_i = \theta_i holds for each 1 \leq i\leq s. Hence the i-th block \theta_i in the left-greedy decomposition consists of points [a_{i,1,1},a_{i,1,2}]_1 \times [a_{i,2,1},a_{i,2,2}]_2. The proof of the converse direction follows similarly, we omit the details.

The construction of \psi'_{\mathrm{dec},s}(x_{i,u,v}) follows analogously, we omit the details.

Source and licence

The text on this page is from arXiv:2610.22218v1 by Klas Marström and Eero Räty, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2610/2610.22218.jsonl.