Zulip Chat Archive
Stream: mathlib4
Topic: LinearMap.restrictScalars prints weirdly
Yaël Dillies (Dec 02 2024 at 15:29):
Why is docs#LinearMap.restrictScalars tagged as coe
? This leads to the following mumble-jumble when pretty-printing:
import Mathlib.Algebra.Module.LinearMap.Defs
import Mathlib.Data.Real.Basic
-- ↑ℝ : (?m.6 →ₗ[?m.5] ?m.7) → ?m.6 →ₗ[ℝ] ?m.7
#check LinearMap.restrictScalars ℝ
Anne Baanen (Dec 02 2024 at 15:32):
Since the coercion docs#LinearMap.coeIsScalarTower is defined as restrictScalars
, our default rule would be to tag restrictScalars
as @[coe]
. But I am not sure whether that coercion is even a good idea, since docs#CoeHTCT is an implementation detail that we shouldn't have instances for...
Eric Wieser (Dec 02 2024 at 17:03):
Personally I think this instance is a bad idea and we should just write restrictScalars
out in full
Eric Wieser (Dec 02 2024 at 17:04):
If that's really too long, we could introduced a scoped notation
Junyan Xu (Dec 02 2024 at 17:06):
I'm observing some simp
timeout if I don't get rid of a certain restrictScalars
. Could it be related?
Last updated: May 02 2025 at 03:31 UTC