Create the hermitian space over E with dimension n and Gram matrix equals to the identity matrix. The number field E must be a quadratic extension, that is, degree(E)==2 must hold.
Create the hermitian space over E with Gram matrix equals to gram. The matrix gram must be square and hermitian with respect to the non-trivial automorphism of E. The number field E must be a quadratic extension, that is, degree(E)==2 must hold.
Here are easy examples to see how these constructors work. We will keep the two following spaces for the rest of this section:
julia> K, a = cyclotomic_real_subfield(7);
julia> Kt, t = K[:t];
julia> E, b = number_field(t^2-a*t+1, :b);
julia> Q = quadratic_space(K, K[01; 10])
Quadratic space of dimension 2
over maximal real subfield of cyclotomic field of order 7
with gram matrix
[0 1]
[1 0]
julia> H = hermitian_space(E, 3)
Hermitian space of dimension 3
over relative number field with defining polynomial t^2 - (z_7 + 1/z_7)*t + 1
over number field with defining polynomial $^3 + $^2 - 2*$ - 1
over rational field
with gram matrix
[1 0 0]
[0 1 0]
[0 0 1]
Let (V,Φ) be a space over E/K. We define its dimension to be its dimension as a vector space over its base ring E and its rank to be the rank of its Gram matrix. If these two invariants agree, the space is said to be regular.
While dealing with lattices, one always works with regular ambient spaces.
The determinantdet(V,Φ) of (V,Φ) is defined to be the class of the determinant of its Gram matrix in K×/N(E×) (which is similar to K×/(K×)2 in the quadratic case). The discriminantdisc(V,Φ) of (V,Φ) is defined to be (−1)(m(m−1)/2)det(V,Φ), where m is the rank of (V,Φ).
So for instance, one could get the following information about the hermitian space H:
julia> K, a = cyclotomic_real_subfield(7);
julia> Kt, t = K[:t];
julia> E, b = number_field(t^2-a*t+1, :b);
julia> H = hermitian_space(E, 3);
julia> rank(H), dim(H)
(3, 3)
julia> gram_matrix(H)
[1 0 0]
[0 1 0]
[0 0 1]
julia> involution(H)
Map
from relative number field of degree 2 over K
to relative number field of degree 2 over K
defined by
b -> -b + (z_7 + 1/z_7)
with trivial map on base field
julia> base_ring(H)
Relative number field with defining polynomial t^2 - (z_7 + 1/z_7)*t + 1
over number field with defining polynomial $^3 + $^2 - 2*$ - 1
over rational field
julia> fixed_field(H)
Number field with defining polynomial $^3 + $^2 - 2*$ - 1
over rational field
julia> det(H), discriminant(H)
(1, -1)
Let (V,Φ) be a hermitian space over E/K (resp. quadratic space K). We say that (V,Φ) is definite if E/K is CM (resp. K is totally real) and if there exists an orthogonal basis of V for which the diagonal elements of the associated Gram matrix of (V,Φ) are either all totally positive or all totally negative. In the former case, V is said to be positive definite, while in the latter case it is negative definite. In all the other cases, we say that V is indefinite.
Return a vector of elements a1,…,an such that the space V is isometric to the diagonal space ⟨a1,…,an⟩. The second output is a matrix U whose rows span an orthogonal basis of V for which the Gram matrix is given by the diagonal matrix of the ai's.
The elements are contained in the fixed field of V.
Given a space (V,Φ) and a subfield K of the base algebra E of V, return the quadratic space W obtained by restricting the scalars of (V,αΦ) to K, together with the map f for extending the scalars back. The form on the restriction is given by Tr∘Φ where Tr:E→K is the trace form. The rescaling factor α is set to 1 by default.
Note that for now one can only restrict scalars to Q.
Let (V,Φ) and (V′,Φ′) be spaces over the same extension E/K. A homomorphism of spaces from V to V′ is a E-linear mapping f:V→V′ such that for all x,y∈V, one has
Φ′(f(x),f(y))=Φ(x,y).
An automorphism of spaces is called an isometry and a monomorphism is called an embedding.
hasse_invariant(V::QuadSpace, p::Union{InfPlc, AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}}) -> Int
Returns the Hasse invariant of the quadratic space V at p. This is equal to the product of local Hilbert symbols (ai,aj)p, i<j, where V is isometric to ⟨a1,…,an⟩. If V is degenerate return the hasse invariant of V/radical(V).
Returns a tuple (n, k, d, H, I) of invariants of M, which determine the isometry class completely. Here n is the dimension. The dimension of the kernel is k. The element d is the determinant of a Gram matrix of the non-degenerate part, H contains the non-trivial Hasse invariants and I contains for each real place the negative index of inertia.
For instance, for the case of Q and the totally ramified prime p of OK above 7, one can get:
julia> K, a = cyclotomic_real_subfield(7);
julia> Q = quadratic_space(K, K[01; 10]);
julia> OK = maximal_order(K);
julia> p = prime_decomposition(OK, 7)[1][1];
julia> hasse_invariant(Q, p), witt_invariant(Q, p)
(1, 1)
julia> Q2 = quadratic_space(K, K[-10; 01]);
julia> is_isometric(Q, Q2, p)
true
julia> is_isometric(Q, Q2)
true
julia> invariants(Q2)
(2, 0, -1, Dict{AbsSimpleNumFieldOrderIdeal, Int64}(), Tuple{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}, Int64}[(Infinite place of real embedding with -1.80 of K, 1), (Infinite place of real embedding with -0.45 of K, 1), (Infinite place of real embedding with 1.25 of K, 1)])
Let (V,Φ) and (V′,Φ′) be two spaces over the same extension E/K, and let σ:V→V′ be an E-linear morphism. σ is called a representation of V into V′ if for all x∈V
Φ′(σ(x),σ(x))=Φ(x,x).
In such a case, V is said to be represented by V′ and σ can be seen as an embedding of V into V′. This representation property can be also tested locally with respect to the completions at some finite places. Note that in both quadratic and hermitian cases, completions are taken at finite places of the fixed field K.
is_locally_represented_by(U::T, V::T, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) where T <: AbstractSpace -> Bool
Given two spaces U and V over the same algebra E, and a prime ideal p in the maximal order OK of their fixed field K, return whether U is represented by V locally at p, i.e. whether Up embeds in Vp.
One can construct direct sums of spaces of the same kind. Since those are also direct products, they are called biproducts in this context. Depending on the user usage, one of the following three methods can be called to obtain the direct sum of a finite collection of spaces. Note that the corresponding copies of the original spaces in the direct sum are pairwise orthogonal.
direct_sum(x::Vararg{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}
direct_sum(x::Vector{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}
Given a collection of quadratic or hermitian spaces V1,…,Vn, return their direct sum V:=V1⊕…⊕Vn, together with the injections Vi→V.
For objects of type AbstractSpace, finite direct sums and finite direct products agree and they are therefore called biproducts. If one wants to obtain V as a direct product with the projections V→Vi, one should call direct_product(x). If one wants to obtain V as a biproduct with the injections Vi→V and the projections V→Vi, one should call biproduct(x).
Returns the algebra A=A1×⋯×Ak. task can be ":sum", ":prod", ":both" or ":none" and determines which canonical maps are computed as well: ":sum" for the injections, ":prod" for the projections.
direct_product(x::Vararg{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}
direct_product(x::Vector{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}
Given a collection of quadratic or hermitian spaces V1,…,Vn, return their direct product V:=V1×…×Vn, together with the projections V→Vi.
For objects of type AbstractSpace, finite direct sums and finite direct products agree and they are therefore called biproducts. If one wants to obtain V as a direct sum with the injections Vi→V, one should call direct_sum(x). If one wants to obtain V as a biproduct with the injections Vi→V and the projections V→Vi, one should call biproduct(x).
biproduct(x::Vararg{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}, Vector{AbstractSpaceMor}
biproduct(x::Vector{T}) where T <: AbstractSpace -> T, Vector{AbstractSpaceMor}, Vector{AbstractSpaceMor}
Given a collection of quadratic or hermitian spaces V1,…,Vn, return their biproduct V:=V1⊕…⊕Vn, together with the injections Vi→V and the projections V→Vi.
For objects of type AbstractSpace, finite direct sums and finite direct products agree and they are therefore called biproducts. If one wants to obtain V as a direct sum with the injections Vi→V, one should call direct_sum(x). If one wants to obtain V as a direct product with the projections V→Vi, one should call direct_product(x).
orthogonal_projection(V::AbstractSpace, M::T) where T <: MatElem -> AbstractSpaceMor
Given a space V and a non-degenerate subspace W with basis matrix M, return the endomorphism of V corresponding to the projection onto the complement of W in V.
Let (V,Φ) be a space over E/K and let p be a place in K. V is said to be isotropic locally at p if there exists an element x∈Vp such that Φp(x,x)=0, where Φp is the continuous extension of Φ to Vp×Vp.
julia> K, a = cyclotomic_real_subfield(7);
julia> Kt, t = K[:t];
julia> E, b = number_field(t^2-a*t+1, :b);
julia> H = hermitian_space(E, 3);
julia> OK = maximal_order(K);
julia> p = prime_decomposition(OK, 7)[1][1];
julia> is_isotropic(H, p)
true
Let (V,Φ) be a space over E/K and let p be a prime ideal of OK. V is said to be hyperbolic locally at p if the completion Vp of V can be decomposed as an orthogonal sum of hyperbolic planes. The hyperbolic plane is the space (H,Ψ) of rank 2 over E/K such that there exists a basis e1,e2 of H such that Ψ(e1,e1)=Ψ(e2,e2)=0 and Ψ(e1,e2)=1.
julia> K, a = cyclotomic_real_subfield(7);
julia> Kt, t = K[:t];
julia> E, b = number_field(t^2-a*t+1, :b);
julia> H = hermitian_space(E, 3);
julia> OK = maximal_order(K);
julia> p = prime_decomposition(OK, 7)[1][1];
julia> is_locally_hyperbolic(H, p)
false
Settings
This document was generated with Documenter.jl version 1.14.1 on Friday 11 July 2025. Using Julia version 1.10.10.