Hello, Pastel
"I won't do the homework like the way he did."
This sentence can be improved. Actually, it is not completely correct. You could say, for example:
"I won't do my homework like he did (his)."
"I won't do my homework in the same way he did (his).
You said:
==>'did' is not used as the main verb in this sentence, it replaces the whole action happened in the past, which is 'the way he did his homework.' It's just a coincidence here that there seems to be a link between present 'do' and past 'did'. In fact, 'did' functions as 'substitution.'
It is true that in some cases, "did" is both the lexical verb (or main verb) and the auxuliary for the simple past tense as well.
When you use 'substitution', though, the one you're using is the auxiliary.
Suppose you had this sentence:
"I
did well in the test; Mary did, too; Tom and Jim didn't."
Perhaps this sentence isn't the greatest of examples, but hopefully it will illustrate what I mean.
The verb "did" appears three times in the sentence, but only the first one (in bold type) is a lexical verb. In "Mary did well" and "Tom and John didn''t" it is an auxiliary verb. Perhaps "didn't" is easier to understand as an auxiliary, since we must use an auxiliary verb to form a negative sentence in the simple past.
If the second "did" isn't so easy to classify as one or the other, you can use a similar sentence with a different main verb -a verb other than "do"- anc compare both sentences then:
1. "I
did well in the test; Mary
did, too."
2. "I
bought flowers this morning; Mary
did, too."
Both sentences have a similar structure and, in both, the main verb has been replaced by the corresponding auxiliary in the second clause (Mary...).
"Bought" has been replaced by "did" in order to avoid repetition. A sentence such as "I bought flowers this morning and Mary bought flowers this morning" is correct from the point of view of grammar; yet it is not what you will usually say/hear. Using "substitution", you can avoid unnecessary repetition.
Now, if you compare #2 to #1, you can safely say that in #2 there is substitution too. Even when you have "did" in both clauses, only the first "did" is a main verb; the second is an auxiliary. If it were a main verb, you would have to say:
I did well in the test; Mary did well in the test too."
Let me know if this is not clear enough?
Miriam