Skip to content

Commit 95de1de

Browse files
chore: tidy various files (#4997)
1 parent 1bb77b6 commit 95de1de

File tree

12 files changed

+113
-116
lines changed

12 files changed

+113
-116
lines changed

Mathlib/Algebra/Order/CompleteField.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import Mathlib.Analysis.SpecialFunctions.Pow.Real
1717
1818
This file shows that the reals are unique, or, more formally, given a type satisfying the common
1919
axioms of the reals (field, conditionally complete, linearly ordered) that there is an isomorphism
20-
preserving these properties to the reals. This is `rat.induced_order_ring_iso`. Moreover this
21-
isomorphism is unique.
20+
preserving these properties to the reals. This is `LinearOrderedField.inducedOrderRingIso` for `ℚ`.
21+
Moreover this isomorphism is unique.
2222
2323
We introduce definitions of conditionally complete linear ordered fields, and show all such are
2424
archimedean. We also construct the natural map from a `LinearOrderedField` to such a field.
@@ -79,7 +79,7 @@ instance (priority := 100) ConditionallyCompleteLinearOrderedField.to_archimedea
7979

8080
/-- The reals are a conditionally complete linearly ordered field. -/
8181
instance : ConditionallyCompleteLinearOrderedField ℝ :=
82-
{ (inferInstance : LinearOrderedField ℝ),
82+
{ (inferInstance : LinearOrderedField ℝ),
8383
(inferInstance : ConditionallyCompleteLinearOrder ℝ) with }
8484

8585
namespace LinearOrderedField
@@ -290,8 +290,8 @@ theorem exists_mem_cutMap_mul_self_of_lt_inducedMap_mul_self (ha : 0 < a) (b :
290290
variable (α β)
291291

292292
/-- `inducedMap` as an additive homomorphism. -/
293-
def inducedAddHom : α →+ β := by
294-
refine ⟨⟨inducedMap α β, inducedMap_zero α β⟩, inducedMap_add α β⟩
293+
def inducedAddHom : α →+ β :=
294+
⟨⟨inducedMap α β, inducedMap_zero α β⟩, inducedMap_add α β⟩
295295
#align linear_ordered_field.induced_add_hom LinearOrderedField.inducedAddHom
296296

297297
/-- `inducedMap` as an `OrderRingHom`. -/

Mathlib/AlgebraicTopology/FundamentalGroupoid/PUnit.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def punitEquivDiscretePUnit : FundamentalGroupoid PUnit.{u + 1} ≌ Discrete PUn
4242
CategoryTheory.Equivalence.mk (Functor.star _) ((CategoryTheory.Functor.const _).obj PUnit.unit)
4343
-- Porting note: was `by decide`
4444
(NatIso.ofComponents fun _ => eqToIso (by simp))
45-
(Functor.pUnitExt _ _)
45+
(Functor.punitExt _ _)
4646
#align fundamental_groupoid.punit_equiv_discrete_punit FundamentalGroupoid.punitEquivDiscretePUnit
4747

4848
end FundamentalGroupoid

Mathlib/CategoryTheory/Closed/Zero.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ attribute [local instance] uniqueHomsetOfZero
6363
/-- A cartesian closed category with a zero object is equivalent to the category with one object and
6464
one morphism.
6565
-/
66-
def equivPunit [HasZeroObject C] : C ≌ Discrete PUnit :=
66+
def equivPUnit [HasZeroObject C] : C ≌ Discrete PUnit :=
6767
Equivalence.mk (Functor.star C) (Functor.fromPUnit 0)
6868
(NatIso.ofComponents
6969
(fun X =>
7070
{ hom := default
7171
inv := default })
7272
fun f => Subsingleton.elim _ _)
73-
(Functor.pUnitExt _ _)
74-
#align category_theory.equiv_punit CategoryTheory.equivPunit
73+
(Functor.punitExt _ _)
74+
#align category_theory.equiv_punit CategoryTheory.equivPUnit
7575

7676
end CategoryTheory

Mathlib/CategoryTheory/IsConnected.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ theorem equiv_relation [IsConnected J] (r : J → J → Prop) (hr : _root_.Equiv
306306
apply hr.3 (hr.2 (z _)) (z _)
307307
#align category_theory.equiv_relation CategoryTheory.equiv_relation
308308

309-
/-- In a connected category, any two objects are related by `zigzag`. -/
309+
/-- In a connected category, any two objects are related by `Zigzag`. -/
310310
theorem isConnected_zigzag [IsConnected J] (j₁ j₂ : J) : Zigzag j₁ j₂ :=
311311
equiv_relation _ zigzag_equivalence
312312
(@fun _ _ f => Relation.ReflTransGen.single (Or.inl (Nonempty.intro f))) _ _
313313
#align category_theory.is_connected_zigzag CategoryTheory.isConnected_zigzag
314314

315-
/-- If any two objects in a nonempty category are related by `zigzag`, the category is connected.
315+
/-- If any two objects in a nonempty category are related by `Zigzag`, the category is connected.
316316
-/
317317
theorem zigzag_isConnected [Nonempty J] (h : ∀ j₁ j₂ : J, Zigzag j₁ j₂) : IsConnected J := by
318318
apply IsConnected.of_induct
@@ -348,13 +348,13 @@ theorem isConnected_of_zigzag [Nonempty J] (h : ∀ j₁ j₂ : J, ∃ l,
348348
#align category_theory.is_connected_of_zigzag CategoryTheory.isConnected_of_zigzag
349349

350350
/-- If `Discrete α` is connected, then `α` is (type-)equivalent to `PUnit`. -/
351-
def discreteIsConnectedEquivPunit {α : Type u₁} [IsConnected (Discrete α)] : α ≃ PUnit :=
351+
def discreteIsConnectedEquivPUnit {α : Type u₁} [IsConnected (Discrete α)] : α ≃ PUnit :=
352352
Discrete.equivOfEquivalence.{u₁, u₁}
353353
{ functor := Functor.star (Discrete α)
354354
inverse := Discrete.functor fun _ => Classical.arbitrary _
355355
unitIso := isoConstant _ (Classical.arbitrary _)
356-
counitIso := Functor.pUnitExt _ _ }
357-
#align category_theory.discrete_is_connected_equiv_punit CategoryTheory.discreteIsConnectedEquivPunit
356+
counitIso := Functor.punitExt _ _ }
357+
#align category_theory.discrete_is_connected_equiv_punit CategoryTheory.discreteIsConnectedEquivPUnit
358358

359359
variable {C : Type u₂} [Category.{u₁} C]
360360

Mathlib/CategoryTheory/Limits/Comma.lean

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def coneOfPreserves [PreservesLimit (F ⋙ snd L R) R] (c₁ : Cone (F ⋙ fst L
7272
w := ((isLimitOfPreserves R t₂).fac (limitAuxiliaryCone F c₁) j).symm }
7373
naturality := fun j₁ j₂ t => by
7474
ext
75-
. simp [← c₁.w t]
76-
. simp [← c₂.w t] }
75+
· simp [← c₁.w t]
76+
· simp [← c₂.w t] }
7777
#align category_theory.comma.cone_of_preserves CategoryTheory.Comma.coneOfPreserves
7878

7979
/-- Provided that `R` preserves the appropriate limit, then the cone in `coneOfPreserves` is a
@@ -92,8 +92,8 @@ def coneOfPreservesIsLimit [PreservesLimit (F ⋙ snd L R) R] {c₁ : Cone (F
9292
exact (s.π.app j).w }
9393
uniq s m w := by
9494
apply CommaMorphism.ext
95-
. exact t₁.uniq ((fst L R).mapCone s) _ (fun j => by simp [← w])
96-
. exact t₂.uniq ((snd L R).mapCone s) _ (fun j => by simp [← w])
95+
· exact t₁.uniq ((fst L R).mapCone s) _ (fun j => by simp [← w])
96+
· exact t₂.uniq ((snd L R).mapCone s) _ (fun j => by simp [← w])
9797
#align category_theory.comma.cone_of_preserves_is_limit CategoryTheory.Comma.coneOfPreservesIsLimit
9898

9999
/-- (Implementation). An auxiliary cocone which is useful in order to construct colimits
@@ -123,8 +123,8 @@ def coconeOfPreserves [PreservesColimit (F ⋙ fst L R) L] {c₁ : Cocone (F ⋙
123123
w := (isColimitOfPreserves L t₁).fac (colimitAuxiliaryCocone _ c₂) j }
124124
naturality := fun j₁ j₂ t => by
125125
ext
126-
. simp [← c₁.w t]
127-
. simp [← c₂.w t] }
126+
· simp [← c₁.w t]
127+
· simp [← c₂.w t] }
128128
#align category_theory.comma.cocone_of_preserves CategoryTheory.Comma.coconeOfPreserves
129129

130130
/-- Provided that `L` preserves the appropriate colimit, then the cocone in `coconeOfPreserves` is
@@ -143,8 +143,8 @@ def coconeOfPreservesIsColimit [PreservesColimit (F ⋙ fst L R) L] {c₁ : Coco
143143
exact (s.ι.app j).w }
144144
uniq s m w := by
145145
apply CommaMorphism.ext
146-
. exact t₁.uniq ((fst L R).mapCocone s) _ (fun j => by simp [← w])
147-
. exact t₂.uniq ((snd L R).mapCocone s) _ (fun j => by simp [← w])
146+
· exact t₁.uniq ((fst L R).mapCocone s) _ (fun j => by simp [← w])
147+
· exact t₂.uniq ((snd L R).mapCocone s) _ (fun j => by simp [← w])
148148
#align category_theory.comma.cocone_of_preserves_is_colimit CategoryTheory.Comma.coconeOfPreservesIsColimit
149149

150150
instance hasLimit (F : J ⥤ Comma L R) [HasLimit (F ⋙ fst L R)] [HasLimit (F ⋙ snd L R)]
@@ -231,8 +231,8 @@ noncomputable instance createsLimit [i : PreservesLimit (F ⋙ proj X G) G] :
231231
CreatesLimit F (proj X G) :=
232232
letI : PreservesLimit (F ⋙ Comma.snd (Functor.fromPUnit X) G) G := i
233233
createsLimitOfReflectsIso fun _ t =>
234-
{ liftedCone := Comma.coneOfPreserves F pUnitCone t
235-
makesLimit := Comma.coneOfPreservesIsLimit _ pUnitConeIsLimit _
234+
{ liftedCone := Comma.coneOfPreserves F punitCone t
235+
makesLimit := Comma.coneOfPreservesIsLimit _ punitConeIsLimit _
236236
validLift := Cones.ext (Iso.refl _) fun _ => (id_comp _).symm }
237237
#align category_theory.structured_arrow.creates_limit CategoryTheory.StructuredArrow.createsLimit
238238

@@ -278,8 +278,8 @@ noncomputable instance createsColimit [i : PreservesColimit (F ⋙ proj G X) G]
278278
CreatesColimit F (proj G X) :=
279279
letI : PreservesColimit (F ⋙ Comma.fst G (Functor.fromPUnit X)) G := i
280280
createsColimitOfReflectsIso fun _ t =>
281-
{ liftedCocone := Comma.coconeOfPreserves F t pUnitCocone
282-
makesColimit := Comma.coconeOfPreservesIsColimit _ _ pUnitCoconeIsColimit
281+
{ liftedCocone := Comma.coconeOfPreserves F t punitCocone
282+
makesColimit := Comma.coconeOfPreservesIsColimit _ _ punitCoconeIsColimit
283283
validLift := Cocones.ext (Iso.refl _) fun _ => comp_id _ }
284284
#align category_theory.costructured_arrow.creates_colimit CategoryTheory.CostructuredArrow.createsColimit
285285

Mathlib/CategoryTheory/Limits/Unit.lean

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@ namespace CategoryTheory.Limits
2828

2929
variable {J : Type v} [Category.{v'} J] {F : J ⥤ Discrete PUnit}
3030

31-
/-- A trivial cone for a functor into `PUnit`. `pUnitConeIsLimit` shows it is a limit. -/
32-
def pUnitCone : Cone F :=
33-
⟨⟨⟨⟩⟩, (Functor.pUnitExt _ _).hom⟩
34-
#align category_theory.limits.punit_cone CategoryTheory.Limits.pUnitCone
31+
/-- A trivial cone for a functor into `PUnit`. `punitConeIsLimit` shows it is a limit. -/
32+
def punitCone : Cone F :=
33+
⟨⟨⟨⟩⟩, (Functor.punitExt _ _).hom⟩
34+
#align category_theory.limits.punit_cone CategoryTheory.Limits.punitCone
3535

36-
/-- A trivial cocone for a functor into `PUnit`. `pUnitCoconeIsLimit` shows it is a colimit. -/
37-
def pUnitCocone : Cocone F :=
38-
⟨⟨⟨⟩⟩, (Functor.pUnitExt _ _).hom⟩
39-
#align category_theory.limits.punit_cocone CategoryTheory.Limits.pUnitCocone
36+
/-- A trivial cocone for a functor into `PUnit`. `punitCoconeIsLimit` shows it is a colimit. -/
37+
def punitCocone : Cocone F :=
38+
⟨⟨⟨⟩⟩, (Functor.punitExt _ _).hom⟩
39+
#align category_theory.limits.punit_cocone CategoryTheory.Limits.punitCocone
4040

4141
/-- Any cone over a functor into `PUnit` is a limit cone.
4242
-/
43-
def pUnitConeIsLimit {c : Cone F} : IsLimit c where
43+
def punitConeIsLimit {c : Cone F} : IsLimit c where
4444
lift := fun s => eqToHom (by simp)
45-
#align category_theory.limits.punit_cone_is_limit CategoryTheory.Limits.pUnitConeIsLimit
45+
#align category_theory.limits.punit_cone_is_limit CategoryTheory.Limits.punitConeIsLimit
4646

4747
/-- Any cocone over a functor into `PUnit` is a colimit cocone.
4848
-/
49-
def pUnitCoconeIsColimit {c : Cocone F} : IsColimit c where
49+
def punitCoconeIsColimit {c : Cocone F} : IsColimit c where
5050
desc := fun s => eqToHom (by simp)
51-
#align category_theory.limits.punit_cocone_is_colimit CategoryTheory.Limits.pUnitCoconeIsColimit
51+
#align category_theory.limits.punit_cocone_is_colimit CategoryTheory.Limits.punitCoconeIsColimit
5252

5353
instance : HasLimitsOfSize.{v', v} (Discrete PUnit) :=
54-
fun _ _ => ⟨fun _ => ⟨pUnitCone, pUnitConeIsLimit⟩⟩⟩
54+
fun _ _ => ⟨fun _ => ⟨punitCone, punitConeIsLimit⟩⟩⟩
5555

5656
instance : HasColimitsOfSize.{v', v} (Discrete PUnit) :=
57-
fun _ _ => ⟨fun _ => ⟨pUnitCocone, pUnitCoconeIsColimit⟩⟩⟩
57+
fun _ _ => ⟨fun _ => ⟨punitCocone, punitCoconeIsColimit⟩⟩⟩
5858

5959
end CategoryTheory.Limits

Mathlib/CategoryTheory/PUnit.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ variable {C}
4040

4141
/-- Any two functors to `Discrete PUnit` are isomorphic. -/
4242
@[simps!]
43-
def pUnitExt (F G : C ⥤ Discrete PUnit) : F ≅ G :=
43+
def punitExt (F G : C ⥤ Discrete PUnit) : F ≅ G :=
4444
NatIso.ofComponents fun X => eqToIso (by simp only [eq_iff_true_of_subsingleton])
45-
#align category_theory.functor.punit_ext CategoryTheory.Functor.pUnitExt
45+
#align category_theory.functor.punit_ext CategoryTheory.Functor.punitExt
4646
-- Porting note: simp does indeed fire for these despite the linter warning
47-
attribute [nolint simpNF] pUnitExt_hom_app_down_down pUnitExt_inv_app_down_down
47+
attribute [nolint simpNF] punitExt_hom_app_down_down punitExt_inv_app_down_down
4848

4949
/-- Any two functors to `Discrete PUnit` are *equal*.
50-
You probably want to use `pUnitExt` instead of this. -/
51-
theorem pUnit_ext' (F G : C ⥤ Discrete PUnit) : F = G :=
50+
You probably want to use `punitExt` instead of this. -/
51+
theorem punit_ext' (F G : C ⥤ Discrete PUnit) : F = G :=
5252
Functor.ext fun X => by simp only [eq_iff_true_of_subsingleton]
53-
#align category_theory.functor.punit_ext' CategoryTheory.Functor.pUnit_ext'
53+
#align category_theory.functor.punit_ext' CategoryTheory.Functor.punit_ext'
5454

5555
/-- The functor from `Discrete PUnit` sending everything to the given object. -/
5656
abbrev fromPUnit (X : C) : Discrete PUnit.{v + 1} ⥤ C :=
@@ -73,7 +73,7 @@ end Functor
7373
/-- A category being equivalent to `PUnit` is equivalent to it having a unique morphism between
7474
any two objects. (In fact, such a category is also a groupoid;
7575
see `CategoryTheory.Groupoid.ofHomUnique`) -/
76-
theorem equiv_pUnit_iff_unique :
76+
theorem equiv_punit_iff_unique :
7777
Nonempty (C ≌ Discrete PUnit) ↔ Nonempty C ∧ ∀ x y : C, Nonempty <| Unique (x ⟶ y) := by
7878
constructor
7979
· rintro ⟨h⟩
@@ -98,11 +98,11 @@ theorem equiv_pUnit_iff_unique :
9898
refine'
9999
Nonempty.intro
100100
(CategoryTheory.Equivalence.mk ((Functor.const _).obj ⟨⟨⟩⟩)
101-
((@Functor.const <| Discrete PUnit).obj p) ?_ (by apply Functor.pUnitExt))
101+
((@Functor.const <| Discrete PUnit).obj p) ?_ (by apply Functor.punitExt))
102102
exact
103103
NatIso.ofComponents fun _ =>
104104
{ hom := default
105105
inv := default }
106-
#align category_theory.equiv_punit_iff_unique CategoryTheory.equiv_pUnit_iff_unique
106+
#align category_theory.equiv_punit_iff_unique CategoryTheory.equiv_punit_iff_unique
107107

108108
end CategoryTheory

Mathlib/FieldTheory/IsAlgClosed/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z := by
9898
#align is_alg_closed.exists_eq_mul_self IsAlgClosed.exists_eq_mul_self
9999

100100
theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
101-
p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by
101+
p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by
102102
refine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩
103103
cases' le_or_lt (degree p) 0 with hd hd
104104
· exact eq_C_of_degree_le_zero hd
@@ -159,10 +159,10 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
159159
exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
160160
#align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
161161

162-
theorem algebra_map_surjective_of_is_integral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
162+
theorem algebraMap_surjective_of_isIntegral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
163163
[IsAlgClosed k] (f : k →+* K) (hf : f.IsIntegral) : Function.Surjective f :=
164164
@algebraMap_surjective_of_isIntegral k K _ _ _ _ f.toAlgebra hf
165-
#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebra_map_surjective_of_is_integral'
165+
#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebraMap_surjective_of_isIntegral'
166166

167167
theorem algebraMap_surjective_of_isAlgebraic {k K : Type _} [Field k] [Ring K] [IsDomain K]
168168
[IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :

0 commit comments

Comments
 (0)