Skip to content

Commit

Permalink
Merge branch 'lg/finalize-release' into 'master'
Browse files Browse the repository at this point in the history
finalize release 0.1

See merge request johannesflake/pbwdeformations.jl!16
  • Loading branch information
lgoettgens committed Jan 13, 2022
2 parents 9d78cfe + 4e437bd commit a3ae1a0
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 73 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PBWDeformations"
uuid = "5e7992ee-18b2-4301-9ba0-4f17696dc75a"
authors = ["Johannes Flake <[email protected]>", "Lars Göttgens <[email protected]>", "Phil Pützstück <[email protected]>"]
version = "0.0.0"
authors = ["Johannes Flake <[email protected]>", "Lars Göttgens <[email protected]>"]
version = "0.1.0"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down
46 changes: 23 additions & 23 deletions examples/PBWDeformationsNotebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
" ----- ----- ----- - - - - \n",
"\n",
"...combining (and extending) ANTIC, GAP, Polymake and Singular\n",
"Version\u001b[32m 0.7.0 \u001b[39m... \n",
"Version\u001b[32m 0.7.1 \u001b[39m... \n",
" ... which comes with absolutely no warranty whatsoever\n",
"Type: '?Oscar' for more information\n",
"(c) 2019-2021 by The Oscar Development Team\n"
Expand All @@ -58,9 +58,9 @@
"text": [
"\u001b[36m\u001b[1m Project\u001b[22m\u001b[39m PBWDeformations v0.0.0\n",
"\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `~/code/pbwdeformations.jl/Project.toml`\n",
" \u001b[90m [c3fe647b] \u001b[39mAbstractAlgebra v0.22.2\n",
" \u001b[90m [861a8166] \u001b[39mCombinatorics v1.0.2\n",
" \u001b[90m [f1435218] \u001b[39mOscar v0.7.0\n",
" \u001b[90m [c3fe647b] \u001b[39mAbstractAlgebra\n",
" \u001b[90m [861a8166] \u001b[39mCombinatorics\n",
" \u001b[90m [f1435218] \u001b[39mOscar\n",
" \u001b[90m [2f01184e] \u001b[39mSparseArrays\n"
]
}
Expand Down Expand Up @@ -103,7 +103,7 @@
{
"data": {
"text/plain": [
"(Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
"(Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
]
},
"execution_count": 3,
Expand All @@ -112,7 +112,7 @@
}
],
"source": [
"sp, ((x_1, x_2, x_3), (v_1, v_2)) = PBWDeformations.smash_product_lie(QQ, 'A', 1, [1])"
"sp, ((x_1, x_2, x_3), (v_1, v_2)) = smash_product_lie(QQ, 'A', 1, [1])"
]
},
{
Expand Down Expand Up @@ -254,7 +254,7 @@
{
"data": {
"text/plain": [
"(Symmetric Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
"(Symmetric Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
]
},
"execution_count": 7,
Expand All @@ -263,7 +263,7 @@
}
],
"source": [
"PBWDeformations.smash_product_symmdeform_lie(sp)"
"smash_product_symmdeform_lie(sp)"
]
},
{
Expand All @@ -283,7 +283,7 @@
{
"data": {
"text/plain": [
"(Symmetric Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
"(Symmetric Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
]
},
"execution_count": 8,
Expand All @@ -293,7 +293,7 @@
],
"source": [
"kappa1 = fill(zero(sp.alg), sp.dimV, sp.dimV)\n",
"deform1, _ = PBWDeformations.smash_product_deform_lie(sp, kappa1)"
"deform1, _ = smash_product_deform_lie(sp, kappa1)"
]
},
{
Expand All @@ -313,7 +313,7 @@
{
"data": {
"text/plain": [
"(Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
"(Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
]
},
"execution_count": 9,
Expand All @@ -325,7 +325,7 @@
"kappa2 = fill(zero(sp.alg), sp.dimV, sp.dimV)\n",
"kappa2[1,2] = x_1^2 + 5*x_2*x_3 + 3\n",
"kappa2[2,1] = -kappa2[1,2]\n",
"deform2, _ = PBWDeformations.smash_product_deform_lie(sp, kappa2)"
"deform2, _ = smash_product_deform_lie(sp, kappa2)"
]
},
{
Expand All @@ -337,7 +337,7 @@
{
"data": {
"text/plain": [
"(Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], PBWDeformations.QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
"(Deformation of Lie Algebra Smash Product with basis x_1, x_2, x_3, v_1, v_2 over Rational Field, (QuadraticQuoAlgebraElem{fmpq}[x_1, x_2, x_3], QuadraticQuoAlgebraElem{fmpq}[v_1, v_2]))"
]
},
"execution_count": 10,
Expand All @@ -349,7 +349,7 @@
"kappa3 = fill(zero(sp.alg), sp.dimV, sp.dimV)\n",
"kappa3[1,2] = 4*x_1*x_2 + x_3^2 - 2*x_3 + 42\n",
"kappa3[2,1] = -kappa3[1,2]\n",
"deform3, _ = PBWDeformations.smash_product_deform_lie(sp, kappa3)"
"deform3, _ = smash_product_deform_lie(sp, kappa3)"
]
},
{
Expand All @@ -374,7 +374,7 @@
"ArgumentError: kappa is not skew-symmetric.",
"",
"Stacktrace:",
" [1] smash_product_deform_lie(sp::PBWDeformations.SmashProductLie{fmpq}, kappa::Matrix{PBWDeformations.QuadraticQuoAlgebraElem{fmpq}})",
" [1] smash_product_deform_lie(sp::SmashProductLie{fmpq}, kappa::Matrix{QuadraticQuoAlgebraElem{fmpq}})",
" @ PBWDeformations ~/code/pbwdeformations.jl/src/SmashProductDeformLie.jl:27",
" [2] top-level scope",
" @ In[11]:4",
Expand All @@ -389,7 +389,7 @@
"kappa4 = fill(zero(sp.alg), sp.dimV, sp.dimV)\n",
"kappa4[1,2] = x_2^2\n",
"kappa4[2,1] = -x_1\n",
"deform4, _ = PBWDeformations.smash_product_deform_lie(sp, kappa4)"
"deform4, _ = smash_product_deform_lie(sp, kappa4)"
]
},
{
Expand Down Expand Up @@ -435,7 +435,7 @@
}
],
"source": [
"PBWDeformations.ispbwdeform(deform1)"
"ispbwdeform(deform1)"
]
},
{
Expand Down Expand Up @@ -464,7 +464,7 @@
}
],
"source": [
"PBWDeformations.ispbwdeform(deform2)"
"ispbwdeform(deform2)"
]
},
{
Expand Down Expand Up @@ -493,7 +493,7 @@
}
],
"source": [
"PBWDeformations.ispbwdeform(deform3)"
"ispbwdeform(deform3)"
]
},
{
Expand Down Expand Up @@ -553,7 +553,7 @@
{
"data": {
"text/plain": [
"3-element Vector{Matrix{PBWDeformations.QuadraticQuoAlgebraElem{fmpq}}}:\n",
"3-element Vector{Matrix{QuadraticQuoAlgebraElem{fmpq}}}:\n",
" [0 1; -1 0]\n",
" [0 -2*x_3 + 4*x_1*x_2 + x_3^2; 2*x_3 + -4*x_1*x_2 + -1*x_3^2 0]\n",
" [0 8*x_3 + 16*x_1*x_2 + -32*x_1*x_2*x_3 + -4*x_3^3 + 16*x_1^2*x_2^2 + 8*x_1*x_2*x_3^2 + x_3^4; -8*x_3 + -16*x_1*x_2 + 32*x_1*x_2*x_3 + 4*x_3^3 + -16*x_1^2*x_2^2 + -8*x_1*x_2*x_3^2 + -1*x_3^4 0]"
Expand All @@ -565,7 +565,7 @@
}
],
"source": [
"kappas = PBWDeformations.pbwdeforms_all(sp, 4)"
"kappas = pbwdeforms_all(sp, 4)"
]
},
{
Expand Down Expand Up @@ -596,8 +596,8 @@
],
"source": [
"for kappa in kappas\n",
" d, _ = PBWDeformations.smash_product_deform_lie(sp, kappa)\n",
" println(PBWDeformations.ispbwdeform(d))\n",
" d, _ = smash_product_deform_lie(sp, kappa)\n",
" println(ispbwdeform(d))\n",
"end"
]
},
Expand Down
6 changes: 3 additions & 3 deletions scripts/CreateDBEntry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ maxdeg = parse(Int, ARGS[4])
using Oscar
using PBWDeformations

