Zulip Chat Archive
Stream: Is there code for X?
Topic: Mixing `ContDiffOn` and `deriv`
Alex Kontorovich (Mar 11 2024 at 18:38):
What's a quick way to show this?
import Mathlib
theorem ContDiffOn.hasDeriv_deriv {φ : ℝ → ℂ} {s : Set ℝ} (φDiff : ContDiffOn ℝ 1 φ s) {x : ℝ} (x_in_s : x ∈ s) :
HasDerivAt φ (deriv φ x) x := by
sorry
Thanks!
Alex Kontorovich (Mar 11 2024 at 18:40):
Also this one please: (basically trying to extract the expected information out of ContDiff _ 1
)
import Mathlib
theorem ContDiffOn.continuousOn_deriv {φ : ℝ → ℂ} {a b : ℝ}
(φDiff : ContDiffOn ℝ 1 φ (Set.uIcc a b)) :
ContinuousOn (deriv φ) (Set.uIcc a b) := by
sorry
Thanks!
Tomas Skrivan (Mar 11 2024 at 20:02):
The second one is almost solved by
import Mathlib
theorem ContDiffOn.continuousOn_deriv {φ : ℝ → ℂ} {a b : ℝ}
(φDiff : ContDiffOn ℝ 1 φ (Set.uIcc a b)) :
ContinuousOn (deriv φ) (Set.uIcc a b) := by
apply ContDiffOn.continuousOn (𝕜:=ℝ) (n:=0)
apply (fun h => ((contDiffOn_succ_iff_deriv_of_isOpen sorry).1 h).2)
assumption
It would work on Set.Ioo a b
, the closed interval needs some more massaging. This is also nice example for fun_prop
, a tactic that would ideally solve this automatically but it fails completely here.
Patrick Massot (Mar 11 2024 at 20:28):
I’m not sure the first one is true.
Patrick Massot (Mar 11 2024 at 20:33):
And indeed the following isn’t super promising:
example : ContDiffOn ℝ 1 (fun x : ℝ ↦ |x|) {0} := by
apply contDiffOn_id.congr
simp
Patrick Massot (Mar 11 2024 at 20:34):
So you lemma would apply to the absolute value function with s = {0}
, x = 0
and φ = abs
.
Alex Kontorovich (Mar 11 2024 at 21:27):
Argh. You would think whatever ContDiffOn _ 1
is doing under the hood, it means "once continuously differentiable"... which in particular would be (a) differentiable, and (b) the derivative would be continuous. Not so, you say!... :(
Alex Kontorovich (Mar 11 2024 at 21:28):
Ok, what if s
in the first one is restricted to an interval Set.Ioo a b
with a < b
...?
Patrick Massot (Mar 11 2024 at 21:44):
Then there is no problem. The whole discussion is what it means to be differentiable on a set that is not open. On an open set there is no subtlety.
Patrick Massot (Mar 11 2024 at 21:45):
The problem is your statement mixes an assumption that see only the restriction of φ
to s
with a conclusion that has nothing to do with s
.
Alex Kontorovich (Mar 11 2024 at 21:45):
Ok good; and is there easy API to conclude HasDerivAt φ (deriv φ x) x
? (I didn't find it...)
Alex Kontorovich (Mar 11 2024 at 21:45):
Patrick Massot said:
The problem is your statement mixes an assumption that see only the restriction of
φ
tos
with a conclusion that has nothing to do withs
.
(Well, I'd asked for , so not nothing...?)
Patrick Massot (Mar 11 2024 at 21:46):
This is not the conclusion.
Patrick Massot (Mar 11 2024 at 21:46):
HasDerivAt
has nothing specific to s
.
Junyan Xu (Mar 11 2024 at 21:47):
There's docs#ContDiffOn.contDiffAt asking s is a neighborhood of x
Patrick Massot (Mar 11 2024 at 21:47):
Sure, asking to s
is open is too much, being a neighborhood of x
is enough.
Alex Kontorovich (Mar 11 2024 at 21:48):
Thanks, and is there then API connecting ContDiffAt
with to HasDerivAt f (deriv f x) x
...?
Junyan Xu (Mar 11 2024 at 21:51):
Yes, there are docs#ContDiffAt.hasStrictDerivAt and docs#HasStrictDerivAt.hasDerivAt
Alex Kontorovich (Mar 11 2024 at 23:14):
Ah, perfect! ContDiffAt.hasStrictDerivAt
is what I couldn't find...
Last updated: May 02 2025 at 03:31 UTC