Skip to content

Commit 29e1694

Browse files
eric-wieserReemMelamed
authored andcommitted
fix: add missing coercion lemma (leanprover-community#40698)
Instead of having the obvious lemma `⇑f.toNonUnitalRingHom = f`, we had some weirder lemmas to try and simplify larger terms containing `⇑f.toNonUnitalRingHom`. The unprimed name is already taken by `NonUnitalRingHomClass.toNonUnitalRingHom`; I believe the plan is to eliminate that in future, but that's out of scope for this PR.
1 parent e0aa582 commit 29e1694

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Mathlib/Algebra/Ring/Equiv.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,10 @@ theorem toNonUnitalRingHom_eq_coe (f : R ≃+* S) : f.toNonUnitalRingHom = ↑f
701701
theorem coe_toNonUnitalRingHom (f : R ≃+* S) : ⇑(f : R →ₙ+* S) = f :=
702702
rfl
703703

704+
@[simp]
705+
theorem coe_toNonUnitalRingHom' (f : R ≃+* S) : ⇑f.toNonUnitalRingHom = f :=
706+
rfl
707+
704708
theorem coe_nonUnitalRingHom_inj_iff {R S : Type*} [NonUnitalNonAssocSemiring R]
705709
[NonUnitalNonAssocSemiring S] (f g : R ≃+* S) : f = g ↔ (f : R →ₙ+* S) = g :=
706710
fun h => by rw [h], fun h => ext <| NonUnitalRingHom.ext_iff.mp h⟩
@@ -710,12 +714,12 @@ theorem toNonUnitalRingHom_refl :
710714
(RingEquiv.refl R).toNonUnitalRingHom = NonUnitalRingHom.id R :=
711715
rfl
712716

713-
@[simp]
717+
@[deprecated apply_symm_apply (since := "2026-06-16")]
714718
theorem toNonUnitalRingHom_apply_symm_toNonUnitalRingHom_apply (e : R ≃+* S) :
715719
∀ y : S, e.toNonUnitalRingHom (e.symm.toNonUnitalRingHom y) = y :=
716720
e.toEquiv.apply_symm_apply
717721

718-
@[simp]
722+
@[deprecated symm_apply_apply (since := "2026-06-16")]
719723
theorem symm_toNonUnitalRingHom_apply_toNonUnitalRingHom_apply (e : R ≃+* S) :
720724
∀ x : R, e.symm.toNonUnitalRingHom (e.toNonUnitalRingHom x) = x :=
721725
Equiv.symm_apply_apply e.toEquiv

0 commit comments

Comments
 (0)