Zulip Chat Archive
Stream: mathlib4
Topic: doc blame linter and prop
Patrick Massot (Dec 17 2022 at 18:19):
The doc blame linter asks for documentation of prop-valued fields of structure, for instance in
class CompleteSemilatticeSup (α : Type _) extends PartialOrder α, SupSet α where
le_supₛ : ∀ s, ∀ a ∈ s, a ≤ supₛ s
supₛ_le : ∀ s a, (∀ b ∈ s, b ≤ a) → supₛ s ≤ a
Is this expected behavior? Do we really want this? I don't see how I could write a docstring that is easier to read than the actual definition.
Mario Carneiro (Dec 17 2022 at 18:39):
I don't see how I could write a docstring that is easier to read than the actual definition.
If you think this then you have been formalizing too much. Not everyone reads symbols as easily as this, especially if they use weird lean-specific notations like sup_s
Patrick Massot (Dec 17 2022 at 18:46):
I did end up writing docstrings in https://github.com/leanprover-community/mathlib4/pull/1053/commits/c13f6c732af9de743f301f5653748f04ae3e9fad. But the main question is about the inconsistency of requiring no docstring for theorems but requiring them for prop-valued fields.
Mario Carneiro (Dec 17 2022 at 18:50):
the prop-valued fields are still def
s though, presumably they also trip the def-lemma linter unless it has a special exemption
Last updated: Dec 20 2023 at 11:08 UTC