# Purple Square Atlas

A mathematical and visual treatise on rotations, local geometry, and counting.

Author: Christopher Yamba  
Co-author: GPT-6.1 Sol Extra High  
Date: 2026-10-10  
Edition 1.0. Geometric patterns in purple and white.

Six oriented tiles create a large space of mosaics. A whole-board rotation moves each tile to another cell and turns the tile's own diagonal. This treatise counts the resulting rotation classes for every positive grid size, explains the result constructively, and extends the method to reflections and arbitrary finite tile alphabets.

![Six quarter-turn-fixed mosaics](figures/05-six-fixed-patterns.png)

$$A_2=336\qquad A_3=2{,}520{,}108$$

The counting principles are standard finite group-action methods. The contribution here is a complete, reproducible exposition of this geometric model, with exact figures, an interactive explorer, and a checked Lean theorem in cycle coordinates. No external pattern collection is reproduced.

## 1. Six tiles, one alphabet

A tile is a unit square: entirely white, entirely purple, or split along a diagonal into one white triangle and one purple triangle. Name a split tile by the corner containing the right angle of its purple triangle.

![The six oriented tile states](figures/01-six-tiles.png)

$$T=\{W,P,NW,NE,SE,SW\},\qquad |T|=6$$

Each of these is an oriented state in a fixed frame. NW and NE are distinct. Colors remain distinct too: exchanging purple and white is not one of the transformations used in this study.

Let ρ be a clockwise quarter-turn of one tile. It fixes the two solids and cycles the four split states:

$$NW\ \longmapsto\ NE\ \longmapsto\ SE\ \longmapsto\ SW\ \longmapsto\ NW$$

Four turns restore every tile, so ρ⁴ is the identity. Each of ρ, ρ² and ρ³ fixes exactly W and P. The distinction between a cell returning to its position and its internal pattern returning to its orientation is essential.

There are no adjacency restrictions, inventory restrictions, or hidden edge-matching conditions. Every cell may independently contain any of the six tiles. The grid remains known, and the thin boundary strokes in the figures are guides.

## 2. Define the board and its rotation

For a positive integer n, define a square set of positions. Rows increase downward; columns increase to the right.

$$B_n=\{0,1,\ldots,n-1\}^2,\qquad X_n=T^{B_n}$$

A pattern is a function f from Bₙ to T. The notation T raised to Bₙ means the set of all such functions. There are n² independent positions, hence:

$$|X_n|=6^{n^2}$$

The clockwise quarter-turn of a position is r. The clockwise quarter-turn of a complete pattern is R:

$$r(i,j)=(j,n-1-i)$$

$$(Rf)(r(p))=\rho(f(p))$$

Equivalently, the value at a destination p is obtained from its source r⁻¹(p), then rotated locally. Moving the cells without turning their diagonals would count a different action.

![The diagonals rotate with the board](figures/02-whole-pattern-rotation.png)

Both r⁴ and ρ⁴ are identities, so R⁴ is an identity. The four operations form the cyclic group C₄. A group action means that applying operations successively agrees with their composition in the group.

## 3. State the counting problem and theorem

The orbit of a pattern is the set of its distinct rotated versions. Two patterns are equivalent when one can be rotated into the other. A pattern is fixed by a transformation if the complete final pattern equals the starting pattern. Write Fix(g) for that fixed set.

The question is to count orbits, rather than oriented arrangements. Let Aₙ denote the number of rotation orbits on an n × n board.

Theorem 1. For every integer n ≥ 1, the rotation-class count is:

Even n:

$$A_n=\frac{6^{n^2}+6^{n^2/2}+2\cdot6^{n^2/4}}{4}$$

Odd n:

$$A_n=\frac{6^{n^2}+2\cdot6^{(n^2-1)/2}+4\cdot6^{(n^2-1)/4}}{4}$$

All exponents are integers in the applicable branch. An even square is divisible by four; an odd square is one modulo four.

Define E = |Xₙ|, H = |Fix(R²)|, and Q = |Fix(R)|. A three-quarter-turn has the same fixed set as a quarter-turn, since these transformations are inverses. The theorem can therefore be written:

