Opened 20 months ago
Last modified 8 days ago
#32020 new defect
Multivariate Generating Functions: critical cone cannot be described for non-rational critical point
Reported by: | behackl | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | asymptotic expansions | Keywords: | |
Cc: | gh-MarkCWilson, gh-kliem | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
FractionWithFactoredDenominator.critical_cone
returns None
when the corresponding critical point has non-rational coordinates. Consider the following example:
sage: from sage.rings.asymptotic.asymptotics_multivariate_generating_functions import FractionWithFactoredDenominatorRing sage: R.<x, y> = QQ[] sage: FFPD = FractionWithFactoredDenominatorRing(R) sage: G = 1; H = 1 - x - y - x*y sage: Hfac = H.factor() sage: G = G / Hfac.unit() sage: F = FFPD(G, Hfac)
For a point with rational coordinates, everything works as expected:
sage: I = F.smooth_critical_ideal(alpha=(1, 1)) sage: points = solve([SR(z) for z in I.gens()], [SR(z) for z in R.gens()], solution_dict=true) sage: F.critical_cone(points[1]) ([(1, 1)], 1-d cone in 2-d lattice N)
For non-rational coordinates, the critical cone returns None
:
sage: I = F.smooth_critical_ideal(alpha=(2, 1)) sage: points = solve([SR(z) for z in I.gens()], [SR(z) for z in R.gens()], solution_dict=true) sage: F.critical_cone(points[1]) ([(((sqrt(5) - 1)*(sqrt(5) - 2) + sqrt(5) - 1)/((sqrt(5) - 1)*(sqrt(5) - 2) + 2*sqrt(5) - 4), 1)], None)
Change History (12)
comment:1 follow-up: 4 Changed 20 months ago by
comment:2 Changed 20 months ago by
Cc: | gh-kliem added |
---|
comment:3 Changed 20 months ago by
See also #30172, where an ABC for convex cones (not necessarily rational polyhedral) is in the works
comment:4 Changed 20 months ago by
Replying to mkoeppe:
Using
Polyhedron
instead ofCone
in this case would be an option.
In this particular example, simplifying the ray directions would actually suffice. The ray list passed to Cone
is
[(((sqrt(5) - 1)*(sqrt(5) - 2) + sqrt(5) - 1)/((sqrt(5) - 1)*(sqrt(5) - 2) + 2*sqrt(5) - 4), 1)]
which actually is just
[(2, 1)]
But that doesn't change the fact that if the rays actually have non-rational components, Cone
isn't suitable.
When I try to use Polyhedron
with non-rational ray directions, I also get an error, e.g.,
sage: Polyhedron(rays=[(sqrt(2), 1)]) Traceback (most recent call last): ... ValueError: no default backend for computations with Symbolic Ring
Did you mean that Polyhedron
could be used after moving the rays to some more appropriate base ring? Or am I missing something else?
Also, thanks for the reference to #30172!
comment:5 follow-up: 6 Changed 20 months ago by
You would need to pass base_ring=AA
. Polyhedron refuses to compute with SR
.
comment:6 Changed 20 months ago by
Replying to mkoeppe:
You would need to pass
base_ring=AA
. Polyhedron refuses to compute withSR
.
Makes sense, thanks.
comment:7 Changed 20 months ago by
If you need cones with transcendental data, #30234 would be an approach.
comment:8 Changed 19 months ago by
Milestone: | sage-9.4 → sage-9.5 |
---|
comment:9 Changed 14 months ago by
Milestone: | sage-9.5 → sage-9.6 |
---|
comment:10 Changed 10 months ago by
Milestone: | sage-9.6 → sage-9.7 |
---|
comment:11 Changed 5 months ago by
Milestone: | sage-9.7 → sage-9.8 |
---|
comment:12 Changed 8 days ago by
Milestone: | sage-9.8 |
---|
Using
Polyhedron
instead ofCone
in this case would be an option.