Skip to content

Commit cc4f996

Browse files
chore: tidy various files (#13562)
1 parent 562c80b commit cc4f996

File tree

29 files changed

+79
-127
lines changed

29 files changed

+79
-127
lines changed

Mathlib/Algebra/DirectLimit.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom
703703
· rintro x (⟨i, j, hij, x, rfl⟩ | ⟨i, rfl⟩ | ⟨i, x, y, rfl⟩ | ⟨i, x, y, rfl⟩)
704704
· refine
705705
⟨j, {⟨i, x⟩, ⟨j, f' i j hij x⟩}, ?_,
706-
isSupported_sub (isSupported_of.2 <| Or.inr (by exact rfl))
706+
isSupported_sub (isSupported_of.2 <| Or.inr (Set.mem_singleton _))
707707
(isSupported_of.2 <| Or.inl rfl), fun [_] => ?_⟩
708708
· rintro k (rfl | ⟨rfl | _⟩)
709709
· exact hij
@@ -716,7 +716,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom
716716
rw [this]
717717
· exact sub_self _
718718
exacts [Or.inl rfl, Or.inr rfl]
719-
· refine ⟨i, {⟨i, 1⟩}, ?_, isSupported_sub (isSupported_of.2 (by exact rfl))
719+
· refine ⟨i, {⟨i, 1⟩}, ?_, isSupported_sub (isSupported_of.2 (Set.mem_singleton _))
720720
isSupported_one, fun [_] => ?_⟩
721721
· rintro k (rfl | h)
722722
rfl
@@ -728,7 +728,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom
728728
⟨i, {⟨i, x + y⟩, ⟨i, x⟩, ⟨i, y⟩}, ?_,
729729
isSupported_sub (isSupported_of.2 <| Or.inl rfl)
730730
(isSupported_add (isSupported_of.2 <| Or.inr <| Or.inl rfl)
731-
(isSupported_of.2 <| Or.inr <| Or.inr (by exact rfl))),
731+
(isSupported_of.2 <| Or.inr <| Or.inr (Set.mem_singleton _))),
732732
fun [_] => ?_⟩
733733
· rintro k (rfl | ⟨rfl | ⟨rfl | hk⟩⟩) <;> rfl
734734
· rw [(restriction _).map_sub, (restriction _).map_add, restriction_of, restriction_of,
@@ -743,7 +743,7 @@ theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCom
743743
⟨i, {⟨i, x * y⟩, ⟨i, x⟩, ⟨i, y⟩}, ?_,
744744
isSupported_sub (isSupported_of.2 <| Or.inl rfl)
745745
(isSupported_mul (isSupported_of.2 <| Or.inr <| Or.inl rfl)
746-
(isSupported_of.2 <| Or.inr <| Or.inr (by exact rfl))), fun [_] => ?_⟩
746+
(isSupported_of.2 <| Or.inr <| Or.inr (Set.mem_singleton _))), fun [_] => ?_⟩
747747
· rintro k (rfl | ⟨rfl | ⟨rfl | hk⟩⟩) <;> rfl
748748
· rw [(restriction _).map_sub, (restriction _).map_mul, restriction_of, restriction_of,
749749
restriction_of, dif_pos, dif_pos, dif_pos, RingHom.map_sub,

Mathlib/Algebra/Lie/Submodule.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ instance : AddSubgroupClass (LieSubmodule R L M) M where
6464
zero_mem N := N.zero_mem'
6565
neg_mem {N} x hx := show -x ∈ N.toSubmodule from neg_mem hx
6666

67-
instance instSmulMemClass : SMulMemClass (LieSubmodule R L M) R M where
67+
instance instSMulMemClass : SMulMemClass (LieSubmodule R L M) R M where
6868
smul_mem {s} c _ h := s.smul_mem' c h
6969

7070
/-- The zero module is a Lie submodule of any Lie module. -/

Mathlib/Algebra/Module/Submodule/Pointwise.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ to prove:
311311
- for all `m₁, m₂`, `P m₁` and `P m₂` implies `P (m₁ + m₂)`;
312312
- `P 0`.
313313
314-
To invoke this induction principal, use `induction x, hx using Submodule.set_smul_inductionOn` where
314+
To invoke this induction principle, use `induction x, hx using Submodule.set_smul_inductionOn` where
315315
`x : M` and `hx : x ∈ s • N`
316316
317317
When we consider subset of `R` acting on `M`
@@ -408,14 +408,14 @@ theorem span_set_smul [SMulCommClass S R M] (s : Set S) (t : Set M) :
408408

409409
variable {s N} in
410410
/--
411-
Induction principal for set acting on submodules. To prove `P` holds for all `s • N`, it is enough
411+
Induction principle for set acting on submodules. To prove `P` holds for all `s • N`, it is enough
412412
to prove:
413413
- for all `r ∈ s` and `n ∈ N`, `P (r • n)`;
414414
- for all `r` and `m ∈ s • N`, `P (r • n)`;
415415
- for all `m₁, m₂`, `P m₁` and `P m₂` implies `P (m₁ + m₂)`;
416416
- `P 0`.
417417
418-
To invoke this induction principal, use `induction x, hx using Submodule.set_smul_inductionOn` where
418+
To invoke this induction principle, use `induction x, hx using Submodule.set_smul_inductionOn` where
419419
`x : M` and `hx : x ∈ s • N`
420420
-/
421421
@[elab_as_elim]

Mathlib/Algebra/MonoidAlgebra/Ideal.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ theorem MonoidAlgebra.mem_ideal_span_of_image [Monoid G] [Semiring k] {s : Set G
3535
obtain ⟨xm, -, hm⟩ := hm
3636
replace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)
3737
obtain ⟨ym, hym, hm⟩ := hm
38-
replace hm := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)
39-
obtain rfl := hm
40-
-- Porting note: changed `Exists.imp` to `And.imp_right` due to change in `∃ x ∈ s`
41-
-- elaboration
38+
obtain rfl := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)
4239
refine (hy _ hym).imp fun sm p => And.imp_right ?_ p
4340
rintro ⟨d, rfl⟩
4441
exact ⟨xm * d, (mul_assoc _ _ _).symm⟩ }

Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We use eight typeclasses to encode the various properties we care about for thos
2020
These typeclasses are meant to be mostly internal to this file, to set up each lemma in the
2121
appropriate generality.
2222
23-
Less granular typeclasses like `OrderedAddCommMonoid`, `LinearOrderedField`` should be enough for
23+
Less granular typeclasses like `OrderedAddCommMonoid`, `LinearOrderedField` should be enough for
2424
most purposes, and the system is set up so that they imply the correct granular typeclasses here.
2525
If those are enough for you, you may stop reading here! Else, beware that what follows is a bit
2626
technical.

Mathlib/CategoryTheory/FiberedCategory/HomLift.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,20 @@ instance lift_comp_eqToHom {R S S': 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶
168168
@[simp]
169169
lemma comp_eqToHom_lift_iff {R S : 𝒮} {a' a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : a' = a) :
170170
p.IsHomLift f (eqToHom h ≫ φ) ↔ p.IsHomLift f φ where
171-
mp := fun hφ' => by subst h; simpa using hφ'
172-
mpr := fun => inferInstance
171+
mp hφ' := by subst h; simpa using hφ'
172+
mpr hφ := inferInstance
173173

174174
@[simp]
175175
lemma eqToHom_comp_lift_iff {R S : 𝒮} {a b b' : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : b = b') :
176176
p.IsHomLift f (φ ≫ eqToHom h) ↔ p.IsHomLift f φ where
177-
mp := fun hφ' => by subst h; simpa using hφ'
178-
mpr := fun => inferInstance
177+
mp hφ' := by subst h; simpa using hφ'
178+
mpr hφ := inferInstance
179179

180180
@[simp]
181181
lemma lift_eqToHom_comp_iff {R' R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : R' = R) :
182182
p.IsHomLift (eqToHom h ≫ f) φ ↔ p.IsHomLift f φ where
183-
mp := fun hφ' => by subst h; simpa using hφ'
184-
mpr := fun => inferInstance
183+
mp hφ' := by subst h; simpa using hφ'
184+
mpr hφ := inferInstance
185185

186186
@[simp]
187187
lemma lift_comp_eqToHom_iff {R S S' : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : S = S') :

Mathlib/CategoryTheory/IsConnected.lean

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ theorem any_functor_const_on_obj [IsPreconnected J] {α : Type u₂} (F : J ⥤
120120
/-- If any functor to a discrete category is constant on objects, J is connected.
121121
The converse of `any_functor_const_on_obj`.
122122
-/
123-
theorem IsPreconnected.of_any_functor_const_on_obj (h : ∀ {α : Type u₁} (F : J ⥤ Discrete α),
124-
∀ j j' : J, F.obj j = F.obj j') : IsPreconnected J where
123+
theorem IsPreconnected.of_any_functor_const_on_obj
124+
(h : ∀ {α : Type u₁} (F : J ⥤ Discrete α), ∀ j j' : J, F.obj j = F.obj j') :
125+
IsPreconnected J where
125126
iso_constant := fun F j' => ⟨NatIso.ofComponents fun j => eqToIso (h F j j')⟩
126127

127128
/-- If any functor to a discrete category is constant on objects, J is connected.
@@ -143,11 +144,7 @@ theorem constant_of_preserves_morphisms [IsPreconnected J] {α : Type u₂} (F :
143144
simpa using
144145
any_functor_const_on_obj
145146
{ obj := Discrete.mk ∘ F
146-
map := @fun _ _ f =>
147-
eqToHom
148-
(by
149-
ext
150-
exact h _ _ f) }
147+
map := fun f => eqToHom (by ext; exact h _ _ f) }
151148
j j'
152149
#align category_theory.constant_of_preserves_morphisms CategoryTheory.constant_of_preserves_morphisms
153150

@@ -161,7 +158,7 @@ theorem IsPreconnected.of_constant_of_preserves_morphisms
161158
(h : ∀ {α : Type u₁} (F : J → α),
162159
(∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), F j₁ = F j₂) → ∀ j j' : J, F j = F j') :
163160
IsPreconnected J :=
164-
IsPreconnected.of_any_functor_const_on_obj @fun _ F =>
161+
IsPreconnected.of_any_functor_const_on_obj fun F =>
165162
h F.obj fun f => by ext; exact Discrete.eq_of_hom (F.map f)
166163

167164
/-- `J` is connected if: given any function `F : J → α` which is constant for any
@@ -215,8 +212,7 @@ instance [hc : IsConnected J] : IsConnected (ULiftHom.{v₂} (ULift.{u₂} J)) :
215212
have hj₀' : Classical.choice hc.is_nonempty ∈ p' := by
216213
simp only [p', (eq_self p')]
217214
exact hj₀
218-
apply induct_on_objects p' hj₀' @fun _ _ f =>
219-
h ((ULiftHomULiftCategory.equiv J).functor.map f)
215+
apply induct_on_objects p' hj₀' fun f => h ((ULiftHomULiftCategory.equiv J).functor.map f)
220216

221217
/-- Another induction principle for `IsPreconnected J`:
222218
given a type family `Z : J → Sort*` and
@@ -227,14 +223,8 @@ theorem isPreconnected_induction [IsPreconnected J] (Z : J → Sort*)
227223
(h₁ : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), Z j₁ → Z j₂) (h₂ : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), Z j₂ → Z j₁)
228224
{j₀ : J} (x : Z j₀) (j : J) : Nonempty (Z j) :=
229225
(induct_on_objects { j | Nonempty (Z j) } ⟨x⟩
230-
(fun f =>
231-
by
232-
rintro ⟨y⟩
233-
exact ⟨h₁ f y⟩, by
234-
rintro ⟨y⟩
235-
exact ⟨h₂ f y⟩⟩)
236-
j :
237-
_)
226+
(fun f => ⟨by rintro ⟨y⟩; exact ⟨h₁ f y⟩, by rintro ⟨y⟩; exact ⟨h₂ f y⟩⟩)
227+
j : _)
238228
#align category_theory.is_preconnected_induction CategoryTheory.isPreconnected_induction
239229

240230
/-- If `J` and `K` are equivalent, then if `J` is preconnected then `K` is as well. -/
@@ -385,7 +375,7 @@ theorem equiv_relation [IsPreconnected J] (r : J → J → Prop) (hr : _root_.Eq
385375
/-- In a connected category, any two objects are related by `Zigzag`. -/
386376
theorem isPreconnected_zigzag [IsPreconnected J] (j₁ j₂ : J) : Zigzag j₁ j₂ :=
387377
equiv_relation _ zigzag_equivalence
388-
(@fun _ _ f => Relation.ReflTransGen.single (Or.inl (Nonempty.intro f))) _ _
378+
(fun f => Relation.ReflTransGen.single (Or.inl (Nonempty.intro f))) _ _
389379
#align category_theory.is_connected_zigzag CategoryTheory.isPreconnected_zigzag
390380

391381
@[deprecated (since := "2024-02-19")] alias isConnected_zigzag := isPreconnected_zigzag
@@ -466,9 +456,11 @@ instance [IsConnected J] : (Functor.const J : C ⥤ J ⥤ C).Full where
466456

467457
theorem nonempty_hom_of_preconnected_groupoid {G} [Groupoid G] [IsPreconnected G] :
468458
∀ x y : G, Nonempty (x ⟶ y) := by
469-
refine equiv_relation _ ?_ @fun j₁ j₂ => Nonempty.intro
459+
refine equiv_relation _ ?_ fun {j₁ j₂} => Nonempty.intro
470460
exact
471-
fun j => ⟨𝟙 _⟩, @fun j₁ j₂ => Nonempty.map fun f => inv f, @fun _ _ _ => Nonempty.map2 (· ≫ ·)⟩
461+
fun j => ⟨𝟙 _⟩,
462+
fun {j₁ j₂} => Nonempty.map fun f => inv f,
463+
fun {_ _ _} => Nonempty.map2 (· ≫ ·)⟩
472464
#align category_theory.nonempty_hom_of_connected_groupoid CategoryTheory.nonempty_hom_of_preconnected_groupoid
473465

474466
attribute [instance] nonempty_hom_of_preconnected_groupoid

Mathlib/CategoryTheory/Localization/Triangulated.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def pretriangulated : Pretriangulated D where
190190

191191
instance isTriangulated_functor :
192192
letI : Pretriangulated D := pretriangulated L W; L.IsTriangulated :=
193-
letI : Pretriangulated D := pretriangulated L W; ⟨fun T hT => ⟨T, Iso.refl _, hT⟩⟩
193+
letI : Pretriangulated D := pretriangulated L W
194+
fun T hT => ⟨T, Iso.refl _, hT⟩⟩
194195

195196
lemma isTriangulated [Pretriangulated D] [L.IsTriangulated] [IsTriangulated C] :
196197
IsTriangulated D := by

Mathlib/Data/Finsupp/Defs.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ lemma apply_single [AddCommMonoid N] [AddCommMonoid P]
458458
e ((single a n) b) = single a (e n) b := by
459459
classical
460460
simp only [single_apply]
461-
split_ifs; rfl; exact map_zero e
461+
split_ifs
462+
· rfl
463+
· exact map_zero e
462464

463465
theorem support_eq_singleton {f : α →₀ M} {a : α} :
464466
f.support = {a} ↔ f a ≠ 0 ∧ f = single a (f a) :=

Mathlib/Data/Prod/Lex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ instance preorder (α β : Type*) [Preorder α] [Preorder β] : Preorder (α ×
104104

105105
theorem monotone_fst [Preorder α] [LE β] (t c : α ×ₗ β) (h : t ≤ c) :
106106
(ofLex t).1 ≤ (ofLex c).1 := by
107-
cases ((Prod.Lex.le_iff t c).mp h) with
107+
cases (Prod.Lex.le_iff t c).mp h with
108108
| inl h' => exact h'.le
109109
| inr h' => exact h'.1.le
110110

0 commit comments

Comments
 (0)