The verbs “do not have to” and “must not” are modal verbs.
Modal verbs are helping/auxiliary verbs that express ideas like ability, necessity, lack of obligation, and prohibition. Many modal verbs have more than one meaning. They are always followed by the simple form of a verb. For example:
Alex doesn’t have to call his mother.
This shows that it is not necessary for Alex to call his mother.
Modals for Lack of Obligation
If something is not necessary or not an obligation, we use the modal verb “do/does not have to.” Make sure the verb agrees with the subject.
In Canada, children do not have to go to school on Saturdays, but many adults have to work.
Common Question: Do children have to go to school on Saturdays? No, they don't.
Negative Question: Don't children have to go to school on Saturdays? No, they don't.
Maggie doesn't have to study tonight because she studied all day.
Common Question: Does Maggie have to study tonight? No, she doesn't.
Negative Question: Doesn't Maggie have to study tonight? No, she doesn't.
To put the modal in past tense, simply use the phrase “DID not have to.”
For homework last night, we had to read Chapters 4 and 6, but we didn't have to read Chapter 5.
Question: Did we have to read Chapter 5 last night? No, we didn’t.
As always, modals are followed by the simple form of a verb. The “to” in “do not have to” is not an infinitive. It is part of the modal itself.
Subject + do/does not have to + simple verb + ...
Modals of Prohibition
Finally, in order to show that something is prohibited or not allowed, we use “must not.” For example:
Students must not copy their work from the Internet. It's illegal!
Children, you must not go in a stranger's car. It's dangerous!
Using “must not” is very serious and not very common in North American English. There is no question form or past tense form. It is useful when people in authority are giving instructions or explaining to people what they must not do in a formal way. It is more common in writing than in speaking.
Drivers must not drive on the left side of the road in North America.
You mustn't drink alcohol before you drive. You could cause an accident.