Skip to content

Commit ee18bf3

Browse files
committed
chore: remove useless tactics (#11333)
The removal of some pointless tactics flagged by #11308.
1 parent 2c97c63 commit ee18bf3

File tree

28 files changed

+30
-71
lines changed

28 files changed

+30
-71
lines changed

Mathlib/AlgebraicTopology/SimplexCategory.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,6 @@ theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ
752752
erw [Fin.predAbove_of_castSucc_lt _ _ (by rwa [Fin.castSucc_castPred])]
753753
dsimp [δ]
754754
rw [Fin.succAbove_of_le_castSucc i _]
755-
-- This was not needed before leanprover/lean4#2644
756-
conv_rhs => dsimp
757755
erw [Fin.succ_pred]
758756
simpa only [Fin.le_iff_val_le_val, Fin.coe_castSucc, Fin.coe_pred] using
759757
Nat.le_sub_one_of_lt (Fin.lt_iff_val_lt_val.mp h')

Mathlib/CategoryTheory/Action.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,13 @@ def curry (F : ActionCategory G X ⥤ SingleObj H) : G →* (X → H) ⋊[mulAut
199199
rfl
200200
{ toFun := fun g => ⟨fun b => F.map (homOfPair b g), g⟩
201201
map_one' := by
202-
congr
203202
dsimp
204203
ext1
205204
ext b
206205
exact F_map_eq.symm.trans (F.map_id b)
207206
rfl
208207
map_mul' := by
209208
intro g h
210-
congr
211209
ext b
212210
exact F_map_eq.symm.trans (F.map_comp (homOfPair (g⁻¹ • b) h) (homOfPair b g))
213211
rfl }

Mathlib/CategoryTheory/Adjunction/Reflective.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
9797
refine @epi_of_epi _ _ _ _ _ (retraction (η.app A)) (η.app A) ?_
9898
rw [show retraction _ ≫ η.app A = _ from η.naturality (retraction (η.app A))]
9999
apply epi_comp (η.app (i.obj ((leftAdjoint i).obj A)))
100-
skip
101100
haveI := isIso_of_epi_of_isSplitMono (η.app A)
102101
exact mem_essImage_of_unit_isIso A
103102
#align category_theory.mem_ess_image_of_unit_is_split_mono CategoryTheory.mem_essImage_of_unit_isSplitMono

Mathlib/CategoryTheory/Closed/Cartesian.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ def cartesianClosedOfEquiv (e : C ≌ D) [h : CartesianClosed C] : CartesianClos
433433
apply isoWhiskerRight e.counitIso (prod.functor.obj X ⋙ e.inverse ⋙ e.functor) ≪≫ _
434434
change prod.functor.obj X ⋙ e.inverse ⋙ e.functor ≅ prod.functor.obj X
435435
apply isoWhiskerLeft (prod.functor.obj X) e.counitIso
436-
skip
437436
apply Adjunction.leftAdjointOfNatIso this }
438437
#align category_theory.cartesian_closed_of_equiv CategoryTheory.cartesianClosedOfEquiv
439438

Mathlib/CategoryTheory/ConcreteCategory/ReflectsIso.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ where `forget C` reflects isomorphisms, itself reflects isomorphisms.
3232
theorem reflectsIsomorphisms_forget₂ [HasForget₂ C D] [ReflectsIsomorphisms (forget C)] :
3333
ReflectsIsomorphisms (forget₂ C D) :=
3434
{ reflects := fun X Y f {i} => by
35-
skip
3635
haveI i' : IsIso ((forget D).map ((forget₂ C D).map f)) := Functor.map_isIso (forget D) _
3736
haveI : IsIso ((forget C).map f) := by
3837
have := @HasForget₂.forget_comp C D
39-
rw [← this]
40-
exact i'
38+
rwa [← this]
4139
apply isIso_of_reflects_iso f (forget C) }
4240
#align category_theory.reflects_isomorphisms_forget₂ CategoryTheory.reflectsIsomorphisms_forget₂
4341

Mathlib/CategoryTheory/EssentiallySmall.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ theorem essentiallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Cate
7272
(e : C ≌ D) : EssentiallySmall.{w} C ↔ EssentiallySmall.{w} D := by
7373
fconstructor
7474
· rintro ⟨S, 𝒮, ⟨f⟩⟩
75-
skip
7675
exact EssentiallySmall.mk' (e.symm.trans f)
7776
· rintro ⟨S, 𝒮, ⟨f⟩⟩
78-
skip
7977
exact EssentiallySmall.mk' (e.trans f)
8078
#align category_theory.essentially_small_congr CategoryTheory.essentiallySmall_congr
8179

@@ -222,13 +220,10 @@ theorem essentiallySmall_iff (C : Type u) [Category.{v} C] :
222220
· intro h
223221
fconstructor
224222
· rcases h with ⟨S, 𝒮, ⟨e⟩⟩
225-
skip
226223
refine' ⟨⟨Skeleton S, ⟨_⟩⟩⟩
227224
exact e.skeletonEquiv
228-
· skip
229-
infer_instance
225+
· infer_instance
230226
· rintro ⟨⟨S, ⟨e⟩⟩, L⟩
231-
skip
232227
let e' := (ShrinkHoms.equivalence C).skeletonEquiv.symm
233228
letI : Category S := InducedCategory.category (e'.trans e).symm
234229
refine' ⟨⟨S, this, ⟨_⟩⟩⟩

Mathlib/CategoryTheory/Functor/Flat.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ variable [PreservesLimits (forget E)]
314314
noncomputable instance lanPreservesFiniteLimitsOfFlat (F : C ⥤ D) [RepresentablyFlat F] :
315315
PreservesFiniteLimits (lan F.op : _ ⥤ Dᵒᵖ ⥤ E) := by
316316
apply preservesFiniteLimitsOfPreservesFiniteLimitsOfSize.{u₁}
317-
intro J _ _; skip
317+
intro J _ _
318318
apply preservesLimitsOfShapeOfEvaluation (lan F.op : (Cᵒᵖ ⥤ E) ⥤ Dᵒᵖ ⥤ E) J
319319
intro K
320320
haveI : IsFiltered (CostructuredArrow F.op K) :=
@@ -341,11 +341,10 @@ set_option linter.uppercaseLean3 false in
341341
theorem flat_iff_lan_flat (F : C ⥤ D) :
342342
RepresentablyFlat F ↔ RepresentablyFlat (lan F.op : _ ⥤ Dᵒᵖ ⥤ Type u₁) :=
343343
fun H => inferInstance, fun H => by
344-
skip
345344
haveI := preservesFiniteLimitsOfFlat (lan F.op : _ ⥤ Dᵒᵖ ⥤ Type u₁)
346345
haveI : PreservesFiniteLimits F := by
347346
apply preservesFiniteLimitsOfPreservesFiniteLimitsOfSize.{u₁}
348-
intros; skip; apply preservesLimitOfLanPreservesLimit
347+
intros; apply preservesLimitOfLanPreservesLimit
349348
apply flat_of_preservesFiniteLimits⟩
350349
set_option linter.uppercaseLean3 false in
351350
#align category_theory.flat_iff_Lan_flat CategoryTheory.flat_iff_lan_flat

Mathlib/CategoryTheory/Limits/FunctorCategory.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ theorem colimit_obj_ext {H : J ⥤ K ⥤ C} [HasColimitsOfShape J C] {k : K} {W
321321

322322
instance evaluationPreservesLimits [HasLimits C] (k : K) :
323323
PreservesLimits ((evaluation K C).obj k) where
324-
preservesLimitsOfShape {J} 𝒥 := by skip; infer_instance
324+
preservesLimitsOfShape {_} _𝒥 := inferInstance
325325
#align category_theory.limits.evaluation_preserves_limits CategoryTheory.Limits.evaluationPreservesLimits
326326

327327
/-- `F : D ⥤ K ⥤ C` preserves the limit of some `G : J ⥤ D` if it does for each `k : K`. -/
@@ -358,7 +358,7 @@ instance preservesLimitsConst : PreservesLimitsOfSize.{w', w} (const D : C ⥤ _
358358

359359
instance evaluationPreservesColimits [HasColimits C] (k : K) :
360360
PreservesColimits ((evaluation K C).obj k) where
361-
preservesColimitsOfShape := by skip; infer_instance
361+
preservesColimitsOfShape := inferInstance
362362
#align category_theory.limits.evaluation_preserves_colimits CategoryTheory.Limits.evaluationPreservesColimits
363363

364364
/-- `F : D ⥤ K ⥤ C` preserves the colimit of some `G : J ⥤ D` if it does for each `k : K`. -/

Mathlib/CategoryTheory/Limits/Shapes/Images.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ instance [HasImage f] [∀ {Z : C} (g h : image f ⟶ Z), HasLimit (parallelPair
465465

466466
theorem epi_image_of_epi {X Y : C} (f : X ⟶ Y) [HasImage f] [E : Epi f] : Epi (image.ι f) := by
467467
rw [← image.fac f] at E
468-
skip
469468
exact epi_of_epi (factorThruImage f) (image.ι f)
470469
#align category_theory.limits.epi_image_of_epi CategoryTheory.Limits.epi_image_of_epi
471470

Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,8 @@ theorem kernel_not_epi_of_nonzero (w : f ≠ 0) : ¬Epi (kernel.ι f) := fun _ =
423423
w (eq_zero_of_epi_kernel f)
424424
#align category_theory.limits.kernel_not_epi_of_nonzero CategoryTheory.Limits.kernel_not_epi_of_nonzero
425425

426-
theorem kernel_not_iso_of_nonzero (w : f ≠ 0) : IsIso (kernel.ι f) → False := fun I =>
427-
kernel_not_epi_of_nonzero w <| by
428-
skip
429-
infer_instance
426+
theorem kernel_not_iso_of_nonzero (w : f ≠ 0) : IsIso (kernel.ι f) → False := fun _ =>
427+
kernel_not_epi_of_nonzero w inferInstance
430428
#align category_theory.limits.kernel_not_iso_of_nonzero CategoryTheory.Limits.kernel_not_iso_of_nonzero
431429

432430
instance hasKernel_comp_mono {X Y Z : C} (f : X ⟶ Y) [HasKernel f] (g : Y ⟶ Z) [Mono g] :
@@ -926,10 +924,8 @@ theorem cokernel_not_mono_of_nonzero (w : f ≠ 0) : ¬Mono (cokernel.π f) := f
926924
w (eq_zero_of_mono_cokernel f)
927925
#align category_theory.limits.cokernel_not_mono_of_nonzero CategoryTheory.Limits.cokernel_not_mono_of_nonzero
928926

929-
theorem cokernel_not_iso_of_nonzero (w : f ≠ 0) : IsIso (cokernel.π f) → False := fun I =>
930-
cokernel_not_mono_of_nonzero w <| by
931-
skip
932-
infer_instance
927+
theorem cokernel_not_iso_of_nonzero (w : f ≠ 0) : IsIso (cokernel.π f) → False := fun _ =>
928+
cokernel_not_mono_of_nonzero w inferInstance
933929
#align category_theory.limits.cokernel_not_iso_of_nonzero CategoryTheory.Limits.cokernel_not_iso_of_nonzero
934930

935931
-- TODO the remainder of this section has obvious generalizations to `HasCoequalizer f g`.

0 commit comments

Comments
 (0)