Skip to content

Commit

Permalink
fix: increase the priority of lemma notation (#17533)
Browse files Browse the repository at this point in the history
This makes it take precedence over the Batteries version, which in turn simplifies the resulting `Syntax` object to not have a `choice` node.

Presumably there is a very marginal performance gain too.

[Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/348111-batteries/topic/lemma.20notation)
  • Loading branch information
eric-wieser committed Oct 8, 2024
1 parent 7740499 commit 71f45a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mathlib/Tactic/Lemma.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import Lean.Parser.Command

open Lean

-- higher priority to override the one in Batteries
/-- `lemma` means the same as `theorem`. It is used to denote "less important" theorems -/
syntax (name := lemma) declModifiers
syntax (name := lemma) (priority := default + 1) declModifiers
group("lemma " declId ppIndent(declSig) declVal) : command

/-- Implementation of the `lemma` command, by macro expansion to `theorem`. -/
Expand Down

0 comments on commit 71f45a5

Please sign in to comment.