Research Notes · October 12, 2026

Discrete Transitions and Phase Locking: The Modular-Arithmetic Algebraic Manifold of the Isomorphic Five-Escape Methods

中文版本 · /zh/blog/modular-arithmetic-phase-locking/

In the phase space of a dynamical system, complex orbital entanglement often does not arise from injected external random disturbances; it may result simply from nonlinear coupling among several minimal discrete oscillators. When two discrete stepper motors with coprime intrinsic periods are mounted on the same drive shaft, their phase-coincidence trajectories trace a periodic lattice of points on a torus.

In deriving four-pillar spacetime coordinates, classical Chinese calendrical practice left two seemingly parallel formulas: the “Five Rat Escape” method (deriving the hours from the day) and the “Five Tiger Escape” method (deriving the months from the year). In traditional terminology, they are wrapped in concrete imagery such as “the rat crouches at midnight; the tiger leaps in spring,” and, over the course of the development of fate-analysis arts, have even been attributed with mystical auspicious or inauspicious significance. If these empirical accretions are stripped away and the formulas are reexamined through the lens of abstract algebra and modular arithmetic, a highly refined algebraic fact emerges: the Five Rat Escape and Five Tiger Escape methods are topologically equivalent; they are isomorphic expansions of the same discrete modular-dynamics mapping under different initial phase offsets.

From the composite torus of the sixty Jiazi to the congruence-class partition of the Five Stem Combinations and then to the basis projection of transformation into qi, this system fundamentally demonstrates how ancient Chinese mathematical scholars used integer arithmetic alone to construct a rigorous set of multiscale spacetime-coupling equations.


I. Coupled Rings and Degeneracy of Degrees of Freedom: Torus Dynamics of the Sixty Jiazi

The first step in understanding the “Five Escape” operators is to establish an algebraic representation of the discrete-time grid.

Let the set of celestial stems be the additive group modulo 10, G_{10} = \mathbb{Z} / 10\mathbb{Z} = \{0, 1, \dots, 9\}, and the set of earthly branches be the additive group modulo 12, G_{12} = \mathbb{Z} / 12\mathbb{Z} = \{0, 1, \dots, 11\}. Their direct product forms a double-ring state space of capacity 120, \mathbb{T}^2 = G_{10} \times G_{12}.

However, the generative mechanism of the calendrical system requires the two state variables to advance synchronously at a constant unit rate:

t \mapsto (t \bmod 10,\; t \bmod 12), \quad t \in \mathbb{N}
Discrete state lattice on the modulo-10 and modulo-12 double torus, showing the diagonal trajectory with unit step size and its helical winding into a closed cycle of length 60. Double-torus algebraic lattice and closed trajectory STATE SPACE T² = G₁₀ × G₁₂ → CYCLE SUBGROUP ℤ/60ℤ (ORD=60, PARITY CONSERVED) Jia 0 Yi 1 Bing 2 Ding 3 Wu (stem) 4 Ji 5 Geng 6 Xin 7 Ren 8 Gui 9 Zi 0 Chou 1 Yin 2 Mao 3 Chen 4 Si 5 Wu (branch) 6 Wei 7 Shen 8 You 9 Xu 10 Hai 11 Jia-Zi (0) Bing-Zi (12) Wu-Zi (24) Geng-Zi (36) Ren-Zi (48) Yi-Chou (1) Ding-Chou (13) Ji-Chou (25) Xin-Chou (37) Gui-Chou (49) Gui-You (9) Xun-void lag: -2 Topological measure indicators |G₁₀| = 10 |G₁₂| = 12 gcd(10, 12) = 2 (parity) lcm(10, 12) = 60 Phase-space degeneracy ratio: 60 / 120 = 50.0% Single-xun drift Δφ = -2 (10 mod 12 = 10 ≡ -2) Reachable congruence-state points (t mod 2 ≡ 0, 60 total) Parity-forbidden points (parity-breaking states, 60 total) HOVER to inspect stem–branch mapping coordinates at lattice nodes
Discrete state lattice on the modulo-10 and modulo-12 double torus, showing the diagonal trajectory with unit step size and its helical winding into a closed cycle of length 60.

By elementary number theory, the shortest closed period of this discrete dynamical-system trajectory is:

T = \operatorname{lcm}(10, 12) = 60

This means that the composite system's dynamical trajectory does not traverse all 120 theoretical coordinates; instead, it degenerates into a cyclic subgroup of order 60, \mathbb{Z} / 60\mathbb{Z}. The other 60 state points, which are never visited, are permanently excluded from physical realization.

This constraint immediately yields two central structural properties:

  1. Parity homomorphism constraint: Since \gcd(10, 12) = 2, the stem-and-branch state sequence is invariant under projection modulo 2: t \bmod 2 \equiv (t \bmod 10) \bmod 2 \equiv (t \bmod 12) \bmod 2. An odd-numbered celestial stem must pair with an odd-numbered earthly branch, and an even-numbered stem with an even-numbered branch; parity is naturally conserved in phase space at this point.
  2. Truncation-induced drift (xunkong, “void”): When the celestial stems complete one full cycle (\Delta t = 10), the earthly-branch trajectory acquires a phase lag relative to the full celestial-stem cycle:
10 \bmod 12 = -2 \equiv 10 \pmod{12}

In the modulo-12 coordinate system, the earthly branches shift two positions backward relative to the stems, so every 10-step interval (a xun, or ten-day cycle) necessarily omits 2 earthly-branch points. The so-called “xun void” is simply the residual phase drift produced when a higher-order oscillator is truncated after one cycle relative to a lower-order oscillator.


II. Modular Mapping Across Fast and Slow Scales: The Algebraic Isomorphism of the Five Rat and Five Tiger Escape Methods

When this composite dynamical system is extended to a multiscale spacetime grid (year–month, day–hour), the problem of multiscale coupling emerges.

Whether the scale transition is from year to month or from day to hour, when the macroscopic discrete scale (the outer, slower oscillator) advances by one unit, the microscopic scale (the inner, faster oscillator) advances by a fixed 12 units:

1. Modular Projection of the Step Operator

Let the outer macroscopic time index be k (marked by the celestial-stem variable x \in G_{10}), and the inner time index be m \in G_{12}. When the outer scale advances by one step, \Delta k = 1, the inner temporal flow traverses a complete cycle, \Delta m = 12.

Projecting this microscopic displacement back onto the celestial-stem group G_{10} gives a net increment on the celestial-stem basis of:

\Delta x_{\text{inner}} = 12 \bmod 10 \equiv 2 \pmod{10}

This explains the underlying mechanism of the classical algorithmic rule “at the same earthly branch, the celestial stem advances two positions”: every time the outer celestial stem moves forward by one position, the stem index at a fixed inner earthly branch must move forward by two.

Phase transmission in a fast–slow dual-clock system: one-step rotation of the slow wheel drives twelve steps of the fast wheel, producing a +2 increment in the modulo-10 celestial-stem counter, as represented by a gear mapping. Fast–slow dual-scale gear mapping and modular celestial-stem transition DUAL-SPEED PHASE COUPLING: Δk = 1 → Δm = 12 → Δx_inner = 12 mod 10 ≡ +2 (mod 10) Jia [0] Yi [1] Bing [2] Ding [3] Wu [4] Ji [5] Geng [6] Xin [7] Ren [8] Gui [9] Slow oscillator Δk = 1 step Macroscopic outer wheel (year / day) ×12 speed ratio Modular transmission coupling Zi 0 Chou 1 Yin 2 Mao 3 Chen 4 Si 5 Wu 6 Wei 7 Shen 8 You 9 Xu 10 Hai 11 Fast oscillator Δm = 12-step cycle Microscopic inner wheel (month / hour) Modular projection calculation Outer step size: +1 Inner rotations: 1 cycle Inner displacement: 12 steps Net celestial-stem increment: 12 mod 10 ≡ +2 Operator derivative: df/dx = 2 (constant) Period T = 5 (Five Combinations) Five Rat Escape: f_Rat(x) ≡ 2x (mod 10) Five Tiger Escape: f_Tiger(x) ≡ 2x + 2 (mod 10) HOVER to inspect phase locking in the gear diagram
Phase transmission in a fast–slow dual-clock system: one-step rotation of the slow wheel drives twelve steps of the fast wheel, producing a +2 increment in the modulo-10 celestial-stem counter, as represented by a gear mapping.

2. Isomorphism Equations for the Five Rat and Five Tiger Escape Methods

Let the outer celestial stem be x \in \{0, 1, \dots, 9\} (Jia=0, Yi=1, …, Gui=9). We seek the celestial-stem assignment function f(x) at the inner reference point.

In the day–hour system (the Five Rat Escape method), the epoch origin is anchored at “Jia day, Jia Zi hour”: when the day stem is Jia (x=0), the stem assigned to the starting Zi hour (m=0) is Jia (0). Since the Zi-hour stem increases by 2 whenever the outer index increases by 1, its mapping equation is written directly as a linear congruence:

f_{\text{鼠}}(x) \equiv (2x) \pmod{10}

In the year–month system (the Five Tiger Escape method), the epoch origin likewise derives from the Jia-Zi month at the winter solstice. From the Zi month (m=0) to the Yin month at Start of Spring (m=2), the inner stem advances naturally by 2 steps. Therefore, in a Jia year (x=0), the reference stem of the Yin month is Bing (2). Its mapping equation is:

f_{\text{虎}}(x) \equiv (2x + 2) \pmod{10}

Comparing the two equations:

f_{\text{虎}}(x) = f_{\text{鼠}}(x) + 2 \pmod{10}

Their transfer matrices are identical (both have multiplier 2), and the differential operator \frac{df}{dx} = 2 is constant. The Five Tiger Escape method is by no means an algorithm independent of the Five Rat Escape method; algebraically, they are affinely isomorphic. The Five Tiger method is merely the output of the Five Rat method shifted by 2 phase units at the spatial origin (that is, a phase-shifted output corresponding to the two time steps from Zi to Yin).


III. Quotient-Group Partition and Symmetry Breaking: The Number-Theoretic Necessity of the Five Stem Combinations

This modular mapping gives rise to a profound algebraic by-product: the emergence of a quotient-group structure.

Consider the kernel and periodicity of the mapping. The equation f(x) \equiv 2x \pmod{10} is a surjective homomorphism from G_{10} to its even-numbered subgroup 2G_{10} \cong \mathbb{Z}/5\mathbb{Z}. When the input variable x advances by five steps:

\Delta f = 2 \times 5 = 10 \equiv 0 \pmod{10}

This means the mapping has period 5. Every five steps along the macroscopic time axis, the initial configuration of the microscopic time axis completes a full traversal of the sixty Jiazi and returns to its origin:

5 \times 12 = 60 \equiv 0 \pmod{60}

Consequently, the modulo-10 set is naturally partitioned by its periodic operator into five equivalence classes, each containing a pair of celestial stems separated by five steps:

[0] = \{0, 5\} \quad (\text{甲, 己})
[1] = \{1, 6\} \quad (\text{乙, 庚})
[2] = \{2, 7\} \quad (\text{丙, 辛})
[3] = \{3, 8\} \quad (\text{丁, 壬})
[4] = \{4, 9\} \quad (\text{戊, 癸})

At the level of the divination arts, these equivalence relations are called the “Five Combinations of the Celestial Stems.” Commentaries in this tradition often attempt to explain why “Jia combines with Ji, Yi with Geng” by invoking ethical metaphors of Yin–Yang pairing or the overcoming relations among the Five Phases. In modular arithmetic, however, this is purely the result of taking the kernel of the fast–slow oscillator mapping on \mathbb{Z}/10\mathbb{Z}: two macroscopic coordinates separated by five positions have microscopic coordinate trajectories that remain strictly phase-locked and fully coincide across the entire time sequence.

The twelve double-hour stem–branch sequences across a Jia day and a Ji day are identical; likewise, the twelve monthly stem–branch sequences throughout a Jia year and a Ji year are identical. This trajectory overlap is not an acquired contract of fortune or misfortune but an algebraic necessity of elementary integer partitioning.


IV. Projection at the Earthly Gate and Transformation into Qi: An Observation Section on a Noncommuting Basis

Once the equivalence classes of the Five Combinations have been established, the most obscure rule in the traditional calendar—the “transformation into qi” of the Five Combinations (for example, Jia–Ji transforming into Earth, Yi–Geng into Metal)—can likewise be located on a dynamical section.

Projection of the Earthly Gate section on the circular manifold of the twelve monthly constructions, showing the Chen–Si coordinate axis cutting the Five Tiger Escape trajectory and projecting it onto the vector distribution of the Five-Phase generation basis. Earthly Gate observation-section projection and transformation-into-qi homomorphism eigenstates OBSERVATION SECTION AT [CHEN m=4, SI m=5] → MONOMORPHISM ON WUXING BASIS Earthly Gate section (SE) Celestial Gate reference (NW) Zi (m=0) Chou (1) Yin (2·start of spring) Mao (3) Chen (m=4) Si (m=5) Wu (6) Wei (7) Shen (8) You (9) Xu (10·Celestial Gate) Hai (11) Five Tiger Escape streamline +2 steps G₁₂ Proj_EarthlyGate Transformation-into-qi eigenvalue and Five-Phase basis EIGENVALUES UNDER HOMOMORPHISM [Jia, Ji] year-stem equivalence class Section: Wu-Chen · Ji-Si → Earth basis Transformation into Earth [Yi, Geng] year-stem equivalence class Section: Geng-Chen · Xin-Si → Metal basis Transformation into Metal [Bing, Xin] year-stem equivalence class Section: Ren-Chen · Gui-Si → Water basis Transformation into Water [Ding, Ren] year-stem equivalence class Section: Jia-Chen · Yi-Si → Wood basis Transformation into Wood [Wu, Gui] year-stem equivalence class Section: Bing-Chen · Ding-Si → Fire basis Transformation into Fire Conclusion: Transformation into qi is not a form-and-substance reaction caused by intersecting celestial stems; it is the algebraic eigenprojection of the Five Tiger Escape trajectory as it crosses Chen–Si (the Earthly Gate). HOVER to highlight the eigenstate card
Projection of the Earthly Gate section on the circular manifold of the twelve monthly constructions, showing the Chen–Si coordinate axis cutting the Five Tiger Escape trajectory and projecting it onto the vector distribution of the Five-Phase generation basis.

