Skip to content

Commit

Permalink
Adjust doctest printing
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 19, 2024
1 parent 13d13fa commit 602eb9b
Show file tree
Hide file tree
Showing 26 changed files with 568 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/src/InvariantTheory/finite_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ julia> M2 = matrix(K, [1 0 0; 0 a 0; 0 0 -a-1])
julia> G = matrix_group(M1, M2)
Matrix group of degree 3
over cyclotomic field of order 3
with 2 generators
[0 0 1]
[1 0 0]
[0 1 0]
[1 0 0]
[0 a 0]
[0 0 -a - 1]
julia> IR = invariant_ring(G)
Invariant ring of
Expand All @@ -101,6 +109,14 @@ with generators
julia> group(IR)
Matrix group of degree 3
over cyclotomic field of order 3
with 2 generators
[0 0 1]
[1 0 0]
[0 1 0]
[1 0 0]
[0 a 0]
[0 0 -a - 1]
julia> coefficient_ring(IR)
Number field with defining polynomial _$^2 + _$ + 1
Expand Down
4 changes: 4 additions & 0 deletions src/Combinatorics/Graphs/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,10 @@ julia> g = complete_graph(4);
julia> automorphism_group(g)
Permutation group of degree 4
with 3 generators
(3,4)
(2,3)
(1,2)
```
"""
function automorphism_group(g::Graph{T}) where {T <: Union{Directed, Undirected}}
Expand Down
4 changes: 4 additions & 0 deletions src/Combinatorics/Matroids/matroids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,10 @@ Matroid of rank 2 on 4 elements
julia> automorphism_group(M)
Permutation group of degree 4
with 3 generators
(3,4)
(1,2)
(2,3)
```
"""
function automorphism_group(M::Matroid)
Expand Down
38 changes: 38 additions & 0 deletions src/Groups/GAPGroups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ Return whether generators for the group `G` are known.
```jldoctest
julia> F = free_group(2)
Free group of rank 2
with 2 generators
f1
f2
julia> has_gens(F)
true
Expand Down Expand Up @@ -731,6 +734,9 @@ Return the vector of all conjugacy classes of subgroups of G.
```jldoctest
julia> G = symmetric_group(3)
Permutation group of degree 3 and order 6
with 2 generators
(1,2,3)
(1,2)
julia> conjugacy_classes_subgroups(G)
4-element Vector{GAPGroupConjClass{PermGroup, PermGroup}}:
Expand Down Expand Up @@ -853,9 +859,13 @@ julia> G = symmetric_group(4);
julia> H = sylow_subgroup(G, 3)[1]
Permutation group of degree 4 and order 3
with 1 generator
(1,2,3)
julia> conjugate_group(H, gen(G, 1))
Permutation group of degree 4 and order 3
with 1 generator
(2,3,4)
```
"""
Expand All @@ -881,15 +891,21 @@ julia> G = symmetric_group(4);
julia> H = sub(G, [G([2, 1, 3, 4])])[1]
Permutation group of degree 4
with 1 generator
(1,2)
julia> K = sub(G, [G([1, 2, 4, 3])])[1]
Permutation group of degree 4
with 1 generator
(3,4)
julia> is_conjugate(G, H, K)
true
julia> K = sub(G, [G([2, 1, 4, 3])])[1]
Permutation group of degree 4
with 1 generator
(1,2)(3,4)
julia> is_conjugate(G, H, K)
false
Expand All @@ -910,15 +926,21 @@ julia> G = symmetric_group(4);
julia> H = sub(G, [G([2, 1, 3, 4])])[1]
Permutation group of degree 4
with 1 generator
(1,2)
julia> K = sub(G, [G([1, 2, 4, 3])])[1]
Permutation group of degree 4
with 1 generator
(3,4)
julia> is_conjugate_with_data(G, H, K)
(true, (1,3)(2,4))
julia> K = sub(G, [G([2, 1, 4, 3])])[1]
Permutation group of degree 4
with 1 generator
(1,2)(3,4)
julia> is_conjugate_with_data(G, H, K)
(false, nothing)
Expand All @@ -945,15 +967,22 @@ julia> G = symmetric_group(4);
julia> U = derived_subgroup(G)[1]
Permutation group of degree 4 and order 12
with 2 generators
(1,2,3)
(2,3,4)
julia> V = sub(G, [G([2,1,3,4])])[1]
Permutation group of degree 4
with 1 generator
(1,2)
julia> is_conjugate_subgroup(G, U, V)
(false, ())
julia> V = sub(G, [G([2, 1, 4, 3])])[1]
Permutation group of degree 4
with 1 generator
(1,2)(3,4)
julia> is_conjugate_subgroup(G, U, V)
(true, ())
Expand Down Expand Up @@ -992,6 +1021,8 @@ julia> G = symmetric_group(4);
julia> H = sylow_subgroup(G, 3)[1]
Permutation group of degree 4 and order 3
with 1 generator
(1,2,3)
julia> short_right_transversal(G, H, G([2, 1, 3, 4]))
PermGroupElem[]
Expand Down Expand Up @@ -1289,6 +1320,10 @@ julia> complement_class_reps(G, derived_subgroup(G)[1])
julia> G = dihedral_group(8)
Pc group of order 8
with 3 generators
f1
f2
f3
julia> complement_class_reps(G, center(G)[1])
PcGroup[]
Expand Down Expand Up @@ -1579,6 +1614,9 @@ Return whether `G` is a finitely generated group.
```jldoctest
julia> F = free_group(2)
Free group of rank 2
with 2 generators
f1
f2
julia> is_finitely_generated(F)
true
Expand Down
10 changes: 10 additions & 0 deletions src/Groups/abelian_aut.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ Gram matrix quadratic form:
julia> OT = orthogonal_group(T)
Group of isometries of Finite quadratic module: Z/15 -> Q/2Z generated by 2 elements
with 2 generators
Isometry of Finite quadratic module: Z/15 -> Q/2Z defined by
[4]
Isometry of Finite quadratic module: Z/15 -> Q/2Z defined by
[11]
julia> T3inT = primary_part(T, 3)[2]
Map
Expand Down Expand Up @@ -474,6 +479,11 @@ julia> T = torsion_quadratic_module(matrix(QQ, 2, 2, [2//3 0; 0 2//5]));
julia> OT = orthogonal_group(T)
Group of isometries of Finite quadratic module: Z/15 -> Q/2Z generated by 2 elements
with 2 generators
Isometry of Finite quadratic module: Z/15 -> Q/2Z defined by
[4]
Isometry of Finite quadratic module: Z/15 -> Q/2Z defined by
[11]
julia> T3inT = primary_part(T, 3)[2]
Map
Expand Down
12 changes: 12 additions & 0 deletions src/Groups/action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,16 @@ be a subgroup of the domain of `g`.
```jldoctest
julia> C = cyclic_group(20)
Pc group of order 20
with 3 generators
f1
f2
f3
julia> S = automorphism_group(C)
Aut( <pc group of size 20 with 3 generators> )
with 2 generators
[ f3^3, f1*f2*f3^3 ] -> [ f3^3, f1*f3 ]
[ f1*f2*f3^3, f3^3 ] -> [ f1*f2*f3^3, f3 ]
julia> H, _ = sub(C, [gens(C)[1]^4])
(Pc group of order 5, Hom: pc group -> pc group)
Expand Down Expand Up @@ -545,6 +552,11 @@ julia> G = symmetric_group(6);
julia> H = sylow_subgroup(G, 2)[1]
Permutation group of degree 6 and order 16
with 4 generators
(1,2)
(3,4)
(1,3)(2,4)
(5,6)
julia> index(G, H)
45
Expand Down
Loading

0 comments on commit 602eb9b

Please sign in to comment.