This morning, the Supreme Court's 11 judges heard arguments from the government's representative, Sir James Eadie QC.
He said prorogation was "a well-established constitutional function exercised by the executive" and decisions about it were "squarely… within that political or high policy area".
Sir James argued Parliament had previously passed laws addressing aspects of prorogation, but there was no law relevant to this particular case.
Therefore, he said, the courts could not intervene in the decision.
UK Supreme CourtCopyright: UK Supreme Court
This afternoon we heard from Aidan O'Neill QC, who was defending a Scottish court’s previous ruling that the prorogation was “unlawful”.
He argued Boris Johnson’s decision to prorogue Parliament was "an improper purpose" to stop MPs holding the government to account over Brexit.
He said one of the advantages of the ruling from Edinburgh was it had "distance" from the “Westminster bubble”, which lends "perspective".
On Thursday, we will hear submissions from those who have been given permission to intervene in the appeals, including former prime minister Sir John Major.
Join us tomorrow from 10:30 BST.
Even the king has to play by the rules - O'Neill
"It doesn't matter who you are, even if you are the king... you are called before the courts and you have to obey the rules," says Mr O'Neill.
His argument is coming to a close - after two hours putting forward his case to the judges.
The QC also responds to a point - made several times earlier by his opponent, government lawyer Sir James Eadie this morning - that Parliament should have legislated to stop it being prorogued.
He says the government "held all the cards in that regard and it is not in fact the case that somehow this court can draw an inference from the fact that Parliament, in the short time that it had, didn't legislate against the prorogation".
He adds: "It's like an arsonist has come into your house and the fire is raging in the kitchen, and you try and put it out in the kitchen, and then they say: 'yeah you didn't do anything in the living room, so you must have consented to it being burnt down'.
"There's only so much time people have."
Decision to prorogue for no-deal Brexit 'based on error of law'
UK Supreme CourtCopyright: UK Supreme Court
Lawyer Mr O'Neill tells the 11 judges that there is no statutory provision - a written law passed by Parliament - for a no-deal Brexit.
"What this government seems to have failed to understand in its reference to there being a no-deal Brexit however, is that there is no statutory provision which in any sense authorises this government to leave the European Union with the inevitable effect that has on individual rights without a deal.
"There is no no-deal statue."
Mr O'Neill adds: "So one of the other reasons why this decision to prorogue is flawed is because it is based on an error of law.
"It presumes that, and it is aimed at, we are seeking to prorogue Parliament in order - if it happens to be the case - to be able to crash out without a deal.
"They have no authority to do that. They've misdirected themselves."
WATCH: 'Look at these documents, don't treat them as gospel'
Timing of prorogation important - Scottish case lawyer
UK Supreme CourtCopyright: UK Supreme Court
Mr O'Neil argues that it is not solely a consideration of how long the prorogation of Parliament is. "It's about what it's doing to our constitution," he says.
"What is the constitutional background? What are the issues which would otherwise be before Parliament for it to call the executive to account and potentially to legislate on?"
"In this case it's the potential for leaving the European Union on exit day with or without a deal."
Scottish case lawyer: Everyone is subject to the law
UK Supreme CourtCopyright: UK Supreme Court
"Everybody is subject to the law," says Mr O'Neill, who wants the court to uphold the Scottish ruling that found Boris Johnson suspended Parliament unlawfully.
"No one has unfettered power, no one has absolute power. That's what the Glorious Revolution was about".
Mr O'Neill turns to the issue of justiciability - which is whether prorogation is a matter for the courts, or a political matter. His opponent, the government, believes prorogation is not a matter for the courts.
He says: "Once Parliament has been prorogued, the only constitutional actor still standing is the courts."
Therefore, he says, it is for the courts to determine whether the power of prorogation has been exercised lawfully by the government - since Parliament can't do it as it is suspended.
'The truth, the whole truth, and nothing but the truth'
'Look perturbed, look upset but don’t look sceptical'
UK Supreme CourtCopyright: UK Supreme Court
Mr O'Neill clashes with one of the judges, after telling them that they should not treat the government documents as the complete truth.
Judge Lord Reed responds: "When you say the complete truth, do you mean not the whole picture?"
Mr O'Neill suggests the document might have been written knowing that their decision to prorogue might be challenged - and they might "need cover".
The lawyer notices the judge's response, and asks: "My Lord is looking perturbed and upset?"
"I'm looking sceptical," the judge responds.
Mr O'Neill replies: "There's no reason to look sceptical, look upset. But the fact is, read the documentation and it says, we know this will potentially cause us a challenge.
"We have no affidavit which says this is true or complete, no affidavit which says this is the truth, the whole truth and nothing but the truth.
"One might not think that a government would engage solely engage in high
politics as opposed to low, dishonest, dirty tricks, but I'm not sure we can assume that of this government, given the attitude which has been taken publicly by its advisers and by the prime minister himself to the notion of the rule of law.
"So look perturbed, look upset but don’t look sceptical."
Irish PM 'can't agree to direct rule for Northern Ireland'
ReutersCopyright: Reuters
Leo Varadkar and Boris Johnson met in Dublin earlier this monthImage caption: Leo Varadkar and Boris Johnson met in Dublin earlier this month
Away from the court, taoisech (Irish prime minister) Leo Varadkar has said Ireland cannot agree with a return to direct rule for Northern Ireland in the event of a no-deal Brexit.
Direct rule would see all the powers that had been handed over to Northern Ireland's government taken back by ministers in London.
It could only be implemented if the UK government passes a new law through Parliament.
Mr Varadkar told Boris Johnson when they met in Dublin that he would seek a consultative role for the Republic if direct rule returns.
Read more of Mr Varadkar's comments here, and more about direct rule here.
Scottish case lawyer: Don't treat documents as gospel
Mr O'Neill is now reading out - and interrogating - a letter from the PM to MPs setting out the prorogation plan.
He reads out the section where Boris Johnson set out his suggestion that Parliament could debate and vote on the government's Brexit plan or deal after the EU Council.
"Not very much time for passing a bill for something very contentious," says Mr O'Neill.
"It doesn't shout Parliamentary accountability to me," he adds,
Mr O'Neill says that the judges should "look at the documents, but don't treat them as gospel" or "the complete truth", because "nothing tells us that is the case".
He argues because of a lack of an affadavit - or witness statement - from the government: "We've got no evidence as to what the real reasons are."
Johnson's handwritten notes 'all we have' - Scottish case lawyer
Dominic Casciani
Home Affairs Correspondent
Mr O'Neill says the “only decision letter from the decison-maker” on prorogation are the prime minister's handwritten notes on 16 August.
"That's all we've got," he says, arguing that they don't explain Mr Johnson's reasons.
BBCCopyright: BBC
The prime minister's handwritten notesImage caption: The prime minister's handwritten notes
He reminds the court the words redacted by the government's lawyers are: "That girly swot Cameron".
PM's own lawyers 'kept in the dark' over suspension plan
Dominic Casciani
Home Affairs Correspondent
Mr O'Neill reminds the justices that the Scottish challenge began on 31 July after "repeated briefings by Downing St sources" who were using the press as a sounding board about possibly closing down Parliament to stymie the Brexit debate.
The judicial review was given the go-ahead for hearings in September - so the case began before the PM’s decision to prorogue Parliament - but continued after his decision.
He says the government’s pleadings (its provisional written submissions to the court before the case gets underway) repeatedly insisted that an alleged plot to close Parliament to stop Brexit debate was academic and hypothetical.
That position has been maintained, including in the papers that went before Scotland’s judges.
“Pleadings have to be done in good faith,” says Mr O’Neill - but the court did not receive full and frank disclosure of the government’s intentions.
He reminds the Supreme Court justices that Lord Carloway (the most senior judge in Scotland) concluded that even the PM’s own lawyers had been “kept in the dark” about the plan to close Parliament.
Mr O'Neill QC: Parliament has no say over prorogation
UK Supreme CourtCopyright: UK Supreme Court
Making his case that prorogation was unlawful, Mr O'Neill says the courts must scrutinise the reasons that the prime minister uses the power of prorogation.
"Precisely because Parliament has no say to when, and how, and what reason and for what period the executive might choose to close parliament and so prevent its sitting," he says.
"In the present case it appears the prime minister's action in proroguing parliament has had the intent and effect of preventing Parliament of holding the government politically to account, at a time when the government is taking decisions that will have constitutional and irreversible impacts for our country."
Scottish case lawyer: Government accountable to Parliament
UK Supreme CourtCopyright: UK Supreme Court
Mr O'Neill says under the constitution, the executive, the government, is accountable to the elected representatives of Parliament.
"Against that background... any power that the executive has to suspend the sittings of Parliament... can only consistently and lawfully and constitutionally be exercised in a manner which is consistent with that overarching principle of accountability," he says.
Cherry lawyer: Claiming direct line to people is 'populism'
UK Supreme CourtCopyright: UK Supreme Court
Now Mr O'Neill, who wants the judges to find that the suspension of Parliament was unlawful, is speaking about parliamentary sovereignty.
"It's inherant in this concept that the executive is subordinate to the law," he tells the judges.
"That's important because that basic principle seems to be being questioned sometimes in these febrile times.
"But that's a fundamental principle. The executive is subordinate to the law and it is accountable to Parliament.
"The essence of our constitution is one of accountability to Parliament."
He says we live in a parliamentary representative democracy, where the executive is accountable to Parliament, and Parliament is accountable to the people.
"The executive in this country is not elected directly by the people. The executive's accountability is therefore not directly to the people.
"Claiming a direct line to the people is not democracy, it's populism".
More jokes with judges
More banter with the judges, as Mr O'Neill refers to a previous case, which he says showed the Supreme Court "not at its finest hour"
"Oh how to win friends and influence people," one of the judges fires back, to an outbreak of laughter in the courtroom.
"I'm sorry, my lady, it's the usual Scots way of I don't know how to be polite."
Another judge cheekily remarks: "And I don't recall who was the unsuccessful advocate?" referring to Mr O'Neill, who lost the case they're talking about.
There's more laughter - before the judge adds there are "no sour grapes".
'A country knows itself when it recognises its history'
Dominic Casciani
Home Affairs Correspondent
What is Mr O'Neill's big point? Basically, that the court has heard endless argument over two days about what English law says about the prime minister's powers to prorogue Parliament.
And he's going to talk about Scottish law. We live in a union state - not a state of uniformity, he says.
"A country knows itself when it recognises its history, acknowledges its diversity and when it knows what its constitution means. And that is the role of this court at this time, in this case," Mr O'Neill continues.
He describes the court’s location: across the square, Parliament; to the right, Westminster Abbey, the church; to the left, buildings of government. Four pillars of the state.
Parliament to legislate, Church to pontificate [build bridges], government to regulate, judges to adjudicate.
He's now turning to the facts of the case.
Macbeth, Burns and Cromwell
UK Supreme CourtCopyright: UK Supreme Court
Unlike the lawyer this morning - and indeed the lawyers yesterday - Mr O'Neill is using a lot of imagery, symbolism and references to literature to make his argument to the 11 judges.
So far we've heard references to Macbeth, Oliver Cromwell, Robert Burns as well as the four emblems of the union - the rose, thistle, leek and flax flower.
He also quoted from the poem The English Flag by Rudyard Kipling: "And what should they know of England who only England know?"
Scottish case lawyer: 'This court can act as fulcrum of union'
UK Supreme CourtCopyright: UK Supreme Court
Mr O'Neill says he's here to talk about Scots law - but that's not a petty, nationalist point, he adds.
He says it is important to have respect for the different parts of the union - and they can be made "richer" by hearing from each other.
"This court, in looking at these issues from two cases being heard simultaneously from two of our traditions, has the opportunity, has the responsibility of acting as the fulcrum of the union," he says.
He appeals to the judges to "definitely find against the appeal in my case" which could then create a legal standard for the other appeal, led by Gina Miller.
"From a constitutional perspective, the maintenance of the rule of law... must be one which says the higher standard, wherever it be found....on matters which govern us all, should be the one which falls."
Live Reporting
Dulcie Lee, Claire Heald and Francesca Gillett
All times stated are UK

UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court View more on twitterView more on twitter 
UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court View more on twitterView more on twitter 
UK Supreme CourtCopyright: UK Supreme Court 
ReutersCopyright: Reuters Leo Varadkar and Boris Johnson met in Dublin earlier this monthImage caption: Leo Varadkar and Boris Johnson met in Dublin earlier this month 

BBCCopyright: BBC The prime minister's handwritten notesImage caption: The prime minister's handwritten notes 
View more on twitterView more on twitter 
UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court 

UK Supreme CourtCopyright: UK Supreme Court 
UK Supreme CourtCopyright: UK Supreme Court
Latest PostRecap: What happened on day two?
The court has just finished today's sitting.
This morning, the Supreme Court's 11 judges heard arguments from the government's representative, Sir James Eadie QC.
He said prorogation was "a well-established constitutional function exercised by the executive" and decisions about it were "squarely… within that political or high policy area".
Sir James argued Parliament had previously passed laws addressing aspects of prorogation, but there was no law relevant to this particular case.
Therefore, he said, the courts could not intervene in the decision.
This afternoon we heard from Aidan O'Neill QC, who was defending a Scottish court’s previous ruling that the prorogation was “unlawful”.
He argued Boris Johnson’s decision to prorogue Parliament was "an improper purpose" to stop MPs holding the government to account over Brexit.
He said one of the advantages of the ruling from Edinburgh was it had "distance" from the “Westminster bubble”, which lends "perspective".
On Thursday, we will hear submissions from those who have been given permission to intervene in the appeals, including former prime minister Sir John Major.
Join us tomorrow from 10:30 BST.
Even the king has to play by the rules - O'Neill
"It doesn't matter who you are, even if you are the king... you are called before the courts and you have to obey the rules," says Mr O'Neill.
His argument is coming to a close - after two hours putting forward his case to the judges.
The QC also responds to a point - made several times earlier by his opponent, government lawyer Sir James Eadie this morning - that Parliament should have legislated to stop it being prorogued.
He says the government "held all the cards in that regard and it is not in fact the case that somehow this court can draw an inference from the fact that Parliament, in the short time that it had, didn't legislate against the prorogation".
He adds: "It's like an arsonist has come into your house and the fire is raging in the kitchen, and you try and put it out in the kitchen, and then they say: 'yeah you didn't do anything in the living room, so you must have consented to it being burnt down'.
"There's only so much time people have."
Decision to prorogue for no-deal Brexit 'based on error of law'
Lawyer Mr O'Neill tells the 11 judges that there is no statutory provision - a written law passed by Parliament - for a no-deal Brexit.
"What this government seems to have failed to understand in its reference to there being a no-deal Brexit however, is that there is no statutory provision which in any sense authorises this government to leave the European Union with the inevitable effect that has on individual rights without a deal.
"There is no no-deal statue."
Mr O'Neill adds: "So one of the other reasons why this decision to prorogue is flawed is because it is based on an error of law.
"It presumes that, and it is aimed at, we are seeking to prorogue Parliament in order - if it happens to be the case - to be able to crash out without a deal.
"They have no authority to do that. They've misdirected themselves."
WATCH: 'Look at these documents, don't treat them as gospel'
Timing of prorogation important - Scottish case lawyer
Mr O'Neil argues that it is not solely a consideration of how long the prorogation of Parliament is. "It's about what it's doing to our constitution," he says.
"What is the constitutional background? What are the issues which would otherwise be before Parliament for it to call the executive to account and potentially to legislate on?"
"In this case it's the potential for leaving the European Union on exit day with or without a deal."
Scottish case lawyer: Everyone is subject to the law
"Everybody is subject to the law," says Mr O'Neill, who wants the court to uphold the Scottish ruling that found Boris Johnson suspended Parliament unlawfully.
"No one has unfettered power, no one has absolute power. That's what the Glorious Revolution was about".
Mr O'Neill turns to the issue of justiciability - which is whether prorogation is a matter for the courts, or a political matter. His opponent, the government, believes prorogation is not a matter for the courts.
He says: "Once Parliament has been prorogued, the only constitutional actor still standing is the courts."
Therefore, he says, it is for the courts to determine whether the power of prorogation has been exercised lawfully by the government - since Parliament can't do it as it is suspended.
'The truth, the whole truth, and nothing but the truth'
BBC home affairs correspondent tweets...
'Look perturbed, look upset but don’t look sceptical'
Mr O'Neill clashes with one of the judges, after telling them that they should not treat the government documents as the complete truth.
Judge Lord Reed responds: "When you say the complete truth, do you mean not the whole picture?"
Mr O'Neill suggests the document might have been written knowing that their decision to prorogue might be challenged - and they might "need cover".
The lawyer notices the judge's response, and asks: "My Lord is looking perturbed and upset?"
"I'm looking sceptical," the judge responds.
Mr O'Neill replies: "There's no reason to look sceptical, look upset. But the fact is, read the documentation and it says, we know this will potentially cause us a challenge.
"We have no affidavit which says this is true or complete, no affidavit which says this is the truth, the whole truth and nothing but the truth.
"One might not think that a government would engage solely engage in high politics as opposed to low, dishonest, dirty tricks, but I'm not sure we can assume that of this government, given the attitude which has been taken publicly by its advisers and by the prime minister himself to the notion of the rule of law.
"So look perturbed, look upset but don’t look sceptical."
Irish PM 'can't agree to direct rule for Northern Ireland'
Away from the court, taoisech (Irish prime minister) Leo Varadkar has said Ireland cannot agree with a return to direct rule for Northern Ireland in the event of a no-deal Brexit.
Direct rule would see all the powers that had been handed over to Northern Ireland's government taken back by ministers in London.
It could only be implemented if the UK government passes a new law through Parliament.
Mr Varadkar told Boris Johnson when they met in Dublin that he would seek a consultative role for the Republic if direct rule returns.
Read more of Mr Varadkar's comments here, and more about direct rule here.
Scottish case lawyer: Don't treat documents as gospel
Mr O'Neill is now reading out - and interrogating - a letter from the PM to MPs setting out the prorogation plan.
The letter in full can be found here.
He reads out the section where Boris Johnson set out his suggestion that Parliament could debate and vote on the government's Brexit plan or deal after the EU Council.
"Not very much time for passing a bill for something very contentious," says Mr O'Neill.
"It doesn't shout Parliamentary accountability to me," he adds,
Mr O'Neill says that the judges should "look at the documents, but don't treat them as gospel" or "the complete truth", because "nothing tells us that is the case".
He argues because of a lack of an affadavit - or witness statement - from the government: "We've got no evidence as to what the real reasons are."
Johnson's handwritten notes 'all we have' - Scottish case lawyer
Dominic Casciani
Home Affairs Correspondent
Mr O'Neill says the “only decision letter from the decison-maker” on prorogation are the prime minister's handwritten notes on 16 August.
"That's all we've got," he says, arguing that they don't explain Mr Johnson's reasons.
He reminds the court the words redacted by the government's lawyers are: "That girly swot Cameron".
PM's own lawyers 'kept in the dark' over suspension plan
Dominic Casciani
Home Affairs Correspondent
Mr O'Neill reminds the justices that the Scottish challenge began on 31 July after "repeated briefings by Downing St sources" who were using the press as a sounding board about possibly closing down Parliament to stymie the Brexit debate.
The judicial review was given the go-ahead for hearings in September - so the case began before the PM’s decision to prorogue Parliament - but continued after his decision.
He says the government’s pleadings (its provisional written submissions to the court before the case gets underway) repeatedly insisted that an alleged plot to close Parliament to stop Brexit debate was academic and hypothetical.
That position has been maintained, including in the papers that went before Scotland’s judges.
“Pleadings have to be done in good faith,” says Mr O’Neill - but the court did not receive full and frank disclosure of the government’s intentions.
He reminds the Supreme Court justices that Lord Carloway (the most senior judge in Scotland) concluded that even the PM’s own lawyers had been “kept in the dark” about the plan to close Parliament.
Braveheart 2?
BBC home affairs correspondent tweets...
Mr O'Neill QC: Parliament has no say over prorogation
Making his case that prorogation was unlawful, Mr O'Neill says the courts must scrutinise the reasons that the prime minister uses the power of prorogation.
"Precisely because Parliament has no say to when, and how, and what reason and for what period the executive might choose to close parliament and so prevent its sitting," he says.
"In the present case it appears the prime minister's action in proroguing parliament has had the intent and effect of preventing Parliament of holding the government politically to account, at a time when the government is taking decisions that will have constitutional and irreversible impacts for our country."
Scottish case lawyer: Government accountable to Parliament
Mr O'Neill says under the constitution, the executive, the government, is accountable to the elected representatives of Parliament.
"Against that background... any power that the executive has to suspend the sittings of Parliament... can only consistently and lawfully and constitutionally be exercised in a manner which is consistent with that overarching principle of accountability," he says.
Cherry lawyer: Claiming direct line to people is 'populism'
Now Mr O'Neill, who wants the judges to find that the suspension of Parliament was unlawful, is speaking about parliamentary sovereignty.
"It's inherant in this concept that the executive is subordinate to the law," he tells the judges.
"That's important because that basic principle seems to be being questioned sometimes in these febrile times.
"But that's a fundamental principle. The executive is subordinate to the law and it is accountable to Parliament.
"The essence of our constitution is one of accountability to Parliament."
He says we live in a parliamentary representative democracy, where the executive is accountable to Parliament, and Parliament is accountable to the people.
"The executive in this country is not elected directly by the people. The executive's accountability is therefore not directly to the people.
"Claiming a direct line to the people is not democracy, it's populism".
More jokes with judges
More banter with the judges, as Mr O'Neill refers to a previous case, which he says showed the Supreme Court "not at its finest hour"
"Oh how to win friends and influence people," one of the judges fires back, to an outbreak of laughter in the courtroom.
"I'm sorry, my lady, it's the usual Scots way of I don't know how to be polite."
Another judge cheekily remarks: "And I don't recall who was the unsuccessful advocate?" referring to Mr O'Neill, who lost the case they're talking about.
There's more laughter - before the judge adds there are "no sour grapes".
'A country knows itself when it recognises its history'
Dominic Casciani
Home Affairs Correspondent
What is Mr O'Neill's big point? Basically, that the court has heard endless argument over two days about what English law says about the prime minister's powers to prorogue Parliament.
And he's going to talk about Scottish law. We live in a union state - not a state of uniformity, he says.
"A country knows itself when it recognises its history, acknowledges its diversity and when it knows what its constitution means. And that is the role of this court at this time, in this case," Mr O'Neill continues.
He describes the court’s location: across the square, Parliament; to the right, Westminster Abbey, the church; to the left, buildings of government. Four pillars of the state.
Parliament to legislate, Church to pontificate [build bridges], government to regulate, judges to adjudicate.
He's now turning to the facts of the case.
Macbeth, Burns and Cromwell
Unlike the lawyer this morning - and indeed the lawyers yesterday - Mr O'Neill is using a lot of imagery, symbolism and references to literature to make his argument to the 11 judges.
So far we've heard references to Macbeth, Oliver Cromwell, Robert Burns as well as the four emblems of the union - the rose, thistle, leek and flax flower.
He also quoted from the poem The English Flag by Rudyard Kipling: "And what should they know of England who only England know?"
Scottish case lawyer: 'This court can act as fulcrum of union'
Mr O'Neill says he's here to talk about Scots law - but that's not a petty, nationalist point, he adds.
He says it is important to have respect for the different parts of the union - and they can be made "richer" by hearing from each other.
"This court, in looking at these issues from two cases being heard simultaneously from two of our traditions, has the opportunity, has the responsibility of acting as the fulcrum of the union," he says.
He appeals to the judges to "definitely find against the appeal in my case" which could then create a legal standard for the other appeal, led by Gina Miller.
"From a constitutional perspective, the maintenance of the rule of law... must be one which says the higher standard, wherever it be found....on matters which govern us all, should be the one which falls."