Are you sure you want to know?
Rebellions are one of the worst mess ups in the logical game design of BotF with the main code being mistakenly part of the random events instead of the penalties for low morale.
There is three codes with entirely different rebellion prerequisites each:
1. Random events(BUG) initial test for rebellions (no home system, rebellious, not last system held) chance 1 : morale value
2. Real random event (rebellious, defiant or disgruntled - even if last system held! but no home) chance 1 : [2100 / 2000 / 1800 / 1650 / 1000 for difficulty levels 1-5]
3. Penalties for low morale (rebellious/defiant, systems held 2+; home system seems possible) -> erratic chance, very unlikely to happen
And they avoided the question of restoring empires by skipping rebellions on systems with inhabitants of dead empires, so rebellious morale issues on said systems could be solved by eliminating conquered empires as fast as possible(untill we fixed that).