What is the relationship between Li Shimin and Emperor Yang of Sui Dynasty?

Taizong of the Tang Dynasty and Emperor Yang of the Sui Dynasty had two levels of relatives.

1. The great-grandfather of Emperor Taizong of the Tang Dynasty and the grandfather of Emperor Yang Guang of the Sui Dynasty were both Duguxin. Li Shimin should be called Emperor Sui Yang's aunt and cousin.

2. Concubine Dayang, the daughter of Emperor Yang Guang of the Sui Dynasty, married Emperor Taizong of the Tang Dynasty and gave birth to Li Ke and Li Min. Emperor Yang of the Sui Dynasty was also considered the father-in-law of Emperor Taizong of the Tang Dynasty.

Extended information:

Lonely Xin’s fourth daughter was the mother of Li Yuan, the founding emperor of the Tang Dynasty. The Li family was the family of Xianhe at that time, so Li Bing, the son of Taiwei Li Hu, one of the "Eight Pillar Kingdoms", became the son-in-law of Lonely Xin, who was Li Yuan's father. When Li Yuan proclaimed himself emperor, his mother had died, so he was posthumously named Empress Yuan Zhen. The second son of Tang Emperor Li Yuan and Queen Dou was Li Shimin, and the second emperor of the Tang Dynasty was later Tang Taizong Li Min.

Gu Xin’s youngest daughter Gu Jia married Yang Jian, the later founding emperor of the Sui Dynasty. She was a real queen. In fact, Gudujia was extremely talented and politically savvy, and was of great help to Emperor Wen of the Sui Dynasty. Later, Emperor Wen of the Sui Dynasty and Queen Dugu gave birth to several children. Yang Guang was the second son of Emperor Wen of the Sui Dynasty Yang Jian and Queen Dugu Jialuo, the second emperor of the Sui Dynasty. After Yang Guang gave birth to a daughter, she was adopted by Emperor Taizong of the Tang Dynasty as Concubine Yang.

From now on, it seems that Li Shimin not only has to call Emperor Sui Yang his aunt and cousin in terms of relatives, but also calls Emperor Sui Yang his father-in-law.

Reference materials: Baidu Encyclopedia-Yang Guang Baidu Encyclopedia-Li Shimin