Skip to content

Commit

Permalink
Rename is_hermitian_matrix to is_hermitian (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Jul 17, 2023
1 parent 742f0e8 commit 5002dbb
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/src/Groups/matgroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ conjugate_transpose(x::MatElem{T}) where T <: FinFieldElem
complement(V::AbstractAlgebra.Generic.FreeModule{T}, W::AbstractAlgebra.Generic.Submodule{T}) where T <: FieldElem
permutation_matrix(F::Ring, Q::AbstractVector{<:IntegerUnion})
is_skewsymmetric_matrix(B::MatElem{T}) where T <: RingElem
is_hermitian_matrix(B::MatElem{T}) where T <: FinFieldElem
is_hermitian(B::MatElem{T}) where T <: FinFieldElem
```

## Classical groups
Expand Down
2 changes: 1 addition & 1 deletion src/Groups/matrices/forms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mutable struct SesquilinearForm{T<:RingElem}

function SesquilinearForm{T}(B::MatElem{T},sym) where T
if sym==:hermitian
@assert is_hermitian_matrix(B) "The matrix is not hermitian"
@assert is_hermitian(B) "The matrix is not hermitian"
elseif sym==:symmetric
@assert is_symmetric(B) "The matrix is not symmetric"
elseif sym==:alternating
Expand Down
4 changes: 2 additions & 2 deletions src/Groups/matrices/matrix_manipulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ function is_skewsymmetric_matrix(B::MatElem{T}) where T <: RingElem
end

"""
is_hermitian_matrix(B::MatElem{T}) where T <: FinFieldElem
is_hermitian(B::MatElem{T}) where T <: FinFieldElem
Return whether the matrix `B` is hermitian, i.e. `B = conjugate_transpose(B)`.
Return `false` if `B` is not a square matrix, or the field has not even degree.
"""
function is_hermitian_matrix(B::MatElem{T}) where T <: FinFieldElem
function is_hermitian(B::MatElem{T}) where T <: FinFieldElem
n = nrows(B)
n==ncols(B) || return false
e = degree(base_ring(B))
Expand Down
1 change: 0 additions & 1 deletion src/aliases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
@alias isglobal is_global
@alias isgraded is_graded
@alias ishermitian_form is_hermitian_form
@alias ishermitian_matrix is_hermitian_matrix
@alias isinner_automorphism is_inner_automorphism
@alias isinvariant is_invariant
@alias isisomorphic_with_alternating_group is_isomorphic_with_alternating_group
Expand Down
2 changes: 2 additions & 0 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,5 @@ function SubdivisionOfPoints{T}(obj::Polymake.BigObject) where T<:scalar_types
return SubdivisionOfPoints{T}(obj, _detect_default_field(T, obj))
end

@deprecate is_hermitian_matrix(B::MatElem{T}) where T <: FinFieldElem is_hermitian(B)
@alias ishermitian_matrix is_hermitian_matrix
1 change: 0 additions & 1 deletion src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@ export is_gorenstein
export is_graded
export is_groebner_basis
export is_hermitian_form
export is_hermitian_matrix
export is_homogeneous
export is_identity_map
export is_injective
Expand Down
4 changes: 2 additions & 2 deletions test/Groups/forms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@test f==alternating_form(gram_matrix(f))
@test base_ring(B)==F
@test !is_symmetric(B)
@test !is_hermitian_matrix(B)
@test !is_hermitian(B)
@test is_alternating_form(f)
@test !is_quadratic_form(f)
@test !is_symmetric_form(f)
Expand All @@ -19,7 +19,7 @@
@test_throws AssertionError f = hermitian_form(B)

B = matrix(F,4,4,[0 1 0 0; 1 0 0 0; 0 0 0 z+2; 0 0 -1-z 0])
@test is_hermitian_matrix(B)
@test is_hermitian(B)
f = hermitian_form(B)
@test f isa SesquilinearForm
@test gram_matrix(f)==B
Expand Down
2 changes: 1 addition & 1 deletion test/Groups/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ end
x=matrix(F,4,4,[1,z,0,0,0,1,z^2,z,z,0,0,1,0,0,z+1,0])
y=x+transpose(x)
@test is_symmetric(y)
@test is_hermitian_matrix(x+conjugate_transpose(x))
@test is_hermitian(x+conjugate_transpose(x))
@test is_skewsymmetric_matrix(y)
y[1,1]=1
@test !is_skewsymmetric_matrix(y)
Expand Down

0 comments on commit 5002dbb

Please sign in to comment.