function kappa_to_string(kappa::Matrix{PBWDeformations.QuadraticQuoAlgebraElem{fmpq}})
function kappa_to_string(kappa::Matrix{QuadraticQuoAlgebraElem{fmpq}})
dim = size(kappa, 1)
string = "["
for i in 1:dim
Expand All @@ -39,8 +39,8 @@ end

for deg in 0:maxdeg
@info "Computing PBWDeformations... (degree=$deg)"
sp, _ = PBWDeformations.smash_product_lie(QQ, dynkin, n, lambda)
kappas = PBWDeformations.pbwdeforms_all(sp, deg)
sp, _ = smash_product_lie(QQ, dynkin, n, lambda)
kappas = pbwdeforms_all(sp, deg)

@info "Writing Output... (degree=$deg)"
path = "db"
Expand Down
19 changes: 17 additions & 2 deletions src/PBWDeformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ using Combinatorics
using Oscar
using SparseArrays

import AbstractAlgebra: NCRing, NCRingElem, Ring, RingElement, base_ring, change_base_ring, check_parent, coeff, elem_type, gen, gens, isgen, ismonomial, monomial, ngens, parent_type, quo, symbols, vars
import AbstractAlgebra: NCRing, NCRingElem, Ring, RingElement,
base_ring, change_base_ring, check_parent, coeff,
elem_type, gen, gens, isgen, ismonomial,
monomial, ngens, parent_type, quo, symbols, vars

