Skip to content

Commit 83a4552

Browse files
committed
chore(MathlibTest): fix defLemma warnings (leanprover-community#40593)
In all these cases, a dummy definition was declared of type True: the `defProp` linter complains that a declaration of type `True` should be a `lemma`. Instead, change to a definition with value (the natural 0).
1 parent be529d5 commit 83a4552

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

MathlibTest/Linter/DocPrime.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Declarations whose name ends with a `'` are expected to contain an explanation f
7979
Note: This linter can be disabled with `set_option linter.docPrime false`
8080
-/
8181
#guard_msgs in
82-
abbrev abbrev_no_doc' : True := .intro
82+
abbrev abbrev_no_doc' : Nat := 0
8383

8484
/--
8585
warning: `def_no_doc'` is missing a doc-string, please add one.
@@ -88,8 +88,7 @@ Declarations whose name ends with a `'` are expected to contain an explanation f
8888
Note: This linter can be disabled with `set_option linter.docPrime false`
8989
-/
9090
#guard_msgs in
91-
set_option linter.defProp false in
92-
def def_no_doc' : True := .intro
91+
def def_no_doc' := 0
9392

9493
-- Anonymous declarations in a primed namespace should not get flagged by the linter.
9594
namespace Foo'

MathlibTest/Tactic/Says/Basic.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,11 @@ example : True := by
9797
-- Check that verification works even with multi-line suggestions, as produced by aesop
9898
def P : Prop := True
9999
def Q : Prop := True
100-
set_option linter.defProp false in
101100
@[simp]
102-
def very_long_lemma_name_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : Q → P := fun _ => trivial
103-
set_option linter.defProp false in
101+
theorem very_long_lemma_name_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : Q → P := fun _ => trivial
102+
104103
@[simp]
105-
def very_long_lemma_name_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb : Q := trivial
104+
theorem very_long_lemma_name_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb : Q := trivial
106105
/--
107106
info: Try this:
108107
[apply] aesop? says

0 commit comments

Comments
 (0)