File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ variable [AddGroupWithOne R]
144
144
145
145
/-- Cast an integer modulo `n` to another semiring.
146
146
This function is a morphism if the characteristic of `R` divides `n`.
147
- See `ZMod.cast_hom ` for a bundled version. -/
147
+ See `ZMod.castHom ` for a bundled version. -/
148
148
@[coe] def cast : ∀ {n : ℕ}, ZMod n → R
149
149
| 0 => Int.cast
150
150
| _ + 1 => fun i => i.val
@@ -1161,6 +1161,10 @@ theorem ringHom_eq_of_ker_eq [CommRing R] (f g : R →+* ZMod n)
1161
1161
rw [← this, RingHom.ext_zmod (f.liftOfRightInverse _ _ ⟨g, _⟩) _, RingHom.id_comp]
1162
1162
#align zmod.ring_hom_eq_of_ker_eq ZMod.ringHom_eq_of_ker_eq
1163
1163
1164
+ @[simp]
1165
+ lemma castHom_self {n : ℕ} : ZMod.castHom dvd_rfl (ZMod n) = RingHom.id (ZMod n) :=
1166
+ RingHom.ext_zmod (ZMod.castHom dvd_rfl (ZMod n)) (RingHom.id (ZMod n))
1167
+
1164
1168
section lift
1165
1169
1166
1170
variable (n) {A : Type *} [AddGroup A]
You can’t perform that action at this time.
0 commit comments