Skip to content

Commit 000c398

Browse files
chore: tidy various files (#34610)
1 parent 70fc798 commit 000c398

File tree

35 files changed

+91
-109
lines changed

35 files changed

+91
-109
lines changed

Archive/Examples/Kuratowski.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ theorem kc_fourteenSet : k fourteenSetᶜ = (Ioo 0 1 ∪ Ioo 1 2)ᶜ := by
191191

192192
theorem kck_fourteenSet : k (k fourteenSet)ᶜ = (Ioo 0 2 ∪ Ioo 4 5)ᶜ := by
193193
rw [closure_compl, k_fourteenSet,
194-
interior_union_of_disjoint_closure, interior_union_of_disjoint_closure] <;>
194+
interior_union_of_disjoint_closure, interior_union_of_disjoint_closure]
195195
all_goals
196196
simp [-union_singleton, disjoint_iff_inter_eq_empty, union_inter_distrib_right, Icc_inter_Icc]
197197
all_goals norm_num

Mathlib/Algebra/Algebra/Subalgebra/Directed.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,22 @@ variable (S : Subalgebra R A)
2929

3030
variable {ι : Type*} [Nonempty ι] {K : ι → Subalgebra R A}
3131

32-
theorem coe_iSup_of_directed (dir : Directed (· ≤ ·) K) : ↑(iSup K) = ⋃ i, (K i : Set A) :=
32+
theorem coe_iSup_of_directed (dir : Directed (· ≤ ·) K) : ↑(iSup K) = ⋃ i, (K i : Set A) := by
3333
let s : Subalgebra R A :=
3434
{ __ := Subsemiring.copy _ _ (Subsemiring.coe_iSup_of_directed dir).symm
3535
algebraMap_mem' := fun _ ↦ Set.mem_iUnion.2
3636
⟨Classical.arbitrary ι, Subalgebra.algebraMap_mem _ _⟩ }
3737
have : iSup K = s := le_antisymm
3838
(iSup_le fun i ↦ le_iSup (fun i ↦ (K i : Set A)) i) (Set.iUnion_subset fun _ ↦ le_iSup K _)
39-
this.symm ▸ rfl
39+
simp [this, s]
4040

4141
variable (K)
4242

