Zulip Chat Archive
Stream: mathlib4
Topic: Is there a theorem in Mathlib4 for deriv_const_rpow
Samarendra Dash (Apr 30 2025 at 23:04):
Hello,
I’m looking for a lemma in Mathlib4 that states deriv c^x = c^x * Real.log c ?
We have theorems such as Real.hasStrictDerivAt_const_rpow , HasFDerivAt.const_rpow .
but I haven’t found a theorem that directly packages the rule
Does such a lemma already exist in Mathlib4, or would it be worthwhile to add one?
Thanks in advance for any pointers!
Patrick Massot (May 01 2025 at 08:58):
@loogle HasDerivAt, Real.log, HPow.hPow
loogle (May 01 2025 at 08:58):
:search: HasDerivAt.rpow, mellin_hasDerivAt_of_isBigO_rpow, and 1 more
Patrick Massot (May 01 2025 at 08:59):
@Samarendra Dash notice how I asked your question to the loogle bot and it replied with useful starting point to explore around.
Patrick Massot (May 01 2025 at 09:01):
Exploring the file containing the first result returned by loogle should be useful.
Patrick Massot (May 01 2025 at 09:09):
That being said, your lemma doesn’t seem to be explicitly stated. You can prove it using
example (c : ℝ) (h : 0 < c) : deriv (fun x : ℝ ↦ c ^ x) = fun x ↦ c^x*(Real.log c) := by
ext x
simpa using (hasDerivAt_const x c).rpow (hasDerivAt_id' x) h |>.deriv
but I think it’s fair for users to expect this to be explicitly stated. So I would say you could contribute it to Mathlib.
Samarendra Dash (May 01 2025 at 15:36):
Thank you @Patrick Massot . I had used loogle to find the expressions and I had searched the file. I just didn't understand how use that to solve this problem. Because usually we have explicit deriv_* expressions to help us. Thank you for the help.
Patrick Massot (May 01 2025 at 19:59):
I think a big part of the issue is the following counter-intuitive thing: the most useful theorem are the ones in term of HasDerivAt
, not the ones in terms of deriv
. In informal math, a course on derivative will typically start with a nice definition of “ is differentiable at if there is some number such that…”, but then very quickly it will say “in this case the number is unique and denoted by ”. And you will never see statement like: for any positive number , the function is differentiable at every with derivative . You will rather see a formula as in your first message. But that formula is really a concise (slightly cheating?) way to write the above sentence. In Mathlib it’s not so easy to cheat.
Patrick Massot (May 01 2025 at 20:03):
A more elementary variation of this issue already appears with limits. Whenever you write you are abusing notations a bit, because it looks like an equality between and the number . But this interpretation relies on the incorrect claim that every sequence admits a limit. So it is much closer the mathematical reality to use some notation like that doesn’t look like an equality.
Last updated: May 02 2025 at 03:31 UTC