Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ab223fa
initial commit
mcdoll May 21, 2026
bda971b
protected
mcdoll May 21, 2026
2519b8e
search&replace
mcdoll May 21, 2026
496edf4
search&replace
mcdoll May 21, 2026
b5d45a4
search&replace
mcdoll May 21, 2026
54cfdf2
fixes
mcdoll May 21, 2026
e12fbfc
fixes
mcdoll May 21, 2026
77e2110
fixes
mcdoll May 21, 2026
91b911d
fixes
mcdoll May 21, 2026
8f60382
fixes
mcdoll May 21, 2026
8a14840
fixes
mcdoll May 21, 2026
e03427a
fixes
mcdoll May 21, 2026
c696cdd
fix?
mcdoll May 21, 2026
ba16b44
fix?
mcdoll May 21, 2026
6680fb6
fix? last try
mcdoll May 21, 2026
d6141e6
fixes
mcdoll May 21, 2026
bcfa056
it builds
mcdoll May 21, 2026
04e741d
nolints
mcdoll May 21, 2026
b458cd6
fix more
mcdoll May 21, 2026
717f5fb
Merge branch 'master' into IsApplyCLM
mcdoll May 25, 2026
5372a3d
revert unnecessary fixes
mcdoll May 28, 2026
697288a
Merge branch 'IsApplyCLM' of github.com:mcdoll/mathlib4 into IsApplyCLM
mcdoll May 28, 2026
db7a89a
merge
mcdoll May 28, 2026
7390194
fix
mcdoll May 28, 2026
1c6ce55
Merge branch 'master' into IsApplyCLM
mcdoll May 30, 2026
3555f3e
fix?
mcdoll Jun 5, 2026
bf29ea8
fixes
mcdoll Jun 5, 2026
2de7818
fixes
mcdoll Jun 5, 2026
6ffa6ef
fixes
mcdoll Jun 5, 2026
0edb19f
fixes
mcdoll Jun 5, 2026
bdf6507
fixes
mcdoll Jun 5, 2026
3331a0c
fixes
mcdoll Jun 5, 2026
67ac40f
fixes
mcdoll Jun 5, 2026
50be9e6
fixes
mcdoll Jun 5, 2026
9eb55ac
fix
mcdoll Jun 5, 2026
0dd0183
Merge branch 'master' into IsApplyCLM
mcdoll Jun 9, 2026
3df4a86
Update Mathlib/Topology/Algebra/Module/ContinuousLinearMap/Basic.lean
mcdoll Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Archive/Sensitivity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ using only the addition of `V`. -/
set_option backward.isDefEq.respectTransparency false in
theorem f_squared (v : V n) : (f n) (f n v) = (n : ℝ) • v := by
induction n with
| zero => simp only [Nat.cast_zero, zero_smul, f_zero, zero_apply]
| zero => simp only [Nat.cast_zero, zero_smul, f_zero, LinearMap.zero_apply]
| succ n IH =>
cases v; rw [f_succ_apply, f_succ_apply]; simp [IH, add_smul (n : ℝ) 1, add_assoc]; abel

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/ModuleCat/Topology/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ section
variable {M₁ M₂ : TopModuleCat R}

