I want to know how to invert these if-clauses in conditionals (for the convenience, I'd leave the main-clause):
If I am not going to catch the train... (a real conditional)
If I were not going to catch the train... (an unreal conditional in the present)
If had not been going to catch the train... (an unreal conditional in the past)
It doesn't matter whether the second and the third don't make sense. I just want to know how to invert them. I've written my attempts below, please correct me if there's any mistake. Thank you.
Should I not be going to catch the train...
Were I not to be going to catch the train...
Had I not been going to catch the train...
Anyway, the reason I'm asking this question is my confusion about the infinitive-to after were I not. I don't know whether to is necessary there.
Thanks in advance.