$$A_n=\frac{E+H+2Q}{4}$$

The next steps construct the fixed patterns explicitly and then explain why this average counts the orbits.

## 4. Find the position cycles

A position cycle is a loop obtained by repeatedly applying a transformation to a cell until it returns. Under a quarter-turn, every noncentral position belongs to a cycle of length four.

![Position cycles and the central cell](figures/03-position-cycles.png)

To prove this, the cycle length must divide four. A shorter cycle would have length one or two, and the position would then be fixed by the half-turn. But:

$$r^2(i,j)=(n-1-i,n-1-j)$$

Equating this with (i,j) requires i = j = (n−1)/2. Such a grid position exists only when n is odd. It is then the center, and is fixed by a quarter-turn as well.

Consequently, an even board contains n²/4 four-cycles. An odd board contains (n²−1)/4 four-cycles plus its center. There are no other one-cycles or two-cycles under the quarter-turn.

Under a half-turn, every noncentral position instead belongs to a pair of opposite cells. There are n²/2 pairs on an even board, or (n²−1)/2 pairs plus a central cell on an odd board.

The diagrams label equal cycles with the same letter. A trailing digit tells where a cell lies in that loop. These are cycles of positions, not yet choices of tile states.

## 5. Choose one seed, force the other tiles

Consider a pattern fixed by a quarter-turn. Around one four-cycle its values must be:

$$t,\quad\rho t,\quad\rho^2t,\quad\rho^3t$$

![Seed transport and the center condition](figures/04-propagation-and-center.png)

Choose the first tile t freely from the six states. The remaining three are forced. After returning to the starting cell, consistency requires ρ⁴t = t, which holds for every state. Thus each four-cycle contributes six choices, not six to the fourth power, and not two.

This is a bijection: recording one seed from each cycle maps fixed assignments to a list of independent tile choices. Conversely, a list of seeds reconstructs the unique fixed assignment by rotating each seed around its cycle. Different cycles do not constrain one another, so their counts multiply.

The center behaves differently. Its position stays fixed while its tile rotates. It must satisfy ρt = t. Only W and P satisfy this, so an odd board gains a factor of exactly two.

Even n and odd n respectively give:

$$Q_n=6^{n^2/4}\qquad Q_n=2\cdot6^{(n^2-1)/4}$$

The 270° fixed count is the same Qₙ: if an invertible transformation fixes a pattern, its inverse fixes the pattern as well.

## 6. Half-turns and the identity

In a half-turn-fixed pattern, each pair of opposite cells has values t and ρ²t. Choosing t freely determines its partner. Returning applies ρ⁴, so every starting tile is permitted.

An even board has n²/2 pairs. An odd board has (n²−1)/2 pairs and a center. At the center the condition is now ρ²t = t. Again, only the two solids survive.

Even n:

$$H_n=6^{n^2/2}$$

Odd n:

$$H_n=2\cdot6^{(n^2-1)/2}$$

The identity imposes no condition, so:

$$E_n=6^{n^2}$$

A fixed pattern need not keep each tile in the same position. It is the final complete arrangement that must agree with the original. This is why a four-cycle can be fixed even when its individual tiles change position and orientation.

We now have all four fixed counts: Eₙ, Qₙ, Hₙ, Qₙ. The remaining step is a general double-counting argument.

## 7. Prove Burnside's lemma

Burnside's lemma. If a finite group G acts on a finite set X, the number of orbits is the average number of fixed elements:

$$|X/G|=\frac{1}{|G|}\sum_{g\in G}|\mathrm{Fix}(g)|$$

Proof. Count the pairs (g,x) satisfying gx = x in two ways. Counting first by g gives the sum of the fixed-point counts. Counting first by x gives the sum of stabilizer sizes. The stabilizer Gₓ is the subgroup of operations that fix x.

The map from G to the orbit of x, given by g ↦ gx, has one fiber for each orbit element. Every fiber has |Gₓ| elements: it is a coset of the stabilizer. Therefore:

$$|Gx|\,|G_x|=|G|$$

Every element in one orbit has stabilizer size |G| divided by the orbit's size. Summing those stabilizer sizes over the whole orbit gives exactly |G|. Thus each orbit contributes the same number of pairs, regardless of how symmetric it is. Divide the total number of pairs by |G| to obtain the lemma.

Apply this to C₄ and the four established fixed counts. Substituting them proves Theorem 1 for every positive n. The tile interiors introduce no need for a stronger theorem; they enter through the local consistency conditions.

## 8. The complete two-by-two example

For a 2 × 2 board, the fixed counts for 0°, 90°, 180°, and 270° are 1296, 6, 36, and 6.

$$A_2=\frac{1296+6+36+6}{4}=336$$

![All six quarter-turn-fixed patterns](figures/05-six-fixed-patterns.png)

The labels encode the four cells in row-major order: top-left, top-right, bottom-left, bottom-right. Codes are 0=W, 1=P, 2=NW, 3=NE, 4=SE, 5=SW. Each of the six quarter-turn-fixed patterns is obtained by one freely chosen seed.

Simply dividing 1296 by four fails because some patterns have fewer than four distinct orientations. The all-white pattern has one; a half-turn-symmetric pattern without quarter-turn symmetry has two.

Corollary 1. The numbers of rotation classes of sizes one, two and four are:

$$Q_n,\qquad\frac{H_n-Q_n}{2},\qquad\frac{E_n-H_n}{4}$$

Proof. The quarter-turn-fixed patterns have orbit size one. The half-turn-fixed patterns outside that set have orbit size two. All remaining patterns have orbit size four. Divide each pattern count by its orbit size.

For n=2 this gives 6, 15 and 315. They satisfy both checks:

$$6+15+315=336\qquad6+2\cdot15+4\cdot315=1296$$

## 9. See the orbits and scale up

![Examples of each orbit size](figures/06-orbit-sizes.png)

The displayed rows have one, two and four distinct orientations. A class is a set of these orientations, not a single favored drawing. The catalogue picks its lexicographically smallest code as a reproducible representative.

For n=3, E₃ = 10,077,696, H₃ = 2,592, and Q₃ = 72. Hence:

$$A_3=\frac{10{,}077{,}696+2{,}592+144}{4}=2{,}520{,}108$$

The companion catalogue prints all 1296 oriented size-two patterns, then all 336 rotation representatives. Two large PNG maps show the same sets. The explorer makes each representative's orientations inspectable and separates rotation equivalence from reflection equivalence.

## 10. An elegant change of coordinates

Choose a starting position in each four-cycle and list its tile values a₀, a₁, a₂, a₃ clockwise. Express the tiles in frames that rotate with their positions:

$$b_i=\rho^{-i}a_i\qquad i\in\mathbb{Z}/4\mathbb{Z}$$

After a whole-board rotation, the original coordinates satisfy a′ᵢ = ρaᵢ₋₁. Therefore:

$$b'_i=\rho^{-i}\rho a_{i-1}=b_{i-1}$$

In the new coordinates, the action is an ordinary cyclic shift of four entries. The inverse map aᵢ = ρⁱbᵢ recovers the original state, so this change is a bijection respecting the transformations: an equivariant equivalence.

For k four-cycles and ε central cells, the configuration space in these coordinates is (T⁴)ᵏ × Tᵋ. A square has ε equal to zero or one, and k = (n²−ε)/4. A four-tuple has fixed counts 1296, 6, 36, 6. A center has fixed counts 6, 2, 2, 2. Independence gives:

$$4A=1296^k6^\epsilon+36^k2^\epsilon+2\cdot6^k2^\epsilon$$

This is the theorem verified by the accompanying Lean development for arbitrary natural k and ε. The classification of square-grid position cycles and this grid-to-cycle correspondence are proved here; the coordinate-grid equivalence is not yet encoded in Lean.

## 11. Add reflections as a separate equivalence

Allowing four rotations and four mirrors gives the eight-element dihedral group D₄. Some authors call it D₈; here the subscript refers to four vertices, and the order is eight.

![Local states allowed by different mirrors](figures/07-mirror-constraints.png)

