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: norm estimates for various operators in linear algebra #12150

Closed
wants to merge 3 commits into from

Conversation

sgouezel
Copy link
Contributor

There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...


Open in Gitpod

@sgouezel sgouezel added awaiting-review The author would like community review of the PR t-analysis Analysis (normed *, calculus) labels Apr 15, 2024
/-- An auxiliary instance to be able to just state the fact that the norm of `smulRightL` makes
sense. This shouldn't be needed. TODO: fix typeclass inference. -/
def seminormedAddCommGroup_aux_for_smulRightL :
SeminormedAddCommGroup ((E →L[𝕜] 𝕜) →L[𝕜] Fₗ →L[𝕜] E →L[𝕜] Fₗ) :=
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't a max recursion depth issue for synthesis? (Not at a computer)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry. Yes that was what I was thinking of. Can you just bump it locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how to do that (there are no examples throughout mathlib, if I can tell correctly).

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you mean set_option synthInstance.maxHeartbeats 0 in, it doesn't work here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a TODO in the core code which limits the number of pending instance problems when solving for another. It is set to a very small number but bumping it in core broke quite a bit.

I don't think we are getting any kind of help on this from core in the short term so we should just figure out here how we want to handle it.

The same problem pops up in Analysis.NormedSpace.OperatorNorm where some letI's helped things along.

Is there anyway to contain the new local instances to the declarations they are needed for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of having a local instance, one can do as follows:

lemma norm_smulRightL_le :
    letI := seminormedAddCommGroup_aux_for_smulRightL 𝕜 E Fₗ
    ‖smulRightL 𝕜 E Fₗ‖ ≤ 1 :=

It's probably a better solution, let me switch to it.

@mattrobball
Copy link
Collaborator

I've created an issue in the core repo about this. Can you reference it in the comments? If it ever gets resolved, we can streamline here.

@sgouezel
Copy link
Contributor Author

I've referenced the issue in the comments.

@mattrobball
Copy link
Collaborator

Thanks!

bors delegate+

@mathlib-bors
Copy link

mathlib-bors bot commented Apr 16, 2024

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

@sgouezel
Copy link
Contributor Author

bors r+

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Apr 16, 2024
mathlib-bors bot pushed a commit that referenced this pull request Apr 16, 2024
There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 16, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: norm estimates for various operators in linear algebra [Merged by Bors] - feat: norm estimates for various operators in linear algebra Apr 16, 2024
@mathlib-bors mathlib-bors bot closed this Apr 16, 2024
@mathlib-bors mathlib-bors bot deleted the SG_constructs branch April 16, 2024 19:33
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...
callesonne pushed a commit that referenced this pull request Apr 22, 2024
There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...
Jun2M pushed a commit that referenced this pull request Apr 24, 2024
There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants