Skip to content

Commit 7ddbcf0

Browse files
committed
chore: golf some simp based proofs (#31266)
1 parent 55c9f19 commit 7ddbcf0

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

Mathlib/Algebra/FreeAbelianGroup/Finsupp.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ theorem Finsupp.toFreeAbelianGroup_comp_singleAddHom (x : X) :
5151
@[simp]
5252
theorem FreeAbelianGroup.toFinsupp_comp_toFreeAbelianGroup :
5353
toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ) := by
54-
ext x y; simp only [AddMonoidHom.id_comp]
55-
rw [AddMonoidHom.comp_assoc, Finsupp.toFreeAbelianGroup_comp_singleAddHom]
56-
simp only [toFinsupp, AddMonoidHom.coe_comp, Finsupp.singleAddHom_apply, Function.comp_apply,
57-
one_smul, lift_apply_of, AddMonoidHom.flip_apply, smulAddHom_apply]
54+
ext
55+
simp
5856

5957
@[simp]
6058
theorem Finsupp.toFreeAbelianGroup_comp_toFinsupp :

Mathlib/CategoryTheory/Limits/HasLimits.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def colimit.homIso' (F : J ⥤ C) [HasColimit F] (W : C) :
790790
(colimit.isColimit F).homIso' W
791791

792792
theorem colimit.desc_extend (F : J ⥤ C) [HasColimit F] (c : Cocone F) {X : C} (f : c.pt ⟶ X) :
793-
colimit.desc F (c.extend f) = colimit.desc F c ≫ f := by ext1; rw [← Category.assoc]; simp
793+
colimit.desc F (c.extend f) = colimit.desc F c ≫ f := by ext; simp
794794

795795
-- This has the isomorphism pointing in the opposite direction than in `has_limit_of_iso`.
796796
-- This is intentional; it seems to help with elaboration.
@@ -885,7 +885,8 @@ theorem colimit.ι_inv_pre [IsIso (pre F E)] (k : K) :
885885
@[reassoc (attr := simp)]
886886
theorem colimit.pre_desc (c : Cocone F) :
887887
colimit.pre F E ≫ colimit.desc F c = colimit.desc (E ⋙ F) (c.whisker E) := by
888-
ext; rw [← assoc, colimit.ι_pre]; simp
888+
ext
889+
simp
889890

890891
variable {L : Type u₃} [Category.{v₃} L]
891892
variable (D : L ⥤ K)

Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ theorem lift_comp_kernelIsoOfEq_inv {Z} {f g : X ⟶ Y} [HasKernel f] [HasKernel
395395
@[simp]
396396
theorem kernelIsoOfEq_trans {f g h : X ⟶ Y} [HasKernel f] [HasKernel g] [HasKernel h] (w₁ : f = g)
397397
(w₂ : g = h) : kernelIsoOfEq w₁ ≪≫ kernelIsoOfEq w₂ = kernelIsoOfEq (w₁.trans w₂) := by
398-
cases w₁; cases w₂; ext; simp [kernelIsoOfEq]
398+
cases w₁; simp
399399

400400
variable {f}
401401

@@ -877,7 +877,7 @@ theorem cokernelIsoOfEq_inv_comp_desc {Z} {f g : X ⟶ Y} [HasCokernel f] [HasCo
877877
theorem cokernelIsoOfEq_trans {f g h : X ⟶ Y} [HasCokernel f] [HasCokernel g] [HasCokernel h]
878878
(w₁ : f = g) (w₂ : g = h) :
879879
cokernelIsoOfEq w₁ ≪≫ cokernelIsoOfEq w₂ = cokernelIsoOfEq (w₁.trans w₂) := by
880-
cases w₁; cases w₂; ext; simp [cokernelIsoOfEq]
880+
cases w₁; simp
881881

882882
variable {f}
883883

Mathlib/Data/Stream/Init.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,8 @@ theorem inits_eq (s : Stream' α) :
666666
rfl
667667

668668
theorem zip_inits_tails (s : Stream' α) : zip appendStream' (inits s) (tails s) = const s := by
669-
apply Stream'.ext; intro n
670-
rw [get_zip, get_inits, get_tails, get_const, take_succ, cons_append_stream, append_take_drop,
671-
Stream'.eta]
669+
ext
670+
simp
672671

673672
theorem identity (s : Stream' α) : pure id ⊛ s = s :=
674673
rfl

Mathlib/Probability/Kernel/Composition/MapComap.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ theorem comap_apply' (κ : Kernel α β) (hg : Measurable g) (c : γ) (s : Set
161161

162162
@[simp]
163163
lemma comap_zero (hg : Measurable g) : Kernel.comap (0 : Kernel α β) g hg = 0 := by
164-
ext; rw [Kernel.comap_apply]; simp
164+
ext; simp
165165

166166
@[simp]
167-
lemma comap_id (κ : Kernel α β) : comap κ id measurable_id = κ := by ext a; rw [comap_apply]; simp
167+
lemma comap_id (κ : Kernel α β) : comap κ id measurable_id = κ := by ext; simp
168168

169169
@[simp]
170170
lemma comap_id' (κ : Kernel α β) : comap κ (fun a ↦ a) measurable_id = κ := comap_id κ

Mathlib/Topology/Category/TopCat/Opens.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ theorem op_map_comp_obj (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
209209

210210
theorem map_iSup (f : X ⟶ Y) {ι : Type*} (U : ι → Opens Y) :
211211
(map f).obj (iSup U) = iSup ((map f).obj ∘ U) := by
212-
ext1; rw [iSup_def, iSup_def, map_obj]
213-
dsimp; rw [Set.preimage_iUnion]
212+
ext
213+
simp
214214

215215
section
216216

0 commit comments

Comments
 (0)