When to answer a question with 沒有? I've just started learning Mandarin and I was curious as to when it is appropriate to answer a yes/no question negatively with 沒有.  Obviously, if the question involves 有 then it makes sense.  However, I understand that
你在做飯嗎？
could also be answered that way as well.
I also understand that questions about being, such as
你是老師嗎？
should be answered instead with 不是。
Is this a general rule?  That is, unless the question is about being or state, is it safe to assume that I can respond with 沒有?
The answer to 你在做飯嗎？is still 是 or 不是 . To answer 有 or 沒有, the question should be 你有做飯嗎？
Example:

You see your friend washing vegetable, and ask 你在做飯嗎？ (are you cooking dinner?) and his answer could be 是 (yes) or 不是 (no)

A wife came home and saw her husband eating pizza, so she asked 你有做飯嗎？(have you cooked dinner?) the answer could be 有 (I have) or 沒有 (I have not)



If the question is 你做飯嗎? (are you cooking (now)?/do you cook (regularly)? ) then you can answer according to the context.
If you mean 'I am not cooking now' then you would say '不是' (no)
If you mean 'I don't cook = 'I haven't been cooking regularly' then you can answer '沒有' (I have not)