Prerequisites
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
structure AtLeastThirtySeven where
val : Nat
le : 37 ≤ val
theorem AtLeastThirtySeven.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).
Actual behavior: AtLeastThirtySeven.le is a def
Versions
leanprover/lean4:v4.1.0-rc1
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Prerequisites
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 typeh : PwhereP : Propwould be more natural astheorems, as this matches the intended use oftheoremelsewhere.Context
This impacts the
docBlamelinter in Std, which declares thatdefs should have docstrings (because their type alone doesn't describe their function) buttheorems need not.For now, we are having to work around this for the special case of projections in std4#269.
Steps to Reproduce
Expected behavior:
AtLeastThirtySeven.leandAtLeastThirtySeven.ltshould both betheorems (or at least, there should be some way to request that they both be).Actual behavior:
AtLeastThirtySeven.leis adefVersions
leanprover/lean4:v4.1.0-rc1
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.