@[simp] lemma hom_zero : (0 : M₁ ⟶ M₂).hom = 0 := rfl
@[simp] lemma hom_zero_apply (m : M₁) : (0 : M₁ ⟶ M₂).hom m = 0 := rfl
lemma hom_zero_apply (m : M₁) : (0 : M₁ ⟶ M₂).hom m = 0 := rfl
@[simp] lemma hom_add (φ₁ φ₂ : M₁ ⟶ M₂) : (φ₁ + φ₂).hom = φ₁.hom + φ₂.hom := rfl
@[simp] lemma hom_neg (φ : M₁ ⟶ M₂) : (-φ).hom = -φ.hom := rfl
@[simp] lemma hom_sub (φ₁ φ₂ : M₁ ⟶ M₂) : (φ₁ - φ₂).hom = φ₁.hom - φ₂.hom := rfl
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Category/ModuleCat/Topology/Homology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def isColimitCoker : IsColimit (CokernelCofork.ofπ (cokerπ φ) (comp_cokerπ
(fun s ↦ ofHom <|
{ toLinearMap := φ.hom.range.liftQ s.π.hom.toLinearMap
(LinearMap.range_le_ker_iff.mpr <| show (φ ≫ s.π).hom.toLinearMap = 0 by
rw [s.condition, hom_zero, ContinuousLinearMap.coe_zero])
rw [s.condition, hom_zero, ContinuousLinearMap.toLinearMap_zero])
cont := Continuous.quotient_lift s.π.hom.2 _ })
(fun s ↦ rfl)
(fun s m h ↦ by dsimp at h ⊢; rw [← cancel_epi (cokerπ φ), h]; rfl)
Expand Down Expand Up @@ -113,7 +113,7 @@ instance : CategoryWithHomology (TopModuleCat R) := by
(Submodule.isOpenQuotientMap_mkQ _).isQuotientMap
(Submodule.isOpenQuotientMap_mkQ _)
(Subtype.val_injective.comp hF.1) ?_
· rw [← ContinuousLinearMap.coe_comp', ← ContinuousLinearMap.coe_comp',
· rw [← ContinuousLinearMap.coe_comp, ← ContinuousLinearMap.coe_comp,
← hom_comp, ← hom_comp, ShortComplex.π_leftRightHomologyComparison'_ι]
· suffices ∀ x y, S.g y = 0 → D₂.p y = D₂.p x → S.g x = 0 by
simpa [Set.subset_def, D₁, kerι_apply S.g] using this
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Analytic/Binomial.lean
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ theorem one_div_sub_pow_hasFPowerSeriesOnBall_zero (a : ℕ) {z : ℂ} (hz : z
rw [← map_zero (z⁻¹ • 1 : ℂ →L[ℂ] ℂ)] at this
have := this.compContinuousLinearMap
have H : 1 / ‖(z⁻¹ • 1 : ℂ →L[ℂ] ℂ)‖ₑ = ‖z‖ₑ := by simp [enorm_smul, enorm_inv, hz]
simp only [one_div, ContinuousLinearMap.coe_smul', H, Function.comp_def] at this
simp only [one_div, FunLike.coe_smul, H, Function.comp_def] at this
convert! (this.const_smul (c := (z ^ (a + 1))⁻¹)).congr ?_ using 2
· ext n
simp only [FormalMultilinearSeries.smul_apply, ContinuousMultilinearMap.smul_apply,
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Analytic/IteratedFDeriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ lemma FormalMultilinearSeries.iteratedFDerivSeries_eq_zero {k n : ℕ}
ContinuousLinearMap.compContinuousMultilinearMap_coe, ContinuousLinearEquiv.coe_coe,
LinearIsometryEquiv.coe_toContinuousLinearEquiv, Function.comp_apply,
continuousMultilinearCurryLeftEquiv_symm_apply, ContinuousMultilinearMap.zero_apply,
ContinuousLinearMap.zero_apply,
_root_.zero_apply,
derivSeries_eq_zero _ (ih (p.congr_zero (Nat.succ_add_eq_add_succ _ _).symm h))]

/-- If the `n`-th term in a power series is zero, then the `n`-th derivative of the corresponding
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/CStarAlgebra/CStarMatrix.lean
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,13 @@ noncomputable def toCLM : CStarMatrix m n A →ₗ[ℂ] C⋆ᵐᵒᵈ(A, m → A
ext
simp only [ContinuousLinearMap.coe_mk', LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply,
WithCStarModule.equivL_apply, WithCStarModule.equivL_symm_apply,
WithCStarModule.equiv_symm_pi_apply, ContinuousLinearMap.add_apply, WithCStarModule.add_apply]
WithCStarModule.equiv_symm_pi_apply, _root_.add_apply, WithCStarModule.add_apply]
rw [Matrix.vecMul_add, Pi.add_apply]
map_smul' c M := by
ext x i
simp only [ContinuousLinearMap.coe_mk', LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply,
WithCStarModule.equivL_apply, WithCStarModule.equivL_symm_apply,
WithCStarModule.equiv_symm_pi_apply, ContinuousLinearMap.smul_apply,
WithCStarModule.equiv_symm_pi_apply, _root_.smul_apply,
WithCStarModule.smul_apply, RingHom.id_apply]
rw [Matrix.vecMul_smul, Pi.smul_apply]

Expand Down
20 changes: 11 additions & 9 deletions Mathlib/Analysis/CStarAlgebra/Multiplier.lean
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ instance instAdd : Add 𝓜(𝕜, A) where
{ toProd := a.toProd + b.toProd
central := fun x y =>
show (a.snd + b.snd) x * y = x * (a.fst + b.fst) y by
simp only [ContinuousLinearMap.add_apply, mul_add, add_mul, central] }
simp only [add_apply, mul_add, add_mul, central] }

instance instZero : Zero 𝓜(𝕜, A) where
zero :=
Expand All @@ -132,7 +132,7 @@ instance instSub : Sub 𝓜(𝕜, A) where
{ toProd := a.toProd - b.toProd
central := fun x y =>
show (a.snd - b.snd) x * y = x * (a.fst - b.fst) y by
simp only [ContinuousLinearMap.sub_apply, _root_.sub_mul, _root_.mul_sub, central] }
simp only [sub_apply, _root_.sub_mul, _root_.mul_sub, central] }

section Scalars

Expand All @@ -144,7 +144,7 @@ instance instSMul : SMul S 𝓜(𝕜, A) where
{ toProd := s • a.toProd
central := fun x y =>
show (s • a.snd) x * y = x * (s • a.fst) y by
simp only [ContinuousLinearMap.smul_apply, mul_smul_comm, smul_mul_assoc, central] }
simp only [smul_apply, mul_smul_comm, smul_mul_assoc, central] }

@[simp]
theorem smul_toProd (s : S) (a : 𝓜(𝕜, A)) : (s • a).toProd = s • a.toProd :=
Expand Down Expand Up @@ -184,13 +184,15 @@ instance instNatCast : NatCast 𝓜(𝕜, A) where
natCast n :=
⟨n, fun x y => by
rw [Prod.snd_natCast, Prod.fst_natCast]
simp only [← Nat.smul_one_eq_cast, smul_apply, one_apply, mul_smul_comm, smul_mul_assoc]⟩
simp only [← Nat.smul_one_eq_cast, smul_apply, one_apply_eq_self, mul_smul_comm,
smul_mul_assoc]⟩

instance instIntCast : IntCast 𝓜(𝕜, A) where
intCast n :=
⟨n, fun x y => by
rw [Prod.snd_intCast, Prod.fst_intCast]
simp only [← Int.smul_one_eq_cast, smul_apply, one_apply, mul_smul_comm, smul_mul_assoc]⟩
simp only [← Int.smul_one_eq_cast, smul_apply, one_apply_eq_self, mul_smul_comm,
smul_mul_assoc]⟩

instance instPow : Pow 𝓜(𝕜, A) ℕ where
pow a n :=
Expand All @@ -199,7 +201,7 @@ instance instPow : Pow 𝓜(𝕜, A) ℕ where
| zero => rfl
| succ k hk =>
rw [Prod.pow_snd, Prod.pow_fst] at hk ⊢
rw [pow_succ' a.snd, mul_apply, a.central, hk, pow_succ a.fst, mul_apply]⟩
rw [pow_succ' a.snd, mul_apply_eq_comp, a.central, hk, pow_succ a.fst, mul_apply_eq_comp]⟩

instance instInhabited : Inhabited 𝓜(𝕜, A) :=
⟨0⟩
Expand Down Expand Up @@ -347,8 +349,8 @@ instance instAlgebra : Algebra 𝕜 𝓜(𝕜, A) where
{ toFun k :=
{ toProd := algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A)) k
central := fun x y => by
simp_rw [Prod.algebraMap_apply, Algebra.algebraMap_eq_smul_one, smul_apply, one_apply,
mul_smul_comm, smul_mul_assoc] }
simp_rw [Prod.algebraMap_apply, Algebra.algebraMap_eq_smul_one, smul_apply,
one_apply_eq_self, mul_smul_comm, smul_mul_assoc] }
map_one' := ext (𝕜 := 𝕜) (A := A) _ _ <| map_one <| algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A))
map_mul' _ _ :=
ext (𝕜 := 𝕜) (A := A) _ _ <|
Expand Down Expand Up @@ -611,7 +613,7 @@ instance instCStarRing : CStarRing 𝓜(𝕜, A) where
(a.fst.le_opNorm_of_le hy))
_ ≤ ‖a‖₊ * ‖a‖₊ := by simp only [mul_one, nnnorm_fst, le_rfl]
rw [← nnnorm_snd]
simp only [mul_snd, ← sSup_unitClosedBall_eq_nnnorm, star_snd, mul_apply]
simp only [mul_snd, ← sSup_unitClosedBall_eq_nnnorm, star_snd, mul_apply_eq_comp]
simp only [← @opNNNorm_mul_apply 𝕜 _ A]
simp only [← sSup_unitClosedBall_eq_nnnorm, mul_apply']
refine csSup_eq_of_forall_le_of_forall_lt_exists_gt (hball.image _) ?_ fun r hr => ?_
Expand Down
10 changes: 5 additions & 5 deletions Mathlib/Analysis/CStarAlgebra/Unitization.lean
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) :
simp only
-- rewrite to a more convenient form; this is where we use the C⋆-property
rw [← Real.sqrt_sq (norm_nonneg _), Real.sqrt_le_sqrt_iff (norm_nonneg _), sq,
← CStarRing.norm_star_mul_self, ContinuousLinearMap.add_apply, star_add, mul_apply',
Algebra.algebraMap_eq_smul_one, ContinuousLinearMap.smul_apply,
ContinuousLinearMap.one_apply, star_mul, star_smul, add_mul, smul_mul_assoc, ← mul_smul_comm,
← CStarRing.norm_star_mul_self, add_apply, star_add, mul_apply',
Algebra.algebraMap_eq_smul_one, smul_apply,
one_apply_eq_self, star_mul, star_smul, add_mul, smul_mul_assoc, ← mul_smul_comm,
mul_assoc, ← mul_add, ← sSup_unitClosedBall_eq_norm]
refine (norm_mul_le _ _).trans ?_
calc
Expand All @@ -119,9 +119,9 @@ theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) :
simpa only [mul_one] using!
mul_le_mul_of_nonneg_left (mem_closedBall_zero_iff.1 hy) (norm_nonneg (star x * x).fst)
· exact (unit_le_opNorm _ y <| mem_closedBall_zero_iff.1 hy).trans (opNorm_mul_apply_le _ _ _)
· simp only [ContinuousLinearMap.add_apply, mul_apply', Unitization.snd_star, Unitization.snd_mul,
· simp only [add_apply, mul_apply', Unitization.snd_star, Unitization.snd_mul,
Unitization.fst_mul, Unitization.fst_star, Algebra.algebraMap_eq_smul_one, smul_apply,
one_apply, smul_add, mul_add, add_mul]
one_apply_eq_self, smul_add, mul_add, add_mul]
simp only [smul_smul, smul_mul_assoc, ← add_assoc, ← mul_assoc, mul_smul_comm]

