${\textsf{a}}^\ast{\textsf{d}}$, ${\textsf{b}}$, $\{{\textsf{a}},{\textsf{c}}\}^\ast{\textsf{b}}$, or ${\textsf{d}}$ and are not of the form ${\textsf{c}}\{{\textsf{a}},{\textsf{c}},{\textsf{d}}\}^\ast$.

With this language we may enumerate the grid class itself[^3], but we are interested instead in the simple permutations. The additional rules for the words encoding simple permutations of length at least four are:

[ccc]{}

(-6,0)(120,88) (80,20)(100,60) (0,0)(80,80) (80,40)(120,0) (80,40)(120,80) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (80,40)[${\textsf{b}}$]{} (80,0)[${\textsf{c}}$]{} (120,40)[${\textsf{d}}$]{}

&&

(-6,0)(120,88) (20,20)(100,60) (0,0)(80,80) (80,40)(120,0) (80,40)(120,80) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (80,40)[${\textsf{b}}$]{} (80,0)[${\textsf{c}}$]{} (120,40)[${\textsf{d}}$]{}

-   To prevent intervals solely contained within an individual cell, we prohibit repetitions ${\textsf{a}}{\textsf{a}}$, ${\textsf{b}}{\textsf{b}}$, ${\textsf{c}}{\textsf{c}}$, or ${\textsf{d}}{\textsf{d}}$ as factors.

-   To prevent intervals of the form shown in the first pane of Figure \[fig-4312-3142-grid-intervals\], we forbid words beginning with $\{{\textsf{c}},{\textsf{d}}\}^2$.

-   To prevent intervals of the form shown in the second pane of Figure \[fig-4312-3142-grid-intervals\], we forbid words of the form $\{{\textsf{a}},{\textsf{b}},{\textsf{c}},{\textsf{d}}\}^\ast\{{\textsf{a}},{\textsf{c}},{\textsf{d}}\}^+$.

With these restrictions, we can then use the package [@delgado:automata-----a-:] for  [@:gap----groups-a:] to count the simple permutations of this grid class[^4]. For future reference, we record that the multivariate generating function for these words of length at least four which begin with ${\textsf{a}}$ is $$s({x_{\textsf{a}}},{x_{\textsf{b}}},{x_{\textsf{c}}},{x_{\textsf{d}}})=\frac{{x_{\textsf{a}}}{x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}}{1-{x_{\textsf{a}}}{x_{\textsf{c}}}-{x_{\textsf{b}}}{x_{\textsf{d}}}-{x_{\textsf{c}}}{x_{\textsf{d}}}-{x_{\textsf{a}}}{x_{\textsf{c}}}{x_{\textsf{d}}}- {x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}},$$ while 