4343
/-- Define an algebra homomorphism on a directed supremum of subalgebras by defining
4444
it on each subalgebra, and proving that it agrees on the intersection of subalgebras. -/
4545
noncomputable def iSupLift (dir : Directed (· ≤ ·) K) (f : ∀ i, K i →ₐ[R] B)
4646
(hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h))
47-
(T : Subalgebra R A) (hT : T ≤ iSup K) : ↥T →ₐ[R] B :=
48-
by
47+
(T : Subalgebra R A) (hT : T ≤ iSup K) : ↥T →ₐ[R] B := by
4948
let compat :
5049
∀ (i j) (x : A) (hxi : x ∈ (K i : Set A)) (hxj : x ∈ (K j : Set A)),
5150
f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩ := by
@@ -85,7 +84,7 @@ theorem iSupLift_inclusion {dir : Directed (· ≤ ·) K} {f : ∀ i, K i →ₐ
8584
iSupLift K dir f hf T hT (inclusion h x) = f i x := by
8685
dsimp [iSupLift, inclusion]
8786
rw [Set.iUnionLift_inclusion]
88-
exact SetLike.coe_subset_coe.mpr fun ⦃x⦄ a ↦ hT (h a)
87+
exact SetLike.coe_subset_coe.mpr <| h.trans hT
8988

9089
@[simp]
9190
theorem iSupLift_comp_inclusion {dir : Directed (· ≤ ·) K} {f : ∀ i, K i →ₐ[R] B}

Mathlib/Algebra/Group/Irreducible/Indecomposable.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ open Submonoid in
230230
lemma IsMulIndecomposable.apply_ne_one_iff_mem_closure
231231
[Finite ι] [InvolutiveInv ι] [CommGroup S] [IsOrderedMonoid S]
232232
(v : ι → G) (f : G →* S) (i : ι) (hi : v i ≠ 1) (hi' : v i⁻¹ = (v i)⁻¹) :
233-
f (v i) ≠ 1 ↔ v i ∈ closure (v '' baseOf v f) ∨
234-
(v i)⁻¹ ∈ closure (v '' baseOf v f) :=
233+
f (v i) ≠ 1 ↔ v i ∈ closure (v '' baseOf v f) ∨ (v i)⁻¹ ∈ closure (v '' baseOf v f) :=
235234
fun h ↦ mem_or_inv_mem_closure_baseOf v f i h hi',
236235
apply_ne_one_of_mem_or_inv_mem_closure v f (baseOf v f) (baseOf_subset_one_lt v f) i hi hi'⟩

Mathlib/Algebra/Module/FinitePresentation.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ lemma Module.FinitePresentation.exists_notMem_bijective [Module.Finite R M]
496496
(hf : Function.Bijective (IsLocalizedModule.map p.primeCompl fM fN f)) :
497497
∃ (g : R), g ∉ p ∧ Function.Bijective (LocalizedModule.map (Submonoid.powers g) f) := by
498498
obtain ⟨g, hg, h⟩ := exists_bijective_map_powers p.primeCompl fM fN f hf
499-
exact ⟨g, hg, h g (by rfl)
499+
exact ⟨g, hg, h g dvd_rfl
500500

501501
open IsLocalizedModule in
502502
/--

Mathlib/Algebra/Module/Torsion/Basic.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ variable (R M : Type*) [CommSemiring R] [AddCommMonoid M] [Module R M]
165165
`a • x = 0`. -/
166166
@[simps!]
167167
def torsionBy (a : R) : Submodule R M :=
168-
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11036): broken dot notation on LinearMap.ker https://github.com/leanprover/lean4/issues/1629
169-
LinearMap.ker (DistribSMul.toLinearMap R M a)
168+
(DistribSMul.toLinearMap R M a).ker
170169

171170
/-- The submodule containing all elements `x` of `M` such that `a • x = 0` for all `a` in `s`. -/
172171
@[simps!]
@@ -233,7 +232,7 @@ end Defs
233232
lemma isSMulRegular_iff_torsionBy_eq_bot {R} (M : Type*)
234233
[CommRing R] [AddCommGroup M] [Module R M] (r : R) :
235234
IsSMulRegular M r ↔ Submodule.torsionBy R M r = ⊥ :=
236-
Iff.symm (DistribSMul.toLinearMap R M r).ker_eq_bot
235+
(DistribSMul.toLinearMap R M r).ker_eq_bot.symm
237236

238237
variable {R M : Type*}
239238

Mathlib/Analysis/InnerProductSpace/Coalgebra.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ noncomputable abbrev ringOfCoalgebra :
121121
simp_rw [AlgebraOfCoalgebra.mul_def, ← rTensor_tmul, ← comp_apply, ← adjoint_rTensor,
122122
← adjoint_comp, ← coassoc_symm, adjoint_comp, adjoint_lTensor, comp_apply,
123123
← toLinearEquiv_assocIsometry, ← toLinearEquiv_symm, adjoint_toLinearMap_eq_symm]
124-
rfl
124+
simp only [symm_symm, toLinearEquiv_assocIsometry, LinearEquiv.coe_coe, assoc_tmul,
125+
lTensor_tmul]
125126
one := adjoint (counit (R := 𝕜) (A := E)) 1
126127
one_mul x := by
127128
dsimp [OfNat.ofNat]
@@ -164,13 +165,13 @@ noncomputable abbrev algebraOfCoalgebra : Algebra 𝕜 E where
164165
← toLinearMap_symm_rid, ← toLinearMap_symm_lid, ← comm_trans_lid,
165166
← toLinearEquiv_commIsometry, ← toLinearEquiv_lidIsometry, ← toLinearEquiv_trans,
166167
← toLinearEquiv_symm, adjoint_toLinearMap_eq_symm]
167-
rfl
168+
simp
168169
smul_def' r x := by
169170
dsimp
170171
simp_rw [← rTensor_tmul, ← adjoint_rTensor, ← comp_apply, ← adjoint_comp,
171172
rTensor_counit_comp_comul, ← toLinearMap_symm_lid, ← toLinearEquiv_lidIsometry,
172173
← toLinearEquiv_symm, adjoint_toLinearMap_eq_symm]
173-
rfl
174+
simp
174175

175176
end algebraOfCoalgebra
176177
end InnerProductSpace

Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public import Mathlib.Topology.Algebra.Module.ClosedSubmodule
1515
In this file, the `orthogonal` complement of a submodule `K` is defined, and basic API established.
1616
We make duplicates for `Submodule` and `ClosedSubmodule`.
1717
Some of the more subtle results about the orthogonal complement are delayed to
18-
`Analysis.InnerProductSpace.Projection`.
18+
`Mathlib/Analysis/InnerProductSpace/Projection/`.
1919
2020
See also `BilinForm.orthogonal` for orthogonality with respect to a general bilinear form.
2121
@@ -125,11 +125,7 @@ lemma map_orthogonal (f : E →ₗᵢ[𝕜] F) :
125125
simp only [Submodule.ext_iff, mem_map, mem_orthogonal, forall_exists_index, and_imp,
126126
forall_apply_eq_imp_iff₂, mem_inf, mem_map, LinearMap.mem_range,
127127
LinearIsometry.coe_toLinearMap]
128-
refine fun x ↦ ⟨?_, ?_⟩
129-
· rintro ⟨x, hx, rfl⟩
130-
refine ⟨by simpa using hx, x, rfl⟩
131-
· rintro ⟨hx, x, rfl⟩
132-
refine ⟨x, by simpa using hx, rfl⟩
128+
grind [LinearIsometry.inner_map_map]
133129

