Thanks to ilywrin, who sent this puzzle to me. It was very difficult, I couldn't solve it. Even Fritz 6 showed only a mate in four moves although this is a mate in three. And if someone can't figure it out who's to move, it's white to move and mate.
In other words, I don't need to take any special measures against 1...Kd7; I just ensure my Q has access to the c3-h8 diagonal. This frees me to devote all resources to defeating 1...Kb7.
If Black is allowed to play 1...Kb7 and 2...Ka7, White has difficulty constructing a mate. I want to play something like 2.Rf7+ to keep him out of a7. After this check, he either returns to c6 for 3.Rc7#, or gets nailed to an edge (2...Kb8 or 2...Ka6). To give mate against both of those, my Q must already be on a square that connects to both the 8th rank and the a-file. There is only one such square.
1.Qd4!! A great key move. Without the above logic, a very hard first move to find. In fact, all the defenses but one are known already. The only one left to consider is the acceptance of the sacrifice, 1...cxd4 2.Rf7! Now possible because the stalemate is relieved. 2...Kc5 (or 2...d3) 3.Rc7#
In other words, I don't need to take any special measures against 1... ...[text shortened]... [/b] Now possible because the stalemate is relieved. 2...Kc5 (or 2...d3) 3.Rc7#[/b]
I looked at this and got drove to frustration so much that I turned the computer off and went out on the drink.
Now I'm looking at a computer screen with a little envy and a lot of hangover, oh and a strange woman with humongous knockers making tea...... alls not lost then eh?.....
so i say well done to Bigdogg for solving a tough one, and thanks to Kbaumen for getting me a new toy