Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Dec 20, 2024
1 parent c2f096e commit be2e968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/algorithms/LaurentPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function is_monomial_recursive(p::LaurentPolyRingElem)
is_monomial_recursive(coeff(p, dr[]))
end

function is_unit(f::T) where {T<:LaurentPolyRingElem}
function is_unit(f::T) where {T <: LaurentPolyRingElem}
# **NOTE** f.poly is not normalized so that the degree 0 coeff is non-zero
is_trivial(parent(f)) && return true # coeffs in zero ring
unit_seen = false
Expand Down
4 changes: 2 additions & 2 deletions src/generic/LaurentMPoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function Base.inv(a::LaurentMPolyWrap)
return LaurentMPolyWrap(parent(a), inv(ap), neg!(ad, ad))
end

function is_unit(f::T) where {T<:LaurentMPolyRingElem}
function is_unit(f::T) where {T <: LaurentMPolyRingElem}
# **NOTE** f.mpoly is not normalized in any way
is_trivial(parent(f)) && return true # coeffs in zero ring
unit_seen = false
Expand All @@ -126,7 +126,7 @@ function is_unit(f::T) where {T<:LaurentMPolyRingElem}
end


function is_nilpotent(f::T) where {T<:LaurentMPolyRingElem}
function is_nilpotent(f::T) where {T <: LaurentMPolyRingElem}
return is_nilpotent(f.mpoly);
end

Expand Down

0 comments on commit be2e968

Please sign in to comment.