TITLE: How to deduce that something does not follow?
QUESTION [8 upvotes]: Assume I have formulas $H$, $P$ and $Q$. Assume further that I can 
show in classical logic that $P$ follows from $H$:
$$H \vdash P$$
And that the negation of $Q$ follows from $H$:
$$H \vdash \neg Q$$
Can I then jump to the conclusion that $Q$ does not
follow from $P$:
$$P\not\vdash Q \text{ ?} $$
Bye

REPLY [8 votes]: If $H$ is consistent then yes. Assume towards contradiction that this is not the case, then $P\vdash Q$. 

$P\vdash Q$ implies $\vdash P\rightarrow Q$ using the deduction theorem.
Therefore $H\vdash P\land P\rightarrow Q$.
And so $H\vdash Q$.

If $H$ is inconsistent (e.g. $0=1$ or $\varnothing\in\varnothing$ sort of thing) then the principle of explosion says that everything is provable from $H$.

REPLY [4 votes]: What you can deduce is $$H \vdash (P \land \lnot Q),\quad\text{that is}\;\;\; H\vdash \lnot(P \rightarrow Q)$$
since $ (P \land \lnot Q)\equiv \lnot(\lnot P \lor  Q) \equiv \lnot (P\rightarrow Q)$