Open eric-wieser opened 4 years ago
I don't see any reasonable way to fix this. Lean has no idea we're doing funny business with terms, and docgen can't reflect on lean syntax. The best you can hope for in the near term is to document lemmas with this pattern so that the comments show what's really going on.
I agree with Mario. Note that #check module_ext
prints the same. The docs aren't generated from the input files (nor should they be), they're generated from the compiled library by printing each declaration. Changing this means implementing a new pretty printer and it's far from clear how that should behave.
Right - so this is presumably an issue in the pretty-printer and not the docs at all. Should this issue be moved to the lean repo?
I don't think it's an issue. The pretty printer is doing what it's supposed to. Both of those terms are r • m
(with different implicit arguments), what do you expect the pretty printer to do?
Perhaps show implicit arguments if they cannot be inferred unambiguously
I don't think there's anything we can realistically do to fix this in Lean 3. IIRC this will be fixed in Lean 4.
The statement of module_ext is
but the docs show it as
This is obviously unhelpful, as
r • m = r • m
is justrfl
, unlike the original theorem which is not.