One legend is that the tai chi ruler was invented by Chen Tuan, later named Chen Hsi-I, who was a famous Taoist and retainer of the first emperor of the Sung Dynasty. I interpret this to mean the first emperor of the Northern Sung Dynasty (960 – 1127) who was Taizu (太祖 Tàizǔ was his temple name – portrait below). During this period Emperors usually did not have posthumous names, but had birth names (his was 趙匡胤 Zhào Kuāngyìn) and one or more era names: his were 建隆 Jiànlóng (960–963); 乾德 Qiándé (963–968) and 開寶 Kāibǎo (968–976). The Northern Sung were attacked by their Jin allies in 1127, lost their capital at Kaifeng and a great deal of territory, and had to relocate. The Southern Song established a new capital at Nanjing, and a peace of sorts was eventually established with the Jin. However, the Jin empire was conquered by the Mongols in 1234 with assistance from the Southern Song Dynasty. Disagreements between the Southern Song and the Mongols were resolved by the Mongols by 1279.