134130
lemma map_orthogonal_equiv (f : E ≃ₗᵢ[𝕜] F) :
135131
Kᗮ.map (f.toLinearEquiv : E →ₗ[𝕜] F) = (K.map (f.toLinearEquiv : E →ₗ[𝕜] F))ᗮ := by

Mathlib/Analysis/Meromorphic/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ lemma zpow {f : 𝕜 → 𝕜'} {n : ℤ} (hf : Meromorphic f) : Meromorphic (f
654654

655655
@[fun_prop]
656656
protected lemma deriv [CompleteSpace E] (hf : Meromorphic f) : Meromorphic (deriv f) :=
657-
fun x ↦ (hf x).deriv
657+
fun x ↦ (hf x).deriv
658658

659659
@[fun_prop]
660660
lemma iterated_deriv [CompleteSpace E] {n : ℕ} (hf : Meromorphic f) :

Mathlib/Analysis/Normed/Operator/BoundedLinearMaps.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ theorem snd : IsBoundedLinearMap 𝕜 fun x : E × F => x.2 := by
123123
exact le_max_right _ _
124124

125125
theorem smul {𝕜' : Type*} (c : 𝕜') [SeminormedRing 𝕜'] [Module 𝕜' F] [IsBoundedSMul 𝕜' F]
126-
[SMulCommClass 𝕜 𝕜' F]
127-
(hf : IsBoundedLinearMap 𝕜 f) : IsBoundedLinearMap 𝕜 (c • f) :=
126+
[SMulCommClass 𝕜 𝕜' F] (hf : IsBoundedLinearMap 𝕜 f) : IsBoundedLinearMap 𝕜 (c • f) :=
128127
let ⟨hlf, M, _, hM⟩ := hf
129128
(c • hlf.mk' f).isLinear.with_bound (‖c‖ * M) fun x =>
130129
calc
@@ -313,10 +312,9 @@ variable {f g : E → F}
313312

314313
/-- A map between normed spaces is linear and continuous if and only if it is bounded. -/
315314
theorem isLinearMap_and_continuous_iff_isBoundedLinearMap (f : E → F) :
316-
IsLinearMap 𝕜 f ∧ Continuous f ↔ IsBoundedLinearMap 𝕜 f :=
317-
fun ⟨hlin, hcont⟩ ↦ ContinuousLinearMap.isBoundedLinearMap
318-
⟨⟨⟨f, IsLinearMap.map_add hlin⟩, IsLinearMap.map_smul hlin⟩, hcont⟩,
319-
fun h_bdd ↦ ⟨h_bdd.toIsLinearMap, h_bdd.continuous⟩⟩
315+
IsLinearMap 𝕜 f ∧ Continuous f ↔ IsBoundedLinearMap 𝕜 f where
316+
mp | ⟨hlin, hcont⟩ => ContinuousLinearMap.isBoundedLinearMap ⟨hlin.mk' _, hcont⟩
317+
mpr h_bdd := ⟨h_bdd.toIsLinearMap, h_bdd.continuous⟩
320318

321319
end IsBoundedLinearMap
322320

Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ theorem integrableOn_rpow_mul_exp_neg_rpow {p s : ℝ} (hs : -1 < s) (hp : 1 ≤
7171
· refine (intervalIntegrable_iff_integrableOn_Icc_of_le zero_le_one).mp ?_
7272
exact intervalIntegral.intervalIntegrable_rpow' hs
7373
· intro x _
74-
change ContinuousWithinAt ((fun x => exp (-x)) ∘ (fun x => x ^ p)) (Icc 0 1) x
74+
rw [← Function.comp_def (fun x => exp (-x)) ^ p)]
7575
refine ContinuousAt.comp_continuousWithinAt (h_exp _) ?_
7676
exact continuousWithinAt_id.rpow_const (Or.inr (le_of_lt (lt_trans zero_lt_one hp)))
7777
· have h_rpow : ∀ (x r : ℝ), x ∈ Ici 1 → ContinuousWithinAt (fun x => x ^ r) (Ici 1) x := by
@@ -80,7 +80,7 @@ theorem integrableOn_rpow_mul_exp_neg_rpow {p s : ℝ} (hs : -1 < s) (hp : 1 ≤
8080
exact ne_of_gt (lt_of_lt_of_le zero_lt_one hx)
8181
refine integrable_of_isBigO_exp_neg (by simp : (0 : ℝ) < 1 / 2)
8282
(ContinuousOn.mul (fun x hx => h_rpow x s hx) (fun x hx => ?_)) (IsLittleO.isBigO ?_)
83-
· change ContinuousWithinAt ((fun x => exp (-x)) ∘ (fun x => x ^ p)) (Ici 1) x
83+
· rw [← Function.comp_def (fun x => exp (-x)) ^ p)]
8484
exact ContinuousAt.comp_continuousWithinAt (h_exp _) (h_rpow x p hx)
8585
· convert rpow_mul_exp_neg_mul_rpow_isLittleO_exp_neg s hp (by simp : (0 : ℝ) < 1) using 3
8686
rw [neg_mul, one_mul]

0 commit comments

Comments
 (0)