Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

feat(analysis/normed_space) bundled bounded linear maps#726

Closed
jlpaca wants to merge 12 commits intoleanprover-community:masterfrom
jlpaca:operator-norm
Closed

feat(analysis/normed_space) bundled bounded linear maps#726
jlpaca wants to merge 12 commits intoleanprover-community:masterfrom
jlpaca:operator-norm

Conversation

@jlpaca
Copy link
Copy Markdown
Collaborator

@jlpaca jlpaca commented Feb 14, 2019

  • bounded_linear_map as a structure.
  • some elementary properties of the operator norm.

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

@jlpaca jlpaca changed the title Operator norm [WIP] feat(analysis/normed_space/bounded_linear_maps) operator norm [WIP] Feb 14, 2019
@kckennylau kckennylau added the WIP Work in progress label Feb 14, 2019
@kckennylau kckennylau changed the title feat(analysis/normed_space/bounded_linear_maps) operator norm [WIP] feat(analysis/normed_space/bounded_linear_maps) operator norm Feb 14, 2019
@cipher1024 cipher1024 requested a review from avigad February 14, 2019 21:31
@jlpaca jlpaca changed the title feat(analysis/normed_space/bounded_linear_maps) operator norm feat(analysis/normed_space) bundled bounded linear maps Feb 23, 2019
Copy link
Copy Markdown
Member

@PatrickMassot PatrickMassot left a comment

Choose a reason for hiding this comment

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

I left some minor comments

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Some minor comments about comments

…perator-norm

- also some notation for bounded_linear_map
@jlpaca
Copy link
Copy Markdown
Collaborator Author

jlpaca commented Mar 29, 2019

@jcommelin Thanks for the pointers. a0369fd removes some spurious comments and adds docstrings.

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Some more comments.

import ring_theory.algebra
import analysis.normed_space.basic
import analysis.asymptotics
import ..asymptotics
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is not conform mathlib style.

def of_linear_map_of_bounded {f : E →ₗ[k] F}
(h : ∃ M, ∀ x, ∥f x∥ ≤ M * ∥x∥) : E →L[k] F := ⟨f, h⟩

/-- the zero map is bounded. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- the zero map is bounded. -/
/-- The bounded map that is constantly zero. -/

/-- the identity map is bounded. -/
def id : E →L[k] E := ⟨linear_map.id, 1, λ x, le_of_eq (one_mul _).symm⟩

/-- the composition of two bounded linear maps is bounded. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- the composition of two bounded linear maps is bounded. -/
/-- Composition of bounded linear maps. -/

commutes' := λ _ _, ext $ λ _, map_smul _ _ _,
}

/-- bounded linear maps are continuous. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- bounded linear maps are continuous. -/
/-- Bounded linear maps are continuous. -/


noncomputable instance : has_norm (bounded_linear_map k E F) := ⟨op_norm⟩

-- so that invocations of real.Inf_le make sense: the set of
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment seems to start halfway a sentence.

(λ hlt, div_le_of_le_mul hlt (by rw mul_comm; exact le_op_norm _))
(λ heq, by rw [←heq, div_zero]; exact op_norm_nonneg _))

/-- the image of the unit ball under a bounded linear map is bounded. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- the image of the unit ball under a bounded linear map is bounded. -/
/-- The image of the unit ball under a bounded linear map is bounded. -/

(λ heq, by rw [←heq, div_zero]; exact op_norm_nonneg _))

/-- the image of the unit ball under a bounded linear map is bounded. -/
lemma unit_le_op_norm : ∥x∥ ≤ 1 → ∥f x∥ ≤ ∥f∥ :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you might as well move hx : ||x|| <= 1 to the assumptions.

(by rw [ mul_comm, ←norm_smul ]; exact hc _))⟩))
(λ heq, by rw [←heq, zero_mul]; exact hn))))

/-- bounded linear maps themselves form a normed space w/ the op norm -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- bounded linear maps themselves form a normed space w/ the op norm -/
/-- Bounded linear maps form a normed space with respect to the operator norm -/

noncomputable instance : normed_space k (bounded_linear_map k E F) :=
normed_space.of_core _ _ ⟨op_norm_eq_zero, op_norm_smul, op_norm_triangle⟩

/-- operator norm is submultiplicative. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- operator norm is submultiplicative. -/
/-- The operator norm is submultiplicative. -/

λ x, by rw mul_assoc; calc _ ≤ ∥h∥ * ∥f x∥: le_op_norm _
... ≤ _ : mul_le_mul_of_nonneg_left (le_op_norm _) (op_norm_nonneg _)⟩)

/-- bounded linear maps are lipschitz continuous. -/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/-- bounded linear maps are lipschitz continuous. -/
/-- Bounded linear maps are lipschitz continuous. -/

jlpaca added 2 commits April 6, 2019 17:30
…ear maps

- chain rule lemma & two results about real normed spaces work in progress
@jlpaca jlpaca requested a review from a team as a code owner April 6, 2019 17:14
@sgouezel
Copy link
Copy Markdown
Collaborator

sgouezel commented Apr 9, 2019

What is the status of this pull request? If I understand correctly, there are two things in there:

  • remove is_bounded_linear_map, and replace it by a bundled version.
  • use the bundled version for the differential.

