The president of the supreme court, Lady Hale, has delivered a public rallying cry for “girly swots” in remarks that appeared directly aimed at the prime minister.

Ten days after delivering the court’s unanimous decision against the prime minister’s “unlawful” move to prorogue parliament, Hale took on Boris Johnson’s sexist language.

Redacted documents released to courts in Edinburgh and London on Johnson’s decision to prorogue parliament included a handwritten note from him that said: “The whole September session is a rigmarole introduced [redacted] to show the public that MPs were earning their crust.” A full copy of the document, leaked to Sky News, showed that the missing words were “by girly swot Cameron”.

Hale pointedly used the same phrase on Friday when she opened the Association of State Girls’ Schools annual leadership conference in London. “Let’s hear it for the girly swots,” she was quoted as telling delegates.

Baroness Hale tells Association of State Girls’ Schools, ‘let’s hear it for the girly swots’ as she opens their leadership conference. pic.twitter.com/n3Rfb3D9aN — Tes (@tes) October 4, 2019

Hale, who is patron of the association and was educated at a state school in Yorkshire, said she and her contemporaries were ambitious to be “girly swots”.

According to the TES, she said: “My father was headmaster of a similarly sized boys’ grammar school in North Yorkshire and he was firmly of the view that single-sex education should be compulsory for girls but forbidden for boys.

“Now, these are two inconsistent positions, but you can work out why. Because … I found this in Cambridge – I was a girly swot and there were quite a few young men who were, similarly, girly swots: they wanted to get on with their work and their lives.

“But sometimes supervisions were invaded by the other sort of male student, who wasn’t particularly interested in doing much in the way of work, and who concentrated on trying to put the supervisor off with silly questions, and just generally not do a lot of work.”

Hale became the first female law lord in 2003 and the first woman to head the supreme court in October 2017. Hale was also reported to have told the conference that her main advice to young women is: “Don’t let the bastards get you down”.

She made the remarks under a slide image that quoted a Metro headline about last week’s verdict: “Spider woman takes down Hulk: viewers transfixed by judge’s brooch as ruling crushes PM”.

The headline was a reference to the spider brooch that has become a symbol of defiance against Johnson following the supreme court’s ruling. Online searches for animal-shaped jewellery soared after the verdict. On Friday Hale was wearing a dragonfly brooch.