Zulip Chat Archive
Stream: mathlib4
Topic: Renaming `Basis.smul`
Eric Wieser (Jul 20 2024 at 10:24):
In #14945, I define a smul action by a group on a basis characterized by (g • b) i = g • b i
, and want to write lemmas about it like Basis.smul_apply
.
Unfortunately, docs#Basis.smul_apply already exists, and is about docs#Basis.smul (b1 : Basis ι R S) (b2 : Basis ι' S A) : Basis (ι × ι') R A
) characterized by (b1.smul b2) i = b1 i • b2 i
.
I'd like to rename this definition to make room for my one.
Some name suggestions I have are:
Basis.smul'
,which matches docs#Pi.smul' in terms of the jointly-elementwise actionBasis.smulTower
, since this is a module over a tower of algebrasBasis.comp
/Basis.trans
, as suggested by @Yaël Dillies
Edward van de Meent (Jul 20 2024 at 11:10):
is the thing you're describing Pi.MulAction
?
Edward van de Meent (Jul 20 2024 at 11:11):
Edward van de Meent (Jul 20 2024 at 11:13):
ah wait, this doesn't give the action on the type you want, only on coersions of basis elements
Eric Wieser (Jul 20 2024 at 11:25):
docs#Pi.smul_apply is analogous to the lemma / instance I want to add, while docs#Pi.smul_apply' is analogous to the existing docs#Basis.smul_apply
Eric Wieser (Jul 20 2024 at 11:26):
/poll What name should the instance satisfying (b1 • b2) i = b1 i • b2 i
have
- Basis.smul (the status quo)
- Basis.smul'
- Basis.smulTower
- Basis.comp
- Basis.trans
Edward van de Meent (Jul 20 2024 at 11:32):
i think that calling this smul
is very bad at describing that this isn't some kind of elementwise manipulation (which i expected at first), but rather a composition.
Edward van de Meent (Jul 20 2024 at 11:32):
and i'd like to point out that Basis.smul
currently satisfies (b1 • b2) i = b1 i.1 • b2 i.2
, rather
Edward van de Meent (Jul 20 2024 at 11:43):
given the choice between comp
and trans
, i'd say trans
is preferable, as Basis
represents an equivalence, and the order of arguments/types also matches. (typically trans a b = comp b a
holds)
Eric Wieser (Jul 20 2024 at 11:44):
Edward van de Meent said:
and i'd like to point out that
Basis.smul
currently satisfies(b1 • b2) i = b1 i.1 • b2 i.2
, rather
I don't know how I managed to repeatedly misread this, thanks!
Edward van de Meent (Jul 20 2024 at 11:45):
i know, it's subtle! hence why simply smul
or smul'
isn't descriptive enough, imo
Eric Wieser (Jul 22 2024 at 13:24):
@Riccardo Brasca, since you reviewed the PR that spawned this, perhaps you could tie-break the naming vote?
Eric Wieser (Jul 22 2024 at 13:24):
(or perhaps @Johan Commelin, who might also have opinions here)
Riccardo Brasca (Jul 22 2024 at 13:26):
I have a little preference for smulTower
. Voted.
Johan Commelin (Jul 22 2024 at 14:10):
I don't have an opinion this time :smiley: But Basis.smulTower
sounds fine to me.
Eric Wieser (Jul 22 2024 at 21:19):
Last updated: May 02 2025 at 03:31 UTC