Zulip Chat Archive

Stream: mathlib4

Topic: Confusing Display of Subtype.val


Yongxi Lin (Aaron) (Nov 07 2025 at 05:57):

Screenshot 2025-11-07 at 12.49.38 AM.png
I wasted a lot of time trying to understand why this theorem holds until I realized that f ∘ Subtype.val has two entirely different meanings over here.
Screenshot 2025-11-07 at 12.52.54 AM.png
I am not familiar with the design of the webpages, but I suppose there should exists a better way to display this theorem so that it is less confusing.

Ruben Van de Velde (Nov 07 2025 at 07:42):

This is indeed confusing. It's one case of the more general known issue that the pretty printer which generates code from the parsed representation is lossy in some cases

Kenny Lau (Nov 07 2025 at 11:18):

maybe we can force the source type to be displayed whenever we detect Subtype.val with no arguments?


Last updated: Dec 20 2025 at 21:32 UTC