Opened 4 years ago

Closed 3 years ago

#22194 closed defect (duplicate)

Multiplying elements from polynomial rings with lots of variables exceeds recursion depth

Reported by: Stefan Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: coercion Keywords: PolynomialRing, multivariate, singular, recursion depth
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


This gives a "RuntimeError?: maximum recursion depth exceeded".

R1 = ZZ['x0','x1']
x = R1(1)
R2 = ZZ[tuple('x'+str(i) for i in range(967))]
y = R2('x0')

Decreasing the number 967 results in the correct answer (it's slow though).

I'm going to guess that "coercion" is the right component.

Change History (3)

comment:1 Changed 4 years ago by tscrim

Yep, something is going wrong with either the coercion or in _element_constructor_ as these are almost instantaneous:

sage: phi = R2.coerce_map_from(R1)
sage: R2._element_constructor_??
sage: phi(x)
sage: phi(x) * y
sage: R2(x) * y

comment:2 Changed 4 years ago by tscrim

My guess is probably in the _element_constructor_.

comment:3 Changed 3 years ago by jdemeyer

  • Milestone changed from sage-7.6 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23906.

Note: See TracTickets for help on using tickets.