I don't really understand the point of the first item: it is certainly better to have both unbundled and bundled versions, and both versions are already there (the bundled version is in the current version of operator_norm.lean -- it is called bounded_linear_maps currently, it would probably be a good idea to rename it bounded_linear_map). And all the properties you prove for your bundled version and the operator norm are already there.

On the other hand, I think the second item (using bundled version for the differential) is a good move. What about :

  • closing this PR
  • opening a PR where you refactor what you want to refactor in operator_norm.lean (changing the name of bounded_linear_maps, adding the lemmas that you think are missing, but without erasing everything and starting from scratch)
  • and once this PR is merged opening another PR in which you would refactor the derivative, to make it use the bundled version

Does it sound reasonable to you?

@jlpaca
Copy link
Copy Markdown
Collaborator Author

jlpaca commented Apr 9, 2019

@sgouezel most of this is admittedly my fault for not spending as much time as consistently as I'd like on this, and mathlib moves forward fast.

So about the content of the PR: at the time I started working on this, the state of normed_space/ was roughly:

  • bounded_linear_maps.lean contained is_bounded_linear_map, which returned a Prop.
  • operator_norm.lean contained bounded_linear_maps.lean, which was 'bundled' in the sense that it implements bounded linear maps as a subspace of the vector space of linear maps, with a carrier made up of all the linear maps satisfying is_bounded_linear_map, and a normed_space instance was constructed for that subspace in the case where the base field is the reals.

The changes that are/were part of this PR:

  • added bounded_linear_map, which is 'bundled' in the sense that it is a structure consisting of a linear_map and a proof of the existence of a bound. Reproduced all of the results about is_bounded_linear_map for bounded_linear_map. (So I suspect this is where much of the confusion comes from.)
  • refactored the proofs for certain properties of the operator norm to be more straightforward, and constructed the normed_space instance of the type bounded_linear_map over arbitrary normed fields, together with some additional lemmas and instances such as Lipschitz continuity, the endomorphism algebra, and asymptotics.
  • refactored the derivative to use bounded_linear_map. Currently all the theorems in deriv.lean have been restated, and the sole incomplete proof is a lemma that's invoked for the chain rule.
  • the prospective removal of is_bounded_linear_map and bounded_linear_maps, once all that is done.

I think closing this and opening separate PRs for the refactor and the derivative is a sensible thing to do, and I'll probably do that in the coming couple of days. I imagine it'd make the changes much easier to review. The only thing that would probably need figuring out is whether to keep both implementations of the normed space of bounded linear maps (the subtype bounded_linear_maps in mathlib master, and the normed_space instance for bounded_linear_map in this PR.)

I don't have strong feelings about whether or not to remove is_bounded_linear_map — I defaulted towards removal, I think, because of the zulip thread back when I started work on this. I'd be perfectly happy to keep both versions and settling on some naming convention that keeps things from being ambiguous and confusing.

@sgouezel
Copy link
Copy Markdown
Collaborator

sgouezel commented Apr 9, 2019

I think it is better to keep the unbundled version is_bounded_linear_map.

As for the bundled version, we already have one, in the form of bounded_linear_maps (defined as a subspace, but still an element of this type is a bundled bounded linear map). You introduce another one. I don't have strong feelings on which one is better (or rather, I think they are essentially equivalent), but my point is that we should only have one bundled version, not two.

@sgouezel
Copy link
Copy Markdown
Collaborator

Would you mind if I try to rebase your branch on master and try some minor changes?

@jlpaca
Copy link
Copy Markdown
Collaborator Author

jlpaca commented Apr 10, 2019

@sgouezel please go ahead with the rebase. Just so I don't be a doofus with duplicated work again, would you mind outlining what sort of changes you mean to exact?

Meanwhile, I'm working on the first of the two suggested refactor PRs as I speak. Expected changes are:

  • remove this branch's bounded_linear_map from bounded_linear_maps.lean, and refactor mathlib's linear-subspace implementation of is_bounded_linear_maps, renaming that to bounded_linear_map.
  • replicate all the additional miscellaneous lemmas in the branch for the refactored bounded_linear_map.
  • refactor most of operator_norm.

also possibly

  • refactor is_bounded_linear_map, changing the definition. The mathlib code has the existence of a positive bound (instead of just any bound) to be the defining property, and this seems to go against the idea that the code should be asking the user for proofs of a minimal amount of things. The statement of all the lemmas will remain unchanged, so I don't this would be a bad breaking change.

The actual PR should probably exist by tonight or tomorrow.

Does that sound alright?

@sgouezel
Copy link
Copy Markdown
Collaborator

Great to hear you're working on it. Since you're working on it, I won't do any refactor. What you propose sounds great.

As for the condition in is_bounded_linear_map that the bound is positive, there are two different things. When you use the definition, you are happy to know that the bound is positive. But when you check the definition, you don't want to check the positivity. So, if there is the positivity in the definition, there should be a constructor without the positivity. And if the positivity is not in the definition, there should be a lemma saying that a positive bound exists. I would say that one uses the definition more often than one checks it, so I would keep the positivity in the definition.

@jlpaca jlpaca mentioned this pull request Apr 10, 2019
6 tasks
@jcommelin
Copy link
Copy Markdown
Member

@jlpaca @sgouezel Is there anything left in this PR that hasn't been included in #927 or #955? Should this now be closed?

@sgouezel
Copy link
Copy Markdown
Collaborator

sgouezel commented May 3, 2019

Yes, this should be closed.

@sgouezel sgouezel closed this May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants