Zulip Chat Archive
Stream: mathlib4
Topic: two_smul'
Michael Stoll (Jul 21 2024 at 17:53):
What is the reason why docs#two_smul' is deprecated? I'm trying to generalize some things around quadratic maps (see this thread), and in this context, this is a very handy lemma (and is frequently suggested by exact?
).
If there is a good reason to deprecate it, what would be a functional equivalent?
Ruben Van de Velde (Jul 21 2024 at 17:56):
Huh, no idea
Ruben Van de Velde (Jul 21 2024 at 17:58):
Apparently it used to be about bit0
Eric Wieser (Jul 21 2024 at 18:01):
It should be a special case of a lemma about ofNat_smul
Michael Stoll (Jul 21 2024 at 18:04):
@loogle "ofNat_smul"
loogle (Jul 21 2024 at 18:04):
:search: Matrix.conjTranspose_ofNat_smul, Matrix.conjTranspose_inv_ofNat_smul
Michael Stoll (Jul 21 2024 at 18:04):
These two do not look relevant...
Michael Stoll (Jul 21 2024 at 18:07):
@loogle ⊢ (?n : ?R) • ?x = (?n : ℕ) • ?x
loogle (Jul 21 2024 at 18:07):
Failure! Bot is unavailable
Michael Stoll (Jul 21 2024 at 18:08):
The web interface worked and gave 12 hits (docs#two_smul' among them), but nothing that would generalize two_smul'
to arbitrary Nat literals.
Edward van de Meent (Jul 21 2024 at 18:27):
is natCast_zsmul relevant?
Edward van de Meent (Jul 21 2024 at 18:28):
maybe ofNat_zsmul ?
Michael Stoll (Jul 21 2024 at 18:29):
These are for conversion between scalar multiplication by naturals and integers; not between naturals and ring elements.
Edward van de Meent (Jul 21 2024 at 18:30):
ah right
Edward van de Meent (Jul 21 2024 at 18:30):
oops
Yaël Dillies (Jul 21 2024 at 18:30):
I'm adding the missing lemma in a pR
Yaël Dillies (Jul 21 2024 at 18:44):
Update: I can't find the PR but I do vividly remember writing the lemma. I will open a separate PR
Eric Wieser (Jul 21 2024 at 19:36):
I also remember writing the lemma
Eric Wieser (Jul 21 2024 at 19:36):
Maybe it's the nnrat floor PR?
Yaël Dillies (Jul 21 2024 at 19:40):
Pretty sure it was a PR of mine :thinking:
Yury G. Kudryashov (Jul 21 2024 at 21:45):
That's why I'm trying to cherry-pick small lemmas to separate PRs. Even if the main PR is stuck in review, the helper lemmas get merged (and it's easier to merge master
later).
Yaël Dillies (Jul 22 2024 at 12:43):
Eric Wieser (Jul 22 2024 at 13:08):
That doesn't have the lemma we want about ofNat?
Eric Wieser (Jul 22 2024 at 13:09):
In fact, isn't that lemma just docs#nsmul_eq_smul_cast ?
Yaël Dillies (Jul 22 2024 at 15:04):
Damn, it's really hard to find lemmas when they are stated the wrong way :frown:
Eric Wieser (Jul 22 2024 at 15:06):
Loogle found it for me
Michael Stoll (Jul 22 2024 at 15:21):
I guess we also want an OfNat.ofNat
version, if it is supposed to specialize to docs#two_smul' ?
Ruben Van de Velde (Jul 22 2024 at 16:54):
Yes
Yaël Dillies (Jul 22 2024 at 20:08):
I will update #14997
Yaël Dillies (Jul 24 2024 at 05:36):
Update: Updated
Last updated: May 02 2025 at 03:31 UTC