Is $(\Diamond p \rightarrow \Diamond q)\rightarrow \Diamond (p \rightarrow q)$ invalid in K? Is it true that the formula bellow is invalid in K:

$(\Diamond p \rightarrow \Diamond q)\rightarrow \Diamond (p \rightarrow q)$

Because we could construct a counter model where $(\Diamond p \rightarrow \Diamond q)$ is true by having $\Diamond p$ false that would make $(\Diamond p \rightarrow \Diamond q$) hold. Such a model would be for example a model with a single world with no successors with no valuation. Then in this model $\Diamond (p \rightarrow q)$ does not hold, because there does not exist a successor of x such that xRy and that in y $p \rightarrow q$ holds

Is this a correct counterexample?
Your counterexample is okay.

Indeed, it is not just a counterexample, it is the only counterexample.



Suppose $\lozenge p\to\lozenge q$ is assumed for some world. &nbsp; Then it would follow:


in the case where $\lozenge p$, there $\lozenge q$ and therefore $\lozenge (p\to q)$.
in the case where $\lnot\lozenge p$, there $\square\lnot p$ and therefore $\square(p\to q)$. If there are any worlds accessible then $\lozenge (p\to q)$.


Therefore $(\lozenge p\to\lozenge q)\to\lozenge(p\to q)$ is true in any world that can access any worlds.

Thus wise, it is imperative that we explore those that cannot access possible worlds in our search for a counterexample.



So, as you suggested:

In the Accessible World Semantics, if there is a world which cannot access any possible world, then $\lozenge(p\to q), \lozenge p,$ and $\lozenge q$ are all false in that world, making $(\lozenge p\to\lozenge q)\to\lozenge(p\to q)$ false there too. 

System K does not prohibit a Frame from having such a world, so $(\lozenge p\to\lozenge q)\to \lozenge(p\to q)$ is not a theorem of System K.
If you regard a model with just one possible world and your accesibility relation $R$ is reflexive ($wRw$ for all possible worlds), then your counter example works:

Say $\Diamond p$ false 

$\Rightarrow$ $p$ false in $w$ (where $w$ is the only / static world) ..since $R$ is reflexive

$\Rightarrow$ $p \rightarrow q$ true in $w$

$\Rightarrow$ $\Diamond (p \rightarrow q)$ true in $w$ ..since $R$ is reflexive

$\Rightarrow$ $(\Diamond p \rightarrow \Diamond q) \rightarrow  \Diamond (p \rightarrow q)$ true in $w$ ..since $(\Diamond p \rightarrow \Diamond q)$ and $\Diamond (p \rightarrow q)$ are true in $w$