Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(analysis/inner_product_space/spectrum): diagonalization of self-adjoint endomorphisms (finite dimension) #9995

Closed
wants to merge 48 commits into from

Conversation

hrmacbeth
Copy link
Member

@hrmacbeth hrmacbeth commented Oct 27, 2021

Diagonalization of a self-adjoint endomorphism T of a finite-dimensional inner product space E over either or : construct a linear isometry T.diagonalization from E to the direct sum of T's eigenspaces, such that T conjugated by T.diagonalization is diagonal:

lemma diagonalization_apply_self_apply (v : E) (μ : eigenvalues T) :
  hT.diagonalization (T v) μ = (μ : 𝕜) • hT.diagonalization v μ

Open in Gitpod

@github-actions github-actions bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Oct 27, 2021
@hrmacbeth hrmacbeth added awaiting-review The author would like community review of the PR and removed blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. labels Oct 27, 2021
@github-actions github-actions bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Oct 27, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Nov 6, 2021
ericrbg pushed a commit that referenced this pull request Nov 9, 2021
…ism (#10027)

Prerequisites in `linear_algebra/eigenspace` for #9995, including a definition `module.End.eigenvalues`, the eigenvalues of an endomorphism considered as a subtype of the scalar ring.
Copy link
Collaborator

@ocfnash ocfnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits but otherwise this looks great.

bors d+

I do have one question though: the main results here hold with the weaker assumption that E is complete rather than finite-dimensional. Is there a reason not just to go straight for the stronger versions?

src/linear_algebra/basic.lean Outdated Show resolved Hide resolved
src/linear_algebra/basic.lean Outdated Show resolved Hide resolved
src/analysis/inner_product_space/spectrum.lean Outdated Show resolved Hide resolved
an internal direct sum decomposition of `E`. -/
lemma direct_sum_submodule_is_internal :
direct_sum.submodule_is_internal (λ μ : eigenvalues T, eigenspace T μ) :=
by convert hT.orthogonal_family_eigenspaces'.submodule_is_internal_iff.mpr
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this convert be avoided? Is it some annoying decidability typeclass issue that renders it necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- I would love to know how to fix it!

Copy link
Collaborator

@ocfnash ocfnash Nov 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The need for by convert is indeed due to two different decidability typeclasses, one classical, one not.

To be precise if you add [decidable_eq ι] to the lemma orthogonal_family.submodule_is_internal_iff then you can drop the by convert here.

I believe that you should add [decidable_eq ι] as an argument to orthogonal_family.submodule_is_internal_iff and also add [decidable_eq 𝕜] as an argument here (i.e., to direct_sum_submodule_is_internal) because otherwise these lemmas contain classical decidability instances (which is a Bad Thing).

Maybe @eric-wieser could confirm / refute my claims given his recent helpful words on Zulip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be precise if you add [decidable_eq ι] to the lemma orthogonal_family.submodule_is_internal_iff then you can drop the by convert here.

Indeed. Thank you!!

I believe that you should ... also add [decidable_eq 𝕜] as an argument here (i.e., to direct_sum_submodule_is_internal)

Should I also add [decidable_eq 𝕜] as an argument to orthogonal_family.submodule_is_internal_iff? Or only here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defer to a true decidability expert.

I think the way I would settle this is to remove open_locale classical (I recommend never using it) and see what decidability assumptions you then need to add to make the statements of your lemmas typecheck. And of course if any proofs break just invoke the classical tactic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, removed classical from projection.lean and spectrum.lean!

@bors
Copy link

bors bot commented Nov 10, 2021

✌️ hrmacbeth can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Nov 10, 2021
@hrmacbeth
Copy link
Member Author

I do have one question though: the main results here hold with the weaker assumption that E is complete rather than finite-dimensional. Is there a reason not just to go straight for the stronger versions?

What do you mean exactly? If you're talking about the result for compact operators, I believe I need to define compact operators and also define and write an API for the Hilbert sum of an (infinite) family of inner product spaces. But I'm heading there :). Is there another version you have in mind?

@ocfnash
Copy link
Collaborator

ocfnash commented Nov 10, 2021

