diff --git a/src/Combinatorics/Matroids/matroids.jl b/src/Combinatorics/Matroids/matroids.jl index 20bac8879b83..03598d7d7ae3 100644 --- a/src/Combinatorics/Matroids/matroids.jl +++ b/src/Combinatorics/Matroids/matroids.jl @@ -43,7 +43,7 @@ Matroid of rank 3 on 7 elements ``` """ function matroid_from_revlex_basis_encoding(rvlx::String, r::IntegerUnion, n::IntegerUnion) - if match(r"[^*0]",rvlx)!=nothing + if match(r"[^*0]",rvlx) !== nothing error("The revlex encoding uses only `*` and `0`") end if length(rvlx)!= binomial(n,r) diff --git a/src/Combinatorics/Matroids/properties.jl b/src/Combinatorics/Matroids/properties.jl index b820a74a72fd..f5d1d2e28c03 100644 --- a/src/Combinatorics/Matroids/properties.jl +++ b/src/Combinatorics/Matroids/properties.jl @@ -161,7 +161,7 @@ function flats_impl(M::Matroid, r::Union{Int,Nothing}, num_flats::Int, pm_flats) jl_flats = reverse(jl_flats) end matroid_flats = [[M.groundset[i] for i in flat] for flat in jl_flats] - if r != nothing + if r !== nothing if r<0 || r>rank(M) error("The specified rank needs to be between 0 and the rank of the matroid.") end diff --git a/src/Groups/matrices/MatGrp.jl b/src/Groups/matrices/MatGrp.jl index 5b9f3e85d6a5..4f88d7635bae 100644 --- a/src/Groups/matrices/MatGrp.jl +++ b/src/Groups/matrices/MatGrp.jl @@ -305,7 +305,9 @@ Base.in(x::MatElem, G::MatrixGroup) = lies_in(x,G,nothing)[1] function Base.in(x::MatrixGroupElem, G::MatrixGroup) isdefined(x,:X) && return lies_in(x.elm,G,x.X)[1] _is_true, x_gap = lies_in(x.elm,G,nothing) - if x_gap !=nothing x.X = x_gap end + if x_gap !== nothing + x.X = x_gap + end return _is_true end @@ -340,7 +342,7 @@ function (G::MatrixGroup)(x::MatrixGroupElem; check::Bool=true) else _is_true, x_gap = lies_in(x.elm,G,nothing) @req _is_true "Element not in the group" - if x_gap == nothing + if x_gap === nothing return MatrixGroupElem(G,x.elm) end return MatrixGroupElem(G,x.elm,x_gap) diff --git a/src/Modules/ModulesGraded.jl b/src/Modules/ModulesGraded.jl index bd87f1f77fb1..6affa0a4ebab 100644 --- a/src/Modules/ModulesGraded.jl +++ b/src/Modules/ModulesGraded.jl @@ -1374,7 +1374,7 @@ function Base.show(io::IO, b::BettiTable) column_widths[j] = max(col_width_from_sum, col_width_from_header) + 2 end - if b.project == nothing + if b.project === nothing for i in 1:ngens(parent(x[1][2])) ngens(parent(x[1][2])) > 1 && println(io, "Betti Table for component ", i) L = sort(unique(collect(x[k][2][i] for k in 1:length(x)))) diff --git a/src/TropicalGeometry/groebner_fan.jl b/src/TropicalGeometry/groebner_fan.jl index 66f08b5219c0..bca1461d3fe3 100644 --- a/src/TropicalGeometry/groebner_fan.jl +++ b/src/TropicalGeometry/groebner_fan.jl @@ -114,7 +114,7 @@ julia> G3 = [x1^2+x2,x2^2+x3,x3+1] x2^2 + x3 x3 + 1 -julia> homogeneity_vector(G3) == nothing +julia> homogeneity_vector(G3) === nothing true ```