In plain words
Defines the complexification of an inner product space E over K∈{R,C} (RCLike) as E×E with the L2 norm, writing (x,y) for x+iy. Complex scalars act by (a+bi)(x,y)=(ax−by, bx+ay), and the complex inner product is ⟨(x,y),(z,w)⟩=Re(⟨x,z⟩+⟨y,w⟩)+iRe(⟨x,w⟩−⟨y,z⟩). So it is the complexification of the underlying real space, which makes it a complex Hilbert space. The PR then complexifies continuous linear maps, T↦TC=T×T, and shows that TC has the same norm, adjoint, kernel and range, the same real spectrum, and keeps positivity, normality and so on. It also characterises complexified submodules and operators as those invariant under conjugation (two exercises in Roman's Advanced Linear Algebra). A second file identifies the complexification with C⊗RE and deduces results on rank, bases, tensor products and matrices.
Transcriptions are drafted with an LLM from the diff and are a reading aid, not a verified statement: the Lean code is the reference.
Conversation on GitHub 12
Import changes for modified files
No significant changes to the import graph
<details><summary>Import changes for all files</summary>
|Files|Import difference|
|-|-|
| Mathlib.Analysis.InnerProductSpace.Complexification.Basic (new file)|2513|
| Mathlib.Analysis.InnerProductSpace.Complexification.TensorProduct (new file)|2574|
</details>
<details><summary>
Declarations diff (regex)
</summary>
+ Complexification
+ Complexification.finrank_eq
+ Complexification.rank_eq
+ Complexification.symm_toTensor_tmul
+ Complexification.toTensor
+ Complexification.toTensor_apply
+ ContinuousLinearMap.arrowCongr_toTensor_toComplexification
+ ContinuousLinearMap.toMatrix_complexification_toComplexification
+ I_smul
+ I_smul_mk
+ Module.Basis.complexification
+ Module.Basis.complexification_apply
+ Module.Basis.complexification_repr_apply
+ TensorProduct.complexificationLinearEquiv
+ TensorProduct.complexificationLinearEquiv_mk_tmul
+ TensorProduct.symm_complexificationLinearEquiv_mk_tmul_mk
+ _root_.Submodule.complexification
+ _root_.Submodule.exists_complexification_eq_iff
+ _root_.Submodule.mem_complexification
+ adjoint_toComplexification
+ bijective_toComplexification_iff
+ conj
+ conj_I_smul
+ conj_conj
+ conj_eq_self_iff
+ conj_mk
+ conjugate
+ conjugate_adjoint
+ conjugate_comp
+ conjugate_conjugate
+ conjugate_id
+ conjugate_mul
+ conjugate_one
+ conjugate_star
+ conjugate_toComplexification
+ continuous_im
+ continuous_mk
+ continuous_mk_zero_left
+ continuous_mk_zero_right
+ continuous_re
+ continuous_toComplexification
+ exists_toComplexification_eq_iff
+ ext
+ im
+ imL
+ im_add
+ im_inner
+ im_mk
+ im_neg
+ im_real_smul
+ im_smul
+ im_sub
+ im_zero
+ inclusion
+ injective_toComplexification_iff
+ inner_conj_conj
+ inner_conj_left
+ inner_conj_right
+ inner_def
+ instInner
+ instInnerProductSpace
+ instSMul
+ instance : Module ℂ (Complexification 𝕜 E)
+ instance : NormedSpace ℂ (Complexification 𝕜 E) where norm_smul_le z v := (norm_smul_eq z v).le
+ instance [NormedAddCommGroup E] : NormedAddCommGroup (Complexification 𝕜 E)
+ instance [NormedAddCommGroup E] [CompleteSpace E] : CompleteSpace (Complexification 𝕜 E)
+ isIdempotentElem_toComplexification_iff
+ isPositive_toComplexification_iff
+ isSelfAdjoint_toComplexification_iff
+ isStarNormal_toComplexification_iff
+ isStarProjection_toComplexification_iff
+ isUnit_toComplexification_iff
+ isometry_mk_zero_left
+ isometry_mk_zero_right
+ isometry_toComplexification
+ isometry_toComplexification_iff
+ ker_toComplexification
+ lipschitzWith_im
+ lipschitzWith_re
+ mk
+ mk_add_mk
+ mk_eq_add_I_smul
+ mk_re_im
+ mk_sub_mk
+ mk_zero_zero
+ neg_mk
+ norm_eq
+ norm_im_le
+ norm_mk_zero_left
+ norm_mk_zero_right
+ norm_re_le
+ norm_smul_eq
+ norm_sq_eq
+ ofComplexification
+ ofComplexification_id
+ ofComplexification_one
+ ofComplexification_toComplexification
+ ofComplexification_zero
+ opENorm_toComplexification
+ opNNNorm_toComplexification
+ opNorm_toComplexification
+ quasispectrum_toComplexification
+ quasispectrum_toComplexification_real
+ range_toComplexification
+ re
+ reL
+ re_add
+ re_inner
+ re_mk
+ re_neg
+ re_real_smul
+ re_smul
+ re_sub
+ re_zero
+ realLinearIsometryEquivComplex
+ realLinearIsometryEquivComplex_apply
+ realLinearIsometryEquivComplex_symm_apply
+ restrictScalars_ofComplexification
+ smul_def
+ spectrum_toComplexification
+ spectrum_toComplexification_real
+ star_toComplexification
+ surjective_toComplexification_iff
+ symm_conj
+ symm_conjugate
+ toComplexification
+ toComplexification_comp
+ toComplexification_id
+ toComplexification_inj
+ toComplexification_injective
+ toComplexification_le_toComplexification_iff
+ toComplexification_mul
+ toComplexification_nonneg_iff
+ toComplexification_ofComplexification
+ toComplexification_one
<details>
<summary>You can run this locally as follows</summary>
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>
</details>
The doc-module for scripts/pr_summary/declarations_diff.sh in the undefined repository contains some details about this script.
</details>
<details><summary>
Declarations diff (Lean -- stale; merge master and push to refresh)
</summary>
✅ Lean-aware diff — post-build, computed from the Lean environment (commit bf215d3).
- +154 new declarations
- −0 removed declarations
+Complexification
+Complexification.I_smul
+Complexification.I_smul_mk
+Complexification.conj
+Complexification.conj_I_smul
+Complexification.conj_apply
+Complexification.conj_conj
+Complexification.conj_eq_self_iff
+Complexification.conj_mk
+Complexification.continuous_im
+Complexification.continuous_mk
+Complexification.continuous_mk_zero_left
+Complexification.continuous_mk_zero_right
+Complexification.continuous_re
+Complexification.ext
+Complexification.ext_iff
+Complexification.finrank_eq
+Complexification.im
+Complexification.imL
+Complexification.imL_apply
+Complexification.im_add
+Complexification.im_inner
+Complexification.im_mk
+Complexification.im_neg
+Complexification.im_real_smul
+Complexification.im_smul
+Complexification.im_sub
+Complexification.im_zero
+Complexification.inclusion
+Complexification.inclusion.congr_simp
+Complexification.inclusion_apply
+Complexification.inner_conj_conj
+Complexification.inner_conj_left
+Complexification.inner_conj_right
+Complexification.inner_def
+Complexification.instInner
+Complexification.instInnerProductSpace
+Complexification.instModuleComplex
+Complexification.instNormedSpaceComplex
+Complexification.instSMul
+Complexification.isometry_mk_zero_left
+Complexification.isometry_mk_zero_right
+Complexification.lipschitzWith_im
+Complexification.lipschitzWith_re
+Complexification.mk
+Complexification.mk_add_mk
+Complexification.mk_eq_add_I_smul
+Complexification.mk_re_im
+Complexification.mk_sub_mk
+Complexification.mk_zero_zero
+Complexification.neg_mk
+Complexification.norm_eq
+Complexification.norm_im_le
+Complexification.norm_mk_zero_left
+Complexification.norm_mk_zero_right
+Complexification.norm_re_le
+Complexification.norm_smul_eq
+Complexification.norm_sq_eq
+Complexification.rank_eq
+Complexification.re
+Complexification.reL
+Complexification.reL.congr_simp
+Complexification.reL_apply
+Complexification.re_add
+Complexification.re_inner
+Complexification.re_mk
+Complexification.re_neg
+Complexification.re_real_smul
+Complexification.re_smul
+Complexification.re_sub
+Complexification.re_zero
+Complexification.realLinearIsometryEquivComplex
+Complexification.realLinearIsometryEquivComplex_apply
+Complexification.realLinearIsometryEquivComplex_symm_apply
+Complexification.smul_def
+Complexification.symm_conj
+Complexification.symm_toTensor_tmul
+Complexification.toTensor
+Complexification.toTensor.congr_simp
+Complexification.toTensor_apply
+ContinuousLinearEquiv.arrowCongrEquivₛₗ.congr_simp
+ContinuousLinearMap.adjoint_toComplexification
+ContinuousLinearMap.arrowCongr_toTensor_toComplexification
+ContinuousLinearMap.bijective_toComplexification_iff
+ContinuousLinearMap.conjugate
+ContinuousLinearMap.conjugate_adjoint
+ContinuousLinearMap.conjugate_apply_apply
+ContinuousLinearMap.conjugate_comp
+ContinuousLinearMap.conjugate_conjugate
+ContinuousLinearMap.conjugate_id
+ContinuousLinearMap.conjugate_mul
+ContinuousLinearMap.conjugate_one
+ContinuousLinearMap.conjugate_star
+ContinuousLinearMap.conjugate_toComplexification
+ContinuousLinearMap.continuous_toComplexification
+ContinuousLinearMap.exists_toComplexification_eq_iff
+ContinuousLinearMap.injective_toComplexification_iff
+ContinuousLinearMap.isIdempotentElem_toComplexification_iff
+ContinuousLinearMap.isPositive_toComplexification_iff
+ContinuousLinearMap.isSelfAdjoint_toComplexification_iff
+ContinuousLinearMap.isStarNormal_toComplexification_iff
+ContinuousLinearMap.isStarProjection_toComplexification_iff
+ContinuousLinearMap.isUnit_toComplexification_iff
+ContinuousLinearMap.isometry_toComplexification
+ContinuousLinearMap.isometry_toComplexification_iff
+ContinuousLinearMap.ker_toComplexification
+ContinuousLinearMap.ofComplexification
+ContinuousLinearMap.ofComplexification.congr_simp
+ContinuousLinearMap.ofComplexification_apply
+ContinuousLinearMap.ofComplexification_id
+ContinuousLinearMap.ofComplexification_one
+ContinuousLinearMap.ofComplexification_toComplexification
+ContinuousLinearMap.ofComplexification_zero
+ContinuousLinearMap.opENorm_toComplexification
+ContinuousLinearMap.opNNNorm_toComplexification
+ContinuousLinearMap.opNorm_toComplexification
+ContinuousLinearMap.quasispectrum_toComplexification
+ContinuousLinearMap.quasispectrum_toComplexification_real
+ContinuousLinearMap.range_toComplexification
+ContinuousLinearMap.restrictScalars_ofComplexification
+ContinuousLinearMap.spectrum_toComplexification
+ContinuousLinearMap.spectrum_toComplexification_real
+ContinuousLinearMap.star_toComplexification
+ContinuousLinearMap.surjective_toComplexification_iff
+ContinuousLinearMap.symm_conjugate
+ContinuousLinearMap.toComplexification
+ContinuousLinearMap.toComplexification_apply_apply
+ContinuousLinearMap.toComplexification_comp
+ContinuousLinearMap.toComplexification_id
+ContinuousLinearMap.toComplexification_inj
+ContinuousLinearMap.toComplexification_injective
+ContinuousLinearMap.toComplexification_le_toComplexification_iff
+ContinuousLinearMap.toComplexification_mul
+ContinuousLinearMap.toComplexification_nonneg_iff
+ContinuousLinearMap.toComplexification_ofComplexification
+ContinuousLinearMap.toComplexification_one
+ContinuousLinearMap.toMatrix_complexification_toComplexification
+IsIdempotentElem.toComplexification
+IsSelfAdjoint.toComplexification
+IsStarNormal.toComplexification
+Module.Basis.complexification
+Module.Basis.complexification.congr_simp
+Module.Basis.complexification_apply
+Module.Basis.complexification_repr_apply
+Submodule.complexification
+Submodule.exists_complexification_eq_iff
+Submodule.mem_complexification
+TensorProduct.complexificationLinearEquiv
+TensorProduct.complexificationLinearEquiv_apply
+TensorProduct.complexificationLinearEquiv_mk_tmul
+TensorProduct.complexificationLinearEquiv_symm_apply
+TensorProduct.symm_complexificationLinearEquiv_mk_tmul_mk
+instCompleteSpaceComplexification
+instNormedAddCommGroupComplexification
</details>
No changes to strong technical debt.
No changes to weak technical debt.
Current commit 3e61ee50ca
Reference commit 1e5fa86cf6
This script lives in the undefined repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
@ADedecker, so this is a huge PR, but would you like to take a look? 🙏
Take your time of course.
Most of the code is just really basic API, which is why it's long.
I can split out the TensorProduct file into another PR, but thought it could be nice to have the equivalence Complexification 𝕜 E ≃ₗ[ℂ] ℂ ⊗[ℝ] E in this PR, since that's another way of defining this.
mcdoll · on Mathlib/Analysis/InnerProductSpace/Complexification/Basic.lean:68 (outdated) ·
2026-08-17 What is the reason to expose these?
mcdoll · on Mathlib/Analysis/InnerProductSpace/Complexification/Basic.lean:135 (outdated) ·
2026-08-17 suffices Continuous fun (p : E × E) ↦ mk 𝕜 p.1 0 + mk 𝕜 0 p.2 by simpa
fun_prop
themathqueen · on Mathlib/Analysis/InnerProductSpace/Complexification/Basic.lean:68 (outdated) ·
2026-08-17 they definitely should not be!
j-loreaux · on Mathlib/Analysis/InnerProductSpace/Complexification/Basic.lean:412 (outdated) ·
2026-08-25 simp only [LinearMap.mem_range, coe_coe, toComplexification_apply_apply,
Complexification.ext_iff, re_mk, im_mk, Submodule.mem_complexification]
exact ⟨by grind, fun ⟨⟨y, hy⟩, ⟨z, hz⟩⟩ ↦ ⟨.mk 𝕜 y z, by simp [hy, hz]⟩⟩
j-loreaux · on Mathlib/Analysis/InnerProductSpace/Complexification/TensorProduct.lean:11 (outdated) ·
2026-08-25 /-! # Tensor product description of complexifications
j-loreaux · on Mathlib/Analysis/InnerProductSpace/Complexification/TensorProduct.lean:71 (outdated) ·
2026-08-25 /-- The complexification of a basis, given by `b.complexification i = (b i, 0)`. -/
j-loreaux · on Mathlib/Analysis/InnerProductSpace/Complexification/TensorProduct.lean:80 (outdated) ·
2026-08-25 (b.baseChange ℂ).repr (Complex.I ⊗ₜ[ℝ] v.im) := by simp [Module.Basis.complexification]
Okay, there is a lot of boilerplate here, you are correct about that, but I think there are several things I would like to see and room for major improvement.
- Before anything, we should decide whether to use
ℂ ⊗[ℝ] E or E × E as the type backing this. I am tempted to agree that E × E is the correct choice, because we will so often want to access the real and imaginary parts, but it should come with a detailed ## Implementation Notes section in the module documentation justifying the choice. - As indicated in a comment below, use
E × E instead of WithLp 2 (E × E) so we can reuse Complexification for C⋆-algebras (and maybe other things?) - Please, please, let's add some scoped notation for this if we can come up with a good one.
- Let's drop the
𝕜 parameter - Due to (1) split out all the norm material from the module material.
- I would like to see this split into at least three, but maybe closer to 5 PRs as follows:
- module structure (and even star algebra structures) and basic API
- norm properties of
WithLp 2 (Complexification E) - properties specific to complexification of spaces involving continuous linear maps
- connection to tensor products
I'll certainly have more to say later, but I think I've given you enough to chew on.
Argh, I forgot that I was pinged here, and I had important comments to make, sorry.
We discussed this a bit with Jireh and Filippo at ICERM, and I think I disagree with a key design choice: when E is a complex vector space, I think Complexification ℂ E should be (complex-isomorphic to) E; if you really want to complexify the underlying real vector space then you should simply use Complexification ℝ E. This works out of the box if you use the "tensoring with ℂ over 𝕜 definition" (at least mathematically).
Now, one issue with our approach is that we don't know that ℂ is a 𝕜-algebra for RCLike 𝕜, and that we can't write such an instance without creating bad diamonds; I think we ended up agreeing that we should have a type alias RCLike.complexField for ℂ viewed as a 𝕜-algebra, but I'm still not 100% sure what things would look like afterwards (e.g if we go this route it seems like we need a CLike structure, and generalize the whole theory of complex C*-algebras to C*-algebras over a CLike field?)
mathlib-dependent-issues[bot] · comment ·
2026-10-25 This PR/issue depends on:
- leanprover-community/mathlib4#45280
By Dependent Issues (🤖). Happy coding!