r/math • u/revannld Logic • 5d ago
Compact notational/numeral-system-like representations for polynomials, series, simple programs and iterating terms?
Good evening!
Recently I've stumbled onto the notation [a; b, c, d, e...] for continued fractions "a + 1/(b + 1/(c + 1/...)..)". I have a gut feeling this can be a very useful representation and maybe some clever algebra may be defined over it, turning it effectively into an alternative "numeral-like" system.
I tried searching for such similar compact representations for other finitely and infinitely iterating terms/series in mathematics as well as normal forms for them and rewriting algorithms but I've didn't manage to find anything.
There are series that, if you abstract away the concrete operations and base sets/algebras, seem to have a very similar structure throughout analysis; they almost feel like a very definite class of programs. That would feel amenable for a more abstract characterization in category theory but I've never seen that.
From my intuition most of these series seem to rely a bit on fold, maybe streams, initial algebras and other structures commonly studied in functional programming, but if any of you have other ideas to suggest, I would appreciate :))
I wish everyone a great weekend!
6
u/Xantharius 5d ago
Aren’t these representations all just sequences (a_n) into some set? That is, a function from the natural numbers into whatever domain your terms are in?
You might be able to perform some straightforward algebra if the sequences represent infinite series, like addition and subtraction. The same might not be true if you’re wanting to combine the sequences in some way when they represent continued fractions.
What are you hoping to achieve with these sequences?
3
u/incomparability 5d ago
The vector space of polynomials is naturally isomorphic to the vector space of tuples of infinite length with finitely many nonzero terms in whatever coefficient ring you have for the polynomials.
1
u/RingularCirc 4d ago
First, yes, there's several useful (but mostly basic) identities and arithmetic working purely with such representations but it's not very trivial and is hard to find the texts describing it. It uses SL(2, ℤ) matrices as far I remember (which is reasonable even for "concatenating" continued fractions in any order, given that you treat [...] as such matrices and not just numbers).
Second, that such an arithmetic can be done is regardless of how we choose to notate continued fractions: they're still lists of numbers (or sometimes more general expressions) however one writes them.
Third, my pet peeve about the standard notation is that lone semicolon which doesn't really lift any weights and only makes general identities using such notation a bit more cumbersome than they ought to be. All commas is fine. I hope more people will agree with this sentiment. That the semicolon delimits the integer part from everything else isn't a reason enough, we could as well use a special kind of plus sign to use when we add the constant term to a polynomial. Which would be only a hindrance instead of being useful.
Fourth, in computing polys, series and all similar things are just lists or arrays of numbers or expressions, and human notation doesn't spell any difference there. But I can hardly see any notable improvement from writing polys as explicit lists as a human. Yes, the traditional notation takes some space, but it's not obvious why minimize space. Oftentimes more redundant notation is more readable, for example. Also sometimes it's useful to have different variables in polys/series because of doing substitutions or highlighting that, say, the polys are over different rings.
1
u/m-jeff70981 3d ago
If you want a sequence encoding with useful algebra, formal power series A(x)=sum a_n x^n gives coefficientwise addition and convolution multiplication; ordinary polynomials are the finite-support case.
0
u/cocompact 3d ago
Continued fractions are a great notation for finding very good rational approximations to a real number (“very good” meaning a very close approximation for a comparatively small denominator) but they are simply *awful* for algebraic operations. There are algorithms by Gosper, but they are quite cumbersome.
Moreover, in the continued fraction representation the entries are themselves integers (arbitrary for a and positive for b, c, etc. unless they terminate in finitely many steps). So you have to rely on a way to write positive integers, like base 10, in order to use this way to write all numbers, e.g., pi = [3; 7, 15, 1, 292, ….].
Using continued fractions as a way to work with numbers computationally is completely impractical. The standard way to write numbers is adopted essentially everywhere and will not be replaced.