@@ -246,6 +246,17 @@ theorem derivWithin_mul_const (hc : DifferentiableWithinAt 𝕜 c s x) (d : 𝔸
246
246
· exact (hc.hasDerivWithinAt.mul_const d).derivWithin hxs
247
247
· simp [derivWithin_zero_of_isolated hxs]
248
248
249
+ lemma derivWithin_mul_const_field (u : 𝕜') :
250
+ derivWithin (fun y => v y * u) s x = derivWithin v s x * u := by
251
+ by_cases hv : DifferentiableWithinAt 𝕜 v s x
252
+ · rw [derivWithin_mul_const hv u]
253
+ by_cases hu : u = 0
254
+ · simp [hu]
255
+ rw [derivWithin_zero_of_not_differentiableWithinAt hv, zero_mul,
256
+ derivWithin_zero_of_not_differentiableWithinAt]
257
+ have : v = fun x ↦ (v x * u) * u⁻¹ := by ext; simp [hu]
258
+ exact fun h_diff ↦ hv <| this ▸ h_diff.mul_const _
259
+
249
260
theorem deriv_mul_const (hc : DifferentiableAt 𝕜 c x) (d : 𝔸) :
250
261
deriv (fun y => c y * d) x = deriv c x * d :=
251
262
(hc.hasDerivAt.mul_const d).deriv
@@ -284,6 +295,11 @@ theorem derivWithin_const_mul (c : 𝔸) (hd : DifferentiableWithinAt 𝕜 d s x
284
295
· exact (hd.hasDerivWithinAt.const_mul c).derivWithin hxs
285
296
· simp [derivWithin_zero_of_isolated hxs]
286
297
298
+ lemma derivWithin_const_mul_field (u : 𝕜') :
299
+ derivWithin (fun y => u * v y) s x = u * derivWithin v s x := by
300
+ simp_rw [mul_comm u]
301
+ exact derivWithin_mul_const_field u
302
+
287
303
theorem deriv_const_mul (c : 𝔸) (hd : DifferentiableAt 𝕜 d x) :
288
304
deriv (fun y => c * d y) x = c * deriv d x :=
289
305
(hd.hasDerivAt.const_mul c).deriv
0 commit comments