variable {𝕜}
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/AbsolutelyMonotone.lean
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ theorem smul {c : ℝ} (hf : AbsolutelyMonotoneOn f s) (hc : 0 ≤ c) :
have hcomp : (T ∘ f) = c • f := by ext x; simp [hT, smul_eq_mul]
refine ⟨_, hcomp ▸ hp.continuousLinearMap_comp T, fun n x hx => ?_⟩
simp only [ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply, hT,
ContinuousLinearMap.smul_apply, ContinuousLinearMap.id_apply, smul_eq_mul]
smul_apply, ContinuousLinearMap.id_apply, smul_eq_mul]
exact mul_nonneg hc (hp_nn n hx)

end AbsolutelyMonotoneOn
9 changes: 3 additions & 6 deletions Mathlib/Analysis/Calculus/ContDiff/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_left (g : F ≃L[𝕜] G
fderivWithin_congr' (@IH) hx
simp_rw [Z]
rw [(g.continuousMultilinearMapCongrRight fun _ : Fin i => E).comp_fderivWithin (hs x hx)]
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_apply,
ContinuousLinearEquiv.continuousMultilinearMapCongrRight_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
rw [iteratedFDerivWithin_succ_apply_left]
simp [iteratedFDerivWithin_succ_apply_left]

/-- Iterated derivatives commute with left composition by continuous linear equivalences. -/
theorem ContinuousLinearEquiv.iteratedFDeriv_comp_left {f : E → F} {x : E} (g : F ≃L[𝕜] G) {i : ℕ} :
Expand Down Expand Up @@ -452,11 +449,11 @@ theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G ≃L[𝕜]
(iteratedFDerivWithin 𝕜 i f s ∘ g)) (g ⁻¹' s) x :=
fderivWithin_congr' (@IH) hx
rw [this, ContinuousLinearEquiv.comp_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx)]
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_apply,
simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe,
ContinuousLinearEquiv.continuousMultilinearMapCongrLeft_apply,
ContinuousMultilinearMap.compContinuousLinearMap_apply]
rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx),
ContinuousLinearMap.coe_comp', coe_coe, comp_apply, tail_def, tail_def]
ContinuousLinearMap.comp_apply, coe_coe, tail_def, tail_def]

