Skip to content

feat(PhyslibAlpha): spectral theory for normal operators - #2280

Draft
TomOleDiem wants to merge 11 commits into
leanprover-community:masterfrom
TomOleDiem:alpha/spectral-theory
Draft

TomOleDiem wants to merge 11 commits into
leanprover-community:masterfrom
TomOleDiem:alpha/spectral-theory

Conversation

@TomOleDiem

Copy link
Copy Markdown
Contributor

No description provided.

TomOleDiem and others added 10 commits December 4, 2026 12:21
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
…erators

Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
…vector measures

Co-authored-by: OpenAI Codex <codex@openai.com>
…lib CFC

Co-authored-by: OpenAI Codex <codex@openai.com>
…coordinates

Co-authored-by: OpenAI Codex <codex@openai.com>
…ization

Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
…ation

Co-authored-by: OpenAI Codex <codex@openai.com>
@github-actions github-actions Bot added large PhyslibAlpha Pull requests which are for modifications to PhyslibAlpha. labels Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

While you wait for a review, note that you can review PRs too; reviewing is not restricted to maintainers. Our review guidelines explain what to look for.

Over time, contributions such as reviews, maintenance and documentation are recorded on contributions.physlib.io.

Three main points:

  • Comment -awaiting-author on its own line to remove that label from your PR.
  • Comment blocked-by-PR or -blocked-by-PR on its own line to add or remove that label, respectively.
  • The first review might take several days to arrive. If in doubt message on the Zulip.

For the author: Please read

Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

Tip: The easiest way to get a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your changes.

If you have any problems or questions, please reach out to the community on the Zulip.

For reviewers: Summary of your PR

Found differences:
@@ PhyslibAlpha.SpectralTheory.ContinuousSpectralCalculus @@
+ module added PhyslibAlpha.SpectralTheory.ContinuousSpectralCalculus (+217 -0)
  namespaces StarAlgHom
+ added lemma cauchySeq_apply_continuous_of_dominated
+ added lemma inner_apply_continuous
+ added lemma integral_mul_sq_spectralMeasure
+ added lemma mem_range_apply_of_integrable_inv_sq
+ added lemma norm_sq_apply_continuous
+ added lemma spectralMeasure_continuous_apply
+ added lemma tendsto_apply_continuous_of_dominated
@@ PhyslibAlpha.SpectralTheory.JointSpectralMeasure @@
+ module added PhyslibAlpha.SpectralTheory.JointSpectralMeasure (+182 -0)
  namespaces LinearPMap, MeasureTheory.ResolutionOfIdentity
+ added def StronglyCommute
+ added def boundedJointSpectralMeasure
+ added def jointSpectralMeasure
+ added lemma boundedJointSpectralMeasure_map_eval
+ added lemma eq_spectralIntegral_jointSpectralMeasure
+ added lemma ext_of_map_eval
+ added lemma jointSpectralMeasure_diagonalizes
+ added lemma jointSpectralMeasure_map_eval
+ added lemma jointSpectralMeasure_resolution_map_eval
+ added lemma jointSpectralMeasure_unique
@@ PhyslibAlpha.SpectralTheory.Port.Algebra.Star.StarProjection @@
+ module added PhyslibAlpha.SpectralTheory.Port.Algebra.Star.StarProjection (+76 -0)
  namespaces IsIdempotentElem, IsStarProjection
+ added lemma add_iff_mul_eq_zero
+ added lemma add_iff_mul_eq_zero
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order (+66 -0)
+ added lemma IsSelfAdjoint.mem_Icc_algebraMap_iff_norm_le
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.Adjoint @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.Adjoint (+46 -0)
  namespaces ContinuousLinearMap
+ added lemma star_inner_right
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BorelOperator @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BorelOperator (+578 -0)
  namespaces StarAlgHom
