analysis.calculus.deriv.pow
⟷
Mathlib.Analysis.Calculus.Deriv.Pow
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -60,7 +60,7 @@ theorem hasStrictDerivAt_pow :
| 0, x => by simp [hasStrictDerivAt_const]
| 1, x => by simpa using hasStrictDerivAt_id x
| n + 1 + 1, x => by
- simpa [pow_succ', add_mul, mul_assoc] using
+ simpa [pow_succ, add_mul, mul_assoc] using
(hasStrictDerivAt_pow (n + 1) x).mul (hasStrictDerivAt_id x)
#align has_strict_deriv_at_pow hasStrictDerivAt_pow
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Mathbin.Analysis.Calculus.Deriv.Mul
-import Mathbin.Analysis.Calculus.Deriv.Comp
+import Analysis.Calculus.Deriv.Mul
+import Analysis.Calculus.Deriv.Comp
#align_import analysis.calculus.deriv.pow from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.pow
-! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Deriv.Mul
import Mathbin.Analysis.Calculus.Deriv.Comp
+#align_import analysis.calculus.deriv.pow from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
+
/-!
# Derivative of `(f x) ^ n`, `n : ℕ`
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -57,6 +57,7 @@ variable {c : 𝕜 → 𝕜} {c' : 𝕜}
variable (n : ℕ)
+#print hasStrictDerivAt_pow /-
theorem hasStrictDerivAt_pow :
∀ (n : ℕ) (x : 𝕜), HasStrictDerivAt (fun x => x ^ n) ((n : 𝕜) * x ^ (n - 1)) x
| 0, x => by simp [hasStrictDerivAt_const]
@@ -65,63 +66,90 @@ theorem hasStrictDerivAt_pow :
simpa [pow_succ', add_mul, mul_assoc] using
(hasStrictDerivAt_pow (n + 1) x).mul (hasStrictDerivAt_id x)
#align has_strict_deriv_at_pow hasStrictDerivAt_pow
+-/
+#print hasDerivAt_pow /-
theorem hasDerivAt_pow (n : ℕ) (x : 𝕜) : HasDerivAt (fun x => x ^ n) ((n : 𝕜) * x ^ (n - 1)) x :=
(hasStrictDerivAt_pow n x).HasDerivAt
#align has_deriv_at_pow hasDerivAt_pow
+-/
+#print hasDerivWithinAt_pow /-
theorem hasDerivWithinAt_pow (n : ℕ) (x : 𝕜) (s : Set 𝕜) :
HasDerivWithinAt (fun x => x ^ n) ((n : 𝕜) * x ^ (n - 1)) s x :=
(hasDerivAt_pow n x).HasDerivWithinAt
#align has_deriv_within_at_pow hasDerivWithinAt_pow
+-/
+#print differentiableAt_pow /-
theorem differentiableAt_pow : DifferentiableAt 𝕜 (fun x => x ^ n) x :=
(hasDerivAt_pow n x).DifferentiableAt
#align differentiable_at_pow differentiableAt_pow
+-/
+#print differentiableWithinAt_pow /-
theorem differentiableWithinAt_pow : DifferentiableWithinAt 𝕜 (fun x => x ^ n) s x :=
(differentiableAt_pow n).DifferentiableWithinAt
#align differentiable_within_at_pow differentiableWithinAt_pow
+-/
+#print differentiable_pow /-
theorem differentiable_pow : Differentiable 𝕜 fun x : 𝕜 => x ^ n := fun x => differentiableAt_pow n
#align differentiable_pow differentiable_pow
+-/
+#print differentiableOn_pow /-
theorem differentiableOn_pow : DifferentiableOn 𝕜 (fun x => x ^ n) s :=
(differentiable_pow n).DifferentiableOn
#align differentiable_on_pow differentiableOn_pow
+-/
+#print deriv_pow /-
theorem deriv_pow : deriv (fun x => x ^ n) x = (n : 𝕜) * x ^ (n - 1) :=
(hasDerivAt_pow n x).deriv
#align deriv_pow deriv_pow
+-/
+#print deriv_pow' /-
@[simp]
theorem deriv_pow' : (deriv fun x => x ^ n) = fun x => (n : 𝕜) * x ^ (n - 1) :=
funext fun x => deriv_pow n
#align deriv_pow' deriv_pow'
+-/
+#print derivWithin_pow /-
theorem derivWithin_pow (hxs : UniqueDiffWithinAt 𝕜 s x) :
derivWithin (fun x => x ^ n) s x = (n : 𝕜) * x ^ (n - 1) :=
(hasDerivWithinAt_pow n x s).derivWithin hxs
#align deriv_within_pow derivWithin_pow
+-/
+#print HasDerivWithinAt.pow /-
theorem HasDerivWithinAt.pow (hc : HasDerivWithinAt c c' s x) :
HasDerivWithinAt (fun y => c y ^ n) ((n : 𝕜) * c x ^ (n - 1) * c') s x :=
(hasDerivAt_pow n (c x)).comp_hasDerivWithinAt x hc
#align has_deriv_within_at.pow HasDerivWithinAt.pow
+-/
+#print HasDerivAt.pow /-
theorem HasDerivAt.pow (hc : HasDerivAt c c' x) :
HasDerivAt (fun y => c y ^ n) ((n : 𝕜) * c x ^ (n - 1) * c') x := by
rw [← hasDerivWithinAt_univ] at *; exact hc.pow n
#align has_deriv_at.pow HasDerivAt.pow
+-/
+#print derivWithin_pow' /-
theorem derivWithin_pow' (hc : DifferentiableWithinAt 𝕜 c s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
derivWithin (fun x => c x ^ n) s x = (n : 𝕜) * c x ^ (n - 1) * derivWithin c s x :=
(hc.HasDerivWithinAt.pow n).derivWithin hxs
#align deriv_within_pow' derivWithin_pow'
+-/
+#print deriv_pow'' /-
@[simp]
theorem deriv_pow'' (hc : DifferentiableAt 𝕜 c x) :
deriv (fun x => c x ^ n) x = (n : 𝕜) * c x ^ (n - 1) * deriv c x :=
(hc.HasDerivAt.pow n).deriv
#align deriv_pow'' deriv_pow''
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.deriv.pow
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.Calculus.Deriv.Comp
/-!
# Derivative of `(f x) ^ n`, `n : ℕ`
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file we prove that `(x ^ n)' = n * x ^ (n - 1)`, where `n` is a natural number.
For a more detailed overview of one-dimensional derivatives in mathlib, see the module docstring of
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -27,7 +27,7 @@ derivative, power
universe u v w
-open Classical Topology BigOperators Filter ENNReal
+open scoped Classical Topology BigOperators Filter ENNReal
open Filter Asymptotics Set
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -107,10 +107,8 @@ theorem HasDerivWithinAt.pow (hc : HasDerivWithinAt c c' s x) :
#align has_deriv_within_at.pow HasDerivWithinAt.pow
theorem HasDerivAt.pow (hc : HasDerivAt c c' x) :
- HasDerivAt (fun y => c y ^ n) ((n : 𝕜) * c x ^ (n - 1) * c') x :=
- by
- rw [← hasDerivWithinAt_univ] at *
- exact hc.pow n
+ HasDerivAt (fun y => c y ^ n) ((n : 𝕜) * c x ^ (n - 1) * c') x := by
+ rw [← hasDerivWithinAt_univ] at *; exact hc.pow n
#align has_deriv_at.pow HasDerivAt.pow
theorem derivWithin_pow' (hc : DifferentiableWithinAt 𝕜 c s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -47,7 +47,7 @@ theorem hasStrictDerivAt_pow :
| 0, x => by simp [hasStrictDerivAt_const]
| 1, x => by simpa using hasStrictDerivAt_id x
| n + 1 + 1, x => by
- simpa [pow_succ', add_mul, mul_assoc] using
+ simpa [pow_succ, add_mul, mul_assoc] using
(hasStrictDerivAt_pow (n + 1) x).mul (hasStrictDerivAt_id x)
#align has_strict_deriv_at_pow hasStrictDerivAt_pow
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -29,25 +29,17 @@ open Topology BigOperators Filter ENNReal
open Filter Asymptotics Set
variable {𝕜 : Type u} [NontriviallyNormedField 𝕜]
-
variable {F : Type v} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
-
variable {E : Type w} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
-
variable {f f₀ f₁ g : 𝕜 → F}
-
variable {f' f₀' f₁' g' : F}
-
variable {x : 𝕜}
-
variable {s t : Set 𝕜}
-
variable {L L₁ L₂ : Filter 𝕜}
/-! ### Derivative of `x ↦ x^n` for `n : ℕ` -/
variable {c : 𝕜 → 𝕜} {c' : 𝕜}
-
variable (n : ℕ)
theorem hasStrictDerivAt_pow :
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -23,7 +23,8 @@ derivative, power
universe u v w
-open Classical Topology BigOperators Filter ENNReal
+open scoped Classical
+open Topology BigOperators Filter ENNReal
open Filter Asymptotics Set
@@ -119,4 +120,3 @@ theorem deriv_pow'' (hc : DifferentiableAt 𝕜 c x) :
deriv (fun x => c x ^ n) x = (n : 𝕜) * c x ^ (n - 1) * deriv c x :=
(hc.hasDerivAt.pow n).deriv
#align deriv_pow'' deriv_pow''
-
@@ -2,15 +2,12 @@
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.pow
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Comp
+#align_import analysis.calculus.deriv.pow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
/-!
# Derivative of `(f x) ^ n`, `n : ℕ`
The unported dependencies are
algebra.order.module
init.core
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file