Opened 20 months ago

# Multivariate Generating Functions: critical cone cannot be described for non-rational critical point

Reported by: behackl minor asymptotic expansions gh-MarkCWilson, gh-kliem N/A

### 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-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)
([(((sqrt(5) - 1)*(sqrt(5) - 2) + sqrt(5) - 1)/((sqrt(5) - 1)*(sqrt(5) - 2) + 2*sqrt(5) - 4),
1)],
None)
```

### comment:1 follow-up:  4 Changed 20 months ago by mkoeppe

Using `Polyhedron` instead of `Cone` in this case would be an option.

### comment:3 Changed 20 months ago by mkoeppe

See also #30172, where an ABC for convex cones (not necessarily rational polyhedral) is in the works

### comment:4 in reply to:  1 Changed 20 months ago by behackl

Using `Polyhedron` instead of `Cone` 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!

Last edited 20 months ago by behackl (previous) (diff)

### comment:5 follow-up:  6 Changed 20 months ago by mkoeppe

You would need to pass `base_ring=AA`. Polyhedron refuses to compute with `SR`.

### comment:6 in reply to:  5 Changed 20 months ago by behackl

You would need to pass `base_ring=AA`. Polyhedron refuses to compute with `SR`.

Makes sense, thanks.

### comment:7 Changed 20 months ago by mkoeppe

If you need cones with transcendental data, #30234 would be an approach.

### comment:8 Changed 19 months ago by mkoeppe

Milestone: sage-9.4 → sage-9.5

### comment:9 Changed 14 months ago by mkoeppe

Milestone: sage-9.5 → sage-9.6

### comment:10 Changed 10 months ago by mkoeppe

Milestone: sage-9.6 → sage-9.7

### comment:11 Changed 5 months ago by mkoeppe

Milestone: sage-9.7 → sage-9.8

### comment:12 Changed 8 days ago by mkoeppe

Milestone: sage-9.8
Note: See TracTickets for help on using tickets.