This answer is yet one more that will take up some of the points already treated in this original question, in another duplicate, and finally in a third would be duplicate question put to the site some eight years later. None of the answers is specifically an answer to this third question, but there is no other spot for presenting an answer that keeps to this given question. The question is that asked by [RockRan1](https://english.stackexchange.com/q/571558/349876) (July 21).

*Question*

>Why in many sentences do we use verbs before pronouns such as we write in a question?
>
>For example: 
>>Neither did I try nor did I want to.  
>She told me that I can improve my grades, and boy was she right. 
>
>Can you explain to me the logic/rules behind using "did" before _I_ in the first and "was" before _she_ in the second sentence?


**I** In the case of "do" this language practice is termed *do support*.

> (CoGEL) **3.37** **DO-support**
>
>The term DO-SUPPORT (or 'DO-periphrasis') applies to the use of DO as an
'empty' or 'dummy' operator […] in conditions where the construction
requires an operator, but where there is no semantic reason for any other
operator to be present. All uses of DO as an auxiliary come under this heading.
The main ones are :  
>**(a)** In indicative clauses […] negated by not, where the verb is simple
present or simple past:  
>♦ She doesn't want to stay.
>
>Negative imperative clauses introduced by *Do not* or *Don't* may, with some
reservation […], be placed in the same category.  
>
>**(b)** In questions and other constructions involving subject-operator inversion, where the verb is in the simple present or past tense:  
> ♦ Did he stay late? What do they say? Does it matter?  
>
>This category includes tag questions ([…]  reduced questions
where the dummy operator is not accompanied by a main verb:
♦ He knows how to drive a car, doesn't he? […])
>
> It also includes inversion after an initial negative element¹:
♦ Never did he think the book would be finished so soon.  
>
>**(c)** In emphatic constructions where the verb is simple present or simple
past (cf emphatic positive constructions, 3.25):  
>♦ They "do want you to come. ♦ Michael "did say he would be here at nine, didn't he?  
> Here we may also include the 'persuasive imperative' introduced by do:  
> ♦ "Do sit down! "Do be quiet.
A: May I sit here? B: Yes, by all means DÒ.
(See, however, 11.30 Note [a] on the dubious status of DO as operator in this
construction.)  
>**(d)** In reduced clauses, where DO acts as a dummy operator preceding ellipsis
of a predication […]

¹ <sub>Note: This describes the category in question, and it is useful to expand on it, which will be done now, right below, essentially on the basis of *Practical English Usage*, Michael Swan, OUP second edition, No 298, 5.</sub> 
  
The following words, expression and constructions with negative or restrictive meaning require the inversion *when they are placed at the beginning of the clause* (there ae others).  
- *nor,  neither, never, seldom, hardly, rarely, little, only* 
- *at no time, not until (much) later, not only,  only then, no sooner, hardly ever, in no case,* 
- *not* + < object >

Inversion is not used after non-emphatic adverbial expressions of place and time.

- ***Not far from here*** you can see foxes.

*Examples (from same source)*

♦ ***Under no circumstances can we*** cash checks. 
♦ ***At no time was the President*** aware of what was happening.  
♦ ***Not until he received her letter did he*** fully realize the depth of her feelings.  
♦ ***Hardly had I*** arrived when trouble started.  
♦ ***Only after her death was I*** able to appreciate her.  
♦ ***No sooner had he*** departed that the mice got back in.  
♦ ***Not a single word did she*** say.   
♦ ***Not a noise could they*** hear. 

Notice that in this grammatical question the addition of "do" corresponds to the inversion of the auxiliaries, which "operates as does "do", for instance in the important context of questions, hence the standpoint that this  addition of "do" is a case of do-support.
    



**II** In the case of the subject-verb inversion of the second sentence, the idea is different; the inversion aims at communicating a feeling of exclamation.

> *Practical English Usage*, Michael Swan, OUP second edition No 298, 2  
> Exclamation often have the same structure as negative questions […].  
>♦ ***Isn't it*** cold? ♦ ***Hasn't she*** got lovely eyes?  
> In spoken American English, exclamations often have the same form as ordinary (non-negative) questions.  
>♦ ***Have you*** got a surprise coming! ♦ ***Am I*** mad!  
> In a rather old-fashioned literary style, inversion is sometimes found in exclamations after *how* and *what*.  
> ♦ How beautiful ***are the flowers***! ♦ What a peaceful place ***is Skegness***!