Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 11baeca

Browse files
authoredFeb 13, 2025··
Add is_zero(::NCRing) as an alias of is_trivial (Nemocas#1991)
1 parent 663db56 commit 11baeca

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎src/Rings.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,27 @@ rings are also called zero rings.
212212
"""
213213
is_trivial(R::NCRing) = !is_domain_type(elem_type(R)) && iszero(one(R))
214214

215+
@doc raw"""
216+
is_zero(R::NCRing)
217+
218+
Test whether the ring $R$ is trivial. However, the recommended method
219+
for doing this is [`is_trivial`](@ref).
220+
221+
```jldoctest
222+
julia> R, (x,) = polynomial_ring(QQ, [:x]);
223+
224+
julia> S=quo(R,1)[1]
225+
Residue ring of R modulo 1
226+
227+
julia> is_trivial(S)
228+
true
229+
230+
julia> is_zero(S)
231+
true
232+
```
233+
"""
234+
is_zero(R::NCRing) = is_trivial(R)
235+
215236
@doc raw"""
216237
is_perfect(F::Field)
217238

0 commit comments

Comments
 (0)
Please sign in to comment.