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

feat(analysis/complex/basic): restriction of scalars, real differentiability of complex functions#1716

Merged
mergify[bot] merged 19 commits intoleanprover-community:masterfrom
sgouezel:restrict_scalar
Nov 26, 2019
Merged

feat(analysis/complex/basic): restriction of scalars, real differentiability of complex functions#1716
mergify[bot] merged 19 commits intoleanprover-community:masterfrom
sgouezel:restrict_scalar

Conversation

@sgouezel
Copy link
Copy Markdown
Collaborator

The goal of this PR is to prove the following theorem

/-- If a complex function is differentiable at a real point, then the induced real function is also
differentiable at this point, with a derivative equal to the real part of the complex derivative. -/
theorem has_deriv_at_real_of_complex (h : has_deriv_at e e' z) :
  has_deriv_at (λx:ℝ, (e x).re) e'.re z

(designed for the differentiability over real numbers of exponential, sine, and so on). I could have given a direct unreadable proof, but instead I decided to do it the right way, i.e., by introducing the restriction of scalars: given an algebra S over R, then an S-module is also an R-module, and S-linear maps induce R-linear maps and so on (which is the right way to say that a complex-differentiable function is also real-differentiable).

Along the way, I needed to define some continuous linear functions on (such as the real part or the imaginary part). I put them into a new file analysis/complex/basic, and refactored things a little bit by moving there facts about the complex numbers that were scattered around.

@fpvandoorn fpvandoorn added the awaiting-review The author would like community review of the PR label Nov 19, 2019
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.

Nice work! At some point we'll have to do the adjunction between restriction of scalars and tensor product as well. (With and/or without category_theory/...)

sgouezel and others added 4 commits November 21, 2019 14:42
Copy link
Copy Markdown
Member

@robertylewis robertylewis left a comment

Choose a reason for hiding this comment

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

This looks basically ready to me -- unless some of the analysis people (@avigad ?) want to weigh in, I'd say it's almost good to go.

has_fderiv_within_at f f' s x ↔ has_deriv_within_at f (f' 1) s x :=
by simp [has_deriv_within_at, has_deriv_at_filter, has_fderiv_within_at]

lemma has_deriv_within_at_iff_has_fderiv_within_at {f' : 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.

The existing iff lemmas around here seem to go in the other direction -- fderiv on the left, deriv on the right. Is there a reason this one goes the other way? Naively, the LHS looks simpler to me.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

All these lemmas will most of the time be used from left to right, in the following way: you have a simple expression, but you may want to transform it into something more complicated to which you will apply an existing theorem. The other direction is essentially not used, as there is no reason why you would stumble on something of this specific form in a proof. This is why all these lemmas are written with the simple expression on the left, and without a simp attribute.

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 see. I think the naming is a little confusing -- it sounds like the symmetric version of the lemma right before. But I don't have a better suggestion. Maybe it would help to have doc strings on both directions that explain the difference? It would show up if someone tried to use one when they needed the other.

In any case, I don't think it's a very big deal.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have added docstrings, hopefully they clarify things at least a little bit.

@robertylewis robertylewis added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Nov 25, 2019
@sgouezel sgouezel added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Nov 25, 2019
@robertylewis robertylewis removed the awaiting-review The author would like community review of the PR label Nov 26, 2019
@robertylewis robertylewis 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 26, 2019
@mergify mergify bot merged commit 3443a7d into leanprover-community:master Nov 26, 2019
@sgouezel sgouezel deleted the restrict_scalar branch December 2, 2019 10:39
butterthebuddha pushed a commit to butterthebuddha/mathlib that referenced this pull request May 15, 2020
…ability of complex functions (leanprover-community#1716)

* restrict scalar

* staging

* complete proof

* staging

* cleanup

* staging

* cleanup

* docstring

* docstring

* reviewer's comments

* Update src/analysis/complex/basic.lean

Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>

* Update src/analysis/calculus/fderiv.lean

Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>

* add ! in docstrings [ci skip]

* more doc formatting in fderiv

* fix comments

* add docstrings
butterthebuddha pushed a commit to butterthebuddha/mathlib that referenced this pull request May 16, 2020
…ability of complex functions (leanprover-community#1716)

* restrict scalar

* staging

* complete proof

* staging

* cleanup

* staging

* cleanup

* docstring

* docstring

* reviewer's comments

* Update src/analysis/complex/basic.lean

Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>

* Update src/analysis/calculus/fderiv.lean

Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>

* add ! in docstrings [ci skip]

* more doc formatting in fderiv

* fix comments

* add docstrings
grunweg added a commit to leanprover-community/mathlib4 that referenced this pull request May 26, 2024
grunweg added a commit to leanprover-community/mathlib4 that referenced this pull request May 26, 2024
grunweg added a commit to leanprover-community/mathlib4 that referenced this pull request May 26, 2024
…diff-a959c7a7d6b5f608638e708fc07590f8a8e1f7b86f05cd9296b0bf3574f86760;

which moved content from analysis/complex/basic... which also goes back to
2019 (e.g. the lemma has_deriv_at.real_of_complex was added in
leanprover-community/mathlib3#1716.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

4 participants