# Exactly which stars repeat? A complete modulo-nine classification

Moessner's theorem produces the exact powers. The chart then applies a centre-anchored reduction modulo nine. This chapter proves the complete collision and multiplicity pattern of that reduction for **every positive integer degree**, with any centre and either flight direction.

The result is an ordinary theorem about integer residues and the project's chosen projection. It does not assert that the higher-degree construction is a historical Feng Shui method, a complete natal chart, or evidence of physical effects.

## 1. The construction being classified

At zero-based flight index \(i=0,\ldots,8\), let \(n=i+1\). Choose a centre \(c\in\{1,\ldots,9\}\) and direction \(\varepsilon\in\{+1,-1\}\). Define

\[
\operatorname{wrap}_9(z)=1+((z-1)\bmod9),
\]

where modulo returns the least nonnegative residue, and set

\[
\boxed{
\operatorname{star}(n)=\operatorname{wrap}_9\big(c+\varepsilon(n^d-1)\big).
}
\tag{1}
\]

The subtraction of the first power, \(1^d=1\), preserves the centre. The palace order is

| \(n\) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Palace | C | NW | W | NE | S | N | SW | E | SE |

This is the path configured in [the exact engine](https://github.com/archgpt-agent/fengshui-2076/blob/main/website/public/engine.mjs) and [the Haskell chart module](https://github.com/archgpt-agent/fengshui-2076/blob/main/haskell/src/Moessner/FengShui.hs). It is different from the row order used to draw a square.

The first nine positive integers represent every residue modulo 9 once. Thus the chart's multiplicities are determined by the power map

\[
T_d:\mathbb Z/9\mathbb Z\longrightarrow\mathbb Z/9\mathbb Z,
\qquad T_d(r)=r^d.
\]

If two integers are congruent modulo 9, their positive integer powers are congruent as well: expanding \((r+9t)^d\) shows that every term except \(r^d\) has a factor of 9. Therefore this power map is well-defined on residue classes.

## 2. Changing centre or direction preserves collisions

On residues, equation (1) first applies \(T_d\), then the affine transformation

\[
A_{c,\varepsilon}(r)=(c-1)+\varepsilon(r-1)\pmod9.
\tag{2}
\]

The final display adds one to the chosen representative. Since multiplication by \(+1\) or \(-1\) and addition of a constant are invertible modulo 9, \(A_{c,\varepsilon}\) is a bijection. Its inverse is

\[
y\longmapsto 1+\varepsilon\big(y-(c-1)\big)\pmod9.
\]

Consequently:

- two palaces have equal displayed stars exactly when their power residues are equal;
- the number of distinct stars is independent of centre and direction;
- the multiset of multiplicities is independent of centre and direction;
- the actual star labels and their element associations can change.

It is therefore enough to classify \(T_d\).

## 3. The three residues divisible by three

For \(d=1\), every residue stays itself. The result is a permutation of all nine labels after the affine transformation.

For \(d\geq2\), the residues \(0,3,6\) all map to zero:

\[
0^d\equiv3^d\equiv6^d\equiv0\pmod9.
\]

Indeed, the square of a multiple of 3 contains a factor of 9, and further multiplication keeps that factor. None of the other six residues can map to zero because each has a multiplicative inverse modulo 9.

Thus the zero power residue has **exactly three preimages** for every \(d\geq2\). In the chart it becomes the displayed star

\[
\operatorname{wrap}_9(c-\varepsilon).
\tag{3}
\]

The corresponding palaces are W, N, and SE, because their power arguments are 3, 6, and 9. These three palaces always agree at higher degrees, regardless of the centre or direction.

## 4. The six invertible residues form a cycle

The invertible residues are

\[
U=\{1,2,4,5,7,8\}.
\]

We do not need a general theorem about unit groups to analyze this case. Direct multiplication gives the full cycle:

| Exponent \(j\) | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| \(2^j\bmod9\) | 1 | 2 | 4 | 8 | 7 | 5 | 1 |

The first six entries are distinct and exhaust \(U\); the next returns to one. Hence each unit has a unique representation \(2^j\) with \(j\) taken modulo 6, and 2 has order exactly 6.

Raising a unit to degree \(d\) acts on its exponent by

\[
(2^j)^d=2^{dj},\qquad j\in\mathbb Z/6\mathbb Z.
\]

Let

\[
g=\gcd(d,6),\qquad h=6/g.
\]

Two exponents \(j,k\) give the same output exactly when

\[
6\mid d(j-k).
\]

Write \(d=gd'\), where \(\gcd(d',h)=1\). The condition becomes \(h\mid d'(j-k)\), equivalent to \(h\mid(j-k)\). For any fixed output, there are exactly \(g\) admissible exponents among the six values of \(j\).

The image therefore has \(6/g\) unit residues, each occurring \(g\) times. Explicitly, it is

\[
\{2^{g\ell}\bmod9:0\leq\ell<6/g\}.
\tag{4}
\]

To see that this is the whole image, multiplication by \(d'\) permutes the residue classes modulo \(h\), because \(d'\) and \(h\) are coprime. Thus \(dj\pmod6\) runs through precisely the multiples of \(g\).

## 5. The classification theorem

Combining the preceding two sections gives the number \(D(d)\) of distinct stars:

\[
\boxed{
D(1)=9,\qquad
D(d)=1+\frac{6}{\gcd(d,6)}\quad(d\geq2).
}
\tag{5}
\]

For \(d\geq2\), the extra one in (5) is the zero power residue. It occurs three times. Each nonzero image residue occurs \(g=\gcd(d,6)\) times. The counts add to

\[
3+\frac{6}{g}\,g=9,
\]

so every palace is accounted for.

| Degree class, with \(d\geq2\) | \(g=\gcd(d,6)\) | Unit image | Multiplicity of each unit image | Distinct stars |
| --- | --- | --- | --- | --- |
| \(d\equiv1,5\pmod6\) | 1 | 1, 2, 4, 5, 7, 8 | 1 | 7 |
| \(d\equiv2,4\pmod6\) | 2 | 1, 4, 7 | 2 | 4 |
| \(d\equiv3\pmod6\) | 3 | 1, 8 | 3 | 3 |
| \(d\equiv0\pmod6\) | 6 | 1 | 6 | 2 |

The zero power residue, of multiplicity three, must be added to every row of this table. Star labels are obtained using (1), not by treating residue zero as a displayed star zero.

This proves that degree one is the **only** positive integer degree yielding a permutation of all nine stars under this construction. For every higher degree, the three fixed nonunit positions already collide. A display that forces every higher-degree result to contain all nine stars would be modifying the mathematical result.

The centre star is also classified exactly. Power residue 1 always maps to \(c\); its unit preimage count is \(g\). Thus the chosen centre label occurs \(\gcd(d,6)\) times for \(d\geq2\). It is distinct from the triply occurring label in (3).

## 6. Every collision class, by palace

For unit arguments, equal outputs mean that their exponent indices in the cycle of 2 differ by a multiple of \(h=6/g\). This gives all collision groups, not merely their sizes.

| \(g\) | Unit-palace groups with equal stars |
| --- | --- |
| 1 | C; NW; NE; S; SW; E are all distinct |
| 2 | C with E; NW with SW; NE with S |
| 3 | C with NE and SW; NW with S and E |
| 6 | C, NW, NE, S, SW, E all agree |

For every row, W, N, and SE form one further group, distinct from all unit groups. These groups are independent of centre and direction. Degrees two and four have the same collision groups but can assign different labels to those groups.

For example, when \(g=2\), the kernel exponent difference is three. Pairing units by multiplication with \(2^3=8\equiv-1\) produces \(1\leftrightarrow8\), \(2\leftrightarrow7\), and \(4\leftrightarrow5\), which are exactly the listed pairs of palaces.

## 7. Exact examples for centre 9, forward flight

The following arrays are in flight order C, NW, W, NE, S, N, SW, E, SE.

| Degree | Power residues modulo 9 | Displayed stars | Distinct |
| --- | --- | --- | --- |
| 1 | 1, 2, 3, 4, 5, 6, 7, 8, 0 | 9, 1, 2, 3, 4, 5, 6, 7, 8 | 9 |
| 2 | 1, 4, 0, 7, 7, 0, 4, 1, 0 | 9, 3, 8, 6, 6, 8, 3, 9, 8 | 4 |
| 3 | 1, 8, 0, 1, 8, 0, 1, 8, 0 | 9, 7, 8, 9, 7, 8, 9, 7, 8 | 3 |
| 4 | 1, 7, 0, 4, 4, 0, 7, 1, 0 | 9, 6, 8, 3, 3, 8, 6, 9, 8 | 4 |
| 5 | 1, 5, 0, 7, 2, 0, 4, 8, 0 | 9, 4, 8, 6, 1, 8, 3, 7, 8 | 7 |
| 6 | 1, 1, 0, 1, 1, 0, 1, 1, 0 | 9, 9, 8, 9, 9, 8, 9, 9, 8 | 2 |
| 7 | 1, 2, 0, 4, 5, 0, 7, 8, 0 | 9, 1, 8, 3, 4, 8, 6, 7, 8 | 7 |
| 8 | 1, 4, 0, 7, 7, 0, 4, 1, 0 | 9, 3, 8, 6, 6, 8, 3, 9, 8 | 4 |
| 9 | 1, 8, 0, 1, 8, 0, 1, 8, 0 | 9, 7, 8, 9, 7, 8, 9, 7, 8 | 3 |

At degree two the power-residue multiplicities are \(0:3,1:2,4:2,7:2\). Under centre 9 and forward direction, these become star multiplicities \(8:3,9:2,3:2,6:2\). At degree six, only stars 9 and 8 remain, with multiplicities six and three.

The exact arrays, including reverse-direction examples, are in [worked-examples.json](worked-examples.json). They are generated by the positional sieve and compared with an independent power calculation.

## 8. Periodicity starts at degree two

For every unit \(u\), the cycle above gives \(u^6=1\), so

\[
u^{d+6}=u^d\pmod9.
\]

For the three nonunits, every power of degree at least two is zero. Therefore the entire nine-value residue vector satisfies

\[
(n^{d+6}\bmod9)_{n=1}^{9}
=(n^d\bmod9)_{n=1}^{9}
\quad\text{for all }d\geq2.
\tag{6}
\]

Its least positive period in this range is six. If a shift \(t>0\) preserves the whole vector, it preserves the entry at \(n=2\). Dividing by the invertible residue \(2^d\) gives \(2^t=1\), and the cycle table shows that this requires \(6\mid t\).

Degree one is exceptional. Degrees one and seven agree on the units, but

\[
3^1\equiv3,\quad3^7\equiv0,
\qquad
6^1\equiv6,\quad6^7\equiv0\pmod9.
\]

They are different charts, with nine and seven distinct stars respectively. Reducing the degree modulo six before handling the nonunits would lose this exception.

For any fixed centre and direction, there are therefore exactly **seven different star assignments over all positive degrees**: the degree-one assignment, and six assignments represented by degrees 2 through 7. Those six are distinct because the value at \(n=2\) distinguishes their exponent classes; the first has no collisions and cannot equal any of them. The unreduced powers and the intermediate sieve tables still continue to change without this six-degree repetition.

## 9. Information loss, element counts, and display orientation

The chart deliberately forgets multiples of nine. Distinct exact values can have the same star; identical charts at degrees two and eight do not imply identical integer sequences or identical sieve traces. A reproducible export should therefore retain the degree, centre, direction, exact terms, and exact offsets, as the current implementation does.

Grouping stars by the five-phase metadata is another many-to-one mapping. If \(E\) maps a star label to its configured element, the element count is simply

\[
\#E^{-1}(e)=\sum_{s:\,E(s)=e}\#\{n:\operatorname{star}(n)=s\}.
\]

Changing centre or direction preserves the star multiplicity pattern but can move repeated labels between element categories. For the centre-9 forward square example, the configured map gives Earth 3, Fire 2, Wood 2, Metal 2, and Water 0. This is a count of labels in the constructed chart, not a measurement of environmental properties.

The south-up layout is

| Southeast | South | Southwest |
| --- | --- | --- |
| East | Centre | West |
| Northeast | North | Northwest |

For the degree-two example, its numerical arrangement is

| 8 | 6 | 3 |
| --- | --- | --- |
| 9 | 9 | 8 |
| 6 | 8 | 3 |

Rotating the display changes screen coordinates, not which star belongs to a named palace. No step of the residue proof depends on drawing orientation.

## 10. Verification status and extensions

The universal classification (5), all collision groups, and the exact period (6) were proved in this chapter using elementary modular arithmetic. [verify_examples.py](verify_examples.py) also checks residue counts through degree 60, together with all centres and directions over a finite range. Those checks catch transcription and implementation errors; the argument above supplies the unrestricted proof.

The existing Lean file [FengShui.lean](https://github.com/archgpt-agent/fengshui-2076/blob/main/lean/FengShui.lean) formalizes bounded labels, centre preservation, degree-one recovery, and concrete examples. It does **not yet contain a general formalization of (5)**. A suitable next formalization task is to encode the six-element unit cycle, prove the power-map fibre count, and transport it through the affine map.

For another modulus, the same strategy begins by separating invertible and noninvertible residues. The simple formula here relies on the particular structure of modulo 9. For example, modulo a prime every nonzero residue is a unit, while composite moduli may have several kinds of nonunit behavior. One should re-prove that structure rather than transplant formula (5) unchanged.