import Oscar: comm, normal_form

import Base: Array, deepcopy, deepcopy_internal, hash, isequal, isone, iszero, length, one, parent, show, xor, zero, +, -, *, ^, ==
import Base: Array, deepcopy, deepcopy_internal,
hash, isequal, isone, iszero, length,
one, parent, show, xor, zero, +, -, *, ^, ==

export FreeAlgebra, FreeAlgebraElem,
QuadraticQuoAlgebra, QuadraticQuoAlgebraElem,
SmashProductLie, SmashProductDeformLie

export free_algebra, ispbwdeform, quadratic_quo_algebra,
pbwdeforms_all, pbwdeform_eqs,
smash_product_lie, smash_product_struct_const_from_gap,
smash_product_deform_lie, smash_product_symmdeform_lie

GAP = Oscar.GAP

Expand Down
22 changes: 11 additions & 11 deletions test/FreeAlgebra-test.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@testset ExtendedTestSet "All FreeAlgebra.jl tests" begin
@testset "deepcopy_internal" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

B = deepcopy(A)

Expand All @@ -12,15 +12,15 @@
end

@testset "change_base_ring" begin
F_Q, = PD.free_algebra(QQ, ["a"])
F_Z = PD.change_base_ring(ZZ, F_Q)
F_Q, = free_algebra(QQ, ["a"])
F_Z = change_base_ring(ZZ, F_Q)

@test base_ring(F_Q) != base_ring(F_Z)
@test F_Q.S === F_Z.S
end

@testset "ismonomial" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

@test ismonomial(A)
@test ismonomial(A^2)
Expand All @@ -30,21 +30,21 @@
end

@testset "iszero" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

@test iszero(0A)
@test !iszero(A)
end

@testset "isone" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

@test isone(0A + 1)
@test !isone(A)
end

@testset "isgen" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

@test isgen(A)

Expand All @@ -54,16 +54,16 @@
end

@testset "Base.:-" begin
F, (A, B) = PD.free_algebra(QQ, ["a", "b"])
F, (A, B) = free_algebra(QQ, ["a", "b"])

@test -A !== -A && -A == -A
@test A - A == zero(F) == -A + A
@test A + 1 - A == 1
end

@testset "parent_type" begin
F, (A,) = PD.free_algebra(QQ, ["a"])
F, (A,) = free_algebra(QQ, ["a"])

# @test parent_type(A) == PD.FreeAlgebra{fmpq}
# @test parent_type(A) == FreeAlgebra{fmpq}
end
end
end
Loading

0 comments on commit a3ae1a0

Please sign in to comment.