Zulip Chat Archive

Stream: mathlib4

Topic: List.perm_comm at Data.List.Perm


Jihoon Hyun (Mar 24 2023 at 14:24):

Other theorems except perm_comm have naming such as Perm.symm, Perm.swap', etc.. Is this a typo?

Alex J. Best (Mar 24 2023 at 14:30):

In mathlib we make use of dot notation (where a.b resolves to (type of a).b a) so List.Perm.symm can be used as p.symm. This doesn't work for List.perm_comm as it doesn't have an explicit argument with type Perm, so the name uses an underscore instead to match the usual naming convention.
So you can find many examples of _comm and .symm for different types in mathlib.
As for the capitalization I think this is still a bit in flux so wouldn't want to say that is completely correct


Last updated: Dec 20 2023 at 11:08 UTC