Koshi (Imperial Heir) (皇嗣)
The Koshi (imperial heir) is a successor of Tenshi (monarch or emperor).
The ritsuryo system (a system of centralized government based on the ritsuryo code)
The ritsuryo system did not provide a clear order of the succession to the Imperial Throne. There were power struggles over succession to the Imperial Throne, such as an emperor's son (crown prince) and his younger brother (the younger brother of an emperor who is the heir apparent).
The Imperial House Law
The Imperial House Law regulates about the imperial heir and its' appellation.
The prince who is the imperial heir is called "Kotaishi" (crown prince). If there is no Kotaishi, the imperial grandchild who is the imperial heir is called "Kotaison" (son of the crown prince).
If Kochoshi (the first son of the emperor), Kochoson (grandchild of the emperor) or any other descendants of Kochoshi do not exist, the "Kojishi" (the second son of the emperor) and his descendants will be authorized as the imperial heirs, based on the order of the right of succession to the Imperial Throne. This imperial heir would be called "kotaitei" (the younger brother of an emperor who is the heir apparent). However, the appellation of Kotaitei is not specified on the Imperial House Law.
When an emperor passes away, the imperial heir will ascend to the throne immediately.