Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ jobs:
# arch: x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
depwarn: error
# See https://github.com/JuliaCollections/DataStructures.jl/pull/951
# with:
# depwarn: error
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SymbolicWedderburn = "858aa9a9-4c7c-4c62-b466-2421203962a2"

[compat]
DataStructures = "0.18"
DataStructures = "0.18, 0.19"
JuMP = "1.10"
MathOptInterface = "1.13"
MultivariateBases = "0.2"
Expand All @@ -29,5 +29,5 @@ MutableArithmetics = "1"
PolyJuMP = "0.7"
Reexport = "0.2, 1.0"
SemialgebraicSets = "0.3"
SymbolicWedderburn = "0.3"
SymbolicWedderburn = "0.3, 0.4"
julia = "1.6"
4 changes: 2 additions & 2 deletions docs/src/tutorials/Symmetry/cyclic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ gram = gram_matrix(con_ref).blocks #src
@test gram[1].basis.polynomials[2] ≈ -sum(x)/√3 #src
@test gram[2].Q ≈ [0.5;;] rtol = 1e-6 #src
@test length(gram[2].basis.polynomials) == 1 #src
@test gram[2].basis.polynomials[1] ≈ (basis[1] - basis[2] * im) / √2 #src
@test gram[2].basis.polynomials[1] ≈ (basis[1] + basis[2] * im) / √2 #src
@test gram[3].Q ≈ [0.5;;] rtol = 1e-6 #src
@test length(gram[3].basis.polynomials) == 1 #src
@test gram[3].basis.polynomials[1] ≈ (basis[1] + basis[2] * im) / √2 #src
@test gram[3].basis.polynomials[1] ≈ (basis[1] - basis[2] * im) / √2 #src
for gram in gram_matrix(con_ref).blocks
println(gram.basis.polynomials)
display(gram.Q)
Expand Down
34 changes: 17 additions & 17 deletions docs/src/tutorials/Symmetry/dihedral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ function solve(G)

g = gram_matrix(con_ref).blocks #src
@test length(g) == 5 #src
@test g[1].basis.polynomials == [y^3, x^2*y, y] #src
@test g[2].basis.polynomials == [-x^3, -x*y^2, -x] #src
for i in 1:2 #src
@test g[4].basis.polynomials == [y^3, x^2*y, y] #src
@test g[5].basis.polynomials == [-x^3, -x*y^2, -x] #src
for i in [4, 5] #src
I = 3:-1:1 #src
Q = g[i].Q[I, I] #src
@test size(Q) == (3, 3) #src
Expand All @@ -162,20 +162,20 @@ function solve(G)
@test Q[1, 3] ≈ -5/8 rtol=1e-2 #src
@test Q[3, 3] ≈ 1 rtol=1e-2 #src
end #src
@test length(g[3].basis.polynomials) == 2 #src
@test g[3].basis.polynomials[1] == 1.0 #src
@test g[3].basis.polynomials[2] ≈ -(√2/2)x^2 - (√2/2)y^2 #src
@test size(g[3].Q) == (2, 2) #src
@test g[3].Q[1, 1] ≈ 7921/4096 rtol=1e-2 #src
@test g[3].Q[1, 2] ≈ 0.983 rtol=1e-2 #src
@test g[3].Q[2, 2] ≈ 1/2 rtol=1e-2 #src
@test g[4].basis.polynomials == [x * y] #src
@test size(g[4].Q) == (1, 1) #src
@test g[4].Q[1, 1] ≈ 0 atol=1e-2 #src
@test length(g[5].basis.polynomials) == 1 #src
@test g[5].basis.polynomials[1] ≈ (√2/2)x^2 - (√2/2)y^2 #src
@test size(g[5].Q) == (1, 1) #src
@test g[5].Q[1, 1] ≈ 0 atol=1e-2 #src
@test length(g[1].basis.polynomials) == 2 #src
@test g[1].basis.polynomials[1] == 1.0 #src
@test g[1].basis.polynomials[2] ≈ -(√2/2)x^2 - (√2/2)y^2 #src
@test size(g[1].Q) == (2, 2) #src
@test g[1].Q[1, 1] ≈ 7921/4096 rtol=1e-2 #src
@test g[1].Q[1, 2] ≈ 0.983 rtol=1e-2 #src
@test g[1].Q[2, 2] ≈ 1/2 rtol=1e-2 #src
@test g[2].basis.polynomials == [x * y] #src
@test size(g[2].Q) == (1, 1) #src
@test g[2].Q[1, 1] ≈ 0 atol=1e-2 #src
@test length(g[3].basis.polynomials) == 1 #src
@test g[3].basis.polynomials[1] ≈ (√2/2)x^2 - (√2/2)y^2 #src
@test size(g[3].Q) == (1, 1) #src
@test g[3].Q[1, 1] ≈ 0 atol=1e-2 #src
for g in gram_matrix(con_ref).blocks
println(g.basis.polynomials)
end
Expand Down
5 changes: 3 additions & 2 deletions src/Certificate/Symmetry/wedderburn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ function SymbolicWedderburn.decompose(
end

function SymbolicWedderburn.ExtensionHomomorphism(
::Type{I},
action::SymbolicWedderburn.Action,
basis::MB.MonomialBasis,
)
) where {I<:Integer}
monos = collect(basis.monomials)
return SymbolicWedderburn.ExtensionHomomorphism(Int, action, monos)
return SymbolicWedderburn.ExtensionHomomorphism(I, action, monos)
end

struct VariablePermutation <: SymbolicWedderburn.ByPermutations end
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SumOfSquares = "4b9e565b-77fc-50a5-a571-1244f986bda1"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
DynamicPolynomials = "0.5"
DynamicPolynomials = "0.5, 0.6"
Loading