Valeyard

Valeyard was a title, potentially Gallifreyan in origin, which the Sixth Doctor knew to mean "learned court prosecutor". (TV: The Mysterious Planet) In the Sixth Doctor's trial, the title was claimed by a Time Lord known as the Valeyard, who revealed to be an amalgamation of the Doctor's darker sides, taken from a point in the Doctor's personal future. (TV: The Ultimate Foe)

Behind the scenes
Contrary to the in-universe definition, "Valeyard" is not a genuine legal title meaning "learned court prosecutor." The word was entirely made-up by writer Robert Holmes. The title does bear some similarity to the French word "vieillard", meaning "old man", possibly alluding to the planned nature of the Valeyard as the Doctor's last incarnation.