+ added def HasBorelOperator
+ added def borelExtension
+ added lemma HasBorelOperator.add
+ added lemma HasBorelOperator.smul
+ added lemma Set.abs_indicator_one_le
+ added lemma _root_.ContinuousLinearMap.re_inner_smul_one_apply_self
+ added lemma borelExtension_add
+ added lemma borelExtension_coe
+ added lemma borelExtension_eq_of_forall_inner_eq
+ added lemma borelExtension_indicator_empty
+ added lemma borelExtension_indicator_inter
+ added lemma borelExtension_indicator_mul_of_disjoint
+ added lemma borelExtension_indicator_union_of_disjoint
+ added lemma borelExtension_indicator_univ
+ added lemma borelExtension_mul
+ added lemma borelExtension_neg
+ added lemma borelExtension_one
+ added lemma borelExtension_smul
+ added lemma borelExtension_sub
+ added lemma borelExtension_zero
+ added lemma eq_of_forall_inner_eq_integral
+ added lemma exists_abs_le_of_continuous
+ added lemma hasBorelOperator_of_continuous
+ added lemma hasBorelOperator_of_measurable
+ added lemma hasBorelOperator_of_tendsto
+ added lemma inner_apply_apply_self
+ added lemma inner_borelExtension_apply_self
+ added lemma inner_borelExtension_mul_apply_apply_self
+ added lemma inner_borelExtension_mul_borelExtension_apply_self
+ added lemma integrable_spectralMeasure_of_bound
+ added lemma isSelfAdjoint_borelExtension
+ added lemma isStarProjection_borelExtension_indicator
+ added lemma norm_borelExtension_le
+ added lemma norm_le_of_inner_eq_integral
+ added lemma norm_sq_borelExtension_apply
+ added lemma real_spectralMeasure_eq_norm_sq
+ added lemma real_spectralMeasure_univ
+ added lemma spectralMeasure_zero
+ added lemma tendsto_inner_borelExtension
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BoundedTransform @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BoundedTransform (+496 -0)
  namespaces LinearPMap
+ added def auxW
+ added def boundedTransform
+ added def firstBoundedTransform
+ added def vonNeumannResolventSqrt
+ added lemma IsNormal.isStarNormal_boundedTransform
+ added lemma auxW_apply
+ added lemma auxW_norm_le
+ added lemma boundedTransform_adjoint_apply
+ added lemma boundedTransform_adjoint_comp
+ added lemma boundedTransform_apply
+ added lemma boundedTransform_comp_adjoint
+ added lemma boundedTransform_norm_sq_add
+ added lemma firstBoundedTransform_apply
+ added lemma firstBoundedTransform_intertwine
+ added lemma isSelfAdjoint_vonNeumannResolventSqrt
+ added lemma norm_boundedTransform_le_one
+ added lemma vonNeumannResolventSqrt_comm
+ added lemma vonNeumannResolventSqrt_mem_domain_all
+ added lemma vonNeumannResolventSqrt_mul_self
+ added lemma vonNeumannResolventSqrt_nonneg
+ added lemma vonNeumannResolvent_range_dense
+ added lemma vonNeumannResolvent_sqrt_mem_domain
+ added lemma vonNeumannResolvent_sqrt_norm_le
+ added lemma vonNeumannResolvent_sqrt_norm_sq
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BoundedTransformRange @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.BoundedTransformRange (+168 -0)
  namespaces ContinuousLinearMap, LinearPMap
+ added lemma mem_range_adjoint_of_norm_inner_le
+ added lemma norm_inner_le_of_mem_domain
+ added lemma norm_sq_vonNeumannResolventSqrt
+ added lemma range_vonNeumannResolventSqrt
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.CfcPositive @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.CfcPositive (+51 -0)
  namespaces ContinuousLinearMap
+ added lemma re_inner_nonneg_of_nonneg
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.JointSpectralResolution @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.JointSpectralResolution (+183 -0)
  namespaces ContinuousLinearMap
+ added def complexJointCfcHom
+ added def complexJointSpectrum
+ added def complexJointSpectrumCoord
+ added def complexJointSpectrumMap
+ added def familyAlgebra
+ added def familyGenerator
+ added def jointNormalSpectralResolution
+ added def realJointCfcHom
+ added instance : CompactSpace (complexJointSpectrum a)
+ added instance isClosed_familyAlgebra
+ added lemma complexJointCfcHom_comp_coord
+ added lemma complexJointSpectrum_apply_mem
+ added lemma continuous_complexJointCfcHom
+ added lemma continuous_complexJointSpectrumMap
+ added lemma isMulCommutative_familyAlgebra_of_normal
+ added lemma jointNormalSpectralResolution_map_eval
+ added lemma mem_familyAlgebra
+ added lemma realJointCfcHom_comp_coord
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralMeasure @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralMeasure (+136 -0)
  namespaces StarAlgHom
