This post is really just an indulgence of a point of pedantry, but it's been bugging me since the election that people keep saying that Jeremy Corbyn would currently be Prime Minister if it hadn't been for the twelve Tory gains from the SNP (indeed, in my weaker moments I may even have retweeted the people who are saying it). It's not strictly true.
Holding the constituency of Berwickshire, Roxburgh & Selkirk would have been an almost miraculous feat for the SNP. Given the enormous tactical switch from the Lib Dems to the Tories, the SNP would actually have needed a significant increase in their own vote just to hold the seat, and that was obviously never going to happen. However, as a 'bit of fun', let's imagine for the sake of argument that they had somehow pulled it off, and also held onto all of the other eleven seats that the Tories gained. This is what the result of the general election would have been -
Liberal Democrats 12
Sinn Féin 7
Plaid Cymru 4
From there's it's a simple calculation - the Conservatives and DUP combined would have had 316 seats, and an informal progressive alliance consisting of Labour, the SNP, Plaid Cymru and the Greens would have had only 314. Sinn Féin are irrelevant because they don't take their seats, so the balance of power would have been held by the 12 Liberal Democrats and the sole independent MP Lady Hermon (who we know is minded to support the Tories in confidence votes). That means the only way the Queen would have been able to justify not inviting Theresa May to form a government would have been if the Liberal Democrats had clearly indicated a preference for Jeremy Corbyn. Based on the commitments they made prior to the election, it seems highly unlikely they would have done so.
What would have happened after May's reappointment as PM? Without an overall majority for the Tory/DUP alliance, it's theoretically possible that the Queen's Speech would have been defeated, triggering a second election almost immediately. The public would not have looked kindly on that, so much more probable is that the Tory government would have introduced a limited and uncontroversial Queen's Speech, allowing the Lib Dems (and possibly even Labour) to abstain with dignity, on the implicit understanding that there would be a general election in the autumn.
There's no doubt that without the Scottish Tory gains we'd be in a radically different situation from the one we actually find ourselves in - the Tory government would be merely a caretaker administration with almost no capacity to get its policies through the Commons, and a quick second election would be a near-certainty rather than just an intriguing possibility. But even so, it's simply not true to say that the Scottish Tory gains are literally responsible for there being a Tory government as of this moment. In the longer run, what would have happened in a second election is entirely a matter for speculation - for all we know, the urgency of the situation would have concentrated Tory minds, and they would have quickly found an alternative leader who might have delivered a much better result in the autumn.
There is no shortage of little paradoxes to be found in politics, and it's not totally inconceivable that the Scottish Tory gains will ultimately leave the Tory government in a weaker position than would otherwise have been the case.