If a negative adverb or adverb phrase comes at the beginning of a clause, it is usually followed by auxiliary verb + subject. These structures are rather formal.
- Under no circumstances can we admit somebody like her. (NOT Under no circumstances we can admit somebody like her.)
- At no time did she realize what she had done. (NOT At no time she realized what she had done.)
- Hardly had I arrived when trouble started. (NOT Hardly I had arrived when trouble started.)
- Seldom have I seen such a horrible sight. (NOT Seldom I have seen such a horrible sight.)
- Little did she realize what she was doing.
- Not only did they lose their money, but they were badly beaten.
In a less formal style, we begin these sentences with their proper subject. In that case, the auxiliary verb comes after the subject.
- I had hardly arrived when trouble started.
- I have seldom seen such a horrible sight.
In formal conditional clauses, an auxiliary verb can be put before the subject instead of using if.
- Were I you, I wouldn’t do it. (= If I were you, I wouldn’t do it.)
- Had I realized what she wanted, I would not have allowed her in. (= If I had realized what she wanted, I would not have allowed her in.)