5D Library › 玛雅卓尔金双模齿轮、神谕十字对合变换与六十四闸门网络渗流 · English
第一章 卓尔金历的双模同余齿轮
两个互素的齿轮
卓尔金历由两个同时转动的计数组成:13 个数字(本书沿用通行说法称为「音阶」)与 20 个日符(Imix、Ik、Akbal 到 Ajaw)。每过一天,两个计数各前进一格。第 天()的音阶为 ,日符为 。
因为 13 与 20 互素,中国剩余定理保证 是 到 的同构;逆映射可以写成一个闭式:
其中 40 模 13 余 1、模 20 余 0,221 模 13 余 0、模 20 余 1。
推导
# Chapter 1. p01: The 260-day count as Z13 x Z20 - and why the Chinese
# sexagenary cycle has only 60 pairs.
# Day d (0..259) of the tzolkin carries tone t = d mod 13 + 1 and day sign
# s = d mod 20 + 1 (1 = Imix ... 20 = Ajaw). Because gcd(13, 20) = 1 the
# Chinese remainder theorem makes (t, s) a bijection, with inverse
# d = (40 (t - 1) + 221 (s - 1)) mod 260,
# since 40 = 1 mod 13, 40 = 0 mod 20, 221 = 0 mod 13, 221 = 1 mod 20.
# Stems (10) and branches (12) have gcd 2: only pairs of equal parity occur.
from math import gcd
SIGNS = ("Imix", "Ik", "Akbal", "Kan", "Chikchan", "Kimi", "Manik",
"Lamat", "Muluk", "Ok", "Chuwen", "Eb", "Ben", "Ix", "Men",
"Kib", "Kaban", "Etznab", "Kawak", "Ajaw")
def pairs(m, n):
return {(d % m, d % n) for d in range(m * n)}
if __name__ == "__main__":
for m, n, name in ((13, 20, "tzolkin 13 x 20"), (10, 12,
"ganzhi 10 x 12")):
p = pairs(m, n)
print(" {}: gcd {}, cycle {}, pairs reached {} of {}".format(
name, gcd(m, n), m * n // gcd(m, n), len(p), m * n))
print(" CRT coefficients: 40 mod 13 = {}, 40 mod 20 = {}".format(
40 % 13, 40 % 20))
print(" 221 mod 13 = {}, 221 mod 20 = {}".format(
221 % 13, 221 % 20))
ok = all((40 * (d % 13) + 221 * (d % 20)) % 260 == d for d in range(260))
print(" inverse formula recovers every day: {}".format(ok))
print(" first days: " + ", ".join(
"{} {}".format(d % 13 + 1, SIGNS[d % 20]) for d in range(0, 5)))
print(" day 13 and 20: {} {}, {} {}".format(
13 % 13 + 1, SIGNS[13 % 20], 20 % 13 + 1, SIGNS[20 % 20]))
same = [d for d in range(260) if d % 13 + 1 == 1 and d % 20 == 0]
print(" 1 Imix recurs only at day {} (mod 260)".format(same))
# tzolkin 13 x 20: gcd 1, cycle 260, pairs reached 260 of 260
# ganzhi 10 x 12: gcd 2, cycle 60, pairs reached 60 of 120
# CRT coefficients: 40 mod 13 = 1, 40 mod 20 = 0
# 221 mod 13 = 0, 221 mod 20 = 1
# inverse formula recovers every day: True
# first days: 1 Imix, 2 Ik, 3 Akbal, 4 Kan, 5 Chikchan
# day 13 and 20: 1 Ix, 8 Imix
# 1 Imix recurs only at day [0] (mod 260)中国的干支是同一类齿轮,但 10 个天干与 12 个地支的最大公约数为 2:天干与地支的序号奇偶永远相同,所以只出现 120 种组合中的 60 种(第 66 本第一章)。卓尔金历没有这种约束,260 种组合全部出现。一个直观的后果是,卓尔金历中第 13 天回到音阶 1(1 Ix),第 20 天回到日符 Imix 时音阶是 8(8 Imix),而「1 Imix」要等满 260 天才重现。
哈布历与历法轮
哈布历有 18 个各 20 天的月,加上 5 天的 Wayeb,共 365 天。一天同时具有卓尔金历的位置与哈布历的位置;两者合在一起重复的周期是
即「历法轮」。程序以 GMT 关联常数(儒略日 584283 为 4 Ajaw 8 Kumku,第 13 个伯克盾的终点)为锚点 (Aveni 2001),在一个历法轮内数出了 18980 种不同的组合,只占 种可能组合的 0.20。
推导
# Chapter 1. p02: The Calendar Round and the four year bearers.
# The haab has 18 months of 20 days and 5 days of wayeb: 365 = 18 x 20 + 5.
# A day is a pair (tzolkin day, haab day); the pair recurs after
# lcm(260, 365) days. Anchor (GMT correlation, JDN 584283): 4 Ajaw 8 Kumku,
# the end of the 13th baktun. Since 365 = 5 (mod 20), the day sign
# advances 5 places a year, so the sign on a fixed haab day takes only
# 4 values: the year bearers. Which 4 depends on the haab day chosen as
# "new year" (0 Pop or 1 Pop): two seating conventions.
from math import gcd
SIGNS = ("Imix", "Ik", "Akbal", "Kan", "Chikchan", "Kimi", "Manik",
"Lamat", "Muluk", "Ok", "Chuwen", "Eb", "Ben", "Ix", "Men",
"Kib", "Kaban", "Etznab", "Kawak", "Ajaw")
ANCHOR = 584283
T0 = (4 - 1) * 40 + (20 - 1) * 221 # 4 Ajaw as a day 0..259
H0 = 17 * 20 + 8 # 8 Kumku, month 18, as 0..364
def day(jdn):
return (T0 % 260 + jdn - ANCHOR) % 260, (H0 + jdn - ANCHOR) % 365
if __name__ == "__main__":
L = 260 * 365 // gcd(260, 365)
print(" lcm(260, 365) = {} days = {} haab = {} tzolkin".format(
L, L // 365, L // 260))
seen = {day(ANCHOR + k) for k in range(L)}
print(" distinct (tzolkin, haab) pairs in one round: {} of {}"
" ({:.2f})".format(len(seen), 260 * 365, len(seen) / (260 * 365)))
for seat, h in (("0 Pop", 0), ("1 Pop", 1)):
bearers = sorted({day(j)[0] % 20 for j in range(ANCHOR, ANCHOR + L)
if day(j)[1] == h})
print(" bearers on {}: {}".format(
seat, ", ".join(SIGNS[b] for b in bearers)))
print(" sign numbers {} - one class mod 5: {}".format(
[b + 1 for b in bearers], sorted({(b + 1) % 5 for b in bearers})))
for h in range(20):
signs = {day(j)[0] % 20 for j in range(ANCHOR, ANCHOR + L)
if day(j)[1] % 20 == h and day(j)[1] < 360}
assert len(signs) == 4
print(" every day-of-month position meets exactly 4 signs: True")
print(" 13 x 4 = {} years of distinct bearer-and-tone pairs".format(
13 * 4))
# lcm(260, 365) = 18980 days = 52 haab = 73 tzolkin
# distinct (tzolkin, haab) pairs in one round: 18980 of 94900 (0.20)
# bearers on 0 Pop: Ik, Manik, Eb, Kaban
# sign numbers [2, 7, 12, 17] - one class mod 5: [2]
# bearers on 1 Pop: Akbal, Lamat, Ben, Etznab
# sign numbers [3, 8, 13, 18] - one class mod 5: [3]
# every day-of-month position meets exactly 4 signs: True
# 13 x 4 = 52 years of distinct bearer-and-tone pairs年承载者为什么只有四个
365 模 20 余 5,所以一年之后日符前进 5 格。于是同一个哈布日上出现的日符,日符序号模 5 的余数永远相同,只可能是四个日符之一。以 0 Pop 为哈布新年时,程序给出的承载者是 Ik、Manik、Eb、Kaban(日符序号 2、7、12、17);若以 1 Pop 为新年,则是 Akbal、Lamat、Ben、Etznab(3、8、13、18)。两种「入座」约定都在文献中出现过,但无论选哪一种,承载者都恰为模 5 的一个剩余类。更一般地,哈布月中的每一个日期位置都只与四个日符相遇。
四个承载者与 13 个音阶组合,得到 个不同的年名,正好是一个历法轮。
证据
结论:年承载者只有四个是算术事实,不是选择。 它只取决于 。哪四个日符担任承载者,则取决于把哪一天当作新年的约定。
小结
卓尔金历是 ,由中国剩余定理给出闭式的逆映射;干支因 只用到一半组合。历法轮为 18980 日;年承载者只能是模 5 的一个剩余类中的四个日符,以 0 Pop 为新年时为 Ik、Manik、Eb、Kaban。
参考文献
Fan, Y. (2026). Mayan Tzolkin Modular Gears, Oracle-Cross Involutions and Sixty-Four-Gate Network Percolation: Coprime Cycle Synchronization, Antipode-Analog Permutations and Nine-Center Connected Components [玛雅卓尔金双模齿轮、神谕十字对合变换与六十四闸门网络渗流] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090193 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).