mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 07:20:28 +01:00
we act on MatAlgElem now; use MatAlgebra
This commit is contained in:
parent
88b460a959
commit
cc9d3db846
@ -213,7 +213,7 @@ function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T
|
||||
return result
|
||||
end
|
||||
|
||||
function (p::perm)(A::MatElem)
|
||||
function (p::perm)(A::MatAlgElem)
|
||||
length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))")
|
||||
result = similar(A)
|
||||
@inbounds for i in 1:size(A, 1)
|
||||
@ -226,7 +226,7 @@ end
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# WreathProductElems action on Nemo.MatElem
|
||||
# WreathProductElems action on MatAlgElem
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@ -242,7 +242,7 @@ function (g::WreathProductElem)(y::GroupRingElem)
|
||||
return result
|
||||
end
|
||||
|
||||
function (g::WreathProductElem{N})(A::MatElem) where N
|
||||
function (g::WreathProductElem{N})(A::MatAlgElem) where N
|
||||
# @assert N == size(A,1) == size(A,2)
|
||||
flips = ntuple(i->(g.n[i].d[1]==1 && g.n[i].d[2]==2 ? 1 : -1), N)
|
||||
result = similar(A)
|
||||
|
@ -9,7 +9,7 @@ function generating_set(G::AutGroup{N}, n=N) where N
|
||||
return [gen_set; inv.(gen_set)]
|
||||
end
|
||||
|
||||
function E(M::MatSpace, i::Integer, j::Integer, val=1)
|
||||
function E(M::MatAlgebra, i::Integer, j::Integer, val=1)
|
||||
@assert i ≠ j
|
||||
@assert 1 ≤ i ≤ nrows(M)
|
||||
@assert 1 ≤ j ≤ ncols(M)
|
||||
@ -18,8 +18,7 @@ function E(M::MatSpace, i::Integer, j::Integer, val=1)
|
||||
return m
|
||||
end
|
||||
|
||||
function generating_set(M::MatSpace, n=nrows(M))
|
||||
@assert nrows(M) == ncols(M)
|
||||
function generating_set(M::MatAlgebra, n=M.n)
|
||||
|
||||
elts = [E(M, i,j) for (i,j) in indexing(n)]
|
||||
return elem_type(M)[elts; inv.(elts)]
|
||||
@ -92,10 +91,13 @@ function Op(RG::GroupRing, N::Integer)
|
||||
return op÷factorial(N-2)^2
|
||||
end
|
||||
|
||||
AbstractAlgebra.nrows(M::MatAlgebra) = M.n
|
||||
AbstractAlgebra.ncols(M::MatAlgebra) = M.n
|
||||
|
||||
for Elt in [:Sq, :Adj, :Op]
|
||||
@eval begin
|
||||
$Elt(RG::GroupRing{AutGroup{N}}) where N = $Elt(RG, N)
|
||||
$Elt(RG::GroupRing{<:MatSpace}) = $Elt(RG, nrows(RG.group))
|
||||
$Elt(RG::GroupRing{<:MatAlgebra}) = $Elt(RG, nrows(RG.group))
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user