1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-29 01:40:28 +01:00

include sqadjop.jl from 1812.03456.jl file

This commit is contained in:
kalmarek 2019-07-04 15:31:55 +02:00
parent e9bb6f13dd
commit e23b6a85dc
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
4 changed files with 33 additions and 37 deletions

26
src/1812.03456.jl Normal file
View File

@ -0,0 +1,26 @@
indexing(n) = [(i,j) for i in 1:n for j in 1:n if i≠j]
function generating_set(G::AutGroup{N}, n=N) where N
rmuls = [Groups.rmul_autsymbol(i,j) for (i,j) in indexing(n)]
lmuls = [Groups.lmul_autsymbol(i,j) for (i,j) in indexing(n)]
gen_set = G.([rmuls; lmuls])
return [gen_set; inv.(gen_set)]
end
function EltaryMat(M::MatAlgebra, i::Integer, j::Integer, val=1)
@assert i j
@assert 1 i nrows(M)
@assert 1 j ncols(M)
m = one(M)
m[i,j] = val
return m
end
function generating_set(M::MatAlgebra, n=nrows(M))
elts = [EltaryMat(M, i,j) for (i,j) in indexing(n)]
return elem_type(M)[elts; inv.(elts)]
end
include("sqadjop.jl")

View File

@ -22,9 +22,8 @@ include("RGprojections.jl")
include("orbitdata.jl")
include("sos_sdps.jl")
include("checksolution.jl")
include("sqadjop.jl")
include("1712.07167.jl")
include("1812.03456.jl")
end # module Property(T)

View File

@ -1,29 +1,3 @@
indexing(n) = [(i,j) for i in 1:n for j in 1:n if i≠j]
function generating_set(G::AutGroup{N}, n=N) where N
rmuls = [Groups.rmul_autsymbol(i,j) for (i,j) in indexing(n)]
lmuls = [Groups.lmul_autsymbol(i,j) for (i,j) in indexing(n)]
gen_set = G.([rmuls; lmuls])
return [gen_set; inv.(gen_set)]
end
function E(M::MatAlgebra, i::Integer, j::Integer, val=1)
@assert i j
@assert 1 i nrows(M)
@assert 1 j ncols(M)
m = one(M)
m[i,j] = val
return m
end
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)]
end
isopposite(σ::perm, τ::perm, i=1, j=2) =
σ[i] τ[i] && σ[i] τ[j] &&
σ[j] τ[i] && σ[j] τ[j]
@ -91,9 +65,6 @@ 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)

View File

@ -9,8 +9,8 @@
for N in [3,4]
M = MatrixAlgebra(zz, N)
@test PropertyT.E(M, 1, 2) isa MatAlgElem
e12 = PropertyT.E(M, 1, 2)
@test PropertyT.EltaryMat(M, 1, 2) isa MatAlgElem
e12 = PropertyT.EltaryMat(M, 1, 2)
@test e12[1,2] == 1
@test inv(e12)[1,2] == -1
@ -65,9 +65,9 @@
@test op == PropertyT.Op(RG)
e = one(M)
g = PropertyT.E(M, 1,2)
h = PropertyT.E(M, 1,3)
k = PropertyT.E(M, 3,4)
g = PropertyT.EltaryMat(M, 1,2)
h = PropertyT.EltaryMat(M, 1,3)
k = PropertyT.EltaryMat(M, 3,4)
edges = N*(N-1)÷2
@test sq[e] == 20*edges