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: add HasSum f a → HasProd (exp ∘ f) (exp a) #12635

Closed
wants to merge 9 commits into from

Conversation

MichaelStollBayreuth
Copy link
Collaborator

@MichaelStollBayreuth MichaelStollBayreuth commented May 3, 2024

This adds lemmas saying that HasSum f a implies HasProd (exp ∘ f) (exp a) for exp = rexp, cexp, NormedSpace.exp.

While the rexp and cexp versions could be deduced from the NormedSpace.exp one, we give a direct proof (and so avoid needing to import stuff about NormedSpace.exp for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames Filter.Tendsto.exp to Filter.Tendsto.rexp for the version specific to the real exponential function, so that Filter.Tendsto.exp can be used for the corresponding statement involving NormedSpace.exp.

See here on Zulip.


Open in Gitpod

@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR awaiting-CI t-analysis Analysis (normed *, calculus) labels May 3, 2024
@@ -473,6 +473,12 @@ theorem exp_continuous : Continuous (exp 𝕂 : 𝔸 → 𝔸) := by
exact continuousOn_exp
#align exp_continuous NormedSpace.exp_continuous

open Topology in
lemma _root_.Filter.Tendsto.NormedSpace_exp {α : Type*} {l : Filter α} {f : α → 𝔸} {a : 𝔸}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think NormedSpace_exp is compatible with the naming convention. exp_normedSpace looks better, although not great.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The naming convention is not really explicit on how to deal with names containing a namespace like NormedSpace.exp when they show up as part of lemma names. Unfortunately, Filter.Tendsto.exp is already claimed by the real exponential function.
Would NormedSpace.Filter.Tendsto.exp be a reasonable alternative?

Copy link
Contributor

Choose a reason for hiding this comment

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

You really want to be able to use dot notation, so it has to be Filter.Tendsto.something. The something could be normedSpaceExp or exp_normedSpace or exp_of_normedSpace. Maybe the best option is indeed normedSpaceExp because it's a single atom, and we need a way to separate it from the other ones. Or just exp, and use rexp and cexp for the real and complex version (I think that's my favorite option).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm renaming Filter.Tendsto.exp to Filter.Tendsto.rexp and then Filter.Tendsto.NormedSpace_exp to Filter.Tendsto.exp.

variable {𝕂 𝔸 : Type*} [RCLike 𝕂] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]

/-- If `f` has sum `a`, then `exp ∘ f` has product `exp a`. -/
lemma HasSum.NormedSpace_exp {ι : Type*} {f : ι → 𝔸} {a : 𝔸} (h : HasSum f a) :
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NormedSpace.hasSum_exp perhaps? Although this would make dot notation on HasSum unavailable here.

Copy link
Contributor

Choose a reason for hiding this comment

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

You really want dot notation. As above, I'd go for HasSum.exp, and use rexp and cexp for the real and complex versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using HasSum.exp now (I'm already using .rexp for the real exponential version).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you forget to push this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like I actually forgot to change it... Thanks for spotting it!

@sgouezel sgouezel 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 May 4, 2024
@MichaelStollBayreuth MichaelStollBayreuth 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 May 4, 2024
Tendsto (fun x => exp (f x)) l (𝓝 (exp z)) :=
(continuous_exp.tendsto _).comp hf
#align filter.tendsto.exp Filter.Tendsto.exp
#align filter.tendsto.exp Filter.Tendsto.rexp

variable [TopologicalSpace α] {f : α → ℝ} {s : Set α} {x : α}

nonrec
theorem ContinuousWithinAt.exp (h : ContinuousWithinAt f s x) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want to do the same to these, but I wouldn't object if you wanted to do that in a follow-up

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's perhaps mission creep for this PR. But I agree that it should be done, and I can have a look.

variable {𝕂 𝔸 : Type*} [RCLike 𝕂] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]

/-- If `f` has sum `a`, then `exp ∘ f` has product `exp a`. -/
lemma HasSum.NormedSpace_exp {ι : Type*} {f : ι → 𝔸} {a : 𝔸} (h : HasSum f a) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you forget to push this change?

@Ruben-VandeVelde Ruben-VandeVelde 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 May 4, 2024
@MichaelStollBayreuth MichaelStollBayreuth 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 May 4, 2024
Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

maintainer merge

