Skip to content

Commit c758509

Browse files
chore: tidy various files (#20154)
1 parent 765f372 commit c758509

File tree

36 files changed

+89
-104
lines changed

36 files changed

+89
-104
lines changed

Mathlib/Algebra/Algebra/Pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ variable {I} (R)
5757
@[simps!]
5858
def algHom [CommSemiring R] [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]
5959
{A : Type*} [Semiring A] [Algebra R A] (g : ∀ i, A →ₐ[R] f i) :
60-
A →ₐ[R] ∀ i, f i where
60+
A →ₐ[R] ∀ i, f i where
6161
__ := Pi.ringHom fun i ↦ (g i).toRingHom
6262
commutes' r := by ext; simp
6363

Mathlib/Algebra/BigOperators/Group/List.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ theorem prod_concat : (l.concat a).prod = l.prod * a := by
119119

120120
@[to_additive (attr := simp)]
121121
theorem prod_flatten {l : List (List M)} : l.flatten.prod = (l.map List.prod).prod := by
122-
induction l <;> [rfl; simp only [*, List.flatten, map, prod_append, prod_cons]]
122+
induction l with
123+
| nil => simp
124+
| cons head tail ih => simp only [*, List.flatten, map, prod_append, prod_cons]
123125

124126
@[deprecated (since := "2024-10-15")] alias prod_join := prod_flatten
125127
@[deprecated (since := "2024-10-15")] alias sum_join := sum_flatten
@@ -130,7 +132,7 @@ theorem prod_eq_foldr {l : List M} : l.prod = foldr (· * ·) 1 l := rfl
130132
@[to_additive (attr := simp)]
131133
theorem prod_replicate (n : ℕ) (a : M) : (replicate n a).prod = a ^ n := by
132134
induction n with
133-
| zero => rw [pow_zero]; rfl
135+
| zero => rw [pow_zero, replicate_zero, prod_nil]
134136
| succ n ih => rw [replicate_succ, prod_cons, ih, pow_succ']
135137

136138
@[to_additive sum_eq_card_nsmul]

Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ theorem stream_succ (h : Int.fract v ≠ 0) (n : ℕ) :
121121
IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n := by
122122
induction n with
123123
| zero =>
124-
have H : (IntFractPair.of v).fr = Int.fract v := rfl
124+
have H : (IntFractPair.of v).fr = Int.fract v := by simp [IntFractPair.of]
125125
rw [stream_zero, stream_succ_of_some (stream_zero v) (ne_of_eq_of_ne H h), H]
126126
| succ n ih =>
127127
rcases eq_or_ne (IntFractPair.stream (Int.fract v)⁻¹ n) none with hnone | hsome

Mathlib/Algebra/Homology/Bifunctor.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ variable {K₁ K₂ F c} in
160160
lemma hom_ext {Y : D} {j : J} {f g : (mapBifunctor K₁ K₂ F c).X j ⟶ Y}
161161
(h : ∀ (i₁ : I₁) (i₂ : I₂) (h : ComplexShape.π c₁ c₂ c ⟨i₁, i₂⟩ = j),
162162
ιMapBifunctor K₁ K₂ F c i₁ i₂ j h ≫ f = ιMapBifunctor K₁ K₂ F c i₁ i₂ j h ≫ g) :
163-
f = g :=
163+
f = g :=
164164
HomologicalComplex₂.total.hom_ext _ h
165165

166166
section

Mathlib/Algebra/Module/LocalizedModule/Basic.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ lemma smul_eq_iff_of_mem
416416
rw [mul_smul, ← eq1, Submonoid.mk_smul, smul_comm r t]
417417
· rintro ⟨a, ha, eq1⟩
418418
refine ⟨a, ha, ?_⟩
419-
rw [← eq1, mul_comm, mul_smul, Submonoid.mk_smul]
420-
rfl
419+
rw [← eq1, mul_comm, mul_smul, Submonoid.mk_smul, Submonoid.smul_def, Submonoid.mk_smul]
421420

422421
lemma eq_zero_of_smul_eq_zero
423422
(r : R) (hr : r ∈ S) (x : LocalizedModule S M) (hx : r • x = 0) : x = 0 := by

Mathlib/Analysis/Calculus/FDeriv/Analytic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ variable {f : E → F} {x : E} {s : Set E}
7979
/-- A function which is analytic within a set is strictly differentiable there. Since we
8080
don't have a predicate `HasStrictFDerivWithinAt`, we spell out what it would mean. -/
8181
theorem HasFPowerSeriesWithinAt.hasStrictFDerivWithinAt (h : HasFPowerSeriesWithinAt f p s x) :
82-
(fun y ↦ f y.1 - f y.2 - ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) (y.1 - y.2))
82+
(fun y ↦ f y.1 - f y.2 - (continuousMultilinearCurryFin1 𝕜 E F (p 1)) (y.1 - y.2))
8383
=o[𝓝[insert x s ×ˢ insert x s] (x, x)] fun y ↦ y.1 - y.2 := by
8484
refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_)
8585
refine isLittleO_iff_exists_eq_mul.2fun y => ‖y - (x, x)‖, ?_, EventuallyEq.rfl⟩
@@ -156,7 +156,7 @@ theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F]
156156
(h.analyticAt_of_mem hy).differentiableWithinAt
157157

158158
theorem AnalyticOn.differentiableOn (h : AnalyticOn 𝕜 f s) : DifferentiableOn 𝕜 f s :=
159-
fun y hy ↦ (h y hy).differentiableWithinAt.mono (by simp)
159+
fun y hy ↦ (h y hy).differentiableWithinAt.mono (by simp)
160160

161161
theorem AnalyticOnNhd.differentiableOn (h : AnalyticOnNhd 𝕜 f s) : DifferentiableOn 𝕜 f s :=
162162
fun y hy ↦ (h y hy).differentiableWithinAt
@@ -376,7 +376,7 @@ protected lemma AnalyticOn.hasFTaylorSeriesUpToOn {n : WithTop ℕ∞}
376376

377377
lemma AnalyticOn.exists_hasFTaylorSeriesUpToOn
378378
(h : AnalyticOn 𝕜 f s) (hu : UniqueDiffOn 𝕜 s) :
379-
(p : E → FormalMultilinearSeries 𝕜 E F),
379+
∃ p : E → FormalMultilinearSeries 𝕜 E F,
380380
HasFTaylorSeriesUpToOn ⊤ f p s ∧ ∀ i, AnalyticOn 𝕜 (fun x ↦ p x i) s :=
381381
⟨ftaylorSeriesWithin 𝕜 f s, h.hasFTaylorSeriesUpToOn hu, h.iteratedFDerivWithin hu⟩
382382

Mathlib/Analysis/Convex/Continuous.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ lemma ConcaveOn.continuousOn_tfae (hC : IsOpen C) (hC' : C.Nonempty) (hf : Conca
162162
∀ ⦃x₀⦄, x₀ ∈ C → (𝓝 x₀).IsBoundedUnder (· ≥ ·) f,
163163
∀ ⦃x₀⦄, x₀ ∈ C → (𝓝 x₀).IsBoundedUnder (· ≤ ·) |f|] := by
164164
have := hf.neg.continuousOn_tfae hC hC'
165-
simp at this
165+
simp only [locallyLipschitzOn_neg_iff, continuousOn_neg_iff, continuousAt_neg_iff, abs_neg]
166+
at this
166167
convert this using 8 <;> exact (Equiv.neg ℝ).exists_congr (by simp)
167168

168169
lemma ConvexOn.locallyLipschitzOn_iff_continuousOn (hC : IsOpen C) (hf : ConvexOn ℝ C f) :

Mathlib/Analysis/Convex/KreinMilman.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ theorem IsCompact.extremePoints_nonempty (hscomp : IsCompact s) (hsnemp : s.None
7171
(hscomp.of_isClosed_subset htclos hst.1).exists_isMaxOn ⟨x, hxt⟩
7272
l.continuous.continuousOn
7373
have h : IsExposed ℝ t ({ z ∈ t | ∀ w ∈ t, l w ≤ l z }) := fun _ => ⟨l, rfl⟩
74-
rw [ ht.eq_of_ge (y := ({ z ∈ t | ∀ w ∈ t, l w ≤ l z }))
74+
rw [ht.eq_of_ge (y := ({ z ∈ t | ∀ w ∈ t, l w ≤ l z }))
7575
⟨⟨z, hzt, hz⟩, h.isClosed htclos, hst.trans h.isExtreme⟩ (t.sep_subset _)] at hyB
7676
exact hl.not_le (hyB.2 x hxt)
7777
refine zorn_superset _ fun F hFS hF => ?_

Mathlib/Analysis/InnerProductSpace/Orthonormal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ theorem exists_maximal_orthonormal {s : Set E} (hs : Orthonormal 𝕜 (Subtype.v
237237
∀ u ⊇ w, Orthonormal 𝕜 (Subtype.val : u → E) → u = w := by
238238
have := zorn_subset_nonempty { b | Orthonormal 𝕜 (Subtype.val : b → E) } ?_ _ hs
239239
· obtain ⟨b, hb⟩ := this
240-
exact ⟨b, hb.1, hb.2.1, fun u hus hu => hb.2.eq_of_ge hu hus
240+
exact ⟨b, hb.1, hb.2.1, fun u hus hu => hb.2.eq_of_ge hu hus⟩
241241
· refine fun c hc cc _c0 => ⟨⋃₀ c, ?_, ?_⟩
242242
· exact orthonormal_sUnion_of_directed cc.directedOn fun x xc => hc xc
243243
· exact fun _ => Set.subset_sUnion_of_mem

Mathlib/Analysis/InnerProductSpace/Symmetric.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,13 @@ protected theorem IsSymmetric.id : (LinearMap.id : E →ₗ[𝕜] E).IsSymmetric
8686
theorem IsSymmetric.add {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
8787
(T + S).IsSymmetric := by
8888
intro x y
89-
rw [LinearMap.add_apply, inner_add_left, hT x y, hS x y, ← inner_add_right]
90-
rfl
89+
rw [add_apply, inner_add_left, hT x y, hS x y, ← inner_add_right, add_apply]
9190

9291
@[aesop safe apply]
9392
theorem IsSymmetric.sub {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
9493
(T - S).IsSymmetric := by
9594
intro x y
96-
rw [LinearMap.sub_apply, inner_sub_left, hT x y, hS x y, ← inner_sub_right]
97-
rfl
95+
rw [sub_apply, inner_sub_left, hT x y, hS x y, ← inner_sub_right, sub_apply]
9896

9997
@[aesop safe apply]
10098
theorem IsSymmetric.smul {c : 𝕜} (hc : conj c = c) {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) :

0 commit comments

Comments
 (0)