Zulip Chat Archive
Stream: mathlib4
Topic: NNRat module structures
Scott Carnahan (Jun 20 2024 at 21:28):
It looks like in the 11 weeks between #9951 and #11203 we had instModuleNNRatOfRat in Mathlib.Algebra.Module.Basic, so for example we could synthesize Module ℚ≥0 ℝ
. Is there an obstruction to restoring it?
Yaël Dillies (Jun 20 2024 at 21:41):
Does
import Mathlib
#synth Module ℚ≥0 ℝ
not work?
Eric Wieser (Jun 20 2024 at 22:01):
It does not
Eric Wieser (Jun 20 2024 at 22:02):
Nor does
import Mathlib
variable {F} [Field F] [CharZero F]
#synth Module ℚ≥0 F
Eric Wieser (Jun 20 2024 at 22:03):
docs#NNRat.instDistribSMul exists
Eric Wieser (Jun 20 2024 at 22:03):
I think this was probably dropped by accident
Eric Wieser (Jun 20 2024 at 22:05):
The previous
/-- A `Module` over `ℚ` restricts to a `Module` over `ℚ≥0`. -/
instance [AddCommMonoid α] [Module ℚ α] : Module NNRat α :=
Module.compHom α NNRat.coeHom
was deleted deliberately, but it seems we forgot to replace it with a new one
Yaël Dillies (Jun 21 2024 at 03:17):
Ah okay, it must be part of the stuff that I have in APAP but didn't PR yet
Herman Chau (Jun 21 2024 at 04:33):
Is the intent to replace it with https://github.com/YaelDillies/LeanAPAP/blob/master/LeanAPAP/Mathlib/Algebra/Algebra/Basic.lean#L11-L14?
This came up when I was testing Scott's suggestion for https://github.com/leanprover-community/mathlib4/pull/13585.
Yaël Dillies (Jun 21 2024 at 05:45):
Yes exactly
Yaël Dillies (Jun 21 2024 at 05:47):
I can PR it Soon:tm: if you need it
Herman Chau (Jun 21 2024 at 06:10):
That would be great! I don't need it urgently but would like to merge the PR :smile:
Yaël Dillies (Jul 30 2024 at 15:31):
@Herman Chau, the PR is #15047
Last updated: May 02 2025 at 03:31 UTC