1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 14:35:28 +01:00

align to perms acting on the right

This commit is contained in:
kalmarek 2018-07-30 13:54:15 +02:00
parent 158ce5ee27
commit fe0e22f0bf
2 changed files with 7 additions and 6 deletions

View File

@ -384,6 +384,6 @@ function matrix_repr(a::FlipAut, n::Int, pow)
return x return x
end end
matrix_repr(a::PermAut, n::Int, pow) = eye(n)[:, (a.perm^pow).d] matrix_repr(a::PermAut, n::Int, pow) = eye(n)[(a.perm^pow).d, :]
matrix_repr(a::Identity, n::Int, pow) = eye(n) matrix_repr(a::Identity, n::Int, pow) = eye(n)

View File

@ -37,7 +37,7 @@ struct WreathProductElem{T<:GroupElem, I<:Integer} <: GroupElem
function WreathProductElem{T, I}(n::DirectProductGroupElem{T}, p::Generic.perm{I}, function WreathProductElem{T, I}(n::DirectProductGroupElem{T}, p::Generic.perm{I},
check::Bool=true) where {T, I} check::Bool=true) where {T, I}
if check if check
length(n.elts) == parent(p).n || throw("Can't form WreathProductElem: lengths differ") length(n.elts) == length(p) || throw("Can't form WreathProductElem: lengths differ")
end end
return new(n, p) return new(n, p)
end end
@ -164,6 +164,8 @@ end
# #
############################################################################### ###############################################################################
(p::perm)(n::DirectProductGroupElem) = DirectProductGroupElem(n.elts[p.d])
doc""" doc"""
*(g::WreathProductElem, h::WreathProductElem) *(g::WreathProductElem, h::WreathProductElem)
> Return the wreath product group operation of elements, i.e. > Return the wreath product group operation of elements, i.e.
@ -174,8 +176,7 @@ doc"""
> `h.n::DirectProductGroupElem` via standard permutation of coordinates. > `h.n::DirectProductGroupElem` via standard permutation of coordinates.
""" """
function *(g::WreathProductElem, h::WreathProductElem) function *(g::WreathProductElem, h::WreathProductElem)
w = DirectProductGroupElem((h.n).elts[inv(g.p).d]) return WreathProductElem(g.n*g.p(h.n), g.p*h.p, false)
return WreathProductElem(g.n*w, g.p*h.p, false)
end end
doc""" doc"""
@ -184,8 +185,8 @@ doc"""
> `g^-1 = (g.n, g.p)^-1 = (g.p^-1(g.n^-1), g.p^-1)`. > `g^-1 = (g.n, g.p)^-1 = (g.p^-1(g.n^-1), g.p^-1)`.
""" """
function inv(g::WreathProductElem) function inv(g::WreathProductElem)
w = DirectProductGroupElem(inv(g.n).elts[g.p.d]) pinv = inv(g.p)
return WreathProductElem(w, inv(g.p), false) return WreathProductElem(pinv(inv(g.n)), pinv, false)
end end
############################################################################### ###############################################################################