Group
AbstractGroup
LatticeTools.AbstractGroup — TypeAbstractGroupAbstract type for abstract groups. Currently the only subtype is FiniteGroup.
FiniteGroup
LatticeTools.FiniteGroup — TypeFiniteGroupFinite group, with elements {1, 2, 3,..., n}. The identity element is always 1. Can be constructed using FiniteGroup(multiplication_table)
Fields
multiplication_table::Matrix{Int}: multiplication tableperiod_lengths::Vector{Int}: period length (order) of every elementinverses::Vector{Int}: inverse of every elementconjugacy_classes::Vector{Vector{Int}}: conjugacy classes
Examples
julia> using LatticeTools
julia> FiniteGroup([1 2; 2 1])
FiniteGroup([1 2; 2 1], [1, 2], [1, 2], [[1], [2]])LatticeTools.element — Methodelement(group, idx)Return the element of index idx. For FiniteGroup, this is somewhat meaningless since the idxth element is idx. The sole purpose of this function is the bounds checking.
LatticeTools.elements — Methodelements(group)Return the elements of the group.
LatticeTools.element_name — Methodelement_name(group, idx)Return the name of element at index idx, which is just the string of idx.
LatticeTools.element_names — Methodelement_names(group)Return the names of element.
LatticeTools.group_order — Methodgroup_order(group)Order of group (i.e. number of elements)
LatticeTools.group_order — Methodgroup_order(group, g)Order of group element (i.e. period length)
LatticeTools.period_length — Methodperiod_length(group, g)Order of group element (i.e. period length)
LatticeTools.group_multiplication_table — Methodgroup_multiplication_table(group)Return multiplcation table of the group.
LatticeTools.isabelian — Methodisabelian(group)Check if the group is abelian.
LatticeTools.group_product — Methodgroup_product(group)Return a function which computes the group product.
LatticeTools.group_inverse — Methodgroup_inverse(group)Get a function which gives inverse.
LatticeTools.group_inverse — Methodgroup_inverse(group, g)Get inverse of element/elements g.
LatticeTools.conjugacy_class — Methodconjugacy_class(group::FiniteGroup, i::Integer)Conjugacy class of the element i.
LatticeTools.generate_subgroup — Methodgenerate_subgroup(group::FiniteGroup, idx::Integer)subgroup generated by generators. ⟨ {idx} ⟩
LatticeTools.issubgroup — Methodissubgroup(group, subset)Check whether the given subset is a subgroup of group.
LatticeTools.minimal_generating_set — Methodminimal_generating_set(group)Get minimally generating set of the finite group.
LatticeTools.group_isomorphism — Methodgroup_isomorphism(group1, group2)Find the isomorphism ϕ: G₁ → G₂. Return nothing if not isomorphic.
LatticeTools.group_multiplication_table — Methodgroup_multiplication_table(elements, product=(*))Generate a multiplication table from elements with product.
LatticeTools.ishomomorphic — Methodishomomorphic(group, representation; product=(*), equal=(==))Check whether representation is homomorphic to group under product and equal, order preserved.
Permutation
LatticeTools.Permutation — TypePermutation(perms; max_order=2048)Create a permutation of integers from 1 to n. perms should be a permutation of 1:n.
Arguments
perms: an integer vector containing a permutation of integers from 1 to nmax_order: maximum order
Note
The convention for the permutation is that map[i] gets mapped to i. In other words, map tells you where each element is from.
Base.:* — Method*(p1 ::Permutation, p2 ::Permutation)Multiply the two permutation. NOT THIS: (Return [p2.map[x] for x in p1.map].) BUT THIS: (Return [p1.map[x] for x in p2.map].)
Examples
julia> using LatticeTools
julia> Permutation([2,1,3]) * Permutation([1,3,2])
Permutation([2, 3, 1], 3)
julia> Permutation([1,3,2]) * Permutation([2,1,3])
Permutation([3, 1, 2], 3)LatticeTools.generate_group — Methodgenerate_group(generators...)Return a FiniteGroup generated by the generators.
Arguments
generators::Permutation...: generating permutations
LatticeTools.isidentity — Methodisidentity(perm::Permutation)Test whether the permutation is an identity.