Off a mirror line, cells occur in pairs and contribute six choices per pair. A cell on the mirror must carry a locally invariant tile. A horizontal or vertical mirror preserves only the two solids. An axial mirror has no fixed cells for even n, or n fixed cells for odd n. A diagonal mirror has n fixed cells, each allowing the solids and the two split tiles whose purple corners lie on that diagonal: four choices.

For an axial reflection, Vₙ equals the following in the even and odd cases respectively:

$$V_n=6^{n^2/2}\qquad V_n=2^n6^{(n^2-n)/2}$$

For either diagonal reflection:

$$D_n=4^n6^{(n^2-n)/2}$$

Corollary 2. Burnside's lemma for the eight transformations gives:

$$|X_n/D_4|=\frac{E_n+H_n+2Q_n+2V_n+2D_n}{8}$$

There are two mirrors of each kind, hence the factors of two. This gives 201 classes for n=2 and 1,263,942 for n=3. These counts use an extra equivalence and differ from the rotation-only question.

## 12. The general cycle-product theorem

Theorem 2. Let a finite group G act on a finite position set B and a finite state alphabet T. Give configurations the action (gf)(p) = g(f(g⁻¹p)). For a fixed operation g, let C(g;B) be its position cycles. Then:

$$|\mathrm{Fix}_{T^B}(g)|=\prod_{C\in\mathcal{C}(g;B)}|\mathrm{Fix}_T(g^{|C|})|$$

Proof. Choose a starting position p on a cycle of length ℓ with value t. Invariance forces f(gⁱp) = gⁱt. Returning requires gˡt = t. Conversely, any seed with that property determines a unique consistent assignment on that cycle. Disjoint cycles are independent, so multiply their counts. Burnside averages those products over G.

This identifies the potential mistake in writing |T| raised to the number of cycles: the starting state must survive the transformation accumulated around its cycle. A stationary central position can still have a nontrivial local action.

Corollary 3. For any m-state alphabet with a quarter-turn permutation ρ satisfying ρ⁴ = id, set a = |Fix(ρ)| and b = |Fix(ρ²)|. The square-board count becomes:

$$\frac{m^{n^2}+m^{n^2/2}+2m^{n^2/4}}{4}\quad(n\ \mathrm{even})$$

$$\frac{m^{n^2}+b\,m^{(n^2-1)/2}+2a\,m^{(n^2-1)/4}}{4}\quad(n\ \mathrm{odd})$$

Our alphabet has (m,a,b) = (6,2,2). Even boards detect only m; the center of an odd board also detects a and b. This is a natural starting point for the general pattern studies planned in Yamba Open Mathematics.

## 13. Evidence, boundaries, and future work

The Python tests exhaustively enumerate all 1296 size-two patterns, verify the rotation/reflection group relations, establish all eight fixed counts, and count the 336 rotational and 201 dihedral orbits. A separately implemented cycle-product algorithm agrees with the formulas for n=1 through 20. These finite checks complement the all-n proof.

The Lean source formalizes the rotation-orbit count in cycle coordinates, using Lean and Mathlib 4.19.0. Its precise mathematical scope is recorded in formal-proof-status.md. The coordinate-grid correspondence, reflections, and general arbitrary-group theorem are proved in this text and are not claimed as fully machine-verified.

The planned Finite Pattern Lab will accept arbitrary finite positions, state alphabets, and group actions. It can extend to other polygons, restricted inventories, color permutations, and adjacency rules. Restrictions must be preserved by the selected group; adjacency conditions generally require more than the independent cycle-product formula. See sibling-roadmap.md for the generalization plan.

All graphics are generated from the declared geometry. The method specializes classical Burnside and orbit-stabilizer results; novelty is not claimed for those principles. The Mathlib formal statement is documented at https://leanprover-community.github.io/mathlib4_docs/Mathlib/GroupTheory/GroupAction/Quotient.html under AddAction.sum_card_fixedBy_eq_card_orbits_mul_card_addGroup.

This article is part of Yamba Open Mathematics, a collection of mathematical ideas, reproducible explorations, and Lean proofs by Christopher Yamba. The next exploration will connect related symmetries to musical composition. No reuse license has yet been assigned to the manuscript or software; bundled font licenses are supplied separately.

