diff --git a/docs/src/quad_forms/basics.md b/docs/src/quad_forms/basics.md index a612ba614c..e8e3a6967a 100644 --- a/docs/src/quad_forms/basics.md +++ b/docs/src/quad_forms/basics.md @@ -84,7 +84,7 @@ In all the other cases, we say that $V$ is *indefinite*. ```@docs is_regular(::AbstractSpace) is_quadratic(::AbstractSpace) -ishermitian(::AbstractSpace) +is_hermitian(::AbstractSpace) is_positive_definite(::AbstractSpace) is_negative_definite(::AbstractSpace) is_definite(::AbstractSpace) @@ -102,7 +102,7 @@ E, b = number_field(t^2-a*t+1, "b"); Q = quadratic_space(K, K[0 1; 1 0]); H = hermitian_space(E, 3); is_regular(Q), is_regular(H) -is_quadratic(Q), ishermitian(H) +is_quadratic(Q), is_hermitian(H) is_definite(Q), is_positive_definite(H) ``` --- diff --git a/src/QuadForm/Herm/Spaces.jl b/src/QuadForm/Herm/Spaces.jl index efe9a902e3..ed22debd17 100644 --- a/src/QuadForm/Herm/Spaces.jl +++ b/src/QuadForm/Herm/Spaces.jl @@ -111,7 +111,7 @@ end is_quadratic(V::HermSpace) = false -ishermitian(V::HermSpace) = true +is_hermitian(V::HermSpace) = true _base_algebra(V::HermSpace) = V.E diff --git a/src/QuadForm/Quad/Spaces.jl b/src/QuadForm/Quad/Spaces.jl index 8e61d36b8c..625b5156ee 100644 --- a/src/QuadForm/Quad/Spaces.jl +++ b/src/QuadForm/Quad/Spaces.jl @@ -73,7 +73,7 @@ end is_quadratic(V::QuadSpace) = true -ishermitian(V::QuadSpace) = false +is_hermitian(V::QuadSpace) = false _base_algebra(V::QuadSpace) = V.K diff --git a/src/QuadForm/Spaces.jl b/src/QuadForm/Spaces.jl index a0f6def2de..af272d7aba 100644 --- a/src/QuadForm/Spaces.jl +++ b/src/QuadForm/Spaces.jl @@ -1,4 +1,4 @@ -export ambient_space, rank, gram_matrix, inner_product, involution, ishermitian, is_quadratic, is_regular, +export ambient_space, rank, gram_matrix, inner_product, involution, is_hermitian, is_quadratic, is_regular, is_local_square, is_isometric, is_rationally_isometric, is_isotropic, is_isotropic_with_vector, quadratic_space, hermitian_space, diagonal, invariants, hasse_invariant, witt_invariant, orthogonal_basis, fixed_field, restrict_scalars, orthogonal_complement, orthogonal_projection @@ -173,7 +173,7 @@ is_quadratic(::AbstractSpace) Return whether the space `V` is hermitian. """ -ishermitian(::AbstractSpace) +is_hermitian(::AbstractSpace) ################################################################################ # @@ -439,7 +439,7 @@ is_isometric(L::AbstractSpace, M::AbstractSpace) function _isdefinite(V::AbstractSpace) E = base_ring(V) K = fixed_field(V) - if (!is_totally_real(K)) || (ishermitian(V) && !is_totally_complex(E)) + if (!is_totally_real(K)) || (is_hermitian(V) && !is_totally_complex(E)) return zero(K) end D = diagonal(V) @@ -467,7 +467,7 @@ Return whether the space `V` is positive definite. function is_positive_definite(V::AbstractSpace) E = base_ring(V) K = fixed_field(V) - if (!is_totally_real(K)) || (ishermitian(V) && !is_totally_complex(E)) + if (!is_totally_real(K)) || (is_hermitian(V) && !is_totally_complex(E)) return false end D = diagonal(V) @@ -487,7 +487,7 @@ Return whether the space `V` is negative definite. function is_negative_definite(V::AbstractSpace) E = base_ring(V) K = fixed_field(V) - if (!is_totally_real(K)) || (ishermitian(V) && !is_totally_complex(E)) + if (!is_totally_real(K)) || (is_hermitian(V) && !is_totally_complex(E)) return false end D = diagonal(V) @@ -679,7 +679,7 @@ end function _biproduct(x::Vector{T}) where T <: AbstractSpace K = base_ring(x[1]) @req all(i -> base_ring(x[i]) === K, 2:length(x)) "All spaces must be defined over the same field" - @req is_quadratic(x[1]) ? all(i -> is_quadratic(x[i]), 2:length(x)) : all(i -> ishermitian(x[i]), 1:length(x)) "Spaces must be all hermitian or all quadratic" + @req is_quadratic(x[1]) ? all(i -> is_quadratic(x[i]), 2:length(x)) : all(i -> is_hermitian(x[i]), 1:length(x)) "Spaces must be all hermitian or all quadratic" G = diagonal_matrix(gram_matrix.(x)) V = is_quadratic(x[1]) ? quadratic_space(K, G) : hermitian_space(K, G) n = sum(dim.(x)) diff --git a/src/QuadForm/indefiniteLLL.jl b/src/QuadForm/indefiniteLLL.jl index 09d47fb27e..2ee6464637 100644 --- a/src/QuadForm/indefiniteLLL.jl +++ b/src/QuadForm/indefiniteLLL.jl @@ -281,7 +281,7 @@ julia> lll_gram_indef_with_transform(G) """ function lll_gram_indef_with_transform(G::MatElem{ZZRingElem}; check::Bool = false) - @req !check || (issymmetric(G) && det(G) != 0 && _is_indefinite(change_base_ring(QQ,G))) "Input should be a non-degenerate indefinite Gram matrix." + @req !check || (is_symmetric(G) && det(G) != 0 && _is_indefinite(change_base_ring(QQ,G))) "Input should be a non-degenerate indefinite Gram matrix." red = lll_gram_indef_isotropic(G; base = true) diff --git a/test/QuadForm/Herm/Spaces.jl b/test/QuadForm/Herm/Spaces.jl index dd50371f10..f5d3c1f5e9 100644 --- a/test/QuadForm/Herm/Spaces.jl +++ b/test/QuadForm/Herm/Spaces.jl @@ -37,7 +37,7 @@ V = @inferred hermitian_space(E, FlintQQ[1 2; 2 1]) @test V === hermitian_space(E, FlintQQ[1 2; 2 1]) @test V !== hermitian_space(E, FlintQQ[1 2; 2 1], cached = false) - @test ishermitian(V) + @test is_hermitian(V) @test !is_definite(V) @test involution(V) == s @test det(V) == -discriminant(V) diff --git a/test/QuadForm/Quad/Spaces.jl b/test/QuadForm/Quad/Spaces.jl index 0fe3d82bdd..340ea549d2 100644 --- a/test/QuadForm/Quad/Spaces.jl +++ b/test/QuadForm/Quad/Spaces.jl @@ -65,7 +65,7 @@ @test (@inferred dim(V)) == 2 @test (@inferred rank(V)) == 0 @test @inferred is_quadratic(V) - @test @inferred !ishermitian(V) + @test @inferred !is_hermitian(V) @test (@inferred fixed_field(V)) === K @test_throws ArgumentError quadratic_space(K, zero_matrix(K, 1, 2))