Is a problem in NP if it is decided by some non-deterministic, polynomial time turing machine? [duplicate]

This question already has an answer here:

I am working trough the book "Introduction to the theory of computation", 3rd edition, by M. Sipser. On page 294, the book states:

A problem is in NP iff it is decided by some non-deterministic, polynomial time turing machine.

I get that it is decidable by some NDPTTM if the problem is in NP, the other way around I do not quite get.This is because I feel like all problems in $CoNP-NP$ can also be decided by some Non Deterministic polynomial time turing machine. I have the following solution in mind: Lets assume $P \neq NP \land NP \neq CoNP$. Take a problem $A \in NP - CoNP$. Now there is problem $\overline{A}$, which is in $CoNP$. Lets say NDTM $N$ decides $A$ in polynomial time. Now we modify $N$ by replacing every reject with accept and every accept with reject. We now have a polynomial NDTM $N'$ which decides $\overline{A}$ in poly time. According to the theorem proposed by the book, this should imply that $\overline{A}$ is in $NP$, but it is not.

Am I missing something here?

Edit:

So, I have seen the possible duplicates and I learned a lot: I see now that $N'$ does not necessarily decide $\overline{A}$. I Do still believe my question is subtly different, so here I go:

Take problem $B \in CoNP-NP$. There is a NDTM which decides $B$ in poly time, right? So, according to the theorem, $B$ should be in NP.

I firmly believe the book is correct, but does that mean that $B$ cannot be decided by any NDTM in poly time?

marked as duplicate by Hendrik Jan, Yuval Filmus complexity-theory StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 3 '16 at 10:09

• NP is, by definition, the things that can be decided by an NDTM in poly time. So, if you take a language such as $B$ which you've explicitly said is not in NP, then it cannot be decided by an NDTM in poly time. – David Richerby May 3 '16 at 15:13