Copy link

github-actions bot commented May 5, 2024

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

@sgouezel
Copy link
Contributor

sgouezel commented May 5, 2024

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 May 5, 2024
mathlib-bors bot pushed a commit that referenced this pull request May 5, 2024
This adds lemmas saying that ` HasSum f a`  implies `HasProd (exp ∘ f) (exp a)` for `exp = rexp, cexp, NormedSpace.exp`.

While the `rexp`  and `cexp`  versions could be deduced from the `NormedSpace.exp` one, we give a direct proof (and so avoid needing to import stuff about `NormedSpace.exp` for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames `Filter.Tendsto.exp` to `Filter.Tendsto.rexp` for the version specific to the real exponential function, so that `Filter.Tendsto.exp` can be used for the corresponding statement involving `NormedSpace.exp`.

See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exp.28tsum.29.20.3D.20tprod.28exp.29/near/436891747) on Zulip.



Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented May 5, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request May 5, 2024
This adds lemmas saying that ` HasSum f a`  implies `HasProd (exp ∘ f) (exp a)` for `exp = rexp, cexp, NormedSpace.exp`.

While the `rexp`  and `cexp`  versions could be deduced from the `NormedSpace.exp` one, we give a direct proof (and so avoid needing to import stuff about `NormedSpace.exp` for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames `Filter.Tendsto.exp` to `Filter.Tendsto.rexp` for the version specific to the real exponential function, so that `Filter.Tendsto.exp` can be used for the corresponding statement involving `NormedSpace.exp`.

See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exp.28tsum.29.20.3D.20tprod.28exp.29/near/436891747) on Zulip.



Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented May 5, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request May 5, 2024
This adds lemmas saying that ` HasSum f a`  implies `HasProd (exp ∘ f) (exp a)` for `exp = rexp, cexp, NormedSpace.exp`.

While the `rexp`  and `cexp`  versions could be deduced from the `NormedSpace.exp` one, we give a direct proof (and so avoid needing to import stuff about `NormedSpace.exp` for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames `Filter.Tendsto.exp` to `Filter.Tendsto.rexp` for the version specific to the real exponential function, so that `Filter.Tendsto.exp` can be used for the corresponding statement involving `NormedSpace.exp`.

See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exp.28tsum.29.20.3D.20tprod.28exp.29/near/436891747) on Zulip.



Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented May 5, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: add HasSum f a → HasProd (exp ∘ f) (exp a) [Merged by Bors] - feat: add HasSum f a → HasProd (exp ∘ f) (exp a) May 5, 2024
@mathlib-bors mathlib-bors bot closed this May 5, 2024
@mathlib-bors mathlib-bors bot deleted the MS_exp_tsum branch May 5, 2024 13:12
apnelson1 pushed a commit that referenced this pull request May 12, 2024
This adds lemmas saying that ` HasSum f a`  implies `HasProd (exp ∘ f) (exp a)` for `exp = rexp, cexp, NormedSpace.exp`.

While the `rexp`  and `cexp`  versions could be deduced from the `NormedSpace.exp` one, we give a direct proof (and so avoid needing to import stuff about `NormedSpace.exp` for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames `Filter.Tendsto.exp` to `Filter.Tendsto.rexp` for the version specific to the real exponential function, so that `Filter.Tendsto.exp` can be used for the corresponding statement involving `NormedSpace.exp`.

See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exp.28tsum.29.20.3D.20tprod.28exp.29/near/436891747) on Zulip.



Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
callesonne pushed a commit that referenced this pull request May 16, 2024
This adds lemmas saying that ` HasSum f a`  implies `HasProd (exp ∘ f) (exp a)` for `exp = rexp, cexp, NormedSpace.exp`.

While the `rexp`  and `cexp`  versions could be deduced from the `NormedSpace.exp` one, we give a direct proof (and so avoid needing to import stuff about `NormedSpace.exp` for these results; the proofs are also a bit faster that way).

Based on the discussion below, this also renames `Filter.Tendsto.exp` to `Filter.Tendsto.rexp` for the version specific to the real exponential function, so that `Filter.Tendsto.exp` can be used for the corresponding statement involving `NormedSpace.exp`.

See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exp.28tsum.29.20.3D.20tprod.28exp.29/near/436891747) on Zulip.



Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-merge 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