I am trying to convert the following to CNF:
$$(P → (Q → R)) → (P → (R → Q))$$
I've done some of it but I'm unsure of what I am supposed to do after this. Here is what I have gotten so far.
$$¬(P \to (Q \to R)) ∨ ( P \to (R \to Q)$$
$$¬(P \to (¬Q ∨ R)) ∨ ( P \to (¬R ∨ Q) $$
$$¬(¬P ∨ (¬Q ∨ R)) ∨ ( ¬P ∨ (¬R ∨ Q) $$
$$(P ∧ ¬(¬Q ∨ R)) ∨ ( ¬P ∨ (¬R ∨ Q) $$
$$(P ∧ (Q ∧ ¬R)) ∨ ( ¬P ∨ (¬R ∨ Q) $$
$$(P ∧ Q ∧ ¬R) ∨ ( ¬P ∨ ¬R ∨ Q) $$
$$(P ∧ Q ∧ ¬R) ∨ ¬P ∨ ¬R ∨ Q $$
$$\neg P \lor \neg R \lor Q$$
I just don't know what to do when I get here. Any help will be much appreciated. Thanks!