/-- The iterated derivative of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
Expand Down
5 changes: 2 additions & 3 deletions Mathlib/Analysis/Calculus/ContDiff/Bounds.lean
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E →L
have Bu_le : ‖Bu‖ ≤ ‖B‖ := by
refine ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg B) fun y => ?_
refine ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => ?_
simp only [Eu, Fu, Gu, hBu, Bu₀, compL_apply, coe_comp', Function.comp_apply,
ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_coe, flip_apply,
LinearIsometryEquiv.norm_map]
simp only [Eu, Fu, Gu, hBu, Bu₀, compL_apply, comp_apply, ContinuousLinearEquiv.coe_coe,
LinearIsometryEquiv.coe_coe, flip_apply, LinearIsometryEquiv.norm_map]
calc
‖B (isoE y) (isoF x)‖ ≤ ‖B (isoE y)‖ * ‖isoF x‖ := ContinuousLinearMap.le_opNorm _ _
_ ≤ ‖B‖ * ‖isoE y‖ * ‖isoF x‖ := by gcongr; apply ContinuousLinearMap.le_opNorm
Expand Down
7 changes: 3 additions & 4 deletions Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ private lemma faaDiBruno_aux1 {m : ℕ} (q : FormalMultilinearSeries 𝕜 F G)
simp only [Nat.succ_eq_add_one, OrderedFinpartition.extend, extendLeft,
ContinuousMultilinearMap.curryLeft_apply,
FormalMultilinearSeries.compAlongOrderedFinpartition_apply, applyOrderedFinpartition_apply,
ContinuousLinearMap.coe_comp', comp_apply, continuousMultilinearCurryFin1_apply,
ContinuousLinearMap.comp_apply, continuousMultilinearCurryFin1_apply,
Matrix.zero_empty, ContinuousLinearMap.flipMultilinear_apply_apply,
compAlongOrderedFinpartitionL_apply, compAlongOrderFinpartition_apply]
congr
Expand All @@ -1032,7 +1032,7 @@ private lemma faaDiBruno_aux2 {m : ℕ} (q : FormalMultilinearSeries 𝕜 F G)
simp? [OrderedFinpartition.extend, extendMiddle, applyOrderedFinpartition_apply] says
simp only [OrderedFinpartition.extend, extendMiddle, ContinuousMultilinearMap.curryLeft_apply,
Nat.succ_eq_add_one, FormalMultilinearSeries.compAlongOrderedFinpartition_apply,
applyOrderedFinpartition_apply, ContinuousLinearMap.coe_comp', comp_apply,
applyOrderedFinpartition_apply, ContinuousLinearMap.comp_apply,
ContinuousMultilinearMap.toContinuousLinearMap_apply, compAlongOrderedFinpartitionL_apply,
compAlongOrderFinpartition_apply]
congr
Expand Down Expand Up @@ -1101,8 +1101,7 @@ theorem HasFTaylorSeriesUpToOn.comp {n : WithTop ℕ∞} {g : F → G} {f : E
ext v
simp only [Nat.succ_eq_add_one, Fintype.sum_option, ContinuousMultilinearMap.curryLeft_apply,
ContinuousMultilinearMap.sum_apply, ContinuousMultilinearMap.add_apply,
FormalMultilinearSeries.compAlongOrderedFinpartition_apply, ContinuousLinearMap.coe_sum',
Finset.sum_apply, ContinuousLinearMap.add_apply]
FormalMultilinearSeries.compAlongOrderedFinpartition_apply, sum_apply, add_apply]
rw [Finset.sum_sigma']
exact Fintype.sum_equiv (OrderedFinpartition.extendEquiv m) _ _ (fun p ↦ rfl)
· intro m hm
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/ContDiff/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ theorem iteratedFDerivWithin_neg_apply {f : E → F} (hu : UniqueDiffOn 𝕜 s)
_ = fderivWithin 𝕜 (-iteratedFDerivWithin 𝕜 i f s) s x (h 0) (Fin.tail h) := by
rw [fderivWithin_congr' (@hi) hx, Pi.neg_def]
_ = -(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s) x (h 0) (Fin.tail h) := by
rw [fderivWithin_neg (hu x hx), ContinuousLinearMap.neg_apply,
rw [fderivWithin_neg (hu x hx), neg_apply,
ContinuousMultilinearMap.neg_apply]
_ = -(iteratedFDerivWithin 𝕜 (i + 1) f s) x h := by
rw [iteratedFDerivWithin_succ_apply_left]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/Darboux.lean
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≤ b)
(not_le_of_gt hma)
have : b - a ∈ posTangentConeAt (Icc a b) a :=
sub_mem_posTangentConeAt_of_segment_subset (segment_eq_Icc hab ▸ Subset.rfl)
simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply]
simpa only [ContinuousLinearMap.smulRight_apply, one_apply_eq_self]
using! hc.localize.hasFDerivWithinAt_nonneg (hg a (left_mem_Icc.2 hab)) this
rcases cmem.2.eq_or_lt' with (rfl | hcb)
-- Show that `c` can't be equal to `b`
· refine absurd (sub_nonpos.1 <| nonpos_of_mul_nonneg_right ?_ (sub_lt_zero.2 hab'))
(not_le_of_gt hmb)
have : a - b ∈ posTangentConeAt (Icc a b) b :=
sub_mem_posTangentConeAt_of_segment_subset (by rw [segment_symm, segment_eq_Icc hab])
simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply]
simpa only [ContinuousLinearMap.smulRight_apply, one_apply_eq_self]
using! hc.localize.hasFDerivWithinAt_nonneg (hg b (right_mem_Icc.2 hab)) this
exact ⟨hac, hcb⟩
use c, cmem'
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/Deriv/Add.lean
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ theorem HasStrictDerivAt.neg (h : HasStrictDerivAt f f' x) : HasStrictDerivAt (-
@[to_fun]
theorem derivWithin.neg : derivWithin (-f) s x = -derivWithin f s x := by
by_cases hsx : UniqueDiffWithinAt 𝕜 s x
· simp only [derivWithin, fderivWithin_neg hsx, ContinuousLinearMap.neg_apply]
· simp only [derivWithin, fderivWithin_neg hsx, neg_apply]
· simp [derivWithin_zero_of_not_uniqueDiffWithinAt hsx]

@[to_fun]
theorem deriv.neg : deriv (-f) x = -deriv f x := by
simp only [deriv, fderiv_neg, ContinuousLinearMap.neg_apply]
simp only [deriv, fderiv_neg, neg_apply]

@[to_fun (attr := simp)]
theorem deriv.neg' : (deriv (-f)) = fun x ↦ -deriv f x :=
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/Deriv/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ variable {s t : Set 𝕜}
variable {L L₁ L₂ : Filter (𝕜 × 𝕜)}

theorem derivWithin_zero_of_not_accPt (h : ¬AccPt x (𝓟 s)) : derivWithin f s x = 0 := by
rw [derivWithin, fderivWithin_zero_of_not_accPt h, ContinuousLinearMap.zero_apply]
rw [derivWithin, fderivWithin_zero_of_not_accPt h, zero_apply]

theorem derivWithin_zero_of_not_uniqueDiffWithinAt (h : ¬UniqueDiffWithinAt 𝕜 s x) :
derivWithin f s x = 0 :=
derivWithin_zero_of_not_accPt <| mt AccPt.uniqueDiffWithinAt h

theorem derivWithin_zero_of_notMem_closure (h : x ∉ closure s) : derivWithin f s x = 0 := by
rw [derivWithin, fderivWithin_zero_of_notMem_closure h, ContinuousLinearMap.zero_apply]
rw [derivWithin, fderivWithin_zero_of_notMem_closure h, zero_apply]

theorem deriv_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : deriv f x = 0 := by
unfold deriv
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/Deriv/CompMul.lean
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ theorem derivWithin_comp_mul_left :

variable (c f x) in
theorem deriv_comp_mul_left : deriv (f <| c * ·) x = c • deriv f (c * x) := by
simp only [← smul_eq_mul, deriv, fderiv_comp_smul, ContinuousLinearMap.smul_apply]
simp only [← smul_eq_mul, deriv, fderiv_comp_smul, smul_apply]
Loading
Loading