Commit 51ef4a9
fix(Analysis/InnerProductSpace): define instInnerProductSpaceRealComplex as RCLike.toInnerProductSpaceReal
Previously `instInnerProductSpaceRealComplex` was defined as
`InnerProductSpace.complexToReal`, which internally uses
`NormedSpace.restrictScalars ℝ ℂ ℂ`. The `Module ℝ ℂ` from that path
disagrees with `Algebra.toModule ℝ ℂ` at `.instances` transparency,
causing `rw [one_smul]` to fail with
`set_option backward.isDefEq.respectTransparency true`.
The fix moves the instance to after `RCLike.toInnerProductSpaceReal`
and defines it as `RCLike.toInnerProductSpaceReal` directly. The
`NormedSpace ℝ ℂ` in `RCLike.toInnerProductSpaceReal` is synthesized
in a context with only `[RCLike 𝕜]`, so synthesis finds
`NormedAlgebra.toNormedSpace` (non-leaky) rather than
`NormedSpace.complexToReal = RestrictScalars.normedSpace` (leaky).
The two instances were already proven equal by `rfl` in the existing
file (since `InnerProductSpace.complexToReal = InnerProductSpace.rclikeToReal ℂ ℂ`
and `RCLike.toInnerProductSpaceReal` use the same underlying `Inner.rclikeToReal`);
this PR just makes the canonical non-leaky one the definition.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent cd57315 commit 51ef4a9
File tree
2 files changed
+41
-7
lines changed- MathlibTest
- Mathlib/Analysis/InnerProductSpace
2 files changed
+41
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | 960 | | |
967 | 961 | | |
968 | 962 | | |
| |||
976 | 970 | | |
977 | 971 | | |
978 | 972 | | |
979 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
980 | 979 | | |
981 | 980 | | |
982 | 981 | | |
983 | 982 | | |
984 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
985 | 989 | | |
986 | 990 | | |
987 | 991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments