File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,33 @@ function vector_space(R::Field, dim::Int; cached::Bool = true)
3434 Generic. FreeModule (R, dim; cached= cached)
3535end
3636
37+ @doc raw """
38+ vector_space_dim(M::FPModule)
39+
40+ Return the dimension of the given vector space.
41+
42+ # Examples
43+ ```jldoctest
44+ julia> M = free_module(QQ, 2)
45+ Vector space of dimension 2 over rationals
46+
47+ julia> vector_space_dim(M)
48+ 2
49+
50+ julia> m = M([1, 2])
51+ (1//1, 2//1)
52+
53+ julia> N, = sub(M, [m])
54+ (Subspace over rationals with 1 generator and no relations, Hom: N -> M)
55+
56+ julia> vector_space_dim(N)
57+ 1
58+
59+ julia> Q, = quo(M, N)
60+ (Quotient space over rationals with 1 generator and no relations, Hom: M -> Q)
61+
62+ julia> vector_space_dim(Q)
63+ 1
64+ ```
65+ """
3766function vector_space_dim end
You can’t perform that action at this time.
0 commit comments