You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: fix diamonds around R and C structures (#38451)
The following examples fail on master, work with the PR:
```lean
example : (Semiring.toNatAlgebra : Algebra ℕ ℂ) = Complex.instAlgebraOfReal := by
with_reducible_and_instances rfl
example : (Ring.toIntAlgebra ℂ : Algebra ℤ ℂ) = Complex.instAlgebraOfReal := by
with_reducible_and_instances rfl
example : Module.restrictScalars ℝ ℂ ℂ = Complex.instModule := by
with_reducible_and_instances rfl
example : (instInnerProductSpaceRealComplex.toSMul : SMul ℝ ℂ) = Complex.instRCLike.toSMul := by
with_reducible_and_instances rfl
example {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] : SMulCommClass ℂ ℝ F :=
inferInstance
```
The PR makes a few algebra maps implicit-reducible. This is necessary to get rid of the diamonds as these maps show up in the instances. This has no noticeable performance impact: implicit-reducible only matters for instances, and there it tends to help unification.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
0 commit comments