Skip to content

Commit 93828f4

Browse files
committed
chore(*): use rfl for more proofs (#16033)
1 parent 559b6a5 commit 93828f4

File tree

8 files changed

+34
-46
lines changed

8 files changed

+34
-46
lines changed

Mathlib/Algebra/Algebra/Equiv.lean

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -403,21 +403,18 @@ theorem arrowCongr_comp (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A
403403
exact (e₂.symm_apply_apply _).symm
404404

405405
@[simp]
406-
theorem arrowCongr_refl : arrowCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ →ₐ[R] A₂) := by
407-
ext
406+
theorem arrowCongr_refl : arrowCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ →ₐ[R] A₂) :=
408407
rfl
409408

410409
@[simp]
411410
theorem arrowCongr_trans (e₁ : A₁ ≃ₐ[R] A₂) (e₁' : A₁' ≃ₐ[R] A₂')
412411
(e₂ : A₂ ≃ₐ[R] A₃) (e₂' : A₂' ≃ₐ[R] A₃') :
413-
arrowCongr (e₁.trans e₂) (e₁'.trans e₂') = (arrowCongr e₁ e₁').trans (arrowCongr e₂ e₂') := by
414-
ext
412+
arrowCongr (e₁.trans e₂) (e₁'.trans e₂') = (arrowCongr e₁ e₁').trans (arrowCongr e₂ e₂') :=
415413
rfl
416414

417415
@[simp]
418416
theorem arrowCongr_symm (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') :
419-
(arrowCongr e₁ e₂).symm = arrowCongr e₁.symm e₂.symm := by
420-
ext
417+
(arrowCongr e₁ e₂).symm = arrowCongr e₁.symm e₂.symm :=
421418
rfl
422419

423420
/-- If `A₁` is equivalent to `A₂` and `A₁'` is equivalent to `A₂'`, then the type of maps
@@ -436,8 +433,7 @@ def equivCongr (e : A₁ ≃ₐ[R] A₂) (e' : A₁' ≃ₐ[R] A₂') : (A₁
436433
simp_rw [trans_apply, apply_symm_apply]
437434

438435
@[simp]
439-
theorem equivCongr_refl : equivCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ ≃ₐ[R] A₁') := by
440-
ext
436+
theorem equivCongr_refl : equivCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ ≃ₐ[R] A₁') :=
441437
rfl
442438

443439
@[simp]
@@ -464,7 +460,7 @@ def ofAlgHom (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ : f.comp
464460

465461
theorem coe_algHom_ofAlgHom (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ h₂) :
466462
↑(ofAlgHom f g h₁ h₂) = f :=
467-
AlgHom.ext fun _ => rfl
463+
rfl
468464

469465
@[simp]
470466
theorem ofAlgHom_coe_algHom (f : A₁ ≃ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ h₂) :
@@ -569,13 +565,11 @@ theorem ofLinearEquiv_symm :
569565

570566
@[simp]
571567
theorem ofLinearEquiv_toLinearEquiv (map_mul) (map_one) :
572-
ofLinearEquiv e.toLinearEquiv map_mul map_one = e := by
573-
ext
568+
ofLinearEquiv e.toLinearEquiv map_mul map_one = e :=
574569
rfl
575570

576571
@[simp]
577-
theorem toLinearEquiv_ofLinearEquiv : toLinearEquiv (ofLinearEquiv l map_one map_mul) = l := by
578-
ext
572+
theorem toLinearEquiv_ofLinearEquiv : toLinearEquiv (ofLinearEquiv l map_one map_mul) = l :=
579573
rfl
580574

581575
end OfLinearEquiv
@@ -631,9 +625,7 @@ def autCongr (ϕ : A₁ ≃ₐ[R] A₂) : (A₁ ≃ₐ[R] A₁) ≃* A₂ ≃ₐ
631625
simp only [mul_apply, trans_apply, symm_apply_apply]
632626

633627
@[simp]
634-
theorem autCongr_refl : autCongr AlgEquiv.refl = MulEquiv.refl (A₁ ≃ₐ[R] A₁) := by
635-
ext
636-
rfl
628+
theorem autCongr_refl : autCongr AlgEquiv.refl = MulEquiv.refl (A₁ ≃ₐ[R] A₁) := rfl
637629

638630
@[simp]
639631
theorem autCongr_symm (ϕ : A₁ ≃ₐ[R] A₂) : (autCongr ϕ).symm = autCongr ϕ.symm :=

Mathlib/Algebra/Algebra/Hom.lean

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ theorem ext {φ₁ φ₂ : A →ₐ[R] B} (H : ∀ x, φ₁ x = φ₂ x) : φ₁
192192

193193
@[simp]
194194
theorem mk_coe {f : A →ₐ[R] B} (h₁ h₂ h₃ h₄ h₅) : (⟨⟨⟨⟨f, h₁⟩, h₂⟩, h₃, h₄⟩, h₅⟩ : A →ₐ[R] B) = f :=
195-
ext fun _ => rfl
195+
rfl
196196

197197
@[simp]
198198
theorem commutes (r : R) : φ (algebraMap R A r) = algebraMap R B r :=
@@ -285,15 +285,15 @@ theorem comp_toRingHom (φ₁ : B →ₐ[R] C) (φ₂ : A →ₐ[R] B) :
285285

286286
@[simp]
287287
theorem comp_id : φ.comp (AlgHom.id R A) = φ :=
288-
ext fun _x => rfl
288+
rfl
289289

290290
@[simp]
291291
theorem id_comp : (AlgHom.id R B).comp φ = φ :=
292-
ext fun _x => rfl
292+
rfl
293293

294294
theorem comp_assoc (φ₁ : C →ₐ[R] D) (φ₂ : B →ₐ[R] C) (φ₃ : A →ₐ[R] B) :
295295
(φ₁.comp φ₂).comp φ₃ = φ₁.comp (φ₂.comp φ₃) :=
296-
ext fun _x => rfl
296+
rfl
297297

298298
/-- R-Alg ⥤ R-Mod -/
299299
def toLinearMap : A →ₗ[R] B where
@@ -316,7 +316,7 @@ theorem comp_toLinearMap (f : A →ₐ[R] B) (g : B →ₐ[R] C) :
316316

317317
@[simp]
318318
theorem toLinearMap_id : toLinearMap (AlgHom.id R A) = LinearMap.id :=
319-
LinearMap.ext fun _ => rfl
319+
rfl
320320

321321
/-- Promote a `LinearMap` to an `AlgHom` by supplying proofs about the behavior on `1` and `*`. -/
322322
@[simps]
@@ -330,20 +330,18 @@ def ofLinearMap (f : A →ₗ[R] B) (map_one : f 1 = 1) (map_mul : ∀ x y, f (x
330330

331331
@[simp]
332332
theorem ofLinearMap_toLinearMap (map_one) (map_mul) :
333-
ofLinearMap φ.toLinearMap map_one map_mul = φ := by
334-
ext
333+
ofLinearMap φ.toLinearMap map_one map_mul = φ :=
335334
rfl
336335

337336
@[simp]
338337
theorem toLinearMap_ofLinearMap (f : A →ₗ[R] B) (map_one) (map_mul) :
339-
toLinearMap (ofLinearMap f map_one map_mul) = f := by
340-
ext
338+
toLinearMap (ofLinearMap f map_one map_mul) = f :=
341339
rfl
342340

343341
@[simp]
344342
theorem ofLinearMap_id (map_one) (map_mul) :
345343
ofLinearMap LinearMap.id map_one map_mul = AlgHom.id R A :=
346-
ext fun _ => rfl
344+
rfl
347345

348346
theorem map_smul_of_tower {R'} [SMul R' A] [SMul R' B] [LinearMap.CompatibleSMul A B R' R] (r : R')
349347
(x : A) : φ (r • x) = r • φ x :=
@@ -358,8 +356,8 @@ instance End : Monoid (A →ₐ[R] A) where
358356
mul := comp
359357
mul_assoc ϕ ψ χ := rfl
360358
one := AlgHom.id R A
361-
one_mul ϕ := ext fun x => rfl
362-
mul_one ϕ := ext fun x => rfl
359+
one_mul ϕ := rfl
360+
mul_one ϕ := rfl
363361

364362
@[simp]
365363
theorem one_apply (x : A) : (1 : A →ₐ[R] A) x = x :=
@@ -458,11 +456,11 @@ theorem ext_id (f g : R →ₐ[R] A) : f = g := Subsingleton.elim _ _
458456
section MulDistribMulAction
459457

460458
instance : MulDistribMulAction (A →ₐ[R] A) Aˣ where
461-
smul := fun f => Units.map f
462-
one_smul := fun x => by ext; rfl
463-
mul_smul := fun x y z => by ext; rfl
464-
smul_mul := fun x y z => by ext; exact map_mul _ _ _
465-
smul_one := fun x => by ext; exact map_one _
459+
smul f := Units.map f
460+
one_smul _ := by ext; rfl
461+
mul_smul _ _ _ := by ext; rfl
462+
smul_mul _ _ _ := by ext; exact map_mul _ _ _
463+
smul_one _ := by ext; exact map_one _
466464

467465
@[simp]
468466
theorem smul_units_def (f : A →ₐ[R] A) (x : Aˣ) :

Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x, f x ∈ S) :
458458
@[simp]
459459
theorem subtype_comp_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x : A, f x ∈ S) :
460460
(NonUnitalSubalgebraClass.subtype S).comp (NonUnitalAlgHom.codRestrict f S hf) = f :=
461-
NonUnitalAlgHom.ext fun _ => rfl
461+
rfl
462462

463463
@[simp]
464464
theorem coe_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x, f x ∈ S) (x : A) :
@@ -906,7 +906,7 @@ theorem inclusion_injective {S T : NonUnitalSubalgebra R A} (h : S ≤ T) :
906906
@[simp]
907907
theorem inclusion_self {S : NonUnitalSubalgebra R A} :
908908
inclusion (le_refl S) = NonUnitalAlgHom.id R S :=
909-
NonUnitalAlgHom.ext fun _ => Subtype.ext rfl
909+
rfl
910910

911911
@[simp]
912912
theorem inclusion_mk {S T : NonUnitalSubalgebra R A} (h : S ≤ T) (x : A) (hx : x ∈ S) :

Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ variable (S : Subalgebra R A)
802802
This is the algebra version of `Submodule.topEquiv`. -/
803803
@[simps!]
804804
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A :=
805-
AlgEquiv.ofAlgHom (Subalgebra.val ⊤) toTop rfl <| AlgHom.ext fun _ => Subtype.ext rfl
805+
AlgEquiv.ofAlgHom (Subalgebra.val ⊤) toTop rfl rfl
806806

807807
instance subsingleton_of_subsingleton [Subsingleton A] : Subsingleton (Subalgebra R A) :=
808808
fun B C => ext fun x => by simp only [Subsingleton.elim x 0, zero_mem B, zero_mem C]⟩

Mathlib/Algebra/Lie/Basic.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,11 @@ theorem coe_linearMap_comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆
385385
rfl
386386

387387
@[simp]
388-
theorem comp_id (f : L₁ →ₗ⁅R⁆ L₂) : f.comp (id : L₁ →ₗ⁅R⁆ L₁) = f := by
389-
ext
388+
theorem comp_id (f : L₁ →ₗ⁅R⁆ L₂) : f.comp (id : L₁ →ₗ⁅R⁆ L₁) = f :=
390389
rfl
391390

392391
@[simp]
393-
theorem id_comp (f : L₁ →ₗ⁅R⁆ L₂) : (id : L₂ →ₗ⁅R⁆ L₂).comp f = f := by
394-
ext
392+
theorem id_comp (f : L₁ →ₗ⁅R⁆ L₂) : (id : L₂ →ₗ⁅R⁆ L₂).comp f = f :=
395393
rfl
396394

397395
/-- The inverse of a bijective morphism is a morphism. -/

Mathlib/Algebra/Module/LinearMap/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ protected theorem congr_fun (h : f = g) (x : M) : f x = g x :=
323323

324324
@[simp]
325325
theorem mk_coe (f : M →ₛₗ[σ] M₃) (h) : (LinearMap.mk f h : M →ₛₗ[σ] M₃) = f :=
326-
ext fun _ ↦ rfl
326+
rfl
327327

328328
variable (fₗ gₗ f g)
329329

@@ -503,11 +503,11 @@ theorem coe_comp : (f.comp g : M₁ → M₃) = f ∘ g :=
503503

504504
@[simp]
505505
theorem comp_id : f.comp id = f :=
506-
LinearMap.ext fun _ ↦ rfl
506+
rfl
507507

508508
@[simp]
509509
theorem id_comp : id.comp f = f :=
510-
LinearMap.ext fun _ ↦ rfl
510+
rfl
511511

512512
theorem comp_assoc
513513
{R₄ M₄ : Type*} [Semiring R₄] [AddCommMonoid M₄] [Module R₄ M₄]

Mathlib/LinearAlgebra/Multilinear/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,15 +797,15 @@ theorem compMultilinearMap_apply (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R
797797
@[simp]
798798
theorem subtype_compMultilinearMap_codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂)
799799
(h) : p.subtype.compMultilinearMap (f.codRestrict p h) = f :=
800-
MultilinearMap.ext fun _ => rfl
800+
rfl
801801

802802
/-- The multilinear version of `LinearMap.comp_codRestrict` -/
803803
@[simp]
804804
theorem compMultilinearMap_codRestrict (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂)
805805
(p : Submodule R M₃) (h) :
806806
(g.codRestrict p h).compMultilinearMap f =
807807
(g.compMultilinearMap f).codRestrict p fun v => h (f v) :=
808-
MultilinearMap.ext fun _ => rfl
808+
rfl
809809

810810
variable {ι₁ ι₂ : Type*}
811811

Mathlib/ModelTheory/Substructures.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ theorem comap_top (f : M →[L] N) : (⊤ : L.Substructure N).comap f = ⊤ :=
481481

482482
@[simp]
483483
theorem map_id (S : L.Substructure M) : S.map (Hom.id L M) = S :=
484-
ext fun _ => ⟨fun ⟨_, h, rfl⟩ => h, fun h => ⟨_, h, rfl⟩⟩
484+
SetLike.coe_injective <| Set.image_id _
485485

486486
theorem map_closure (f : M →[L] N) (s : Set M) : (closure L s).map f = closure L (f '' s) :=
487487
Eq.symm <|

0 commit comments

Comments
 (0)