Skip to content

Commit 12fcbb2

Browse files
author
mathlib4-bot
committed
Merge remote-tracking branch 'upstream/master' into bump/v4.32.0
2 parents 54a62b8 + 07107e4 commit 12fcbb2

50 files changed

Lines changed: 435 additions & 197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Archive/Examples/IfNormalization/Result.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ We add some local simp lemmas so we can unfold the definitions of the normalizat
2424
attribute [local simp] normalized hasNestedIf hasConstantIf hasRedundantIf disjoint vars
2525
List.disjoint
2626

27-
set_option warning.simp.varHead false in
28-
attribute [local simp] apply_ite ite_eq_iff'
29-
3027
variable {b : Bool} {f : ℕ → Bool} {i : ℕ} {t e : IfExpr}
3128

3229
/-!
@@ -74,7 +71,7 @@ def normalize (l : AList (fun _ : ℕ => Bool)) :
7471
if t' = e' then t' else .ite (var v) t' e', by
7572
refine ⟨fun f => ?_, ?_, fun w b => ?_⟩
7673
· -- eval = eval
77-
simp? says simp only [apply_ite, eval_ite_var, ite_eq_iff']
74+
simp only [apply_ite, eval_ite_var, ite_eq_iff']
7875
cases hfv : f v
7976
· simp_all
8077
congr

Archive/Imo/Imo2024Q6.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ lemma Aquaesulian.injective : Function.Injective f := by
5555
· exact (h.eq_of_apply_eq_inl he.symm hc).symm
5656
· exact h.eq_of_apply_eq_inl he hc
5757

58-
set_option warning.simp.varHead false in
59-
@[simp]
6058
lemma Aquaesulian.apply_zero : f 0 = 0 := by
6159
refine h.injective ?_
6260
convert! h.apply_apply_add 0 using 1 <;> simp
@@ -69,14 +67,12 @@ lemma Aquaesulian.apply_neg_apply_add (x : G) : f (-(f x)) + x = 0 := by
6967
· rw [add_neg_cancel, h.apply_zero] at hc
7068
exact hc.symm
7169

72-
set_option warning.simp.varHead false in
73-
@[simp]
7470
lemma Aquaesulian.apply_neg_apply (x : G) : f (-(f x)) = -x := by
7571
rw [← add_eq_zero_iff_eq_neg]
7672
exact h.apply_neg_apply_add x
7773

7874
lemma Aquaesulian.apply_neg_apply_neg (x : G) : f (-(f (-x))) = x := by
79-
simp [h]
75+
simp [h.apply_neg_apply]
8076

8177
lemma Aquaesulian.apply_neg_of_apply_eq {x₁ x₂ : G} (hx : f x₁ = x₂) : f (-x₂) = -x₁ := by
8278
rw [← hx]

Mathlib/Algebra/CharP/Two.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ theorem natCast_cases (n : ℕ) : (n : R) = 0 ∨ (n : R) = 1 :=
6464
theorem natCast_eq_mod (n : ℕ) : (n : R) = (n % 2 : ℕ) := by
6565
simp [natCast_eq_ite, Nat.even_iff]
6666

67-
set_option warning.simp.varHead false in
6867
@[scoped simp]
69-
theorem ofNat_eq_mod (n : ℕ) [n.AtLeastTwo] : (ofNat(n) : R) = (ofNat(n) % 2 : ℕ) :=
68+
theorem ofNat_eq_mod (n : ℕ) [n.AtLeastTwo] : (OfNat.ofNat n : R) = (ofNat(n) % 2 : ℕ) :=
7069
natCast_eq_mod n
7170

7271
example : (37 : R) = 1 := by simp

Mathlib/Algebra/Group/Subgroup/Ker.lean

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -262,20 +262,6 @@ theorem comap_ker {P : Type*} [MulOneClass P] (g : N →* P) (f : G →* N) :
262262
g.ker.comap f = (g.comp f).ker :=
263263
rfl
264264

265-
/-- The kernel of a homomorphism composed with an isomorphism is equal to the kernel of
266-
the homomorphism mapped by the inverse isomorphism. -/
267-
@[to_additive (attr := simp)]
268-
lemma ker_comp_mulEquiv {P : Type*} [MulOneClass P] (g : N →* P) (iso : G ≃* N) :
269-
(g.comp iso).ker = map (iso.symm : N →* G) g.ker := by
270-
rw [← comap_ker, comap_equiv_eq_map_symm]
271-
272-
/-- Composing with an isomorphism on the codomain does not change the kernel. -/
273-
@[to_additive (attr := simp)]
274-
lemma ker_mulEquiv_comp {P : Type*} [MulOneClass P] (f : G →* N) (iso : N ≃* P) :
275-
((iso : N →* P).comp f).ker = f.ker := by
276-
ext
277-
simp
278-
279265
@[to_additive (attr := simp)]
280266
theorem comap_bot (f : G →* N) : (⊥ : Subgroup N).comap f = f.ker :=
281267
rfl
@@ -312,13 +298,36 @@ theorem ker_eq_bot_iff (f : G →* M) : f.ker = ⊥ ↔ Function.Injective f :=
312298
fun h x y hxy => by rwa [eq_iff, h, mem_bot, inv_mul_eq_one, eq_comm] at hxy, fun h =>
313299
bot_unique fun _ hx => h (hx.trans f.map_one.symm)⟩
314300

301+
@[to_additive]
302+
theorem ker_eq_bot (f : G →* M) (hf : Function.Injective f) : f.ker = ⊥ :=
303+
f.ker_eq_bot_iff.mpr hf
304+
305+
/-- The kernel of a homomorphism composed with an isomorphism is equal to the kernel of
306+
the homomorphism mapped by the inverse isomorphism. -/
307+
@[to_additive (attr := simp)]
308+
lemma ker_comp_mulEquiv {P : Type*} [MulOneClass P] (g : N →* P) (iso : G ≃* N) :
309+
(g.comp iso).ker = map (iso.symm : N →* G) g.ker := by
310+
rw [← comap_ker, comap_equiv_eq_map_symm]
311+
312+
/-- Composing with an injective homomorphism on the codomain does not change the kernel. -/
313+
@[to_additive]
314+
lemma ker_comp_of_injective {P : Type*} [MulOneClass P] (f : G →* N) (g : N →* P)
315+
(hg : Function.Injective g) : (g.comp f).ker = f.ker := by
316+
rw [← comap_ker, g.ker_eq_bot hg, comap_bot]
317+
318+
/-- Composing with an isomorphism on the codomain does not change the kernel. -/
319+
@[to_additive (attr := simp)]
320+
lemma ker_mulEquiv_comp {P : Type*} [MulOneClass P] (f : G →* N) (iso : N ≃* P) :
321+
((iso : N →* P).comp f).ker = f.ker :=
322+
ker_comp_of_injective f iso.toMonoidHom iso.injective
323+
315324
@[to_additive (attr := simp)]
316325
theorem _root_.Subgroup.ker_subtype (H : Subgroup G) : H.subtype.ker = ⊥ :=
317-
H.subtype.ker_eq_bot_iff.mpr Subtype.coe_injective
326+
H.subtype.ker_eq_bot Subtype.coe_injective
318327

319328
@[to_additive (attr := simp)]
320329
theorem _root_.Subgroup.ker_inclusion {H K : Subgroup G} (h : H ≤ K) : (inclusion h).ker = ⊥ :=
321-
(inclusion h).ker_eq_bot_iff.mpr (Set.inclusion_injective h)
330+
(inclusion h).ker_eq_bot (Set.inclusion_injective h)
322331

323332
@[to_additive ker_prod]
324333
theorem ker_prod {M N : Type*} [MulOneClass M] [MulOneClass N] (f : G →* M) (g : G →* N) :
@@ -386,7 +395,7 @@ theorem map_eq_bot_iff {f : G →* N} : H.map f = ⊥ ↔ H ≤ f.ker :=
386395

387396
@[to_additive]
388397
theorem map_eq_bot_iff_of_injective {f : G →* N} (hf : Function.Injective f) :
389-
H.map f = ⊥ ↔ H = ⊥ := by rw [map_eq_bot_iff, f.ker_eq_bot_iff.mpr hf, le_bot_iff]
398+
H.map f = ⊥ ↔ H = ⊥ := by rw [map_eq_bot_iff, f.ker_eq_bot hf, le_bot_iff]
390399

391400
open MonoidHom
392401

@@ -453,7 +462,7 @@ theorem comap_map_eq_self {f : G →* N} {H : Subgroup G} (h : f.ker ≤ H) :
453462
@[to_additive]
454463
theorem comap_map_eq_self_of_injective {f : G →* N} (h : Function.Injective f) (H : Subgroup G) :
455464
comap f (map f H) = H :=
456-
comap_map_eq_self (((ker_eq_bot_iff _).mpr h).symm ▸ bot_le)
465+
comap_map_eq_self ((ker_eq_bot _ h).symm ▸ bot_le)
457466

458467
@[to_additive]
459468
theorem map_le_map_iff {f : G →* N} {H K : Subgroup G} : H.map f ≤ K.map f ↔ H ≤ K ⊔ f.ker := by

Mathlib/AlgebraicGeometry/Modules/Tilde.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ lemma isSMulRegular_of_le_basicOpen {f : R} (hle : U ≤ PrimeSpectrum.basicOpen
121121

122122
set_option backward.isDefEq.respectTransparency false in
123123
@[simp]
124-
lemma Scheme.Modules.restrictAppIso_smul_Spec {S : CommRingCat.{u}} (f : R ⟶ S)
124+
lemma restrictAppIso_smul_Spec {S : CommRingCat.{u}} (f : R ⟶ S)
125125
[IsOpenImmersion (Spec.map f)] {U : (Spec S).Opens} (r : R)
126126
(x : Γ(M.restrict (Spec.map f), U)) :
127127
dsimp% (M.restrictAppIso (Spec.map f) U).hom (f r • x) =
128128
r • (M.restrictAppIso (Spec.map f) U).hom x := by
129-
rw [Scheme.Modules.smul_Spec_def, Scheme.Modules.smul_Spec_def]
129+
rw [smul_Spec_def, smul_Spec_def]
130130
simp_rw [smul_restrictAppIso_hom_apply, ← ConcreteCategory.comp_apply, Category.assoc]
131131
have :
132132
f ≫ (ΓSpecIso S).inv ≫ (Spec S).presheaf.map U.leTop.op ≫ (Hom.appIso (Spec.map f) U).inv =
@@ -135,6 +135,10 @@ lemma Scheme.Modules.restrictAppIso_smul_Spec {S : CommRingCat.{u}} (f : R ⟶ S
135135
rfl
136136
rw [this]
137137

138+
set_option linter.dupNamespace false in
139+
@[deprecated (since := "2026-06-04")]
140+
alias Scheme.Modules.restrictAppIso_smul_Spec := restrictAppIso_smul_Spec
141+
138142
end Scheme.Modules
139143

140144
/--

Mathlib/Analysis/Analytic/Composition.lean

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -850,31 +850,26 @@ lemma AnalyticOn.comp {f : F → G} {g : E → F} {s : Set F}
850850
AnalyticOn 𝕜 (f ∘ g) t :=
851851
fun x m ↦ (hf _ (h m)).comp (hg x m) h
852852

853+
-- Allow `to_fun` to eta-expand `g ∘ f`. Ideally, `Function.comp_def` would be a global pull lemma
854+
-- instead, which is not supported yet: see https://github.com/leanprover-community/mathlib4/issues/40183.
855+
attribute [local push ←] Function.comp_def
853856
/-- If two functions `g` and `f` are analytic respectively at `f x` and `x`, then `g ∘ f` is
854857
analytic at `x`. -/
855-
@[fun_prop]
858+
@[to_fun (attr := fun_prop)]
856859
theorem AnalyticAt.comp {g : F → G} {f : E → F} {x : E} (hg : AnalyticAt 𝕜 g (f x))
857860
(hf : AnalyticAt 𝕜 f x) : AnalyticAt 𝕜 (g ∘ f) x := by
858861
rw [← analyticWithinAt_univ] at hg hf ⊢
859862
apply hg.comp hf (by simp)
860863

861-
/-- If two functions `g` and `f` are analytic respectively at `f x` and `x`, then `g ∘ f` is
862-
analytic at `x`. -/
863-
@[fun_prop]
864-
theorem AnalyticAt.comp' {g : F → G} {f : E → F} {x : E} (hg : AnalyticAt 𝕜 g (f x))
865-
(hf : AnalyticAt 𝕜 f x) : AnalyticAt 𝕜 (fun z ↦ g (f z)) x :=
866-
hg.comp hf
864+
@[deprecated (since := "2026-01-24")] alias AnalyticAt.comp' := AnalyticAt.fun_comp
867865

868866
/-- Version of `AnalyticAt.comp` where point equality is a separate hypothesis. -/
867+
@[to_fun]
869868
theorem AnalyticAt.comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E} (hg : AnalyticAt 𝕜 g y)
870869
(hf : AnalyticAt 𝕜 f x) (hy : f x = y) : AnalyticAt 𝕜 (g ∘ f) x := by
871870
rw [← hy] at hg
872871
exact hg.comp hf
873-
874-
/-- Version of `AnalyticAt.comp` where point equality is a separate hypothesis. -/
875-
theorem AnalyticAt.comp_of_eq' {g : F → G} {f : E → F} {y : F} {x : E} (hg : AnalyticAt 𝕜 g y)
876-
(hf : AnalyticAt 𝕜 f x) (hy : f x = y) : AnalyticAt 𝕜 (fun z ↦ g (f z)) x := by
877-
apply hg.comp_of_eq hf hy
872+
@[deprecated (since := "2026-05-18")] alias AnalyticAt.comp_of_eq' := AnalyticAt.fun_comp_of_eq
878873

879874
theorem AnalyticAt.comp_analyticWithinAt {g : F → G} {f : E → F} {x : E} {s : Set E}
880875
(hg : AnalyticAt 𝕜 g (f x)) (hf : AnalyticWithinAt 𝕜 f s x) :
@@ -939,6 +934,7 @@ theorem HasFiniteFPowerSeriesAt.comp {m n : ℕ} {g : F → G} {f : E → F}
939934

940935
/-- If two functions `g` and `f` are continuously polynomial respectively at `f x` and `x`,
941936
then `g ∘ f` is continuously polynomial at `x`. -/
937+
@[to_fun]
942938
theorem CPolynomialAt.comp {g : F → G} {f : E → F} {x : E}
943939
(hg : CPolynomialAt 𝕜 g (f x)) (hf : CPolynomialAt 𝕜 f x) :
944940
CPolynomialAt 𝕜 (g ∘ f) x := by
@@ -947,25 +943,13 @@ theorem CPolynomialAt.comp {g : F → G} {f : E → F} {x : E}
947943
refine ⟨q.comp p, m * (n + 1), ?_⟩
948944
exact hm.comp (hn.of_le (Nat.le_succ n)) (Nat.zero_lt_succ n)
949945

950-
/-- If two functions `g` and `f` are continuously polynomial respectively at `f x` and `x`,
951-
then `g ∘ f` is continuously polynomial at `x`. -/
952-
theorem CPolynomialAt.fun_comp {g : F → G} {f : E → F} {x : E}
953-
(hg : CPolynomialAt 𝕜 g (f x)) (hf : CPolynomialAt 𝕜 f x) :
954-
CPolynomialAt 𝕜 (fun z ↦ g (f z)) x :=
955-
hg.comp hf
956-
957946
/-- Version of `CPolynomialAt.comp` where point equality is a separate hypothesis. -/
947+
@[to_fun]
958948
theorem CPolynomialAt.comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E} (hg : CPolynomialAt 𝕜 g y)
959949
(hf : CPolynomialAt 𝕜 f x) (hy : f x = y) : CPolynomialAt 𝕜 (g ∘ f) x := by
960950
rw [← hy] at hg
961951
exact hg.comp hf
962952

963-
/-- Version of `CPolynomialAt.comp` where point equality is a separate hypothesis. -/
964-
theorem CPolynomialAt.fun_comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E}
965-
(hg : CPolynomialAt 𝕜 g y) (hf : CPolynomialAt 𝕜 f x) (hy : f x = y) :
966-
CPolynomialAt 𝕜 (fun z ↦ g (f z)) x :=
967-
hg.comp_of_eq hf hy
968-
969953
/-- If two functions `g` and `f` are continuously polynomial respectively on `s.image f` and `s`,
970954
then `g ∘ f` is continuously polynomial on `s`. -/
971955
theorem CPolynomialOn.comp' {s : Set E} {g : F → G} {f : E → F} (hg : CPolynomialOn 𝕜 g (s.image f))

Mathlib/Analysis/Calculus/DifferentialForm/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ theorem extDerivWithin_pullback {ω : F → F [⋀^Fin n]→L[𝕜] G} {f : E
250250
rw [extDerivWithin,
251251
fderivWithin_continuousAlternatingMapCompContinuousLinearMap (by exact hω.comp x hdf hst) hd2f
252252
(hs x hxs),
253-
alternatizeUncurryFin_add, fderivWithin_comp' _ hω hdf hst (hs x hxs), extDerivWithin,
253+
alternatizeUncurryFin_add, fderivWithin_fun_comp _ hω hdf hst (hs x hxs), extDerivWithin,
254254
alternatizeUncurryFin_fderivCompContinuousLinearMap_eq_zero, add_zero]
255255
· ext v
256256
simp +unfoldPartialApp [alternatizeUncurryFin_apply, Fin.removeNth, Function.comp_def]

Mathlib/Analysis/Calculus/FDeriv/Comp.lean

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -133,31 +133,24 @@ theorem DifferentiableAt.comp_differentiableWithinAt {g : F → G} (hg : Differe
133133
(hf : DifferentiableWithinAt 𝕜 f s x) : DifferentiableWithinAt 𝕜 (g ∘ f) s x :=
134134
hg.differentiableWithinAt.comp x hf (mapsTo_univ _ _)
135135

136+
-- Allow `to_fun` to eta-expand `g ∘ f`. Ideally, `Function.comp_def` would be a global pull lemma
137+
-- instead, which is not supported yet: see https://github.com/leanprover-community/mathlib4/issues/40183.
138+
attribute [local push ←] Function.comp_def
139+
@[to_fun fderivWithin_fun_comp]
136140
theorem fderivWithin_comp {g : F → G} {t : Set F} (hg : DifferentiableWithinAt 𝕜 g t (f x))
137141
(hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t) (hxs : UniqueDiffWithinAt 𝕜 s x) :
138142
fderivWithin 𝕜 (g ∘ f) s x = (fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x) :=
139143
(hg.hasFDerivWithinAt.comp x hf.hasFDerivWithinAt h).fderivWithin hxs
140144

145+
@[to_fun fderivWithin_fun_comp_of_eq]
141146
theorem fderivWithin_comp_of_eq {g : F → G} {t : Set F} {y : F}
142147
(hg : DifferentiableWithinAt 𝕜 g t y) (hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t)
143148
(hxs : UniqueDiffWithinAt 𝕜 s x) (hy : f x = y) :
144149
fderivWithin 𝕜 (g ∘ f) s x = (fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x) := by
145150
subst hy; exact fderivWithin_comp _ hg hf h hxs
146151

147-
/-- A variant for the derivative of a composition, written without `∘`. -/
148-
theorem fderivWithin_comp' {g : F → G} {t : Set F} (hg : DifferentiableWithinAt 𝕜 g t (f x))
149-
(hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t) (hxs : UniqueDiffWithinAt 𝕜 s x) :
150-
fderivWithin 𝕜 (fun y ↦ g (f y)) s x
151-
= (fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x) :=
152-
fderivWithin_comp _ hg hf h hxs
153-
154-
/-- A variant for the derivative of a composition, written without `∘`. -/
155-
theorem fderivWithin_comp_of_eq' {g : F → G} {t : Set F} {y : F}
156-
(hg : DifferentiableWithinAt 𝕜 g t y) (hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t)
157-
(hxs : UniqueDiffWithinAt 𝕜 s x) (hy : f x = y) :
158-
fderivWithin 𝕜 (fun y ↦ g (f y)) s x
159-
= (fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x) := by
160-
subst hy; exact fderivWithin_comp _ hg hf h hxs
152+
@[deprecated (since := "2026-05-18")] alias fderivWithin_comp' := fderivWithin_fun_comp
153+
@[deprecated (since := "2026-05-18")] alias fderivWithin_comp_of_eq' := fderivWithin_fun_comp_of_eq
161154

162155
/-- A version of `fderivWithin_comp` that is useful to rewrite the composition of two derivatives
163156
into a single derivative. This version always applies, but creates a new side-goal `f x = y`. -/
@@ -180,14 +173,11 @@ theorem fderivWithin_comp₃ {g' : G → G'} {g : F → G} {t : Set F} {u : Set
180173
exact (hg'.hasFDerivWithinAt.comp x (hg.hasFDerivWithinAt.comp x hf.hasFDerivWithinAt h2f) <|
181174
h2g.comp h2f).fderivWithin hxs
182175

176+
@[to_fun fderiv_fun_comp]
183177
theorem fderiv_comp {g : F → G} (hg : DifferentiableAt 𝕜 g (f x)) (hf : DifferentiableAt 𝕜 f x) :
184178
fderiv 𝕜 (g ∘ f) x = (fderiv 𝕜 g (f x)).comp (fderiv 𝕜 f x) :=
185179
(hg.hasFDerivAt.comp x hf.hasFDerivAt).fderiv
186-
187-
/-- A variant for the derivative of a composition, written without `∘`. -/
188-
theorem fderiv_comp' {g : F → G} (hg : DifferentiableAt 𝕜 g (f x)) (hf : DifferentiableAt 𝕜 f x) :
189-
fderiv 𝕜 (fun y ↦ g (f y)) x = (fderiv 𝕜 g (f x)).comp (fderiv 𝕜 f x) :=
190-
fderiv_comp x hg hf
180+
@[deprecated (since := "2026-05-18")] alias fderiv_comp' := fderiv_fun_comp
191181

192182
theorem fderiv_comp_fderivWithin {g : F → G} (hg : DifferentiableAt 𝕜 g (f x))
193183
(hf : DifferentiableWithinAt 𝕜 f s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :

Mathlib/Analysis/Calculus/VectorField.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ lemma pullbackWithin_lieBracketWithin_of_isSymmSndFDerivWithinAt
636636
have Af : DifferentiableWithinAt 𝕜 f s x := h'f.differentiableWithinAt two_ne_zero
637637
simp only [lieBracketWithin_eq, pullbackWithin_eq_of_fderivWithin_eq hMx, map_sub, AV, AW]
638638
rw [fderivWithin_clm_apply, fderivWithin_clm_apply]
639-
· simp [fderivWithin_comp' x hW Af hst (hu x hx), ← hMx,
640-
fderivWithin_comp' x hV Af hst (hu x hx), M_diff, hf.eq]
639+
· simp [fderivWithin_fun_comp x hW Af hst (hu x hx), ← hMx,
640+
fderivWithin_fun_comp x hV Af hst (hu x hx), M_diff, hf.eq]
641641
· exact hu x hx
642642
· exact M_symm_smooth.differentiableWithinAt one_ne_zero
643643
· exact hV.comp x Af hst

Mathlib/Analysis/MeanInequalities.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,10 @@ lemma inner_le_weight_mul_Lp_of_nonneg (s : Finset ι) {p : ℝ} (hp : 1 ≤ p)
10121012
have := coe_le_coe.2 <| NNReal.inner_le_weight_mul_Lp s hp.le (fun i ↦ ENNReal.toNNReal (w i))
10131013
fun i ↦ ENNReal.toNNReal (f i)
10141014
rw [coe_mul] at this
1015-
simp_rw [coe_rpow_of_nonneg _ <| inv_nonneg.2 hp₀.le, coe_finsetSum, ← ENNReal.toNNReal_rpow,
1015+
simp_rw [coe_rpow_of_nonneg _ <| inv_nonneg.2 hp₀.le, ofNNReal_finsetSum, ← ENNReal.toNNReal_rpow,
10161016
← ENNReal.toNNReal_mul, sum_congr rfl fun i hi ↦ coe_toNNReal (H'.2 i hi)] at this
1017-
simp only [toNNReal_mul, coe_mul, sub_nonneg, hp₁.le, coe_rpow_of_nonneg, coe_finsetSum] at this
1017+
simp only [toNNReal_mul, coe_mul, sub_nonneg, hp₁.le, coe_rpow_of_nonneg, ofNNReal_finsetSum]
1018+
at this
10181019
convert! this using 2 with i hi
10191020
· obtain hw | hw := eq_or_ne (w i) 0
10201021
· simp [hw]

0 commit comments

Comments
 (0)