Heavenly Stems

The ten Heavenly Stems (or Celestial Stems ) are a system of ordinals indigenous to China and used throughout East Asia, first attested c. 1250 BCE during the Shang dynasty as the names of the ten days of the week. They were also used in Shang-era rituals in the names of dead family members, who were offered sacrifices on the corresponding day of the Shang week. Stems are no longer used as names for the days of the week, but have acquired many other uses. Most prominently, they have been used in conjunction with the associated set of twelve Earthly Branches in the compound sexagenary cycle, an important feature of historical Chinese calendars.

Origin
The Shang people believed that there were ten suns, each of which appeared in order in a ten-day cycle (旬; xún). The Heavenly Stems (tiāngān 天干) were the names of the ten suns, which may have designated world ages as did the Five Suns and the Six Ages of the World of Saint Augustine. They were found in the given names of the kings of the Shang in their Temple Names. These consisted of a relational term (Father, Mother, Grandfather, Grandmother) to which was added one of the ten gān names (e.g. Grandfather Jia). These names are often found on Shang bronzes designating whom the bronze was honoring (and on which day of the week their rites would have been performed, that day matching the day designated by their name). David Keightley, a leading scholar of ancient China and its bronzes, believes that the gān names were chosen posthumously through divination. Some historians think the ruling class of the Shang had ten clans, but it is not clear whether their society reflected the myth or vice versa. The associations with Yin-Yang and the Five Elements developed later, after the collapse of the Shang Dynasty.

Jonathan Smith has proposed that the heavenly stems predate the Shang and originally referred to ten asterisms along the ecliptic, of which their oracle bone script characters were drawings; he identifies similarities between these and asterisms in the later Four Images and Twenty-Eight Mansions systems. These would have been used to track the moon's progression along its monthly circuit, in conjunction with the earthly branches referring to its phase.

The literal meanings of the characters were, and are now, roughly as follows. Among the modern meanings, those deriving from the characters' position in the sequence of Heavenly Stems are in italics.

Current usage
The Stems are still commonly used nowadays in East Asian counting systems similar to the way the alphabet is used in English. For example:
 * Korea and Japan also use heavenly stems on legal documents in this way. In Korea, letters gap (甲) and eul (乙) are consistently used to denote the larger and the smaller contractor (respectively) in a legal contract, and are sometimes used as synonyms for such; this usage is also common in the Korean IT industry.
 * Chinese mathematician Li Shanlan developed a system using the heavenly stems and terrestrial branches to represent English letters in advanced mathematics. In Li's system, the first ten letters (a-j) are represented by the heavenly stems, the next twelve letters (k-v) are represented by the terrestrial branches, and the final four letters (w-z) are represented by ("matter"),  ("heaven"),  ("earth"), and  ("human"), respectively. The radical '口' (the 'mouth' radical) may be added to the corresponding heavenly stem, terrestrial branch, or any of '物', '天', '地', and '人' to denote an upper-case letter (e.g. a=甲, A=呷, d=丁, D=叮).
 * Choices on multiple choice exams, surveys, etc.
 * Organic chemicals (e.g. methanol: 甲醇 jiǎchún; ethanol: 乙醇 yǐchún). See Organic nomenclature in Chinese.
 * Diseases (Hepatitis A: 甲型肝炎 jiǎxíng gānyán; Hepatitis B: 乙型肝炎 yǐxíng gānyán)
 * Sports leagues (Serie A: 意甲 yìjiǎ)
 * Vitamins (although currently, in this case, the Latin letters are usually used)
 * Characters conversing in a short text (甲 speaks first, 乙 answers)
 * Students' grades in Taiwan: with an additional Yōu (優 "Excellence") before the first Heavenly Stem Jiǎ. Hence, American grades A, B, C, D and F correspond to 優, 甲, 乙, 丙 and 丁 (yōu, jiǎ, yǐ, bǐng, dīng).
 * In astrology and Feng Shui. The Heavenly Stems and Earthly Branches form the four pillars of Chinese metaphysics in Qi Men Dun Jia and Da Liu Ren.