Skip to content

Commit 83450e8

Browse files
chore: tidy various files (#17342)
1 parent 5ba5782 commit 83450e8

File tree

30 files changed

+88
-97
lines changed

30 files changed

+88
-97
lines changed

Counterexamples/Phillips.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -415,21 +415,17 @@ theorem continuousPart_evalCLM_eq_zero [TopologicalSpace α] [DiscreteTopology
415415
calc
416416
f.continuousPart s = f.continuousPart (s \ {x}) :=
417417
(continuousPart_apply_diff _ _ _ (countable_singleton x)).symm
418-
_ = f (univ \ f.discreteSupport ∩ (s \ {x})) := rfl
418+
_ = f (univ \ f.discreteSupport ∩ (s \ {x})) := by simp [continuousPart]
419419
_ = indicator (univ \ f.discreteSupport ∩ (s \ {x})) 1 x := rfl
420420
_ = 0 := by simp
421421

422422
theorem toFunctions_toMeasure [MeasurableSpace α] (μ : Measure α) [IsFiniteMeasure μ] (s : Set α)
423423
(hs : MeasurableSet s) :
424424
μ.extensionToBoundedFunctions.toBoundedAdditiveMeasure s = (μ s).toReal := by
425-
change
426-
μ.extensionToBoundedFunctions
427-
(ofNormedAddCommGroupDiscrete (indicator s 1) 1 (norm_indicator_le_one s)) =
428-
(μ s).toReal
425+
simp only [ContinuousLinearMap.toBoundedAdditiveMeasure]
429426
rw [extensionToBoundedFunctions_apply]
430-
· change ∫ x, s.indicator (fun _ => (1 : ℝ)) x ∂μ = _
431-
simp [integral_indicator hs]
432-
· change Integrable (indicator s 1) μ
427+
· simp [integral_indicator hs]
428+
· simp only [coe_ofNormedAddCommGroupDiscrete]
433429
have : Integrable (fun _ => (1 : ℝ)) μ := integrable_const (1 : ℝ)
434430
apply
435431
this.mono' (Measurable.indicator (@measurable_const _ _ _ _ (1 : ℝ)) hs).aestronglyMeasurable

Mathlib/Algebra/Algebra/Basic.lean

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,21 @@ variable {R M}
187187

188188
theorem End_algebraMap_isUnit_inv_apply_eq_iff {x : R}
189189
(h : IsUnit (algebraMap R (Module.End S M) x)) (m m' : M) :
190-
(↑(h.unit⁻¹) : Module.End S M) m = m' ↔ m = x • m' :=
191-
{ mp := fun H => H ▸ (End_isUnit_apply_inv_apply_of_isUnit h m).symm
192-
mpr := fun H =>
193-
H.symm ▸ by
194-
apply_fun ⇑h.unit.val using ((Module.End_isUnit_iff _).mp h).injective
195-
simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m') }
190+
(↑(h.unit⁻¹) : Module.End S M) m = m' ↔ m = x • m' where
191+
mp H := H ▸ (End_isUnit_apply_inv_apply_of_isUnit h m).symm
192+
mpr H :=
193+
H.symm ▸ by
194+
apply_fun ⇑h.unit.val using ((Module.End_isUnit_iff _).mp h).injective
195+
simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m')
196196

197197
theorem End_algebraMap_isUnit_inv_apply_eq_iff' {x : R}
198198
(h : IsUnit (algebraMap R (Module.End S M) x)) (m m' : M) :
199-
m' = (↑h.unit⁻¹ : Module.End S M) m ↔ m = x • m' :=
200-
{ mp := fun H => H ▸ (End_isUnit_apply_inv_apply_of_isUnit h m).symm
201-
mpr := fun H =>
202-
H.symm ▸ by
203-
apply_fun (↑h.unit : M → M) using ((Module.End_isUnit_iff _).mp h).injective
204-
simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m') |>.symm }
199+
m' = (↑h.unit⁻¹ : Module.End S M) m ↔ m = x • m' where
200+
mp H := H ▸ (End_isUnit_apply_inv_apply_of_isUnit h m).symm
201+
mpr H :=
202+
H.symm ▸ by
203+
apply_fun (↑h.unit : M → M) using ((Module.End_isUnit_iff _).mp h).injective
204+
simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m') |>.symm
205205

206206
end
207207

Mathlib/Algebra/Group/Aut.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ The definition of multiplication in the automorphism groups agrees with function
1818
multiplication in `Equiv.Perm`, and multiplication in `CategoryTheory.End`, but not with
1919
`CategoryTheory.comp`.
2020
21-
This file is kept separate from `Algebra/Group/Equiv/*` so that `GroupTheory.Perm` is free to use
22-
equivalences (and other files that use them) before the group structure is defined.
21+
This file is kept separate from `Mathlib/Algebra/Group/Equiv/*` so that `Mathlib.GroupTheory.Perm`
22+
is free to use equivalences (and other files that use them) before the group structure is defined.
2323
2424
## Tags
2525

Mathlib/Algebra/Module/ZLattice/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ subgroup of `E` such that `L` spans `E` over `K`.
1818
1919
A `ℤ`-lattice `L` can be defined in two ways:
2020
* For `b` a basis of `E`, then `L = Submodule.span ℤ (Set.range b)` is a ℤ-lattice of `E`
21-
* As an`ℤ-submodule` of `E` with the additional properties:
21+
* As a `ℤ-submodule` of `E` with the additional properties:
2222
* `DiscreteTopology L`, that is `L` is discrete
2323
* `Submodule.span ℝ (L : Set E) = ⊤`, that is `L` spans `E` over `K`.
2424
@@ -354,7 +354,7 @@ theorem measure_fundamentalDomain_ne_zero [Finite ι] [MeasurableSpace E] [Borel
354354
{μ : Measure E} [Measure.IsAddHaarMeasure μ] :
355355
μ (fundamentalDomain b) ≠ 0 := by
356356
convert (ZSpan.isAddFundamentalDomain b μ).measure_ne_zero (NeZero.ne μ)
357-
exact (inferInstance : VAddInvariantMeasure (span ℤ (Set.range b)).toAddSubgroup E μ)
357+
exact inferInstanceAs <| VAddInvariantMeasure (span ℤ (Set.range b)).toAddSubgroup E μ
358358

359359
theorem measure_fundamentalDomain [Fintype ι] [DecidableEq ι] [MeasurableSpace E] (μ : Measure E)
360360
[BorelSpace E] [Measure.IsAddHaarMeasure μ] (b₀ : Basis ι ℝ E) :

Mathlib/Algebra/Polynomial/BigOperators.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ where additionally, the product of the leading coefficients must be nonzero.
343343
theorem leadingCoeff_multiset_prod :
344344
t.prod.leadingCoeff = (t.map fun f => leadingCoeff f).prod := by
345345
rw [← leadingCoeffHom_apply, MonoidHom.map_multiset_prod]
346-
rfl
346+
simp only [leadingCoeffHom_apply]
347347

348348
/-- The leading coefficient of a product of polynomials is equal to
349349
the product of the leading coefficients.

Mathlib/Algebra/Ring/Aut.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ The definition of multiplication in the automorphism group agrees with function
1818
multiplication in `Equiv.Perm`, and multiplication in `CategoryTheory.End`, but not with
1919
`CategoryTheory.comp`.
2020
21-
This file is kept separate from `Algebra/Ring/Equiv.lean` so that `GroupTheory.Perm` is free to use
22-
equivalences (and other files that use them) before the group structure is defined.
21+
This file is kept separate from `Mathlib/Algebra/Ring/Equiv.lean` so that `Mathlib.GroupTheory.Perm`
22+
is free to use equivalences (and other files that use them) before the group structure is defined.
2323
2424
## Tags
2525

Mathlib/Algebra/Ring/Subring/IntPolynomial.lean

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,20 @@ import Mathlib.Algebra.Polynomial.AlgebraMap
1010
1111
Given a field `K` with a subring `R`, in this file we construct a map from polynomials in `K[X]`
1212
with coefficients in `R` to `R[X]`. We provide several lemmas to deal with
13-
coefficients, degree, and evaluation of `intPolynomial`.
13+
coefficients, degree, and evaluation of `Polynomial.int`.
1414
This is useful when dealing with integral elements in an extension of fields.
1515
1616
# Main Definitions
17-
* `Polynomial.int` : given a polynomial `P`. in `K[X]` with coefficients in a field `K` with a
18-
subring `R` such that all coefficients belong to `R`, `P.int R` is the corresponding polynomial
19-
in `R[X]`.
17+
* `Polynomial.int` : given a polynomial `P` in `K[X]` whose coefficients all belong to a subring `R`
18+
of the field `K`, `P.int R` is the corresponding polynomial in `R[X]`.
2019
-/
2120

2221
variable {K : Type*} [Field K] (R : Subring K)
2322

24-
open Polynomial
25-
2623
open scoped Polynomial
2724

2825
/-- Given a polynomial in `K[X]` such that all coefficients belong to the subring `R`,
29-
`intPolynomial` is the corresponding polynomial in `R[X]`. -/
26+
`Polynomial.int` is the corresponding polynomial in `R[X]`. -/
3027
def Polynomial.int (P : K[X]) (hP : ∀ n : ℕ, P.coeff n ∈ R) : R[X] where
3128
toFinsupp :=
3229
{ support := P.support

Mathlib/Analysis/Analytic/Constructions.lean

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ variable {ι : Type*} [Fintype ι] {e : E} {Fm : ι → Type*}
415415
lemma FormalMultilinearSeries.radius_pi_le (p : Π i, FormalMultilinearSeries 𝕜 E (Fm i)) (i : ι) :
416416
(FormalMultilinearSeries.pi p).radius ≤ (p i).radius := by
417417
apply le_of_forall_nnreal_lt (fun r' hr' ↦ ?_)
418-
obtain ⟨C, -, hC⟩ : ∃ C > 0, ∀ (n : ℕ),
419-
‖pi p n‖ * ↑r' ^ n ≤ C := norm_mul_pow_le_of_lt_radius _ hr'
418+
obtain ⟨C, -, hC⟩ : ∃ C > 0, ∀ n, ‖pi p n‖ * ↑r' ^ n ≤ C := norm_mul_pow_le_of_lt_radius _ hr'
420419
apply le_radius_of_bound _ C (fun n ↦ ?_)
421420
apply le_trans _ (hC n)
422421
gcongr
@@ -460,10 +459,12 @@ lemma HasFPowerSeriesWithinOnBall.pi
460459
hasSum {_} m hy := Pi.hasSum.2 (fun i ↦ (hf i).hasSum m hy)
461460

462461
lemma hasFPowerSeriesWithinOnBall_pi_iff (hr : 0 < r) :
463-
HasFPowerSeriesWithinOnBall (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) s e r
464-
↔ ∀ i, HasFPowerSeriesWithinOnBall (f i) (p i) s e r :=
465-
fun h i ↦ ⟨h.r_le.trans (FormalMultilinearSeries.radius_pi_le _ _), hr,
466-
fun m hy ↦ Pi.hasSum.1 (h.hasSum m hy) i⟩, fun h ↦ .pi h hr⟩
462+
HasFPowerSeriesWithinOnBall (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) s e r ↔
463+
∀ i, HasFPowerSeriesWithinOnBall (f i) (p i) s e r where
464+
mp h i :=
465+
⟨h.r_le.trans (FormalMultilinearSeries.radius_pi_le _ _), hr,
466+
fun m hy ↦ Pi.hasSum.1 (h.hasSum m hy) i⟩
467+
mpr h := .pi h hr
467468

468469
lemma HasFPowerSeriesOnBall.pi
469470
(hf : ∀ i, HasFPowerSeriesOnBall (f i) (p i) e r) (hr : 0 < r) :
@@ -472,8 +473,8 @@ lemma HasFPowerSeriesOnBall.pi
472473
exact HasFPowerSeriesWithinOnBall.pi hf hr
473474

474475
lemma hasFPowerSeriesOnBall_pi_iff (hr : 0 < r) :
475-
HasFPowerSeriesOnBall (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) e r
476-
∀ i, HasFPowerSeriesOnBall (f i) (p i) e r := by
476+
HasFPowerSeriesOnBall (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) e r
477+
∀ i, HasFPowerSeriesOnBall (f i) (p i) e r := by
477478
simp_rw [← hasFPowerSeriesWithinOnBall_univ]
478479
exact hasFPowerSeriesWithinOnBall_pi_iff hr
479480

@@ -486,8 +487,8 @@ lemma HasFPowerSeriesWithinAt.pi
486487
exact ⟨r, HasFPowerSeriesWithinOnBall.pi hr r_pos⟩
487488

488489
lemma hasFPowerSeriesWithinAt_pi_iff :
489-
HasFPowerSeriesWithinAt (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) s e
490-
∀ i, HasFPowerSeriesWithinAt (f i) (p i) s e := by
490+
HasFPowerSeriesWithinAt (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) s e
491+
∀ i, HasFPowerSeriesWithinAt (f i) (p i) s e := by
491492
refine ⟨fun h i ↦ ?_, fun h ↦ .pi h⟩
492493
obtain ⟨r, hr⟩ := h
493494
exact ⟨r, (hasFPowerSeriesWithinOnBall_pi_iff hr.r_pos).1 hr i⟩
@@ -499,8 +500,8 @@ lemma HasFPowerSeriesAt.pi
499500
exact HasFPowerSeriesWithinAt.pi hf
500501

501502
lemma hasFPowerSeriesAt_pi_iff :
502-
HasFPowerSeriesAt (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) e
503-
∀ i, HasFPowerSeriesAt (f i) (p i) e := by
503+
HasFPowerSeriesAt (fun x ↦ (f · x)) (FormalMultilinearSeries.pi p) e
504+
∀ i, HasFPowerSeriesAt (f i) (p i) e := by
504505
simp_rw [← hasFPowerSeriesWithinAt_univ]
505506
exact hasFPowerSeriesWithinAt_pi_iff
506507

Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ lemma Real.HasSum_rexp_HasProd (f : ι → α → ℝ) (hfn : ∀ x n, 0 < f n x
270270
product.-/
271271
lemma Real.rexp_tsum_eq_tprod (f : ι → α → ℝ) (hfn : ∀ x n, 0 < f n x)
272272
(hf : ∀ x : α, Summable fun n => log ((f n x))) :
273-
(rexp ∘ (fun a : α => (∑' n : ι, log (f n a)))) = (fun a : α => ∏' n : ι, (f n a)) := by
273+
(rexp ∘ (fun a : α => (∑' n : ι, log (f n a)))) = (fun a : α => ∏' n : ι, (f n a)) := by
274274
ext a
275275
apply (HasProd.tprod_eq ?_).symm
276276
apply ((hf a).hasSum.rexp).congr
@@ -279,15 +279,15 @@ lemma Real.rexp_tsum_eq_tprod (f : ι → α → ℝ) (hfn : ∀ x n, 0 < f n x)
279279
exact funext fun x ↦ exp_log (hfn a x)
280280

281281
lemma Real.summable_cexp_multipliable (f : ι → α → ℝ) (hfn : ∀ x n, 0 < f n x)
282-
(hf : ∀ x : α, Summable fun n => log (f n x)) (a : α): Multipliable fun b ↦ f b a := by
282+
(hf : ∀ x : α, Summable fun n => log (f n x)) (a : α) : Multipliable fun b ↦ f b a := by
283283
have := (Real.HasSum_rexp_HasProd f hfn fun a => (hf a).hasSum) a
284284
use (∏' n : ι, (f n a))
285285

286286
open Complex
287287

288288
lemma Complex.HasSum_cexp_HasProd (f : ι → α → ℂ) (hfn : ∀ x n, f n x ≠ 0)
289289
(hf : ∀ x : α, HasSum (fun n => log (f n x)) (∑' i, log (f i x))) (a : α) :
290-
HasProd (fun b ↦ f b a) (∏' n : ι, (f n a)) := by
290+
HasProd (fun b ↦ f b a) (∏' n : ι, (f n a)) := by
291291
have : HasProd (fun b ↦ f b a) ((cexp ∘ fun a ↦ ∑' (n : ι), log (f n a)) a) := by
292292
apply ((hf a).cexp).congr
293293
intro _
@@ -296,16 +296,16 @@ lemma Complex.HasSum_cexp_HasProd (f : ι → α → ℂ) (hfn : ∀ x n, f n x
296296
rwa [HasProd.tprod_eq this]
297297

298298
lemma Complex.summable_cexp_multipliable (f : ι → α → ℂ) (hfn : ∀ x n, f n x ≠ 0)
299-
(hf : ∀ x : α, Summable fun n => log (f n x)) (a : α):
300-
Multipliable fun b ↦ f b a := by
299+
(hf : ∀ x : α, Summable fun n => log (f n x)) (a : α) :
300+
Multipliable fun b ↦ f b a := by
301301
have := (Complex.HasSum_cexp_HasProd f hfn fun a => (hf a).hasSum) a
302302
use (∏' n : ι, (f n a))
303303

304304
/--The exponential of a infinite sum of comples logs (which converges absolutely) is an infinite
305305
product.-/
306306
lemma Complex.cexp_tsum_eq_tprod (f : ι → α → ℂ) (hfn : ∀ x n, f n x ≠ 0)
307307
(hf : ∀ x : α, Summable fun n => log (f n x)) :
308-
(cexp ∘ (fun a : α => (∑' n : ι, log (f n a)))) = (fun a : α => ∏' n : ι, ((f n a))) := by
308+
(cexp ∘ (fun a : α => (∑' n : ι, log (f n a)))) = fun a : α => ∏' n : ι, f n a := by
309309
ext a
310310
apply (HasProd.tprod_eq ?_).symm
311311
apply ((hf a).hasSum.cexp).congr

Mathlib/CategoryTheory/Bicategory/Adjunction.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ namespace Adjunction
9292

9393
attribute [simp] left_triangle right_triangle
9494

95-
-- attribute [local simp] leftZigzag rightZigzag
96-
9795
/-- Adjunction between identities. -/
9896
def id (a : B) : 𝟙 a ⊣ 𝟙 a where
9997
unit := (ρ_ _).inv

0 commit comments

Comments
 (0)