You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposition fields result in defs not theorems #2575
Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description
When declaring a structure, all the projections are generated as defs even though morally they should sometimes be thought of as theorems. Specifically, fields of type h : P where P : Prop would be more natural as theorems, as this matches the intended use of theorem elsewhere.
Context
This impacts the docBlame linter in Std, which declares that defs should have docstrings (because their type alone doesn't describe their function) but theorems need not.
For now, we are having to work around this for the special case of projections in std4#269.
Steps to Reproduce
structureAtLeastThirtySevenwhereval : Nat
le : 37 ≤ val
theoremAtLeastThirtySeven.lt (x : AtLeastThirtySeven) : 36 < x.val := x.le
Expected behavior:AtLeastThirtySeven.le and AtLeastThirtySeven.lt should both be theorems (or at least, there should be some way to request that they both be).
Activity
fix: proposition fields must be theorems
fix: proposition fields must be theorems (#4006)
chore: fix `defLemma`, update linters to leanprover/lean4#2575 being …