Definition
Plain language
A private shorthand defined at the top of a file that changes what the symbols below it mean.
As stated in the literature
Lean's file-scoped notation and abbreviation declarations; redefining a symbol in the editable preamble alters the elaborated meaning of a byte-identical theorem statement.
Also called: notation override, notation overrides, notation hack, notation hacks
Why it matters: It shows why protecting the words of a statement is not enough — if the definitions above it can be rewritten, the same text can be made to say something far weaker.
For example, you can declare at the top of a file that the plus sign now means something else entirely, and every line below quietly takes on a different meaning while looking unchanged.
Heard on the show
“All problems have been solved using local notation hacks.”Episode 260 — One Line of Lean Faked 34 Proofs, and 99 Agents Copied It