+ added def spectralFunctional
+ added def spectralMeasure
+ added instance (x : H) : IsFiniteMeasure (Φ.spectralMeasure x)
+ added lemma apply_nonneg
+ added lemma integral_spectralMeasure
+ added lemma integral_spectralMeasure_continuous
+ added lemma isSelfAdjoint_apply
+ added lemma spectralMeasure_map
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralResolution @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralResolution (+283 -0)
  namespaces StarAlgHom, ContinuousLinearMap
+ added def realCfcHom
+ added def resolutionOfIdentity
+ added lemma IsStarProjection.norm_apply_le
+ added lemma IsStarProjection.norm_sq_apply_eq_re_inner
+ added lemma hasSum_borelExtension_indicator_apply
+ added lemma inner_borelExtension_indicator_apply_eq_zero_of_disjoint
+ added lemma realCfcHom_eq_cfc
+ added lemma realCfcHom_re_add_I_smul_im
+ added lemma resolutionOfIdentity_apply
+ added lemma resolutionOfIdentity_map
+ added lemma sum_borelExtension_indicator_apply
+ added lemma variation_toComplexMeasure_self_eq_spectralMeasure
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralTheoremNormal @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.SpectralTheoremNormal (+363 -0)
  namespaces LinearPMap
+ added def betaInv
+ added def betaInvC
+ added def boundedTransformWeight
+ added def normalSpectralResolution
+ added def spectralMeasureC
+ added lemma borelExtension_indicator_unit_circle
+ added lemma boundedTransformWeight_pos_ae
+ added lemma boundedTransformWeight_sq
+ added lemma eq_spectralIntegral_normalSpectralResolution
+ added lemma inner_graph_eq_integral
+ added lemma inner_self_apply_eq_integral_betaInv
+ added lemma inner_self_apply_eq_integral_spectralMeasureC
+ added lemma inv_sq_boundedTransformWeight
+ added lemma measurable_betaInv
+ added lemma measurable_betaInvC
+ added lemma mem_domain_iff_lintegral_of_isNormal
+ added lemma mem_domain_iff_lintegral_spectralMeasureC
+ added lemma norm_betaInvC
+ added lemma norm_le_one_of_mem_spectrum_boundedTransform
+ added lemma normalSpectralResolution_scalarMeasure
+ added lemma spectralMeasureC_def
+ added lemma vonNeumannResolventSqrt_eq_realCfcHom
+ added lemma vonNeumannResolvent_eq_realCfcHom
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.VonNeumannResolvent @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.VonNeumannResolvent (+521 -0)
  namespaces LinearPMap
+ added abbrev adjointComp
+ added def graphLp
+ added def vonNeumannResolvent
+ added lemma IsNormal.vonNeumannResolvent_eq
+ added lemma add_one_adjointComp_injective
+ added lemma adjointComp_apply
+ added lemma adjointComp_reApplyInnerSelf_nonneg
+ added lemma adjoint_adjoint
+ added lemma apply_congr
+ added lemma dense_adjoint_domain
+ added lemma graphLp_orthogonal_adjoint
+ added lemma hasOrthogonalProjection_graphLp
+ added lemma isClosed_graphLp
+ added lemma isPositive_vonNeumannResolvent
+ added lemma isSelfAdjoint_vonNeumannResolvent
+ added lemma le_adjoint_adjoint
+ added lemma mem_adjointComp_domain
+ added lemma mem_graphLp
+ added lemma norm_vonNeumannResolvent_le_one
+ added lemma vonNeumannResolvent_apply
+ added lemma vonNeumannResolvent_apply_norm_le
+ added lemma vonNeumannResolvent_eq_of_adjointComp_eq
+ added lemma vonNeumannResolvent_injective
+ added lemma vonNeumannResolvent_polarization
+ added lemma vonNeumannResolvent_spec
+ added structure IsNormal
@@ PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.WeakOperatorLimit @@
+ module added PhyslibAlpha.SpectralTheory.Port.Analysis.InnerProductSpace.WeakOperatorLimit (+141 -0)
  namespaces ContinuousLinearMap