The theory of transformation into qi is not an intrinsic property of the celestial stems themselves, but a measurement of the Five Tiger Escape trajectory at a particular spatial section. In the Song dynasty, Shen Kuo perceptively observed in Dream Pool Essays (Mengxi Bitan) that the key to transformation into qi lies in the Chen and Si positions—that is, the Earthly Gate section in the Celestial Gate–Earthly Gate model.

If, within the continuous mapping of the Five Tiger Escape method, we forcibly extract the stem assignment of each equivalence class at fixed spatial sections—the Chen position (m=4) and Si position (m=5)—we obtain:

Equivalence class (year stem)Yin month (m=2)Mao month (m=3)Chen month (m=4)Si month (m=5)Five-Phase attribute at sectionClassical transformation-into-qi assignment
[甲, 己] (x=0,5)丙寅丁卯戊辰己巳戊/己 \rightarrow 土土
[乙, 庚] (x=1,6)戊寅己卯庚辰辛巳庚/辛 \rightarrow 金金
[丙, 辛] (x=2,7)庚寅辛卯壬辰癸巳壬/癸 \rightarrow 水水
[丁, 壬] (x=3,8)壬寅癸卯甲辰乙巳甲/乙 \rightarrow 木木
[戊, 癸] (x=4,9)甲寅乙卯丙辰丁巳丙/丁 \rightarrow 火火

The data here display remarkable internal consistency: When the Five Tiger Escape trajectory reaches the Chen and Si sections, the celestial-stem attributes it carries form a strict injective homomorphism with the classical generation sequence of the Five Phases (Earth \to Metal \to Water \to Wood \to Fire).

“Transformation into qi” is, in essence, the eigenvalue obtained by projecting and measuring the algebraic labels of macroscopic equivalence classes at a particular reference coordinate system (the Earthly Gate section), as the spacetime-dynamics trajectory advances. The ancients observed the difference between the section measurement and the celestial-stem archetype and, lacking abstract operator tools, described it anthropomorphically as “two stems meeting and transforming in form and substance.”


V. Conclusion: The Ontological Illusion as an Algorithmic By-Product

The history of traditional Chinese divination systems repeatedly stages a cognitive bias: the symmetry by-products of discrete algorithmic evolution are post hoc elevated into ontological laws governing the universe.

Xunkong is not nothingness or calamity; it is the modular-drift remainder produced by cycle truncation. The Five Rat and Five Tiger methods are not the concealment of spirits; they are linear congruence equations for fast–slow clock systems under different initial phases. Nor are the Five Stem Combinations and transformation into qi mysterious acts of mystical creation: they are isomorphic appearances produced when discrete trajectories, driven by duodecimal and decimal clocks, are projected onto a specific measurement section.

Stripped of all added fatalistic rhetoric and empirical curve-fitting, the classical stem-and-branch system reveals a remarkably rigorous discrete-dynamics engineering framework. With the simplest congruence arithmetic, it seamlessly joins multiscale time on a two-dimensional torus. The geometric consistency and austere logic of its mathematical core possess a symmetry more striking than any attachment of auspicious or inauspicious meanings.


Source lineage: Ouyue, “The Five Tiger and Five Rat Escape Methods Are Not Two Algorithms: Where Do the Five Stem Combinations and Transformation into Qi Come From?” (original: 《五虎遁和五鼠遁根本不是两套算法——天干五合与化气从何而来?》).

Apply the Model to Your Context

Want to apply this systems lens to your own context? Start with a free FREE snapshot to map strengths, constraints, and observable variables; for a deeper one-to-one discussion, book a consultation.