Here we will test the attractor tree formula (see arXiv:1910.03098 and arXiv:2101.07636) and the flow tree formula (see arXiv:1804.06928 and arXiv:2102.11200). They allow us to find rational DT invariants for any stability parameter from rational attractor invariants. We will compare these computations to the algorithm from arXiv:math/0204059 that allows us to find the same invariants from the total invariant (stacky invariant for the trivial stability). We will also compare implementation speeds of all algorithms.
import os, sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
from msinvar import *
Q=KroneckerQuiver(3, prec=[3,3])
z=Stability([1,0])
Omb1=Q.attr_tree_formula(z,Q.ratAtt_default())
%time Omb1.dict()
CPU times: user 442 ms, sys: 2.62 ms, total: 444 ms Wall time: 443 ms
{(1, 0): 1, (2, 0): 1/2*y/(y^2 + 1), (3, 0): 1/3*y^2/(y^4 + y^2 + 1), (0, 1): 1, (1, 1): (y^4 + y^2 + 1)/y^2, (2, 1): (y^4 + y^2 + 1)/y^2, (3, 1): 1, (0, 2): 1/2*y/(y^2 + 1), (1, 2): (y^4 + y^2 + 1)/y^2, (2, 2): (-y^12 - 3/2*y^10 - 2*y^8 - 3/2*y^6 - 2*y^4 - 3/2*y^2 - 1)/(y^7 + y^5), (3, 2): (y^12 + y^10 + 3*y^8 + 3*y^6 + 3*y^4 + y^2 + 1)/y^6, (0, 3): 1/3*y^2/(y^4 + y^2 + 1), (1, 3): 1, (2, 3): (y^12 + y^10 + 3*y^8 + 3*y^6 + 3*y^4 + y^2 + 1)/y^6, (3, 3): (y^24 + 2*y^22 + 4*y^20 + 16/3*y^18 + 6*y^16 + 6*y^14 + 19/3*y^12 + 6*y^10 + 6*y^8 + 16/3*y^6 + 4*y^4 + 2*y^2 + 1)/(y^14 + y^12 + y^10)}
Omb2=Q.flow_tree_formula(z,Q.ratAtt_default())
%time Omb2.dict()
CPU times: user 695 ms, sys: 5.35 ms, total: 700 ms Wall time: 704 ms
{(1, 0): 1, (2, 0): 1/2*y/(y^2 + 1), (3, 0): 1/3*y^2/(y^4 + y^2 + 1), (0, 1): 1, (1, 1): (y^4 + y^2 + 1)/y^2, (2, 1): (y^4 + y^2 + 1)/y^2, (3, 1): 1, (0, 2): 1/2*y/(y^2 + 1), (1, 2): (y^4 + y^2 + 1)/y^2, (2, 2): (-y^12 - 3/2*y^10 - 2*y^8 - 3/2*y^6 - 2*y^4 - 3/2*y^2 - 1)/(y^7 + y^5), (3, 2): (y^12 + y^10 + 3*y^8 + 3*y^6 + 3*y^4 + y^2 + 1)/y^6, (0, 3): 1/3*y^2/(y^4 + y^2 + 1), (1, 3): 1, (2, 3): (y^12 + y^10 + 3*y^8 + 3*y^6 + 3*y^4 + y^2 + 1)/y^6, (3, 3): (y^24 + 2*y^22 + 4*y^20 + 16/3*y^18 + 6*y^16 + 6*y^14 + 19/3*y^12 + 6*y^10 + 6*y^8 + 16/3*y^6 + 4*y^4 + 2*y^2 + 1)/(y^14 + y^12 + y^10)}
Omb3=Q.rat_from_total(z)
%time Omb3.dict()
CPU times: user 47.4 ms, sys: 2.69 ms, total: 50.1 ms Wall time: 50.1 ms
{(1, 0): 1, (2, 0): 1/2*y/(y^2 + 1), (3, 0): 1/3*y^2/(y^4 + y^2 + 1), (0, 1): 1, (1, 1): (-y^4 - y^2 - 1)/(-y^2), (2, 1): (-y^4 - y^2 - 1)/(-y^2), (3, 1): 1, (0, 2): 1/2*y/(y^2 + 1), (1, 2): (-y^4 - y^2 - 1)/(-y^2), (2, 2): (y^12 + 3/2*y^10 + 2*y^8 + 3/2*y^6 + 2*y^4 + 3/2*y^2 + 1)/(-y^7 - y^5), (3, 2): (y^12 + y^10 + 3*y^8 + 3*y^6 + 3*y^4 + y^2 + 1)/y^6, (0, 3): 1/3*y^2/(y^4 + y^2 + 1), (1, 3): 1, (2, 3): (-y^12 - y^10 - 3*y^8 - 3*y^6 - 3*y^4 - y^2 - 1)/(-y^6), (3, 3): (y^24 + 2*y^22 + 4*y^20 + 16/3*y^18 + 6*y^16 + 6*y^14 + 19/3*y^12 + 6*y^10 + 6*y^8 + 16/3*y^6 + 4*y^4 + 2*y^2 + 1)/(y^14 + y^12 + y^10)}
r=6
Q=ChainQuiver(r)
Q.prec([1]*r)
z=Stability([1]*r).randomize()
Omb1=Q.attr_tree_formula(z,Q.ratAtt_default())
%time Omb1.dict()
CPU times: user 14.1 s, sys: 18.4 ms, total: 14.1 s Wall time: 14.1 s
{(1, 0, 0, 0, 0, 0): 1, (0, 1, 0, 0, 0, 0): 1, (0, 0, 1, 0, 0, 0): 1, (0, 0, 0, 1, 0, 0): 1, (0, 0, 1, 1, 0, 0): 1, (0, 1, 1, 1, 0, 0): 1, (0, 0, 0, 0, 1, 0): 1, (0, 0, 1, 1, 1, 0): 1, (0, 1, 1, 1, 1, 0): 1, (0, 0, 0, 0, 0, 1): 1, (0, 0, 0, 0, 1, 1): 1, (0, 0, 1, 1, 1, 1): 1, (0, 1, 1, 1, 1, 1): 1}
Omb2=Q.flow_tree_formula(z,Q.ratAtt_default())
%time Omb2.dict()
CPU times: user 500 ms, sys: 2.9 ms, total: 503 ms Wall time: 502 ms
{(1, 0, 0, 0, 0, 0): 1, (0, 1, 0, 0, 0, 0): 1, (0, 0, 1, 0, 0, 0): 1, (0, 0, 0, 1, 0, 0): 1, (0, 0, 1, 1, 0, 0): 1, (0, 1, 1, 1, 0, 0): 1, (0, 0, 0, 0, 1, 0): 1, (0, 0, 1, 1, 1, 0): 1, (0, 1, 1, 1, 1, 0): 1, (0, 0, 0, 0, 0, 1): 1, (0, 0, 0, 0, 1, 1): 1, (0, 0, 1, 1, 1, 1): 1, (0, 1, 1, 1, 1, 1): 1}
Omb3=Q.rat_from_total(z)
%time Omb3.dict()
CPU times: user 143 ms, sys: 2.01 ms, total: 145 ms Wall time: 144 ms
{(1, 0, 0, 0, 0, 0): 1, (0, 1, 0, 0, 0, 0): 1, (0, 0, 1, 0, 0, 0): 1, (0, 0, 0, 1, 0, 0): 1, (0, 0, 1, 1, 0, 0): 1, (0, 1, 1, 1, 0, 0): 1, (0, 0, 0, 0, 1, 0): 1, (0, 0, 1, 1, 1, 0): 1, (0, 1, 1, 1, 1, 0): 1, (0, 0, 0, 0, 0, 1): 1, (0, 0, 0, 0, 1, 1): 1, (0, 0, 1, 1, 1, 1): 1, (0, 1, 1, 1, 1, 1): 1}
r=7
Q=ChainQuiver(r)
Q.prec([1]*r)
z=Stability([1]*r).randomize()
Omb2=Q.flow_tree_formula(z,Q.ratAtt_default())
%time Omb2.dict()
CPU times: user 8.19 s, sys: 11 ms, total: 8.2 s Wall time: 8.2 s
{(1, 0, 0, 0, 0, 0, 0): 1, (0, 1, 0, 0, 0, 0, 0): 1, (1, 1, 0, 0, 0, 0, 0): 1, (0, 0, 1, 0, 0, 0, 0): 1, (0, 0, 0, 1, 0, 0, 0): 1, (0, 0, 0, 0, 1, 0, 0): 1, (0, 0, 0, 1, 1, 0, 0): 1, (0, 0, 1, 1, 1, 0, 0): 1, (0, 0, 0, 0, 0, 1, 0): 1, (0, 0, 0, 0, 0, 0, 1): 1, (0, 0, 0, 0, 0, 1, 1): 1, (0, 0, 0, 0, 1, 1, 1): 1, (0, 0, 0, 1, 1, 1, 1): 1, (0, 0, 1, 1, 1, 1, 1): 1}
Omb3=Q.rat_from_total(z)
%time Omb3.dict()
CPU times: user 400 ms, sys: 2.18 ms, total: 402 ms Wall time: 401 ms
{(1, 0, 0, 0, 0, 0, 0): 1, (0, 1, 0, 0, 0, 0, 0): 1, (1, 1, 0, 0, 0, 0, 0): 1, (0, 0, 1, 0, 0, 0, 0): 1, (0, 0, 0, 1, 0, 0, 0): 1, (0, 0, 0, 0, 1, 0, 0): 1, (0, 0, 0, 1, 1, 0, 0): 1, (0, 0, 1, 1, 1, 0, 0): 1, (0, 0, 0, 0, 0, 1, 0): 1, (0, 0, 0, 0, 0, 0, 1): 1, (0, 0, 0, 0, 0, 1, 1): 1, (0, 0, 0, 0, 1, 1, 1): 1, (0, 0, 0, 1, 1, 1, 1): 1, (0, 0, 1, 1, 1, 1, 1): 1}
r=8
Q=ChainQuiver(r)
Q.prec([1]*r)
z=Stability([1]*r).randomize()
Omb2=Q.flow_tree_formula(z,Q.ratAtt_default())
%time Omb2([1]*r)
CPU times: user 1min 39s, sys: 103 ms, total: 1min 39s Wall time: 1min 39s
0
Omb3=Q.rat_from_total(z)
%time Omb3([1]*r)
CPU times: user 292 ms, sys: 2.3 ms, total: 294 ms Wall time: 293 ms
0