Skip to content

Commit 8080f08

Browse files
chore: tidy various files (#9903)
1 parent 69a8f62 commit 8080f08

File tree

15 files changed

+99
-109
lines changed

15 files changed

+99
-109
lines changed

Mathlib/Algebra/AddTorsor.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ instance instAddTorsor : AddTorsor (G × G') (P × P') where
287287
zero_vadd _ := Prod.ext (zero_vadd _ _) (zero_vadd _ _)
288288
add_vadd _ _ _ := Prod.ext (add_vadd _ _ _) (add_vadd _ _ _)
289289
vsub p₁ p₂ := (p₁.1 -ᵥ p₂.1, p₁.2 -ᵥ p₂.2)
290-
nonempty := Prod.Nonempty
290+
nonempty := Prod.instNonempty
291291
vsub_vadd' _ _ := Prod.ext (vsub_vadd _ _) (vsub_vadd _ _)
292292
vadd_vsub' _ _ := Prod.ext (vadd_vsub _ _) (vadd_vsub _ _)
293293

Mathlib/Algebra/CharP/Basic.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,21 +445,21 @@ theorem sum_pow_char {ι : Type*} (s : Finset ι) (f : ι → R) :
445445
variable (n : ℕ)
446446

447447
theorem list_sum_pow_char_pow (l : List R) : l.sum ^ p ^ n = (l.map (· ^ p ^ n : R → R)).sum := by
448-
induction n
449-
case zero => simp_rw [pow_zero, pow_one, List.map_id']
450-
case succ n ih => simp_rw [pow_succ', pow_mul, ih, list_sum_pow_char, List.map_map]; rfl
448+
induction n with
449+
| zero => simp_rw [pow_zero, pow_one, List.map_id']
450+
| succ n ih => simp_rw [pow_succ', pow_mul, ih, list_sum_pow_char, List.map_map]; rfl
451451

452452
theorem multiset_sum_pow_char_pow (s : Multiset R) :
453453
s.sum ^ p ^ n = (s.map (· ^ p ^ n : R → R)).sum := by
454-
induction n
455-
case zero => simp_rw [pow_zero, pow_one, Multiset.map_id']
456-
case succ n ih => simp_rw [pow_succ', pow_mul, ih, multiset_sum_pow_char, Multiset.map_map]; rfl
454+
induction n with
455+
| zero => simp_rw [pow_zero, pow_one, Multiset.map_id']
456+
| succ n ih => simp_rw [pow_succ', pow_mul, ih, multiset_sum_pow_char, Multiset.map_map]; rfl
457457

458458
theorem sum_pow_char_pow {ι : Type*} (s : Finset ι) (f : ι → R) :
459459
(∑ i in s, f i) ^ p ^ n = ∑ i in s, f i ^ p ^ n := by
460-
induction n
461-
case zero => simp_rw [pow_zero, pow_one]
462-
case succ n ih => simp_rw [pow_succ', pow_mul, ih, sum_pow_char]
460+
induction n with
461+
| zero => simp_rw [pow_zero, pow_one]
462+
| succ n ih => simp_rw [pow_succ', pow_mul, ih, sum_pow_char]
463463

464464
end CommSemiring
465465

Mathlib/Algebra/CharP/ExpChar.lean

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -253,37 +253,37 @@ variable {R}
253253
variable [CommSemiring R] (q : ℕ) [hR : ExpChar R q] (n : ℕ)
254254

255255
theorem list_sum_pow_expChar (l : List R) : l.sum ^ q = (l.map (· ^ q : R → R)).sum := by
256-
cases hR
257-
case zero => simp_rw [pow_one, List.map_id']
258-
case prime hprime _ => haveI := Fact.mk hprime; exact list_sum_pow_char q l
256+
cases hR with
257+
| zero => simp_rw [pow_one, List.map_id']
258+
| prime hprime => haveI := Fact.mk hprime; exact list_sum_pow_char q l
259259

260260
theorem multiset_sum_pow_expChar (s : Multiset R) : s.sum ^ q = (s.map (· ^ q : R → R)).sum := by
261-
cases hR
262-
case zero => simp_rw [pow_one, Multiset.map_id']
263-
case prime hprime _ => haveI := Fact.mk hprime; exact multiset_sum_pow_char q s
261+
cases hR with
262+
| zero => simp_rw [pow_one, Multiset.map_id']
263+
| prime hprime => haveI := Fact.mk hprime; exact multiset_sum_pow_char q s
264264

265265
theorem sum_pow_expChar {ι : Type*} (s : Finset ι) (f : ι → R) :
266266
(∑ i in s, f i) ^ q = ∑ i in s, f i ^ q := by
267-
cases hR
268-
case zero => simp_rw [pow_one]
269-
case prime hprime _ => haveI := Fact.mk hprime; exact sum_pow_char q s f
267+
cases hR with
268+
| zero => simp_rw [pow_one]
269+
| prime hprime => haveI := Fact.mk hprime; exact sum_pow_char q s f
270270

271271
theorem list_sum_pow_expChar_pow (l : List R) :
272272
l.sum ^ q ^ n = (l.map (· ^ q ^ n : R → R)).sum := by
273-
cases hR
274-
case zero => simp_rw [one_pow, pow_one, List.map_id']
275-
case prime hprime _ => haveI := Fact.mk hprime; exact list_sum_pow_char_pow q n l
273+
cases hR with
274+
| zero => simp_rw [one_pow, pow_one, List.map_id']
275+
| prime hprime => haveI := Fact.mk hprime; exact list_sum_pow_char_pow q n l
276276

277277
theorem multiset_sum_pow_expChar_pow (s : Multiset R) :
278278
s.sum ^ q ^ n = (s.map (· ^ q ^ n : R → R)).sum := by
279-
cases hR
280-
case zero => simp_rw [one_pow, pow_one, Multiset.map_id']
281-
case prime hprime _ => haveI := Fact.mk hprime; exact multiset_sum_pow_char_pow q n s
279+
cases hR with
280+
| zero => simp_rw [one_pow, pow_one, Multiset.map_id']
281+
| prime hprime => haveI := Fact.mk hprime; exact multiset_sum_pow_char_pow q n s
282282

283283
theorem sum_pow_expChar_pow {ι : Type*} (s : Finset ι) (f : ι → R) :
284284
(∑ i in s, f i) ^ q ^ n = ∑ i in s, f i ^ q ^ n := by
285-
cases hR
286-
case zero => simp_rw [one_pow, pow_one]
287-
case prime hprime _ => haveI := Fact.mk hprime; exact sum_pow_char_pow q n s f
285+
cases hR with
286+
| zero => simp_rw [one_pow, pow_one]
287+
| prime hprime => haveI := Fact.mk hprime; exact sum_pow_char_pow q n s f
288288

289289
end BigOperators

Mathlib/Analysis/Fourier/AddCircle.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 := by
219219
rw [ContinuousMap.norm_eq_iSup_norm]
220220
have : ∀ x : AddCircle T, ‖fourier n x‖ = 1 := fun x => abs_coe_circle _
221221
simp_rw [this]
222-
exact @ciSup_const _ _ _ Zero.nonempty _
222+
exact @ciSup_const _ _ _ Zero.instNonempty _
223223
#align fourier_norm fourier_norm
224224

225225
/-- For `n ≠ 0`, a translation by `T / 2 / n` negates the function `fourier n`. -/

Mathlib/Analysis/NormedSpace/PiLp.lean

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,40 @@ protected theorem PiLp.ext {p : ℝ≥0∞} {ι : Type*} {α : ι → Type*} {x
8686
namespace PiLp
8787

8888
variable (p : ℝ≥0∞) (𝕜 : Type*) {ι : Type*} (α : ι → Type*) (β : ι → Type*)
89+
section
90+
/- Register simplification lemmas for the applications of `PiLp` elements, as the usual lemmas
91+
for Pi types will not trigger. -/
92+
variable {𝕜 p α}
93+
variable [SeminormedRing 𝕜] [∀ i, SeminormedAddCommGroup (β i)]
94+
variable [∀ i, Module 𝕜 (β i)] [∀ i, BoundedSMul 𝕜 (β i)] (c : 𝕜)
95+
96+
variable (x y : PiLp p β) (i : ι)
97+
98+
@[simp]
99+
theorem zero_apply : (0 : PiLp p β) i = 0 :=
100+
rfl
101+
#align pi_Lp.zero_apply PiLp.zero_apply
102+
103+
@[simp]
104+
theorem add_apply : (x + y) i = x i + y i :=
105+
rfl
106+
#align pi_Lp.add_apply PiLp.add_apply
107+
108+
@[simp]
109+
theorem sub_apply : (x - y) i = x i - y i :=
110+
rfl
111+
#align pi_Lp.sub_apply PiLp.sub_apply
112+
113+
@[simp]
114+
theorem smul_apply : (c • x) i = c • x i :=
115+
rfl
116+
#align pi_Lp.smul_apply PiLp.smul_apply
117+
118+
@[simp]
119+
theorem neg_apply : (-x) i = -x i :=
120+
rfl
121+
#align pi_Lp.neg_apply PiLp.neg_apply
122+
end
89123

90124
/-! Note that the unapplied versions of these lemmas are deliberately omitted, as they break
91125
the use of the type synonym. -/
@@ -223,11 +257,11 @@ separate from `PiLp.seminormedAddCommGroup` since the latter requires the type c
223257
224258
Registering this separately allows for a future norm-like structure on `PiLp p β` for `p < 1`
225259
satisfying a relaxed triangle inequality. These are called *quasi-norms*. -/
226-
instance hasNorm : Norm (PiLp p β) where
260+
instance instNorm : Norm (PiLp p β) where
227261
norm f :=
228262
if p = 0 then {i | ‖f i‖ ≠ 0}.toFinite.toFinset.card
229263
else if p = ∞ then ⨆ i, ‖f i‖ else (∑ i, ‖f i‖ ^ p.toReal) ^ (1 / p.toReal)
230-
#align pi_Lp.has_norm PiLp.hasNorm
264+
#align pi_Lp.has_norm PiLp.instNorm
231265

232266
variable {p β}
233267

@@ -299,7 +333,6 @@ def pseudoEmetricAux : PseudoEMetricSpace (PiLp p β) where
299333
(∑ i, edist (f i) (g i) ^ p.toReal) ^ (1 / p.toReal) +
300334
(∑ i, edist (g i) (h i) ^ p.toReal) ^ (1 / p.toReal) :=
301335
ENNReal.Lp_add_le _ _ _ hp
302-
303336
#align pi_Lp.pseudo_emetric_aux PiLp.pseudoEmetricAux
304337

305338
attribute [local instance] PiLp.pseudoEmetricAux
@@ -528,17 +561,13 @@ instance seminormedAddCommGroup [∀ i, SeminormedAddCommGroup (β i)] :
528561
{ Pi.addCommGroup with
529562
dist_eq := fun x y => by
530563
rcases p.dichotomy with (rfl | h)
531-
· simp only [dist_eq_iSup, norm_eq_ciSup, dist_eq_norm]
532-
-- Porting note: added
533-
congr
564+
· simp only [dist_eq_iSup, norm_eq_ciSup, dist_eq_norm, sub_apply]
534565
· have : p ≠ ∞ := by
535566
intro hp
536567
rw [hp, ENNReal.top_toReal] at h
537568
linarith
538569
simp only [dist_eq_sum (zero_lt_one.trans_le h), norm_eq_sum (zero_lt_one.trans_le h),
539-
dist_eq_norm]
540-
-- Porting note: added
541-
congr }
570+
dist_eq_norm, sub_apply] }
542571
#align pi_Lp.seminormed_add_comm_group PiLp.seminormedAddCommGroup
543572

544573
/-- normed group instance on the product of finitely many normed groups, using the `L^p` norm. -/
@@ -610,8 +639,7 @@ theorem norm_sq_eq_of_L2 (β : ι → Type*) [∀ i, SeminormedAddCommGroup (β
610639

611640
theorem dist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
612641
dist x y = (∑ i, dist (x i) (y i) ^ 2).sqrt := by
613-
simp_rw [dist_eq_norm, norm_eq_of_L2]
614-
rfl
642+
simp_rw [dist_eq_norm, norm_eq_of_L2, sub_apply]
615643
#align pi_Lp.dist_eq_of_L2 PiLp.dist_eq_of_L2
616644

617645
theorem nndist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
@@ -626,7 +654,7 @@ theorem edist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)
626654
edist x y = (∑ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ) := by simp [PiLp.edist_eq_sum]
627655
#align pi_Lp.edist_eq_of_L2 PiLp.edist_eq_of_L2
628656

629-
instance instboundedSMul [SeminormedRing 𝕜] [∀ i, SeminormedAddCommGroup (β i)]
657+
instance instBoundedSMul [SeminormedRing 𝕜] [∀ i, SeminormedAddCommGroup (β i)]
630658
[∀ i, Module 𝕜 (β i)] [∀ i, BoundedSMul 𝕜 (β i)] :
631659
BoundedSMul 𝕜 (PiLp p β) :=
632660
.of_nnnorm_smul_le fun c f => by
@@ -637,8 +665,6 @@ instance instboundedSMul [SeminormedRing 𝕜] [∀ i, SeminormedAddCommGroup (
637665
have hpt : p ≠ ⊤ := p.toReal_pos_iff_ne_top.mp hp0
638666
rw [nnnorm_eq_sum hpt, nnnorm_eq_sum hpt, NNReal.rpow_one_div_le_iff hp0, NNReal.mul_rpow,
639667
← NNReal.rpow_mul, div_mul_cancel 1 hp0.ne', NNReal.rpow_one, Finset.mul_sum]
640-
-- Porting note: added to replace Pi.smul_apply
641-
have smul_apply : ∀ i : ι, (c • f) i = c • (f i) := fun i => rfl
642668
simp_rw [← NNReal.mul_rpow, smul_apply]
643669
exact Finset.sum_le_sum fun i _ => NNReal.rpow_le_rpow (nnnorm_smul_le _ _) hp0.le
644670

@@ -648,39 +674,10 @@ instance normedSpace [NormedField 𝕜] [∀ i, SeminormedAddCommGroup (β i)]
648674
norm_smul_le := norm_smul_le
649675
#align pi_Lp.normed_space PiLp.normedSpace
650676

651-
/- Register simplification lemmas for the applications of `PiLp` elements, as the usual lemmas
652-
for Pi types will not trigger. -/
653677
variable {𝕜 p α}
654678
variable [SeminormedRing 𝕜] [∀ i, SeminormedAddCommGroup (β i)]
655679
variable [∀ i, Module 𝕜 (β i)] [∀ i, BoundedSMul 𝕜 (β i)] (c : 𝕜)
656680

657-
variable (x y : PiLp p β) (x' y' : ∀ i, β i) (i : ι)
658-
659-
@[simp]
660-
theorem zero_apply : (0 : PiLp p β) i = 0 :=
661-
rfl
662-
#align pi_Lp.zero_apply PiLp.zero_apply
663-
664-
@[simp]
665-
theorem add_apply : (x + y) i = x i + y i :=
666-
rfl
667-
#align pi_Lp.add_apply PiLp.add_apply
668-
669-
@[simp]
670-
theorem sub_apply : (x - y) i = x i - y i :=
671-
rfl
672-
#align pi_Lp.sub_apply PiLp.sub_apply
673-
674-
@[simp]
675-
theorem smul_apply : (c • x) i = c • x i :=
676-
rfl
677-
#align pi_Lp.smul_apply PiLp.smul_apply
678-
679-
@[simp]
680-
theorem neg_apply : (-x) i = -x i :=
681-
rfl
682-
#align pi_Lp.neg_apply PiLp.neg_apply
683-
684681
/-- The canonical map `WithLp.equiv` between `PiLp ∞ β` and `Π i, β i` as a linear isometric
685682
equivalence. -/
686683
def equivₗᵢ : PiLp ∞ β ≃ₗᵢ[𝕜] ∀ i, β i :=
@@ -703,8 +700,6 @@ def _root_.LinearIsometryEquiv.piLpCongrLeft (e : ι ≃ ι') :
703700
(PiLp p fun _ : ι => E) ≃ₗᵢ[𝕜] PiLp p fun _ : ι' => E where
704701
toLinearEquiv := LinearEquiv.piCongrLeft' 𝕜 (fun _ : ι => E) e
705702
norm_map' x' := by
706-
-- Porting note: this avoids spurious `x` and `y` arguments
707-
clear x y
708703
rcases p.dichotomy with (rfl | h)
709704
· simp_rw [norm_eq_ciSup]
710705
exact e.symm.iSup_congr fun _ => rfl
@@ -754,7 +749,6 @@ variable [DecidableEq ι]
754749
@[simp]
755750
theorem nnnorm_equiv_symm_single [hp : Fact (1 ≤ p)] (i : ι) (b : β i) :
756751
‖(WithLp.equiv p (∀ i, β i)).symm (Pi.single i b)‖₊ = ‖b‖₊ := by
757-
clear x y -- Porting note: added
758752
haveI : Nonempty ι := ⟨i⟩
759753
induction p using ENNReal.recTopCoe generalizing hp with
760754
| top =>
@@ -834,7 +828,6 @@ for `p ≠ ∞`. -/
834828
theorem nnnorm_equiv_symm_const' {β} [SeminormedAddCommGroup β] [Nonempty ι] (b : β) :
835829
‖(WithLp.equiv p (ι → β)).symm (Function.const _ b)‖₊ =
836830
(Fintype.card ι : ℝ≥0) ^ (1 / p).toReal * ‖b‖₊ := by
837-
clear x y -- Porting note: added to avoid spurious arguments
838831
rcases em <| p = ∞ with (rfl | hp)
839832
· simp only [WithLp.equiv_symm_pi_apply, ENNReal.div_top, ENNReal.zero_toReal, NNReal.rpow_zero,
840833
one_mul, nnnorm_eq_ciSup, Function.const_apply, ciSup_const]

Mathlib/Analysis/SpecialFunctions/Gaussian.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,8 @@ theorem isLittleO_exp_neg_mul_sq_cocompact {a : ℂ} (ha : 0 < a.re) (s : ℝ) :
665665
/-- Jacobi's theta-function transformation formula for the sum of `exp -Q(x)`, where `Q` is a
666666
negative definite quadratic form. -/
667667
theorem Complex.tsum_exp_neg_quadratic {a : ℂ} (ha : 0 < a.re) (b : ℂ) :
668-
(∑' n : ℤ, cexp (-π * a * n ^ 2 + 2 * π * b * n)) = 1 / a ^ (1 / 2 : ℂ) *
669-
∑' n : ℤ, cexp (-π / a * (n + I * b) ^ 2) := by
668+
(∑' n : ℤ, cexp (-π * a * n ^ 2 + 2 * π * b * n)) =
669+
1 / a ^ (1 / 2 : ℂ) * ∑' n : ℤ, cexp (-π / a * (n + I * b) ^ 2) := by
670670
let f : ℝ → ℂ := fun x ↦ cexp (-π * a * x ^ 2 + 2 * π * b * x)
671671
have hCf : Continuous f
672672
· refine Complex.continuous_exp.comp (Continuous.add ?_ ?_)
@@ -691,8 +691,7 @@ theorem Complex.tsum_exp_neg_quadratic {a : ℂ} (ha : 0 < a.re) (b : ℂ) :
691691
-↑π / a * x ^ 2 + (-2 * π * I * b) / a * x + π * b ^ 2 / a
692692
· intro x; ring_nf; rw [I_sq]; ring
693693
simp_rw [this]
694-
conv => enter [2, x]; rw [Complex.exp_add, ← mul_assoc _ _ (Complex.exp _),
695-
mul_comm]
694+
conv => enter [2, x]; rw [Complex.exp_add, ← mul_assoc _ _ (Complex.exp _), mul_comm]
696695
refine ((cexp_neg_quadratic_isLittleO_abs_rpow_cocompact
697696
(?_) (-2 * ↑π * I * b / a) (-2)).isBigO.const_mul_left _).const_mul_left _
698697
rwa [neg_div, neg_re, neg_lt_zero]
@@ -704,8 +703,7 @@ theorem Complex.tsum_exp_neg_quadratic {a : ℂ} (ha : 0 < a.re) (b : ℂ) :
704703
theorem Complex.tsum_exp_neg_mul_int_sq {a : ℂ} (ha : 0 < a.re) :
705704
(∑' n : ℤ, cexp (-π * a * (n : ℂ) ^ 2)) =
706705
1 / a ^ (1 / 2 : ℂ) * ∑' n : ℤ, cexp (-π / a * (n : ℂ) ^ 2) := by
707-
simpa only [mul_zero, zero_mul, add_zero] using
708-
Complex.tsum_exp_neg_quadratic ha 0
706+
simpa only [mul_zero, zero_mul, add_zero] using Complex.tsum_exp_neg_quadratic ha 0
709707
#align complex.tsum_exp_neg_mul_int_sq Complex.tsum_exp_neg_mul_int_sq
710708

711709
theorem Real.tsum_exp_neg_mul_int_sq {a : ℝ} (ha : 0 < a) :

Mathlib/Combinatorics/SimpleGraph/Maps.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ theorem coe_comp (f' : G' →g G'') (f : G →g G') : ⇑(f'.comp f) = f' ∘ f
344344
#align simple_graph.hom.coe_comp SimpleGraph.Hom.coe_comp
345345

346346
/-- The graph homomorphism from a smaller graph to a bigger one. -/
347-
def ofLe (h : G₁ ≤ G₂) : G₁ →g G₂ := ⟨id, @h⟩
348-
#align simple_graph.hom.of_le SimpleGraph.Hom.ofLe
347+
def ofLE (h : G₁ ≤ G₂) : G₁ →g G₂ := ⟨id, @h⟩
348+
#align simple_graph.hom.of_le SimpleGraph.Hom.ofLE
349349

350-
@[simp, norm_cast] lemma coe_ofLe (h : G₁ ≤ G₂) : ⇑(ofLe h) = id := rfl
351-
#align simple_graph.hom.coe_of_le SimpleGraph.Hom.coe_ofLe
350+
@[simp, norm_cast] lemma coe_ofLE (h : G₁ ≤ G₂) : ⇑(ofLE h) = id := rfl
351+
#align simple_graph.hom.coe_of_le SimpleGraph.Hom.coe_ofLE
352352

353353
end Hom
354354

Mathlib/Data/Fintype/Prod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ instance Pi.infinite_of_left {ι : Sort*} {π : ι → Sort _} [∀ i, Nontrivia
8787
/-- If at least one `π i` is infinite and the rest nonempty, the pi type of all `π` is infinite. -/
8888
theorem Pi.infinite_of_exists_right {ι : Type*} {π : ι → Type*} (i : ι) [Infinite <| π i]
8989
[∀ i, Nonempty <| π i] : Infinite (∀ i : ι, π i) :=
90-
let ⟨m⟩ := @Pi.Nonempty ι π _
90+
let ⟨m⟩ := @Pi.instNonempty ι π _
9191
Infinite.of_injective _ (update_injective m i)
9292
#align pi.infinite_of_exists_right Pi.infinite_of_exists_right
9393

Mathlib/GroupTheory/MonoidLocalization.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,16 +2006,12 @@ variable {α : Type*} [CancelCommMonoid α] {s : Submonoid α} {a₁ b₁ : α}
20062006

20072007
@[to_additive]
20082008
theorem mk_left_injective (b : s) : Injective fun a => mk a b := fun c d h => by
2009-
-- porting note: times out unless we add this `have`. Even `infer_instance` times out here.
2010-
have : Nonempty s := One.nonempty
20112009
simpa [-mk_eq_monoidOf_mk', mk_eq_mk_iff, r_iff_exists] using h
20122010
#align localization.mk_left_injective Localization.mk_left_injective
20132011
#align add_localization.mk_left_injective AddLocalization.mk_left_injective
20142012

20152013
@[to_additive]
20162014
theorem mk_eq_mk_iff' : mk a₁ a₂ = mk b₁ b₂ ↔ ↑b₂ * a₁ = a₂ * b₁ := by
2017-
-- porting note: times out unless we add this `have`. Even `inferInstance` times out here.
2018-
have : Nonempty s := One.nonempty
20192015
simp_rw [mk_eq_mk_iff, r_iff_exists, mul_left_cancel_iff, exists_const]
20202016
#align localization.mk_eq_mk_iff' Localization.mk_eq_mk_iff'
20212017
#align add_localization.mk_eq_mk_iff' AddLocalization.mk_eq_mk_iff'

Mathlib/GroupTheory/Nilpotent.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ theorem IsPGroup.isNilpotent [Finite G] {p : ℕ} [hp : Fact (Nat.Prime p)] (h :
865865
have hcq : Fintype.card (G ⧸ center G) < Fintype.card G := by
866866
rw [card_eq_card_quotient_mul_card_subgroup (center G)]
867867
apply lt_mul_of_one_lt_right
868-
exact Fintype.card_pos_iff.mpr One.nonempty
868+
exact Fintype.card_pos_iff.mpr One.instNonempty
869869
exact (Subgroup.one_lt_card_iff_ne_bot _).mpr (ne_of_gt h.bot_lt_center)
870870
have hnq : IsNilpotent (G ⧸ center G) := ih _ hcq (h.to_quotient (center G))
871871
exact of_quotient_center_nilpotent hnq

0 commit comments

Comments
 (0)