In the building behind them, senior judges listened to lawyers argue whether parliament or government ministers had the legal right to invoke Article 50 of the Lisbon Treaty and begin the process to leave the EU.