I do have one question though: the main results here hold with the weaker assumption that E is complete rather than finite-dimensional. Is there a reason not just to go straight for the stronger versions?

What do you mean exactly? If you're talking about the result for compact operators, I believe I need to define compact operators and also define and write an API for the Hilbert sum of an (infinite) family of inner product spaces. But I'm heading there :). Is there another version you have in mind?

Good clarification, I should indeed have said "with the weaker assumption that E is complete and T is compact" (both of which are automatic in finite dimensions). I was just dusting off some very old thoughts and IIRC you don't need to use the finite-dimensional spectral theorem to get the infinite-dimensional one. If that's true then there's no need to start out with the finite-dimensional case.

@hrmacbeth
Copy link
Member Author

hrmacbeth commented Nov 10, 2021

IIRC you don't need to use the finite-dimensional spectral theorem to get the infinite-dimensional one. If that's true then there's no need to start out with the finite-dimensional case.

There's quite a bit of infrastructure needed for the infinite-dimensional case (the Hilbert sum API in particular). So I think we'll want this more elementary finite-dimensional version which uses pi_Lp (rather than the Hilbert sum) anyway, to reduce the imports needed when someone wants just the finite-dimensional version. Since I expect writing the Hilbert sum API to be a big project, I also wanted a bit of quick gratification first in finishing off the finite-dimensional version :)

But I have been bearing the infinite-dimensional version in mind when structuring this file: did you notice that everything down to

lemma orthogonal_supr_eigenspaces (μ : 𝕜) :
  eigenspace (T.restrict hT.orthogonal_supr_eigenspaces_invariant) μ = ⊥ :

in this file and everything down to

lemma has_eigenvector_of_is_max_on (hT : is_self_adjoint (T : E →ₗ[𝕜] E)) {x₀ : E}
  (hx₀ : x₀ ≠ 0) (hextr : is_max_on T.re_apply_inner_self (sphere (0:E) ∥x₀∥) x₀) :
  has_eigenvector (T : E →ₗ[𝕜] E) ↑(⨆ x : {x : E // x ≠ 0}, rayleigh_quotient x) x₀ :=

in the Rayleigh file has no [finite_dimensional 𝕜 E] assumption?

We can talk more on Zulip if you're curious about the approach.

Co-authored-by: Oliver Nash <github@olivernash.org>
@ocfnash
Copy link
Collaborator

ocfnash commented Nov 10, 2021

There's quite a bit of infrastructure needed for the infinite-dimensional case ... I also wanted a bit of quick gratification first in finishing off the finite-dimensional version :)

Totally agreed, and indeed this is already a very useful and gratifying result! I especially agree about the point about needing a findim version that does not invoke the infdim direct sum machinery etc.

But I have been bearing the infinite-dimensional version in mind when structuring this file: did you notice that everything down to ... and ... has no [finite_dimensional 𝕜 E] assumption?

I did notice this!

We can talk more on Zulip if you're curious about the approach.

I have no more questions but I'm always happy to chat!

@hrmacbeth
Copy link
Member Author

bors r+

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Nov 12, 2021
bors bot pushed a commit that referenced this pull request Nov 12, 2021
…adjoint endomorphisms (finite dimension) (#9995)

Diagonalization of a self-adjoint endomorphism `T` of a finite-dimensional inner product space `E` over either `ℝ` or `ℂ`:  construct a linear isometry `T.diagonalization` from `E` to the direct sum of `T`'s eigenspaces, such that `T` conjugated by `T.diagonalization` is diagonal:
```lean
lemma diagonalization_apply_self_apply (v : E) (μ : eigenvalues T) :
  hT.diagonalization (T v) μ = (μ : 𝕜) • hT.diagonalization v μ
```



Co-authored-by: Frédéric Dupuis <dupuisf@iro.umontreal.ca>
@bors
Copy link

bors bot commented Nov 12, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(analysis/inner_product_space/spectrum): diagonalization of self-adjoint endomorphisms (finite dimension) [Merged by Bors] - feat(analysis/inner_product_space/spectrum): diagonalization of self-adjoint endomorphisms (finite dimension) Nov 12, 2021
@bors bors bot closed this Nov 12, 2021
@bors bors bot deleted the diagonalize branch November 12, 2021 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants