"Have to" is used to express certainty, necessity, and obligation.
"Have to" behaves quite irregularly in the past and the future. Study the chart below to learn how "have to" behaves in different contexts.
2. That has to have been the right restaurant. There were no other restaurants on the street.
2. SHIFT TO "MUST"
That must not have been the right restaurant. I guess there was another one around there somewhere.
2. She had to finish the first book before the midterm.
3. She will have to finish the other books before the final exam.
2. She didn't have to write a critique of "The Scarlet Letter." She had to give a presentation to her class.
3. She won't have to take any other literature classes. American Literature 101 is the only required course.
REMEMBER: "Do not have to" vs. "Must not"
"Do not have to" suggests that someone is not required to do something. "Must not" suggests that you are prohibited from doing something.