1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-13 22:05:27 +01:00

update to PermutationGroups-0.4

This commit is contained in:
Marek Kaluba 2023-10-06 14:15:16 +02:00
parent 7791fbdc42
commit 759d4c9ed7
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
6 changed files with 24 additions and 10 deletions

View File

@ -9,6 +9,7 @@ IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
IntervalMatrices = "5c1f47dc-42dd-5697-8aaa-4d102d140ba9"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PermutationGroups = "8bc5a954-2dfc-11e9-10e6-cd969bffa420"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@ -20,8 +21,9 @@ Groups = "0.7"
IntervalArithmetic = "0.20"
IntervalMatrices = "0.8"
JuMP = "1.3"
PermutationGroups = "0.4"
ProgressMeter = "1.7"
SCS = "1.1"
SCS = "1.3"
StaticArrays = "1"
SymbolicWedderburn = "0.3.4"
julia = "1.6"

View File

@ -23,7 +23,7 @@ end
function Base.:^(
w::W,
p::PermutationGroups.AbstractPerm,
p::PermutationGroups.AbstractPermutation,
) where {W<:Groups.AbstractWord}
return W([l^p for l in w])
end

View File

@ -2,7 +2,7 @@
function _conj(
t::Groups.Transvection,
σ::PermutationGroups.AbstractPerm,
σ::PermutationGroups.AbstractPermutation,
)
return Groups.Transvection(t.id, t.i^inv(σ), t.j^inv(σ), t.inv)
end

View File

@ -2,7 +2,7 @@
function _conj(
t::MatrixGroups.ElementaryMatrix{N},
σ::PermutationGroups.AbstractPerm,
σ::PermutationGroups.AbstractPermutation,
) where {N}
return MatrixGroups.ElementaryMatrix{N}(t.i^inv(σ), t.j^inv(σ), t.val)
end

View File

@ -2,7 +2,7 @@
function _conj(
s::MatrixGroups.ElementarySymplectic{N,T},
σ::PermutationGroups.AbstractPerm,
σ::PermutationGroups.AbstractPermutation,
) where {N,T}
@assert iseven(N)
@assert PermutationGroups.degree(σ) == N ÷ 2 "Got degree = $(PermutationGroups.degree(σ)); N = $N"

View File

@ -1,18 +1,30 @@
import SymbolicWedderburn.PermutationGroups.AbstractPerm
import PermutationGroups.AbstractPermutation
# move to Groups
Base.keys(a::Alphabet) = keys(1:length(a))
## the old 1812.03456 definitions
isopposite(σ::AbstractPerm, τ::AbstractPerm, i=1, j=2) =
i^σ i^τ && i^σ j^τ && j^σ i^τ && j^σ j^τ
function isopposite(
σ::AbstractPermutation,
τ::AbstractPermutation,
i = 1,
j = 2,
)
return i^σ i^τ && i^σ j^τ && j^σ i^τ && j^σ j^τ
end
isadjacent(σ::AbstractPerm, τ::AbstractPerm, i=1, j=2) =
(i^σ == i^τ && j^σ j^τ) || # first equal, second differ
function isadjacent(
σ::AbstractPermutation,
τ::AbstractPermutation,
i = 1,
j = 2,
)
return (i^σ == i^τ && j^σ j^τ) || # first equal, second differ
(j^σ == j^τ && i^σ i^τ) || # second equal, first differ
(i^σ == j^τ && j^σ i^τ) || # first σ equal to second τ
(j^σ == i^τ && i^σ j^τ) # second σ equal to first τ
end
function _ncycle(start, length, n=start + length - 1)
p = PermutationGroups.Perm(Int8(n))