From be17491397d8a02c1a6c4ed6c9be72dcdc4e59b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sat, 25 Oct 2025 12:37:50 +0200 Subject: [PATCH 1/6] Update SymbolicWedderburn to v0.4 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 299a03b2..605219b6 100644 --- a/Project.toml +++ b/Project.toml @@ -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" From 901bf7e85f284545943887511d2cc748516a2fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sat, 25 Oct 2025 14:01:26 +0200 Subject: [PATCH 2/6] Fix --- src/Certificate/Symmetry/wedderburn.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Certificate/Symmetry/wedderburn.jl b/src/Certificate/Symmetry/wedderburn.jl index 71adffce..12adc16a 100644 --- a/src/Certificate/Symmetry/wedderburn.jl +++ b/src/Certificate/Symmetry/wedderburn.jl @@ -132,7 +132,7 @@ function _gram_basis(pattern::Pattern, basis, ::Type{T}) where {T} T, pattern.group, pattern.action, - basis, + collect(basis), semisimple = true, ) # We have a new basis `b = vcat(R * basis.monomials for R in summands)``. From 3688128a742537ff521dc23bfae78a3867a58b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sat, 25 Oct 2025 14:01:41 +0200 Subject: [PATCH 3/6] Up --- Project.toml | 2 +- test/Project.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 605219b6..236bf0e1 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/test/Project.toml b/test/Project.toml index 492f4adb..095817a8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -13,4 +13,4 @@ SumOfSquares = "4b9e565b-77fc-50a5-a571-1244f986bda1" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -DynamicPolynomials = "0.5" +DynamicPolynomials = "0.6" From 1776c8af1ac2eaec5a886ba50820f08d7638db28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sat, 25 Oct 2025 15:58:27 +0200 Subject: [PATCH 4/6] Allow DynamicPolynomials v0.5 Co-authored-by: Christian Schilling --- test/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Project.toml b/test/Project.toml index 095817a8..97ea56b7 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -13,4 +13,4 @@ SumOfSquares = "4b9e565b-77fc-50a5-a571-1244f986bda1" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -DynamicPolynomials = "0.6" +DynamicPolynomials = "0.5, 0.6" From 81d7c7c06999e885964301a341276970f3e3c65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sat, 25 Oct 2025 18:24:15 +0200 Subject: [PATCH 5/6] Fixes --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1545270c..139046b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} From be90eec8911f86e1b8f9491fba3733f63617ca14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 31 Oct 2025 13:34:20 +0100 Subject: [PATCH 6/6] Fixes --- docs/src/tutorials/Symmetry/cyclic.jl | 4 +-- docs/src/tutorials/Symmetry/dihedral.jl | 34 ++++++++++++------------- src/Certificate/Symmetry/wedderburn.jl | 7 ++--- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/docs/src/tutorials/Symmetry/cyclic.jl b/docs/src/tutorials/Symmetry/cyclic.jl index f7088f4b..edb9cef8 100644 --- a/docs/src/tutorials/Symmetry/cyclic.jl +++ b/docs/src/tutorials/Symmetry/cyclic.jl @@ -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) diff --git a/docs/src/tutorials/Symmetry/dihedral.jl b/docs/src/tutorials/Symmetry/dihedral.jl index 7802a8b6..920859c1 100644 --- a/docs/src/tutorials/Symmetry/dihedral.jl +++ b/docs/src/tutorials/Symmetry/dihedral.jl @@ -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 @@ -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 diff --git a/src/Certificate/Symmetry/wedderburn.jl b/src/Certificate/Symmetry/wedderburn.jl index 12adc16a..698ed0c1 100644 --- a/src/Certificate/Symmetry/wedderburn.jl +++ b/src/Certificate/Symmetry/wedderburn.jl @@ -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 @@ -132,7 +133,7 @@ function _gram_basis(pattern::Pattern, basis, ::Type{T}) where {T} T, pattern.group, pattern.action, - collect(basis), + basis, semisimple = true, ) # We have a new basis `b = vcat(R * basis.monomials for R in summands)``.