|
116 | 116 |
|
117 | 117 | from copy import copy |
118 | 118 |
|
119 | | -from sage.all import AA, PolynomialRing, QQ, QQbar, SR, DifferentialWeylAlgebra, Ideal |
120 | | -from sage.all import ( |
121 | | - gcd, |
122 | | - prod, |
123 | | - pi, |
124 | | - matrix, |
125 | | - exp, |
126 | | - log, |
127 | | - I, |
128 | | - factorial, |
129 | | - srange, |
130 | | - shuffle, |
131 | | - vector, |
132 | | -) |
| 119 | +from sage.algebras.weyl_algebra import DifferentialWeylAlgebra |
| 120 | +from sage.arith.misc import gcd |
| 121 | +from sage.arith.srange import srange |
| 122 | +from sage.functions.log import log, exp |
| 123 | +from sage.functions.other import factorial |
| 124 | +from sage.matrix.constructor import matrix |
| 125 | +from sage.misc.misc_c import prod |
| 126 | +from sage.misc.prandom import shuffle |
| 127 | +from sage.modules.free_module_element import vector |
| 128 | +from sage.rings.asymptotic.asymptotic_ring import AsymptoticRing |
| 129 | +from sage.rings.ideal import Ideal |
| 130 | +from sage.rings.imaginary_unit import I |
| 131 | +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing |
| 132 | +from sage.rings.qqbar import AA, QQbar |
| 133 | +from sage.rings.rational_field import QQ |
| 134 | +from sage.symbolic.constants import pi |
| 135 | +from sage.symbolic.ring import SR |
133 | 136 |
|
134 | 137 | from sage_acsv.kronecker import _kronecker_representation |
135 | 138 | from sage_acsv.helpers import ( |
|
144 | 147 | from sage_acsv.debug import Timer, acsv_logger |
145 | 148 | from sage_acsv.settings import ACSVSettings |
146 | 149 | from sage_acsv.whitney import whitney_stratification |
147 | | -from sage_acsv.macaulay2 import compute_primary_decomposition, compute_saturation |
| 150 | +from sage_acsv.groebner import compute_primary_decomposition, compute_saturation |
148 | 151 |
|
149 | 152 |
|
150 | 153 | # we need to monkeypatch a function from the asymptotics module such that creating |
@@ -337,8 +340,6 @@ def _diagonal_asymptotics_combinatorial_smooth( |
337 | 340 | result = sum([a**n * b * c * d for (a, b, c, d) in result]) |
338 | 341 |
|
339 | 342 | elif output_format == ACSVSettings.Output.ASYMPTOTIC: |
340 | | - from sage.all import AsymptoticRing |
341 | | - |
342 | 343 | AR = AsymptoticRing("QQbar^n * n^QQ", QQbar) |
343 | 344 | n = AR.gen() |
344 | 345 | result = sum( |
@@ -653,7 +654,8 @@ def diagonal_asymptotics_combinatorial( |
653 | 654 | vs_copy, r_copy = copy(vs), copy(r) |
654 | 655 | for cp in min_crit_pts: |
655 | 656 | vs, r = copy(vs_copy), copy(r_copy) |
656 | | - # Step 1: Determine if pt is a transverse multiple point of H, and compute the factorization |
| 657 | + # Step 1: Determine if pt is a transverse multiple point of H, |
| 658 | + # and compute the factorization |
657 | 659 | # for now, we'll just try to factor it in the polynomial ring |
658 | 660 | R = PolynomialRing(QQbar, len(vs), vs) |
659 | 661 | G = R(SR(G)) |
@@ -683,8 +685,10 @@ def diagonal_asymptotics_combinatorial( |
683 | 685 | ) |
684 | 686 |
|
685 | 687 | # Step 2: Find the locally parametrizing coordinates of the point pt |
686 | | - # Since we have d variables and s factors, there should be d-s of these parametrizing coordinates |
687 | | - # We will try to parametrize with the first d-s coordinates, shuffling the vs and r if it doesn't work |
| 688 | + # Since we have d variables and s factors, there should be d-s of these |
| 689 | + # parametrizing coordinates |
| 690 | + # We will try to parametrize with the first d-s coordinates, shuffling |
| 691 | + # the vs and r if it doesn't work |
688 | 692 | for _ in range(s**2): |
689 | 693 | Jac = matrix( |
690 | 694 | [ |
@@ -717,7 +721,8 @@ def diagonal_asymptotics_combinatorial( |
717 | 721 | x ** (multiplicities[i] - 1) |
718 | 722 | for i, x in enumerate(list(vector(r) * Gamma.inverse())[:s]) |
719 | 723 | ) |
720 | | - # If cp lies on a single smooth component, we can compute asymptotics like in the smooth case |
| 724 | + # If cp lies on a single smooth component, we can compute asymptotics |
| 725 | + # like in the smooth case |
721 | 726 | if s == 1 and sum(multiplicities) == 1: |
722 | 727 | n = SR.var("n") |
723 | 728 | expansion = sum( |
@@ -785,8 +790,6 @@ def diagonal_asymptotics_combinatorial( |
785 | 790 | result = sum([a**n * b * c * d for (a, b, c, d) in result]) |
786 | 791 |
|
787 | 792 | elif output_format == ACSVSettings.Output.ASYMPTOTIC: |
788 | | - from sage.all import AsymptoticRing |
789 | | - |
790 | 793 | AR = AsymptoticRing("QQbar^n * n^QQ", QQbar) |
791 | 794 | n = AR.gen() |
792 | 795 | result = sum( |
|
0 commit comments