-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from Ruben-VandeVelde/EulerProducts
Drop dependency on EulerProducts
- Loading branch information
Showing
4 changed files
with
78 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/- | ||
Copyright (c) 2024 Michael Stoll. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Michael Stoll | ||
-/ | ||
import Mathlib.Analysis.Complex.Positivity | ||
|
||
/-! | ||
### Auxiliary lemmas | ||
-/ | ||
|
||
namespace Complex | ||
-- see https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Differentiability.20of.20the.20natural.20map.20.E2.84.9D.20.E2.86.92.20.E2.84.82/near/418095234 | ||
|
||
lemma hasDerivAt_ofReal (x : ℝ) : HasDerivAt ofReal 1 x := | ||
HasDerivAt.ofReal_comp <| hasDerivAt_id x | ||
|
||
lemma deriv_ofReal (x : ℝ) : deriv ofReal x = 1 := | ||
(hasDerivAt_ofReal x).deriv | ||
|
||
lemma differentiableAt_ofReal (x : ℝ) : DifferentiableAt ℝ ofReal x := | ||
(hasDerivAt_ofReal x).differentiableAt | ||
|
||
lemma differentiable_ofReal : Differentiable ℝ ofReal := | ||
ofRealCLM.differentiable | ||
|
||
end Complex | ||
|
||
lemma DifferentiableAt.comp_ofReal {e : ℂ → ℂ} {z : ℝ} (hf : DifferentiableAt ℂ e z) : | ||
DifferentiableAt ℝ (fun x : ℝ ↦ e x) z := | ||
hf.hasDerivAt.comp_ofReal.differentiableAt | ||
|
||
lemma deriv.comp_ofReal {e : ℂ → ℂ} {z : ℝ} (hf : DifferentiableAt ℂ e z) : | ||
deriv (fun x : ℝ ↦ e x) z = deriv e z := | ||
hf.hasDerivAt.comp_ofReal.deriv | ||
|
||
lemma Differentiable.comp_ofReal {e : ℂ → ℂ} (h : Differentiable ℂ e) : | ||
Differentiable ℝ (fun x : ℝ ↦ e x) := | ||
fun _ ↦ h.differentiableAt.comp_ofReal | ||
|
||
lemma DifferentiableAt.ofReal_comp {z : ℝ} {f : ℝ → ℝ} (hf : DifferentiableAt ℝ f z) : | ||
DifferentiableAt ℝ (fun (y : ℝ) ↦ (f y : ℂ)) z := | ||
hf.hasDerivAt.ofReal_comp.differentiableAt | ||
|
||
lemma Differentiable.ofReal_comp {f : ℝ → ℝ} (hf : Differentiable ℝ f) : | ||
Differentiable ℝ (fun (y : ℝ) ↦ (f y : ℂ)) := | ||
fun _ ↦ hf.differentiableAt.ofReal_comp | ||
|
||
open Complex ContinuousLinearMap in | ||
lemma HasDerivAt.of_hasDerivAt_ofReal_comp {z : ℝ} {f : ℝ → ℝ} {u : ℂ} | ||
(hf : HasDerivAt (fun y ↦ (f y : ℂ)) u z) : | ||
∃ u' : ℝ, u = u' ∧ HasDerivAt f u' z := by | ||
lift u to ℝ | ||
· have H := (imCLM.hasFDerivAt.comp z hf.hasFDerivAt).hasDerivAt.deriv | ||
simp only [Function.comp_def, imCLM_apply, ofReal_im, deriv_const] at H | ||
rwa [eq_comm, comp_apply, imCLM_apply, smulRight_apply, one_apply, one_smul] at H | ||
refine ⟨u, rfl, ?_⟩ | ||
convert (reCLM.hasFDerivAt.comp z hf.hasFDerivAt).hasDerivAt | ||
rw [comp_apply, smulRight_apply, one_apply, one_smul, reCLM_apply, ofReal_re] | ||
|
||
lemma DifferentiableAt.ofReal_comp_iff {z : ℝ} {f : ℝ → ℝ} : | ||
DifferentiableAt ℝ (fun (y : ℝ) ↦ (f y : ℂ)) z ↔ DifferentiableAt ℝ f z := by | ||
refine ⟨fun H ↦ ?_, ofReal_comp⟩ | ||
obtain ⟨u, _, hu₂⟩ := H.hasDerivAt.of_hasDerivAt_ofReal_comp | ||
exact HasDerivAt.differentiableAt hu₂ | ||
|
||
lemma Differentiable.ofReal_comp_iff {f : ℝ → ℝ} : | ||
Differentiable ℝ (fun (y : ℝ) ↦ (f y : ℂ)) ↔ Differentiable ℝ f := | ||
forall_congr' fun _ ↦ DifferentiableAt.ofReal_comp_iff | ||
|
||
lemma deriv.ofReal_comp {z : ℝ} {f : ℝ → ℝ} : | ||
deriv (fun (y : ℝ) ↦ (f y : ℂ)) z = deriv f z := by | ||
by_cases hf : DifferentiableAt ℝ f z | ||
· exact hf.hasDerivAt.ofReal_comp.deriv | ||
· have hf' := mt DifferentiableAt.ofReal_comp_iff.mp hf | ||
rw [deriv_zero_of_not_differentiableAt hf, deriv_zero_of_not_differentiableAt hf', | ||
Complex.ofReal_zero] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters