From a15d473434914f3efe300130295ea1939b8ec70b Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Wed, 5 Jun 2024 16:31:55 +0200 Subject: [PATCH] Update partialDeriv.lean --- Nevanlinna/partialDeriv.lean | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Nevanlinna/partialDeriv.lean b/Nevanlinna/partialDeriv.lean index 19d4bed..33f3aec 100644 --- a/Nevanlinna/partialDeriv.lean +++ b/Nevanlinna/partialDeriv.lean @@ -226,6 +226,33 @@ lemma partialDeriv_fderivOn ยท simp +lemma partialDeriv_fderivAt + {z : E} + {f : E โ†’ F} + (hf : ContDiffAt ๐•œ 2 f z) + (a b : E) : + fderiv ๐•œ (fderiv ๐•œ f) z b a = partialDeriv ๐•œ b (partialDeriv ๐•œ a f) z := by + + unfold partialDeriv + rw [fderiv_clm_apply] + simp + + -- DifferentiableAt ๐•œ (fun w => fderiv ๐•œ f w) z + obtain โŸจf', โŸจu, hโ‚u, hโ‚‚uโŸฉ, hf' โŸฉ := contDiffAt_succ_iff_hasFDerivAt.1 hf + have tโ‚ : (fun w โ†ฆ fderiv ๐•œ f w) =แถ [nhds z] f' := by + apply Filter.eventuallyEq_iff_exists_mem.2 + use u + constructor + ยท exact hโ‚u + ยท intro x hx + exact HasFDerivAt.fderiv (hโ‚‚u x hx) + rw [Filter.EventuallyEq.differentiableAt_iff tโ‚] + exact hf'.differentiableAt le_rfl + + -- DifferentiableAt ๐•œ (fun w => a) z + exact differentiableAt_const a + + theorem partialDeriv_eventuallyEq {fโ‚ fโ‚‚ : E โ†’ F} {x : E} (h : fโ‚ =แถ [nhds x] fโ‚‚) : โˆ€ v : E, partialDeriv ๐•œ v fโ‚ x = partialDeriv ๐•œ v fโ‚‚ x := by unfold partialDeriv rw [Filter.EventuallyEq.fderiv_eq h] @@ -356,3 +383,41 @@ theorem partialDeriv_commOn rw [โ† partialDeriv_fderivOn โ„ hs h vโ‚‚ vโ‚ z hz] rw [derivSymm] rw [โ† partialDeriv_fderivOn โ„ hs h vโ‚ vโ‚‚ z hz] + + +theorem partialDeriv_commAt + {E : Type*} [NormedAddCommGroup E] [NormedSpace โ„ E] + {F : Type*} [NormedAddCommGroup F] [NormedSpace โ„ F] + {z : E} + {f : E โ†’ F} + (h : ContDiffAt โ„ 2 f z) : + โˆ€ vโ‚ vโ‚‚ : E, partialDeriv โ„ vโ‚ (partialDeriv โ„ vโ‚‚ f) z = partialDeriv โ„ vโ‚‚ (partialDeriv โ„ vโ‚ f) z := by + + intro vโ‚ vโ‚‚ + + have derivSymm : + (fderiv โ„ (fun w => fderiv โ„ f w) z) vโ‚ vโ‚‚ = (fderiv โ„ (fun w => fderiv โ„ f w) z) vโ‚‚ vโ‚ := by + + let f' := fderiv โ„ f + have hโ‚€ : โˆ€ y โˆˆ s, HasFDerivAt f (f' y) y := by + intro y hy + apply DifferentiableAt.hasFDerivAt + apply DifferentiableOn.differentiableAt _ (IsOpen.mem_nhds hs hy) + apply h.differentiableOn one_le_two + + let f'' := (fderiv โ„ f' z) + have hโ‚ : HasFDerivAt f' f'' z := by + apply DifferentiableAt.hasFDerivAt + apply DifferentiableOn.differentiableAt _ (IsOpen.mem_nhds hs hz) + apply ContDiffOn.differentiableOn _ (Submonoid.oneLE.proof_2 โ„•โˆž) + exact ((contDiffOn_succ_iff_fderiv_of_isOpen hs).1 h).2 + + have hโ‚€' : โˆ€แถ  (y : E) in nhds z, HasFDerivAt f (f' y) y := by + apply eventually_nhds_iff.mpr + use s + + exact second_derivative_symmetric_of_eventually hโ‚€' hโ‚ vโ‚ vโ‚‚ + + rw [โ† partialDeriv_fderivAt โ„ hs h vโ‚‚ vโ‚ z hz] + rw [derivSymm] + rw [โ† partialDeriv_fderivOn โ„ hs h vโ‚ vโ‚‚ z hz]