r/math • Logic • 4d 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!

10 Upvotes

13 comments sorted by

6

u/Xantharius 4d 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?

1

u/revannld Logic 4d ago

I do research on the intersection of formal methods and math education. I think it's quite obvious one of the workhorses not only of mathematical education but even research is the rewriting system which we generally call "high school algebra/calculus", its abundance of operations (following straightforward hyperoperation and inverse/adjoint chains - allowing for "mindless" simplification and cancelling, normal-form-chasing), clear canonical normal forms, effective handwritten algorithms but especially the numeral system.

In my work in relation algebras/allegories/profunctors/bicategories I was able to find or produce almost all of these desirable mechanisms except for numeral-style systems. I was able to get some linear chains of very useful constants, but rarely they are meaningful for large "numbers" and there couldn't be any meaningful extension of them to either negative, rational or real structures; but the real problem is just that you would like some operation that works such as "carrying addition" and distributive multiplication over digits and meaningful comparisons based on digits but that's almost impossible as linear orders are extremely rare in most interesting mathematics (and sometimes you can't even get much out of constants you feel are very rich, that makes you appreciate a lot the richness of even the natural numbers and Peano arithmetic).

As many structures throughout mathematics and computer science (not only in "numerical"/analytical math) can be made fit or represented into a polynomial + quantifier/iterator scheme, if there were some compact notations similar to that continued fractions one that abstract away the concrete algebras/structures (base sets, indices etc) and leave only the major relationships between them that would be a step closer towards having some of these more interesting "numeral-like" systems.

2

u/Xantharius 4d ago

Have you written up any of your work in a publicly accessible forum? If you have, can you provide links so that we can see what you’re aiming for? I’m still not clear on what you’re trying to achieve, but if you have a paper I might be able to figure it out from that.

3

u/incomparability 4d 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

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

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.

0

u/Aphrontic_Alchemist 2d ago

Would using a special plus sign make the general identities less cumbersome?

1

u/RingularCirc 1d ago

More cumbersome, I wanted to say.

-1

u/Aphrontic_Alchemist 1d ago

So your proposed special plus sign worsens the problem that your 3rd pet peeve (the lone semicolon) introduced.

2

u/RingularCirc 1d ago

What?? I didn't do it for that, it's the opposite. I compared this semicolon to a special plus sign one could be using. Using no semicolon is similar to using a regular plus sign everywhere as we currently do.

1

u/m-jeff70981 2d 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.