+ added lemma exists_tendsto_inner_of_norm_le
+ added lemma exists_tendsto_inner_of_norm_le_of_tendsto_inner_self
+ added lemma isSelfAdjoint_of_tendsto_inner
@@ PhyslibAlpha.SpectralTheory.Port.MeasureTheory.Function.BoundedInduction @@
+ module added PhyslibAlpha.SpectralTheory.Port.MeasureTheory.Function.BoundedInduction (+234 -0)
+ added lemma Measurable.induction_bounded
+ added lemma eq_of_sequentiallyNormal
@@ PhyslibAlpha.SpectralTheory.Port.MeasureTheory.PVM.ProjectionValuedMeasure @@
+ module added PhyslibAlpha.SpectralTheory.Port.MeasureTheory.PVM.ProjectionValuedMeasure (+388 -0)
  namespaces MeasureTheory, MeasureTheory.ResolutionOfIdentity
+ added def ResolutionOfIdentity.toComplexMeasure
+ added def ResolutionOfIdentity.toFun
+ added def map
+ added def ofMeasurable
+ added def scalarMeasure
+ added instance : CoeFun (ResolutionOfIdentity α H) (fun _ => Set α → H →L[ℂ] H)
+ added instance isFiniteMeasure_scalarMeasure
+ added lemma ResolutionOfIdentity.empty
+ added lemma ResolutionOfIdentity.iUnion_apply
+ added lemma ResolutionOfIdentity.inner_apply_eq_inner_apply_apply
+ added lemma ResolutionOfIdentity.inter
+ added lemma ResolutionOfIdentity.isStarProjection
+ added lemma ResolutionOfIdentity.mul_eq_zero_of_disjoint
+ added lemma ResolutionOfIdentity.not_measurable
+ added lemma ResolutionOfIdentity.selfAdjoint
+ added lemma ResolutionOfIdentity.toComplexMeasure_apply
+ added lemma ResolutionOfIdentity.toComplexMeasure_self_apply
+ added lemma ResolutionOfIdentity.toComplexMeasure_self_variation_apply
+ added lemma ResolutionOfIdentity.toFun_eq
+ added lemma ResolutionOfIdentity.union_of_disjoint
+ added lemma ResolutionOfIdentity.univ
+ added lemma ext
+ added lemma ext_of_scalarMeasure
+ added lemma inner_projection_eq_zero_of_disjoint
+ added lemma map_apply
+ added lemma map_map
+ added lemma ofMeasurable_apply
+ added lemma scalarMeasure_apply
+ added lemma scalarMeasure_map
+ added lemma scalarMeasure_projection
+ added structure ResolutionOfIdentity
@@ PhyslibAlpha.SpectralTheory.Port.MeasureTheory.VectorMeasure.PointwiseConvergence @@
+ module added PhyslibAlpha.SpectralTheory.Port.MeasureTheory.VectorMeasure.PointwiseConvergence (+85 -0)
  namespaces PointwiseConvergenceCLM, MeasureTheory.VectorMeasure
+ added def ofPointwiseCLM
+ added lemma hasSum_iff
@@ PhyslibAlpha.SpectralTheory.SpectralIntegral @@
+ module added PhyslibAlpha.SpectralTheory.SpectralIntegral (+299 -0)
  namespaces LinearPMap, MeasureTheory.ResolutionOfIdentity
+ added def simpleIntegral
+ added def spectralIntegral
+ added def spectralIntegralApprox
+ added def spectralIntegralDomain
+ added lemma cauchySeq_simpleIntegral_approx
+ added lemma dense_spectralIntegral_domain
+ added lemma eLpNorm_simpleFunc
+ added lemma eLpNorm_two_sq
+ added lemma eq_spectralIntegral
+ added lemma ext_of_inner_self
+ added lemma memLp_two_iff
+ added lemma mem_spectralIntegral_domain_iff
+ added lemma simpleIntegral_apply
+ added lemma simpleIntegral_inner_self
+ added lemma simpleIntegral_norm_sq
+ added lemma simpleIntegral_sub
+ added lemma spectralIntegral_inner_self
+ added lemma spectralIntegral_map
+ added lemma tendsto_approx
@@ PhyslibAlpha @@
! module modified PhyslibAlpha (+19 -0)
253 differences

The declarations are found by reading the diff as text, without regard for namespaces, so a declaration whose keyword and name are on different lines is missed, and two declarations of the same name in different namespaces are listed as one. A change to a proof, or to the body of a definition, does not appear. See scripts/alpha/github/pr_summary.lean.

Summary of commit a2c8361, remade whenever a commit is pushed.

Co-authored-by: OpenAI Codex <codex@openai.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large PhyslibAlpha Pull requests which are for modifications to PhyslibAlpha.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant