Conversation
d13deb6 to
a18539f
Compare
a18539f to
d22e353
Compare
4d01b7d to
a235c7d
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a Birkhoff–Trjitzinsky-based asymptotics engine for linear difference systems/recurrences, adding core algebra types (formal series ring + tropical growth comparisons) and wiring them into LinearRecurrence.asymptotics() with accompanying unit tests.
Changes:
- Added new asymptotics subsystem (
SeriesMatrix,GrowthRate,Reducer) and extensive test coverage for reduction/growth extraction. - Extended
Matrixutilities (degrees, Jordan form block sorting, infinity-limit helper) and added tests for degree extraction. - Added
LinearRecurrence.asymptotics()plus tests (including MeijerG-derived regressions).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
ramanujantools/matrix.py |
Adds caching to companion coboundary matrix; adds degree extraction, Jordan block sorting, and an infinity-limit helper. |
ramanujantools/matrix_test.py |
Adds unit test for new Matrix.degrees(). |
ramanujantools/linear_recurrence.py |
Adds hashing + asymptotics extraction via the new reduction engine, with precision backoff. |
ramanujantools/linear_recurrence_test.py |
Updates existing tests and adds Fibonacci asymptotics test (but introduces global test state). |
ramanujantools/cmf/meijer_g_test.py |
Adds asymptotics regression tests via LinearRecurrence. |
ramanujantools/asymptotics/series_matrix.py |
New formal Puiseux/Taylor series matrix ring implementation. |
ramanujantools/asymptotics/series_matrix_test.py |
New unit tests for SeriesMatrix operations. |
ramanujantools/asymptotics/reducer.py |
New BT reduction engine and canonical growth/fundamental matrix extraction. |
ramanujantools/asymptotics/reducer_test.py |
New reducer correctness and guardrail tests. |
ramanujantools/asymptotics/growth_rate.py |
New tropical growth semiring/comparator implementation. |
ramanujantools/asymptotics/growth_rate_test.py |
New unit tests for growth comparisons and operations. |
ramanujantools/asymptotics/__init__.py |
Exports the new asymptotics API surface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ece31b4 to
900d20b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e conjugates of each other
c067e52 to
74cfc8d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
74cfc8d to
805a667
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Birkhoff-Trjitzinsky Asymptotics
Classes
SeriesMatrix
Introduced
SeriesMatrix, a formal Puiseux Series Ring, to handle formal power series expansions in terms of a ramified local parametert = n^{-1/p}. It supports exact Cauchy multiplication, formal inversion, and generalized binomial discrete shifts (n -> n+1).GrowthRate
Implements a Tropical Semiring to track and compare asymptotic hierarchies (factorials, exponentials, sub-exponentials, polynomials, and logarithms). Overloads
+to act as an L_infinity max-filter (safely isolating dominant terms without SymPy relational crashes) and*for asymptotic term multiplication and degree shifting.Reducer
The core Birkhoff-Trjitzinsky algebraic solver. Iteratively applies gauge transformations (shears) and series ramification to deflate the Poincaré rank of formal difference systems until they completely decouple into scalar equations. Outputs the mathematically pure Canonical Fundamental Matrix (CFM).
Usage
Extracts a formal basis of asymptotic solutions for scalar linear difference equations. Because a linear recurrence is inherently solved as a companion matrix, the gauge transformation to physical space is the identity matrix (
U = I). The formal BT solutions map strictly 1:1 to the sequence bounds.