Skip to content

Commit

Permalink
feat(algebra/char_zero): add a lemma ring_hom.injective_nat (#14414)
Browse files Browse the repository at this point in the history
Note that there is a lemma `ring_hom.injective_int`.
  • Loading branch information
negiizhao committed Jun 3, 2022
1 parent d2dcb74 commit 705160e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/algebra/char_zero.lean
Expand Up @@ -225,4 +225,8 @@ lemma ring_hom.char_zero_iff {ϕ : R →+* S} (hϕ : function.injective ϕ) :
⟨λ hR, ⟨λ a b h, by rwa [←@nat.cast_inj R _ _ hR, ←hϕ.eq_iff, map_nat_cast ϕ, map_nat_cast ϕ]⟩,
λ hS, by exactI ϕ.char_zero⟩

lemma ring_hom.injective_nat (f : ℕ →+* R) [char_zero R] :
function.injective f :=
subsingleton.elim (nat.cast_ring_hom _) f ▸ nat.cast_injective

end ring_hom

0 comments on commit 705160e

Please sign in to comment.