# Spaces

## Creation of spaces

quadratic_spaceMethod
quadratic_space(K::NumField, n::Int; cached::Bool = true) -> QuadSpace

Create the quadratic space over K with dimension n and Gram matrix equals to the identity matrix.

source
hermitian_spaceMethod
hermitian_space(E::NumField, n::Int; cached::Bool = true) -> HermSpace

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.

source
quadratic_spaceMethod
quadratic_space(K::NumField, G::MatElem; cached::Bool = true) -> QuadSpace

Create the quadratic space over K with Gram matrix G. The matrix G must be square and symmetric.

source
hermitian_spaceMethod
hermitian_space(E::NumField, gram::MatElem; cached::Bool = true) -> HermSpace

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.

source

### Examples

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[0 1; 1 0])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

source

### Example

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