The Evolution of the Heavenly Stems and Earthly Branches and the Transformation of Dun Jia: A Unified Mathematical Metaphysical Study of the Information Capacity in Bazi and Qimen Dunjia
This paper systematically investigates the information-carrying capacity of Bazi (Eight Characters) and Qimen Dunjia (Mystical Gates) as divination systems, starting from the mathematical structure of Taiji, Liangyi, Sixiang, and Bagua in the *Book of Changes*. By analyzing the classical mathematical foundations such as Yin-Yang, Five Phases, the River Chart, and the Luo Script, it aims to provide a unified perspective for measuring and comparing the information density of these two divination arts.

Chapter 4: Traces of Stems and Branches and Dunjia Thought in Pre-Qin Classics
Section 1: Stems and Branches in Oracle Bone Inscriptions
Shang Dynasty oracle bone inscriptions (Jiǎgǔwén) are the earliest material evidence of Stems and Branches dating. Oracle bones contain numerous records of Stems and Branches dating days, such as:
"Gui Mao divination, Ke asks, is there misfortune during the ten-day period$23" (Guǐmǎo bǔ, Ké zhēn, xún wáng huò$24) "Ding You divination, Zheng asks, will it rain tomorrow, Wu Xu$25" (Dīngyǒu bǔ, Zhēng zhēn, yì Wùxū yǔ$26)
Such divinations clearly date days using the Sixty Jiazi system, proving that the Sixty Jiazi system was fully mature by the Shang Dynasty at the latest.
The forms of the Heavenly Stems and Earthly Branches in oracle bones:
Jia (Shield shape), Yi (Bent shape), Bing (Platform shape), Ding (Nail shape), Wu (Spear shape), Ji (Bow shape), Geng (Musical instrument shape), Xin (Torture device shape), Ren (工 shape), Gui (Variant of the spear shape).
Zi (Infant shape), Chou (Finger shape), Yin (Arrow shape), Mao (Door shape), Chen (Conch shape), Si (Snake shape), Wu (Pestle shape), Wei (Branch shape), Shen (Lightning shape), You (Wine vessel shape), Xu (Spear shape), Hai (Kernel shape).
The original meanings of these characters reveal that the Stems and Branches may have held concrete material significance in antiquity—rather than being purely abstract symbols as later understood. This implies that the original information content of the Stems and Branches was richer than later understood.
The concept of "Xun" (Ten-day period) also appears in oracle bones—ten days per xun, corresponding to the Ten Heavenly Stems. Divination inscriptions often asked "Is there misfortune during this xun$27"—this is prediction based on the cycle of the Heavenly Stems—a rudimentary form of Bazi thinking.
Section 2: Time and Space Information Encoding in the Book of Changes
The textual content and commentaries of the Book of Changes (Zhou Yi) contain the joint origin of Bazi and Qimen Dunjia thought.
Firstly, the hexagram sequence in the Book of Changes implies temporal information. The Xugua Zhuan states:
"Only after Heaven and Earth came into existence did the myriad things begin to grow. What fills the space between Heaven and Earth is only the myriad things, thus it is followed by Tun. Tun means proliferation; it is the beginning of the growth of things. Things that begin to grow must be nurtured, thus it is followed by Meng. Meng means covering; it is the immaturity of things. Immature things must be nourished, thus it is followed by Xu. Xu is the way of eating and drinking. Eating and drinking must lead to contention, thus it is followed by Song. Contention must lead to the gathering of a crowd, thus it is followed by Shi. Shi means a multitude. A multitude must have something to align with, thus it is followed by Bi. Bi means alignment. Alignment must involve accumulation, thus it is followed by Xiao Chu. Only after things are accumulated can there be rites, thus it is followed by Lü. ..."
The sequence of these sixty-four hexagrams is essentially a temporal narrative from the "Initial differentiation of Heaven and Earth" to the "Completion of all things"—this is similar to the approach of Bazi, which centers on temporal flow.
Secondly, the Shuogua Zhuan's directional assignments of the Eight Trigrams imply spatial information:
"The Emperor emerges from Zhen (East), flourishes in Xun (Southeast), meets in Li (South), commands service in Kun (Southwest), expresses pleasure in Dui (West), battles in Qian (Northwest), labors in Kan (North), and completes the discourse in Gen (Northeast)."
This is the "Later Heaven Bagua Orientation" (Wen Wang Eight Trigrams sequence)—Zhen East, Xun Southeast, Li South, Kun Southwest, Dui West, Qian Northwest, Kan North, Gen Northeast—which differs from the spatial assignments in the Former Heaven Trigrams.
The existence of two spatial reference systems, Former Heaven and Later Heaven, implies two "reference frames" for spatial encoding—this dual reference system provides the intellectual basis for the "rotating disk" mechanism of Qimen Dunjia. The Earth Plate uses the Later Heaven positions (fixed), while the Heaven Plate and Man Plate rotate upon this fixed framework—analogous to the interaction between Former and Later Heaven.
The Xici Zhuan states:
"The Way of Yi is not fixed. Its Way shifts repeatedly; movement does not cease; it circulates through the six positions; its top and bottom are never constant; hardness and softness interchange; it cannot be made into a fixed canon, only adapting to change." (Yì zhī wéi shū yě, bùkě yuǎn. Wéi dào yě lǚ qiān, biàndòng bù jū, zhōuliú liùxū, shàngxià wú cháng, gāngróu xiāngyì, bùkě wéi diǎnyào, wéi biàn suǒ shì.)
This passage vividly reveals the essential characteristic of the Book of Changes—"Change" (Biàn). Unfixed, unconstant, interchanging, adapting only to change—this is the dynamic nature of information. The "Great Cycles" (Dàyùn) and "Flowing Years" (Liúnián) in Bazi reflect "change," just as the "rotating plates" and "flying layouts" in Qimen Dunjia reflect "change." The richness of this "change" directly determines the size of the information capacity.
Section 3: The Book of Documents, Grand Plan and the Five Phases in Mathematical Logic
The Shangshu: Hongfan (Grand Plan) is a classic document on Five Phase theory. The "Nine Categories" (Jiǔ Chóu) presented by Jizi to King Wu have profound parallels with the structure of the Nine Palaces in Qimen Dunjia.
The Hongfan states:
"First, the Five Phases; second, respectfully using the Five Matters; third, using the Eight Political Tasks for agriculture; fourth, harmonizing with the Five Temporal Records; fifth, establishing the Grand Ultimate (Huángjí); sixth, governing with the Three Virtues; seventh, clarifying with Divination to Resolve Doubt; eighth, considering all responses; ninth, aspiring to the Five Blessings and using the Six Extremes."
The Nine Categories use the "Grand Ultimate" (the Fifth Category) in the center, just as the number Five resides in the center of the Luo Writing. This structure of the "Nine Categories" shares an uncanny similarity with the Nine Palaces of Qimen Dunjia—both use Nine as a framework, with the center as the pivot.
It is particularly noteworthy that the Seventh Category, "Clarifying with Divination to Resolve Doubt" (Qímì Jié Yí):
"Select and establish diviners, then order the tortoise and yarrow for divination. They say: Rain, Clear weather, Obscurity, Delay, Success, Affirmation, Regret—seven in all. Five are from tortoise divination, two are used from yarrow, for extension and reversal. Establish people to perform divination; three persons interpret, then follow the words of two."
This details the methods of divination—tortoise divination has five signs (Rain, Clear weather, Obscurity, Delay, Success), and yarrow divination yields two results (Affirmation, Regret), plus "extension and reversal" (extension of variation). This is a description of the information system of pre-Qin divination.
"Three persons interpret, then follow the words of two"—this is the principle of "majority rule," a classical expression of information redundancy coding and error correction mechanisms. Why require three diviners$1 Because the judgment of a single person might contain error ("noise"); following the majority of three reduces the probability of misjudgment—this is completely consistent with modern principles of error-correcting codes in information theory.
Section 4: Examples of Divination in the Zuo Zhuan and Guoyu
Pre-Qin classics preserve numerous examples of divination, which provide valuable material for understanding the information processing methods of the pre-Qin era.
Example 1: Divination of Marquis Li of Chen in the 22nd Year of Duke Zhuang (Zuo Zhuan)
"The Marquis of Chen sent someone to divine. They obtained Guan (Observing) transforming into Pi (Obstruction). The diviner said: 'This is called "Observing the light of a state, which is beneficial for being a guest to the King." Will he replace Chen in ruling$2 No, it will be in another state. If not in his own person, it will be in his descendants. The light is far away and shines from elsewhere. Kun is Earth. Xun is Wind. Qian is Heaven. Wind acts as Heaven over Earth, which is Mountain. If one has the material of a mountain illuminated by heavenly light, he then resides on the earth, thus it is said, "Observing the light of a state, beneficial for being a guest to the King." The courtyard is filled with a hundred sacrifices, presented with jade and silk, the beauty of Heaven and Earth is complete, thus it is said, "Beneficial for being a guest to the King." There is still observation, thus it is said, perhaps in the future. Wind moves and leaves its mark on the earth, thus it is said, perhaps in another state. If in another state, it must be of the Jiang surname. Jiang is descended from the Great Yue. Mountains and peaks are matched with Heaven; nothing can be truly great twice. When Chen declines, will this be its prosperity$3'"
This record is extremely precious. The divination obtained Hexagram Guan transforming into Pi—the original hexagram is Guan (Wind over Earth), the transforming hexagram is Pi (Heaven over Earth), meaning the fourth line changed from Yin to Yang.
The diviner's interpretation process:
- Based on the line text, "Observing the light of a state, beneficial for being a guest to the King."
- Then analyzing the hexagram images: Kun for Earth, Xun for Wind, Qian for Heaven.
- Further inferring: Wind acting as Heaven over Earth suggests the image of a Mountain $\rightarrow$ the image of a State.
- Then relating to "the light is far away and shines from elsewhere" $\rightarrow$ in another state.
- Then deducing the Jiang surname based on the Five Phases and directions.
In this divination process, the extraction of information is multi-layered and multi-dimensional—it involves textual information from the line texts, symbolic information from the hexagram images, and inferential information from the Five Phases and directions. This is the pre-Qin mode of information processing in divination—far more complex than later imagined.
Example 2: The Battle of Qin and Jin at Han (Zuo Zhuan, Duke Xi Year 15)
"Initially, Duke Xian of Jin divined about marrying Bo Ji to Qin; he obtained Gui Mei (Slight Mismatch) transforming into Kui (Strife). Shi Su interpreted it: 'Inauspicious. The changing line says: 'The official cuts the sheep, yet there is no remnant. The woman carries the basket, yet there is no abundance. The western neighbor blames and speaks, which cannot be repaid.' Gui Mei transforming into Kui, still lacking mutual support.' ..." "...When Duke Hui was in Qin, he said: 'If the former lord had followed Shi Su's divination, I would not have suffered this fate.'"
In this record, Shi Su's divination was not followed, and later the negative outcome was realized. This shows that the divination information in pre-Qin times possessed predictive power—but this predictability depended on the diviner's correct interpretation of the information.
Example 3: The Discussion of Musical Pitch by Ling Zhoujiu (Guoyu, Zhou Yu)
"Ling Zhoujiu said: 'Governance is like music; music follows harmony; harmony follows equilibrium. Sounds are used to create music, pitch (lǜ) is used to ensure equilibrium. Metal and stone are used to move it; silk and bamboo are used to carry it. Poetry is used to convey it; singing is used to chant it; the gourd is used to express it; ceramics are used to supplement it; leather and wood are used to regulate it. When things attain their norm, it is called the ultimate of music (yuè jí); where the ultimate gathers is called sound (shēng); sound responding to each other in protection is called harmony (hé); small and large not exceeding bounds is called equilibrium (píng).'"
Although this passage does not directly discuss arcane arts, it reveals the pre-Qin concept of "Pitch and Calendar Unity"—musical pitch is connected to the calendar. This idea is crucial for the mathematical foundation of Qimen Dunjia.
The Twelve Musical Pitches (Lǜ) correspond to the Twelve Earthly Branches:
- Huang Zhong $\leftrightarrow$ Zi
- Da Lü $\leftrightarrow$ Chou
- Tai Cu $\leftrightarrow$ Yin
- Jia Zhong $\leftrightarrow$ Mao
- Gu Xi $\leftrightarrow$ Chen
- Zhong Lü $\leftrightarrow$ Si
- Rui Bin $\leftrightarrow$ Wu
- Lin Zhong $\leftrightarrow$ Wei
- Yi Ze $\leftrightarrow$ Shen
- Nan Lü $\leftrightarrow$ You
- Wu She $\leftrightarrow$ Xu
- Ying Zhong $\leftrightarrow$ Hai
This correspondence means that the Earthly Branches not only carry temporal and spatial information but also auditory (frequency) information—this greatly expands the information dimensions of the Stems and Branches system.
Section 5: The Five Phases and Chronology in Guanzi
While the compilation date of the Guanzi is debated, many chapters reflect pre-Qin Five Phase thought and arcane concepts.
The Guanzi, Five Phases Chapter states:
"At the Summer Solstice, one observes Jia Zi, and the Wood Phase governs... Seventy-two days complete this. Observe Bing Zi, and the Fire Phase governs... Seventy-two days complete this. Observe Wu Zi, and the Earth Phase governs... Seventy-two days complete this. Observe Geng Zi, and the Metal Phase governs... Seventy-two days complete this. Observe Ren Zi, and the Water Phase governs... Seventy-two days complete this."
This passage divides the 360 days of the year into five segments (72 days each), governed by one Phase in each, marked by the starting Stems and Branches—this is a method combining timekeeping by Stems and Branches with the assignment of the Five Phases to time—a precursor to the concept of Five Phases governing the Month Command in Bazi.
Furthermore, the Guanzi, Four Seasons Chapter states:
"Therefore, Yin and Yang are the great principles of Heaven and Earth. The Four Seasons are the great framework of Yin and Yang. Punishment and Virtue (Xíng Dé) are the conjunction of the Four Seasons. When Punishment and Virtue align with the seasons, blessings arise; when they deviate, misfortune arises." (Shì gù yīnyáng zhě, tiāndì zhī dàlǐ yě. Sìshí zhě, yīnyáng zhī dàjīng yě. Xíngdé zhě, sìshí zhī hé yě. Xíngdé hé yú shí zé shēng fú, guǐ zé shēng huò.)
The chain of inference "Yin/Yang $\rightarrow$ Four Seasons $\rightarrow$ Punishment and Virtue" clearly shows the path of pre-Qin arcane arts: starting from the most fundamental Yin/Yang duality, moving through the framework of the Four Seasons, to arrive at judgments of human fortune and misfortune. This logic is entirely inherited by Bazi and Qimen Dunjia.
The Guanzi, Minor Officials Chapter offers a more detailed description of seasonal arcane calculations:
"Spring acts with the politics of Winter—austere; acts with the politics of Autumn—thunder; acts with the politics of Summer—castration i.e., severe restriction. After twelve days, the Earth Qi erupts, cautioning Spring affairs. After twelve days, the minor Mao early spring, plowing begins. After twelve days, Heavenly Qi descends, giving rewards. After twelve days, Righteous Qi arrives, repairing gates and doors. After twelve days, Purity and Brightness, prohibitions are lifted. After twelve days, the main Mao late spring, mating begins."
This subdivides the affairs of Spring into periods of "twelve days," with a change every twelve days—similar to the Qimen Dunjia concept of a "Yuan" (five days per Yuan), involving fine temporal segmentation.
Section 6: The Lunar Months in Lüshi Chunqiu and the System of Mathematical Principles
The Twelve Records (Shí'èr Jì) in the Lüshi Chunqiu represent the culmination of pre-Qin lunar month theory.
The Record of Early Spring states:
"In the month of Early Spring, the Sun is in the Camp House (Yíngshì), at dusk it is in the Heart (Shēn), at dawn it is in the Tail (Wěi). Its Stems are Jia and Yi; its Emperor is Taihao; its Spirit is Gou Mang; its creatures are scaled; its tone is Jue; its pitch is Tai Cu; its number is Eight; its taste is sour; its odor is rank; its sacrifice is the Door; sacrifice to the Spleen first. The East Wind thaws the frost, hibernating insects begin to stir, fish rise under the ice, the otter offers fish to the heron, the migrating geese fly north."
This passage contains extremely rich information: the attributes of just one month include:
- Celestial observation (Sun in Yingshi, dusk in Shen, dawn in Wei).
- Heavenly Stems (Jia and Yi—Wood).
- Heavenly Emperor (Taihao—Emperor of the East).
- Heavenly Spirit (Gou Mang—Spirit of Wood).
- Animal category (Scaled creatures).
- Musical Tone (Jue tone).
- Pitch Name (Tai Cu).
- Number (Eight).
- Taste (Sour).
- Odor (Rank).
- Sacrifice (Sacrifice to the Door, sacrifice to the Spleen first).
- Phenology (East wind thawing, etc., five observations).
One month has twelve or more dimensions of information! The Twelve Records detail the attributes for all twelve months, forming an extremely vast "Annual Information Matrix."
This "Lunar Month" system is precisely the shared knowledge basis for the Month Pillar information in Bazi and the Solar Term initiation of Qimen Dunjia charts.
Especially noteworthy is "Its Number" (qí shù)—the number for Early Spring is Eight, for Mid-Spring is Eight, for Late Spring is Eight (Number of Wood); for Early Summer is Seven, Mid-Summer is Seven, Late Summer is Seven (Number of Fire)... This numerical system corresponds to both the generating numbers of the River Chart and the positional numbers of the Luo Writing.
Section 7: "Number" and "Juncture" in the Zhuangzi
Although the Zhuangzi is famous for Daoist philosophy, it contains profound reflections on "Number" (shù) and "Juncture" (jī).
The Zhuangzi, Transcending Things Chapter (Tianxia) states:
"Hui Shi had many methods, his writings filled five carts. His Dao was discordant, his words did not hit the mark. His intent in charting things was: 'The greatest without outside is called Great One (Dàyī). The smallest without inside is called Small One (Xiǎoyī). Without thickness, it cannot be accumulated, yet it can span a thousand li. Heaven and Earth are low, mountains and marshes are level. The sun at its zenith is already declining; things in the process of being born are already in the process of dying. Great Equality differs from Small Equality; this is called Small Difference. All things are equally the same and equally different; this is called Great Difference.' ..."
Hui Shi's "Ten Points of Charting Things" involve concepts of limits, infinity, and relativity—numerical philosophy. If information capacity can tend toward "the greatest without outside," then the information capacity of any arcane system has the potential for infinite expansion—the problem is how much can be utilized in actual practice.
The Zhuangzi, Discussion on Making Things Equal (Qíwù Lùn) states:
"Heaven and Earth were born together with me, and the myriad things are one with me. If they are already one, can words still exist$4 If one has already spoken of 'One,' can one refrain from speaking$5 One and words become two; two and one become three. From here onward, the skilled calculator cannot arrive, let alone the ordinary person! Thus, from nothing adapting to something, one reaches three, how much more so from something adapting to something$6 There is no adaptation, thus one rests here." (Tiāndì yǔ wǒ bìngshēng, ér wànwù yǔ wǒ wéi yī. Jì yǐ wéi yī yǐ, qiě dé yǒu yán hū$7 Jì yǐ wéi yī yǐ, qiě dé wú yán hū$8 Yī yǔ yán wéi èr, èr yǔ yī wéi sān. Zì cǐ yǐ wǎng, qiǎolì bùnéng dé, ér kuàng qí fán hū$9 Gù zì wú shì yǒu, yǐ zhì yú sān, ér kuàng zì yǒu shì yǒu hū$10 Wú shì, yīn shì yǐ.)
"One and words become two; two and one become three"—this is the classical expression of the self-referential paradox. "From here onward, the skilled calculator (qiǎolì) cannot arrive"—Qiǎolì, meaning those skilled in chronology and mathematics, cannot exhaust this recursive count, let alone the ordinary person. This reveals a deep information theory proposition: The self-referential nature of information leads to an infinite increase in information capacity.
When we discuss the information capacity of Bazi or Qimen Dunjia, are we not facing a similar dilemma$11 The interpretation of a Bazi chart can generate new information, and that new information can be further interpreted... This recursive process is theoretically endless. Furthermore, the multi-layered superposition of Qimen Dunjia, where each layer interacts with others to generate new information—is its depth of recursion greater than that of Bazi$12 This is a question requiring deeper exploration later.
The Zhuangzi, Heaven and Earth Chapter also states:
"In the primal beginning there was nothingness, and nothingness was without name. The stirring of the One brought forth form, but it was not yet shaped. Things obtained their generation, called Virtue (Dé). That which was unshaped had divisions, yet still without separation; this is called Fate (Mìng). When stillness moves and things are born, things achieve their inherent principle, called Form (Xíng). Form preserves Spirit, and each has its standard (yí zé); this is called Nature (Xìng)."
The appearance of the word "Fate" (Mìng) is crucial—"That which was unshaped had divisions, yet still without separation, this is called Fate." Even before things take shape, they already possess inherent differentiation—this is the original meaning of "Fate." What Bazi seeks to divine is precisely this "Fate"—the innate pattern predetermined at birth.
And "each has its standard (yí zé)"—the "standard" or "rule" (yí zé)—this is the "principle" (lǐ) upon which arcane arts rely. The multi-layered structure of Qimen Dunjia is intended to capture the multi-dimensional expression of these "standards."
Section 8: Pre-Qin Military Treatises and Dunjia Thought
The tradition of Qimen Dunjia has always been closely linked to military strategy. Pre-Qin military texts contain rich elements of Dunjia thought.
The Art of War, Laying Plans Chapter (Shǐjì) states:
"Sunzi said: Warfare is a matter of supreme importance to the State; the way of life or death; the road to survival or ruin; it is mandatory that it be studied. Hence the five fundamental factors must be compared when making plans: First, the Way (Dào); second, Heaven (Tiān); third, Earth (Dì); fourth, the Commander (Jiāng); and fifth, Method (Fă)." (Sūnzǐ yuē: Bīng zhě, guó zhī dàshì, shēngsǐ zhī dì, cúnwáng zhī dào, bùkě bù chá yě. Gù jīng zhī yǐ wǔ shì, jiào zhī yǐ jì ér suǒ qí qíng: yī yuē dào, èr yuē tiān, sān yuē dì, sì yuē jiāng, wǔ yuē fǎ.)
This framework of the "Five Factors"—Dao, Heaven, Earth, Commander, Method—corresponds to the multi-layered structure of Qimen Dunjia:
- "Heaven" corresponds to the Heaven Plate (Nine Stars + Heaven Plate Curiosities/Instruments).
- "Earth" corresponds to the Earth Plate (Nine Palaces + Earth Plate Curiosities/Instruments).
- "Commander" corresponds to the Man Plate (Eight Gates).
- "Dao" and "Method" correspond to the overall rules of application.
Sunzi also says:
"Heaven refers to Yin and Yang, cold and heat, and the constraints of the seasons. Earth refers to distance and proximity, hazard and ease, breadth and narrowness, life and death." (Tiān zhě, yīnyáng, hánshǔ, shí zhì yě. Dì zhě, yuǎnjìn, xiǎnyì, guǎngxiǎo, shēngsǐ yě.)
The information of "Heaven" includes Yin/Yang, cold/heat, and temporal constraints—this is the information in the temporal dimension; the information of "Earth" includes distance/proximity, hazard/ease, breadth/narrowness, life/death—this is the information in the spatial dimension. Qimen Dunjia takes the Heaven Plate as primarily temporal and the Earth Plate as primarily spatial, which coincides exactly with Sunzi's classification of "Heaven" and "Earth."
And the words "life and death" (shēngsǐ) are crucial—Qimen Dunjia has the "Life Gate" and the "Death Gate," and the terminology used directly stems from the military tradition.
The Art of War, Maneuvering for Position Chapter states:
"Attack where the enemy is unprepared to defend; advance where they do not expect. To march a thousand li without exhaustion, march where there are no men. To attack and be certain of success, attack where they do not defend. To defend and be certain of security, defend where they do not attack. Thus, the skillful attacker conceals his point of defense from the enemy; the skillful defender conceals his point of attack from the enemy. Subtlety, subtlety, to the point of invisibility (wú xíng); mystery, mystery, to the point of inaudibility (wú shēng), thus one can become the disposer of the enemy's fate."
"Subtlety, subtlety, to the point of invisibility (wú xíng)"—this is the meaning of "Dùn" (Escape/Concealment). Jia hides beneath the Six Instruments, not revealing its form, making it impossible for the enemy to grasp—this is perfectly consistent with the concept of "concealment of form" in military strategy. And "mystery, mystery, to the point of inaudibility (wú shēng)"—this is the concealment and encryption of information. "Dùn" in Qimen Dunjia, from an information science perspective, is an information encryption mechanism—the superficially presented information (the Heavenly Stems shown by the Six Instruments) differs from the deeply hidden information (the identity of the Six Jia)—decoding the deep information requires "decryption" (knowing which Jia hides under which Instrument).
This information encryption mechanism makes the information hierarchy of Qimen Dunjia richer—it has not only "explicit information" (what is superficially visible) but also "implicit information" (what is hidden beneath the surface). Bazi is relatively "transparent"—the Stems and Branches are directly presented, although there is the concept of Hidden Stems, it is not as clearly layered as the "hiding" of Dunjia.
The Nine Grounds Chapter of Sunzi states:
"Dispersive ground, light ground, contention ground, intersecting ground, open ground, heavy ground, obstructing ground, encircled ground, death ground."
These nine types of terrain can also be mapped analogously to the Nine Palaces of Qimen Dunjia—different palaces present different "terrain" characteristics in different Bureaus, with pros, cons, life, and death.
The Six Strategies (attributed to Lü Wang, though its dating is debated, its military thought inherits pre-Qin tradition) also contains extensive application of celestial timing and terrestrial advantage:
"King Wu asked Grand Tutor: 'Leading troops deep into the territory of the feudal lords, facing the enemy army head-on. The two formations face each other, the strength of the multitudes is equal. I do not dare move first. I wish to make the enemy general fearful, and the soldiers confused, so that if they wish to fight they dare not, if they wish to defend they cannot, their fronts and rears separated, their left and right lost—is this possible$13' Grand Tutor replied: 'It is possible.'"
Although this passage does not explicitly mention Dunjia, the military effect described—"making the enemy general fearful and the soldiers confused"—is the ideal application scenario for Qimen Dunjia in military affairs.
Section 9: The Legend of the Yellow Emperor vs. Chiyou and the Origin of Dunjia
The most famous legend concerning the origin of Qimen Dunjia is the story of the Yellow Emperor fighting Chiyou.
The Records of the Five Emperors in the Records of the Grand Historian (Shiji) records:
"During the time of Xuanyuan (Yellow Emperor), the era of Shennong declined. Feudal lords attacked each other, oppressing the common people, and Shennong could not subdue them. Thus, Xuanyuan practiced the use of weapons and mobilized troops to conquer those who did not submit, and all the feudal lords came to assist him. Chiyou was the most violent, and no one could defeat him. The Flame Emperor wished to invade the feudal lords, and all the lords defected to Xuanyuan. Xuanyuan then cultivated virtue and mobilized troops, managed the Five Qi, cultivated the Five Grains, comforted the people, measured the Four Directions, taught the Bear, Grizzly, Panther, Leopard, Tiger, to fight the Flame Emperor at the field of Banquan. After three battles he achieved his aim. Chiyou rebelled and ignored the Emperor's commands. Thus, the Yellow Emperor mustered the feudal lords and fought Chiyou at the field of Zhuolu, finally capturing and killing Chiyou."
While Dunjia is not mentioned here, "cultivated virtue and mobilized troops, managed the Five Qi (wǔ qì), cultivated the Five Grains, comforted the people, measured the Four Directions (dù sì fāng)"—"managing the Qi of the Five Phases" and "measuring the Four Directions" (spatial orientation)—already contain the basic elements of Dunjia.
Legend has it that the Yellow Emperor was trapped by Chiyou's great fog, and the Heavenly Emperor sent the Nine Heavens Mysterious Lady to teach him the Dragon Jia Divine Chapter (also called the Dunjia Heavenly Book). Based on this, the Yellow Emperor invented the South-Pointing Chariot to break the fog and ultimately defeated Chiyou. Although this legend is mythological, it reflects an important concept: the art of Dunjia is closely related to "breaking confusion" (making correct decisions under conditions of incomplete information)—this is the classical expression of "signal processing."
Chiyou's "great fog" is, from an information theory perspective, "information interference" or "obscured vision"—i.e., a noisy environment. The function of the Dunjia art is to extract useful information in a noisy environment and make correct judgments—this is the classical expression of "signal processing."
The Yellow Emperor's legend also includes the achievement of "regulating the calendar and clarifying time":
"Obtained the treasure tripod, pushed the stalks according to the sun's arrival." (Huò bǎodǐng, yíngrì tuī cè.) (Shiji: Wǔdì Běnjì)
"Pushing the stalks according to the sun's arrival" means establishing the calendar. The calendar is the encoding system for temporal information. The dual roles of the Yellow Emperor in "regulating the calendar" and "employing troops" correspond precisely to the division between Bazi (application of the calendar) and Qimen Dunjia (application of military strategy)—both arts originate from the creations of the ancient Sage-Kings.