Merge pull request 'Merge Stereo 3 into master' (#7) from stereo.3 into master

Reviewed-on: http://raspberrypi.lan:3000/cube/zenzicubi.co/pulls/7
This commit is contained in:
cube 2026-10-04 09:32:33 -05:00
commit 446ec669c6
18 changed files with 1043 additions and 61 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -116,8 +116,12 @@ website:
- section: "Algebraic Stereography" - section: "Algebraic Stereography"
href: ./posts/math/stereo/index.qmd href: ./posts/math/stereo/index.qmd
contents: contents:
- ./posts/math/stereo/1/index.qmd - text: "Algebraic Rotations and Stereography"
- ./posts/math/stereo/2/index.qmd href: ./posts/math/stereo/1/index.qmd
- text: "Further Notes on Algebraic Stereography"
href: ./posts/math/stereo/2/index.qmd
- text: "Stereographic Hyperspheres"
href: ./posts/math/stereo/3/index.qmd
- id: permutations-sidebar - id: permutations-sidebar
style: "floating" style: "floating"
@ -172,9 +176,9 @@ website:
- text: "Appendix" - text: "Appendix"
href: ./posts/math/finite-field/2/extra/index.qmd href: ./posts/math/finite-field/2/extra/index.qmd
- text: "Part 3: Roll a d20" - text: "Part 3: Roll a d20"
href: ./posts/math/finite-field/2/index.qmd href: ./posts/math/finite-field/3/index.qmd
- text: "Part 5: The Power of Forgetting" - text: "Part 4: The Power of Forgetting"
href: ./posts/math/finite-field/2/index.qmd href: ./posts/math/finite-field/4/index.qmd
format: format:
html: html:

View File

@ -485,7 +485,7 @@ $$
While there is some cancellation in the denominator, both products are rather messy. While there is some cancellation in the denominator, both products are rather messy.
To get more cancellation, we can add some nice algebraic properties between *i* and *j*. To get more cancellation, we can add some nice algebraic properties between *i* and *j*.
If we let i and j be *anticommutative* (meaning that $ij = -ji$) then $stij$ cancels with $stji$. If we let *i* and *j8 be *anticommutative* (meaning that $ij = -ji$) then $stij$ cancels with $stji$.
So that the denominator is totally real (and therefore can be guaranteed to divide), So that the denominator is totally real (and therefore can be guaranteed to divide),
we can also assert that $i^2$ and $j^2$ are both real. we can also assert that $i^2$ and $j^2$ are both real.
Then the expression becomes Then the expression becomes
@ -533,7 +533,7 @@ If you know a little group theory, you might know there are only two nonabelian
In the latter group, *j* and *k* are both imaginary, but square to 1 (*i* still squares to -1)[^4]. In the latter group, *j* and *k* are both imaginary, but square to 1 (*i* still squares to -1)[^4].
[^4]: I'm being a bit careless with the meanings of "1" and "-1" here. [^4]: I'm being a bit careless with the meanings of "1" and "-1" here.
Properly, these are the group identity and another group element which commutes with all others. Properly, these are the group identity and another group element of order 2 which commutes with all others.
Changing the sign of one (or both) of the imaginary squares in the expression $h / h^{*}$ above Changing the sign of one (or both) of the imaginary squares in the expression $h / h^{*}$ above
switches the multiplicative structure from quaternions to the dihedral group. switches the multiplicative structure from quaternions to the dihedral group.

View File

@ -111,36 +111,37 @@ This is also the *only* property upon which the recurrence depends; all else is
Knowing this, let's start over with the stereographic projection of the circle: Knowing this, let's start over with the stereographic projection of the circle:
$$ $$
o_1(t) = {1 + it \over 1 - it} o(t) = {1 + it \over 1 - it}
= {1 - t^2 \over 1 + t^2} + i {2t \over 1 + t^2} = {1 - t^2 \over 1 + t^2} + i {2t \over 1 + t^2}
= \text{c}_1 + i\text{s}_1 = \text{c}_1 + i\text{s}_1
$$ $$
The subscript "1" is because as *t* ranges over $(-\infty, \infty)$, the function loops once The subscript "1" for *c* and *s* is because as *t* ranges over $[-\infty, \infty)$,
around the unit circle. the function loops once around the unit circle.
Taking this to higher powers keeps points on the circle since all points on the circle Taking *o* to higher powers keeps points on the circle since all points on the circle
have a norm of 1. have a norm of 1.
It also makes more loops around the circle, which we can denote by larger subscripts: It also makes more loops around the circle, which we can denote by larger subscripts:
$$ $$
\begin{align*} \begin{align*}
o_n &= (o_1)^n o^n
= \left( {1 + it \over 1 - it} \right)^n &= \left( {1 + it \over 1 - it} \right)^n
\\ \\
\text{c}_n + i\text{s}_n
&= (\text{c}_1 + i\text{s}_1)^n &= (\text{c}_1 + i\text{s}_1)^n
\\
&= \text{c}_n + i\text{s}_n
\end{align*} \end{align*}
$$ $$
This mirrors raising the complex exponential to a power This mirrors raising the complex exponential to a power
(which loops over the range $(-\pi, \pi)$ instead). (which loops over the range $[-\pi, \pi)$ instead).
The final line is analogous to de Moivre's formula, but in a form where everything is The final line is analogous to de Moivre's formula, but in a form where everything is
a ratio of polynomials in *t*. a ratio of polynomials in *t*.
This means that the Chebyshev polynomials can be obtained directly from these rational expressions: This means that the Chebyshev polynomials can be obtained directly from these rational expressions:
$$ $$
\begin{align*} \begin{align*}
o_2 = (o_1)^2 &= (\text{c}_1 + i\text{s}_1)^2 o^2 &= (\text{c}_1 + i\text{s}_1)^2
\\ \\
&= \text{c}_1^2 + 2i\text{c}_1\text{s}_1 - \text{s}_1^2 &= \text{c}_1^2 + 2i\text{c}_1\text{s}_1 - \text{s}_1^2
+ (0 = \text{c}_1^2 + \text{s}_1^2 - 1) + (0 = \text{c}_1^2 + \text{s}_1^2 - 1)
@ -149,11 +150,11 @@ $$
\\ \\
&= 2\text{c}_1(\text{c}_1 + i\text{s}_1) - 1 &= 2\text{c}_1(\text{c}_1 + i\text{s}_1) - 1
\\ \\
&= 2\text{c}_1 o_1 - 1 &= 2\text{c}_1 o - 1
\\ \\
o_2 \cdot (o_1)^n &= 2\text{c}_1 o_1 \cdot (o_1)^n - (o_1)^n o^2 \cdot o^n &= 2\text{c}_1 o \cdot o^n - o^n
\\ \\
o_{n+2} &= 2\text{c}_1 o_{n+1} - o_n o^{n+2} &= 2\text{c}_1 o^{n+1} - o^n
\end{align*} \end{align*}
$$ $$
@ -211,7 +212,7 @@ Meanwhile, the complex stereograph has derivative
$$ $$
\begin{align*} \begin{align*}
{d \over dt} o_1(t) &= {d \over dt} {1 + it \over 1 - it} {d \over dt} o(t) &= {d \over dt} {1 + it \over 1 - it}
= {i(1 - it) + i(1 + it) \over (1 - it)^2} = {i(1 - it) + i(1 + it) \over (1 - it)^2}
\\ \\
&= {2i \over (1 - it)^2} &= {2i \over (1 - it)^2}
@ -224,20 +225,19 @@ $$
\\ \\
&= -(1 + c_1)s_1 + i(1 + c_1)c_1 &= -(1 + c_1)s_1 + i(1 + c_1)c_1
\\ \\
&= i(1 + c_1)o_1 &= i(1 + c_1)o
\end{align*} \end{align*}
$$ $$
Just like the complex exponential, an imaginary coefficient falls out. Just like the complex exponential, an imaginary coefficient falls out.
However, the expression also accrues a $1 + c_1$ term, almost like an adjustment factor However, the expression also accrues $1 + c_1$ as an adjustment factor.
for its failure to be the complex exponential. The complex exponential doesn't need this term because it goes around the circle at a constant rate,
Sine and cosine obey a simpler relationship with respect to the derivative, resulting in a simpler relationship with respect to the derivative.
and thus need no adjustment.
### Complex Analysis ### Complex Analysis
Since $o_n$ is a curve which loops around the unit circle *n* times, that possibly suits it Since $o^n$ is a curve which loops around the unit circle *n* times, that possibly suits it
to showing a simple result from complex analysis. to showing a simple result from complex analysis.
Integrating along a contour which wraps around a sufficiently nice function's pole Integrating along a contour which wraps around a sufficiently nice function's pole
(i.e., where its magnitude grows without bound) yields a familiar value. (i.e., where its magnitude grows without bound) yields a familiar value.
@ -249,16 +249,16 @@ $$
= 2\pi i = 2\pi i
$$ $$
In this example, *Γ* is a counterclockwise curve parametrized by *γ* which loops once around In this example, Γ is a counterclockwise curve parametrized by *γ* which loops once around
the pole at *z* = 0. the pole at *z* = 0.
More loops will scale this by a factor according to the number of loops. More loops will scale this by a factor according to the number of loops.
Normally this equality is demonstrated with the complex exponential, but will $o_1$ work just as well? Normally this equality is demonstrated with Γ as the unit circle and *γ* as the complex exponential?
If *Γ* is the unit circle, the integral is: But will *o* work just as well in place of the latter?
$$ $$
\oint_\Gamma {1 \over z} dz \oint_\Gamma {1 \over z} dz
= \int_{-\infty}^\infty {o_1'(t) \over o_1(t)} dt = \int_{-\infty}^\infty {o'(t) \over o(t)} dt
= \int_{-\infty}^\infty i(1 + c_1(t)) dt = \int_{-\infty}^\infty i(1 + c_1(t)) dt
= 2i\int_{-\infty}^\infty {1 \over 1 + t^2} dt = 2i\int_{-\infty}^\infty {1 \over 1 + t^2} dt
$$ $$
@ -272,30 +272,30 @@ Since powers of *o* are more loops around the circle, the chain and power rules
$$ $$
\begin{gather*} \begin{gather*}
{d \over dt} (o_1)^n = n(o_1)^{n-1} {d \over dt} o_1 {d \over dt} o^n = no^{n-1} {d \over dt} o
\\[14pt] \\[14pt]
\oint_\Gamma {1 \over z} dz \oint_\Gamma {1 \over z} dz
= \int_{-\infty}^\infty {n o_1(t)^{n-1} o_1'(t) \over o_1(t)^n} dt = \int_{-\infty}^\infty {n o(t)^{n-1} o'(t) \over o(t)^n} dt
= n \int_{-\infty}^\infty {o_1'(t) \over o_1(t)} dt = n \int_{-\infty}^\infty {o'(t) \over o(t)} dt
= 2 \pi i n = 2 \pi i n
\end{gather*} \end{gather*}
$$ $$
It is certainly possible to perform these contour integrals along straight lines It is certainly possible to perform these contour integrals along straight lines
in the complex plane; in fact, making *Γ* a diamond-shaped contour from in the complex plane; in fact, making Γ a diamond-shaped contour from
1 to *i* to -1 to -*i* produces a similar integral involving arctangent. 1 to *i* to -1 to -*i* produces a similar integral involving arctangent.
However, the best one can do to construct more loops with lines is to count each line However, the best one can do to construct more loops with lines is to count each line
multiple times, which isn't extraordinarily convincing. multiple times, which isn't extraordinarily convincing.
Perhaps the use of $\infty$ in the integral bounds is also unconvincing. Perhaps the use of $\infty$ in the integral bounds is also unconvincing.
The integral can be shifted back into the realm of plausibility by considering simpler bounds on $o_2$: The integral can be shifted back into the realm of plausibility by considering simpler bounds on $o^2$:
$$ $$
\begin{align*} \begin{align*}
\oint_\Gamma {1 \over z} dz \oint_\Gamma {1 \over z} dz
&= \int_{-1}^1 {2 o_1(t) o_1'(t) \over o_1(t)^2} dt &= \int_{-1}^1 {2 o(t) o'(t) \over o(t)^2} dt
\\ \\
&= 2 \int_{-1}^1 {o_1'(t) \over o_1(t)} dt &= 2 \int_{-1}^1 {o'(t) \over o(t)} dt
\\ \\
&= 2(2i\arctan(1) - 2i\arctan(-1)) &= 2(2i\arctan(1) - 2i\arctan(-1))
\\ \\
@ -309,7 +309,7 @@ This series converges for $-1 \le t \le 1$, which happens to match the bounds of
The convergence of this series is fairly important, since it is tied to formulas for π, The convergence of this series is fairly important, since it is tied to formulas for π,
in particular [Leibniz's formula](https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80). in particular [Leibniz's formula](https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80).
Were one to integrate with the complex exponential, we would instead use the bounds $(0, 2\pi)$, Were one to integrate with the complex exponential, we would instead use the bounds $[0, 2\pi)$,
since at this point a full loop has been made. since at this point a full loop has been made.
But think to yourself -- how do you know the period of the complex exponential? But think to yourself -- how do you know the period of the complex exponential?
How do you know that 2π radians is equivalent to 0 radians? How do you know that 2π radians is equivalent to 0 radians?
@ -361,7 +361,7 @@ $$
x(t) = c_p(t) c_1(t) \qquad y(t) = c_p(t) s_1(t) x(t) = c_p(t) c_1(t) \qquad y(t) = c_p(t) s_1(t)
$$ $$
will plot a $p/1$ polar rose as t ranges over $(-\infty, \infty)$. will plot a $p/1$ polar rose as t ranges over $[-\infty, \infty)$.
```{python} ```{python}
#| echo: false #| echo: false
@ -413,15 +413,15 @@ p/1 polar roses as rational curves.
Since *t* never reaches infinity, a bite appears to be taken out of the graphs near (-1, 0)." Since *t* never reaches infinity, a bite appears to be taken out of the graphs near (-1, 0)."
::: :::
$q = 1$ happens to match the subscript *c* term of *x* and *s* term of *y*, so one might wonder $q = 1$ happens to match the subscript of a *c* term of *x* and the *s* term of *y*,
whether the other polar curves can be obtained by allowing it to vary as well. so one might wonder whether the other polar curves can be obtained by allowing it to vary.
And you'd be right. And you'd be right.
$$ $$
x(t) = c_p(t) c_q(t) \qquad y(t) = c_p(t) s_q(t) x(t) = c_p(t) c_q(t) \qquad y(t) = c_p(t) s_q(t)
$$ $$
will plot a $p/q$ polar rose as t ranges over $(-\infty, \infty)$. will plot a $p/q$ polar rose as t ranges over $[-\infty, \infty)$.
```{python} ```{python}
#| echo: false #| echo: false
@ -443,7 +443,7 @@ p/q polar roses as rational curves
::: :::
Just as with the prior calculus examples, doubling all subscripts of *c* and *s* will Just as with the prior calculus examples, doubling all subscripts of *c* and *s* will
only require *t* to range over $(-1, 1)$, which removes the ugly bite mark. only require *t* to range over $[-1, 1)$, which removes the ugly bite mark.
Perhaps it is also slightly less satisfying, since the fraction $p/q$ directly appears in the Perhaps it is also slightly less satisfying, since the fraction $p/q$ directly appears in the
typical polar incarnation with cosine. typical polar incarnation with cosine.
On the other hand, it exposes an important property of these curves: they are all rational. On the other hand, it exposes an important property of these curves: they are all rational.
@ -522,9 +522,9 @@ $$
:::: ::::
*x* is a quadratic polynomial in *y*, so trivially the figure formed is a parabola. *x* is a quadratic polynomial in *y*, so trivially the figure formed is a parabola.
Technically it is missing the point where $y = 0 ~ (t = \infty)$, and this is not a circumstance Technically, it is missing the point where $y = 0 ~ (t = \infty)$.
where using a higher $c_n$ would help. Unfortunately, this is not a circumstance where using a higher $c_n$ would help.
It is however, similar to the situation where we allow $o_1(\infty) = -1$, and an argument It is however, similar to the situation where we allow $o(\infty) = -1$, and an argument
can be made to waive away any concerns one might have. can be made to waive away any concerns one might have.
@ -562,9 +562,9 @@ $$
::: :::
:::: ::::
There isn't an obvious way to combine products of *x* and *y* into a single equation. There isn't an obvious way write *x* and *y* above as an implicit equation for the curve.
The general form of a conic section is $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$, so The general form of a conic section is $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$,
we know that the implicit equation for the curve almost certainly involves $x^2$ and $y^2$. so we know that such an equation curve almost certainly involves $x^2$ and $y^2$.
$$ $$
x^2 = {4 - 8t^2 + 4t^4 \over (3t^2 + 1)^2} \qquad x^2 = {4 - 8t^2 + 4t^4 \over (3t^2 + 1)^2} \qquad
@ -612,7 +612,7 @@ $$
$$ $$
Notably, the coefficients of *x* and *y* are 3 and 4. Notably, the coefficients of *x* and *y* are 3 and 4.
Simultaneously, $o_1(\varepsilon) = o_1(1/2) = {3 \over 5} + i{4 \over 5}$. Simultaneously, $o(\varepsilon) = o(1/2) = {3 \over 5} + i{4 \over 5}$.
This binds together three concepts: the simplest case of the Pythagorean theorem, This binds together three concepts: the simplest case of the Pythagorean theorem,
the 3-4-5 right triangle; the coefficients of the implicit form; and the role of eccentricity the 3-4-5 right triangle; the coefficients of the implicit form; and the role of eccentricity
with respect to stereography. with respect to stereography.
@ -621,7 +621,7 @@ This binds together three concepts: the simplest case of the Pythagorean theorem
#### Hyperbola ($|\varepsilon| > 1$) #### Hyperbola ($|\varepsilon| > 1$)
As evidenced by the bound on the eccentricity above, hyperbolae are in some way the inverses of ellipses. As evidenced by the bound on the eccentricity above, hyperbolae are in some way the inverses of ellipses.
Since $o_1(2)$ is a reflection of $o_1(1/2)$, you might think the implicit equation for Since $o(2)$ is a reflection of $o(1/2)$, you might think the implicit equation for
$\varepsilon = 2$ to be the same, but with a flipped sign or two. $\varepsilon = 2$ to be the same, but with a flipped sign or two.
Unfortunately, you'd be wrong. Unfortunately, you'd be wrong.
@ -751,7 +751,7 @@ Approximations to the Archimedean spiral
::: :::
Since R necessarily defines a rational curve, the curves will never be equal, Since *R* necessarily defines a rational curve, the curves will never be equal,
just as any stretching of $c_n$ will never exactly become cosine. just as any stretching of $c_n$ will never exactly become cosine.

1
posts/math/stereo/3/anim.py Symbolic link
View File

@ -0,0 +1 @@
../2/anim.py

BIN
posts/math/stereo/3/close_equatorial_sphere.mp4 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,649 @@
---
title: "Stereographic Hyperspheres"
description: |
How do you explicitly describe *n*-dimensional spheres?
format:
html:
html-math-method: katex
jupyter: python3
date: "2026-10-04"
categories:
- algebra
- topology
- geometric algebra
---
<style>
.figure-img {
max-width: 512px;
object-fit: contain;
height: 100%;
}
</style>
```{python}
#| echo: false
import numpy as np
import matplotlib.pyplot as plt
import sympy
import sympy.plotting as plot
from sympy.abc import t
from anim import SympyAnimationWrapper
```
In [the first post of this series](../1/), we explored a definition of quaternions
and their application to rotation in three dimensions.
In doing so, we used stereography to define a point on the 2-sphere, i.e.,
one whose coordinates satisfy $x^2 + y^2 + z^2 = 1$.
It's easy to extend this implicit equation to higher-dimensional spheres (or hyperspheres).
A point $(x_0, x_1, x_2, ... x_n)$ is on a unit hypersphere in *n*+1-dimensional
Euclidean space if
$$
x_0^2 + x_1^2 + x_2^2 + ... + x_n^2 = 1
$$
This follows naturally from the definition of the sphere as the locus of points which
all have the same distance to the origin.
Since this has an implicit equation, there's a natural question: how do we parameterize hyperspheres?
Guidance from Lower Dimensions
------------------------------
Because points on the sphere are constrained by an equation, there is one fewer degree of freedom
than a general point in the space they occupy.
Hence, a sphere in *n+1*-dimensional space is itself *n*-dimensional, and is termed an *n*-sphere.
As a basic example, the complex unit circle is a 1-sphere in the 2-dimensional complex plane:
$$
o(t) = {1 + it \over 1 - it}
= {1 - t^2 \over 1 + t^2} + i{2t \over 1 + t^2}
$$
The explicit map for the 2-sphere is similar; we have two parameters and
have two "nonreal"s *i* and *j*, which turned out to be quaternions.
$$
o_2(s, t) = {1 + is + jt \over 1 - is - jt}
= {1 - s^2 - t^2 \over 1 + s^2 + t^2} + i{2s \over 1 + s^2} + j{2t \over 1 + t^2}
$$
These are valid constructions because division works for both complex numbers and quaternions.
But the ability to divide
[isn't very common in higher dimensions](https://mathworld.wolfram.com/DivisionAlgebra.html),
so without justification, we can't extend it and hope the math works out.
### Topological Insights
In above equation for a circle, we assign values to *t* from a number line,
a 1-dimensional Euclidean space.
More precisely, the line is the imaginary axis $it$ in the numerator.
We also include an extra point "at infinity".
This same point is approached regardless of whether *t* is negative or positive,
and "closes" the circle.
$$
\begin{align*}
o(\infty) &\approx {1 + i\infty \over 1 - i\infty}
\approx {-\infty \over \infty}
\approx -1
\\
o(-\infty) &\approx {1 - i\infty \over 1 + i\infty}
\approx {\infty \over -\infty}
\approx -1
\end{align*}
$$
For (2-)spheres, a similar statement holds true.
Rather than a line, we range over the imaginary plane $is + jt$, a 2-dimensional Euclidean space.
If one or both of the parameters *s* or *t* has a value of "infinity",
then they seem to describe the same point.
$$
\begin{align*}
o_2(s, \infty) &\approx {1 + is + j\infty \over 1 - is - j\infty}
\approx {\infty \over -\infty}
\approx -1
\\
o_2(\infty, t) &\approx {1 + i\infty + jt \over 1 - i\infty - jt}
\approx {\infty \over -\infty}
\approx -1
\end{align*}
$$
In both expressions, the point at infinity contains no "nonreals" like *i* or *j*.
In another sense, the real space is the extra dimension into which the sphere extends as a surface.
Topologically, this description of the resulting space is called the
[one-point compactification](https://mathworld.wolfram.com/One-PointCompactification.html).
In other words, the circle is the one-point compactification of the line,
and in general, an *n*-sphere is the one-point compactification of Euclidean *n*-space.
$$
\mathbb{E}^{n} \cup \{ \infty \} \cong S^n
$$
![
One-point compactification of 1- (top) and 2- (bottom) dimensional Euclidean space.
Both spaces extend indefinitely in the indicated directions before joining up at $\infty$.
](./one-point_compactification.png)
### Invariance of Dimension
The topological definition seems to imply that our construction shouldn't care about
how many dimensions are in the space.
In fact, when constructing the 2-sphere, all we cared about was that *i* and *j* anti-commute
to get cancellation.
[Geometric algebra](https://en.wikipedia.org/wiki/Geometric_algebra) gives some tools to generalize
this argument to higher dimensions.
In an *n*-dimensional algebra, we have unit vectors ${\vec e_0}, {\vec e_1}, ..., {\vec e_{n-1}}$
and the following properties:
- Scalars and vectors can be added and multiplied together,
and all possibilities comprise the algebra
- The product of a unit vector with itself is a scalar, generally chosen among -1, 0, or 1
- Scalars commute, but the product of two different unit vectors anticommutes
- e.g., ${\vec e_0} {\vec e_1} = - {\vec e_1} {\vec e_0}$
- Consequently, the square of the product is the negative of the product of the squares
- e.g., ${\vec e_0} {\vec e_1} {\vec e_0} {\vec e_1} = - {\vec e_0} {\vec e_1} {\vec e_1} {\vec e_0} = - {\vec e_0^2} {\vec e_1^2}$
- Division by anything other than scalars is undefined
A consequence is that the square of a general vector $\vec v$ with components
${\vec e_k}x_k$ is a scalar.
This can be seen by arranging the components of the product after distributing as a square:
$$
\begin{align*}
{\vec v} &= {\vec e_0} x_0 + {\vec e_1} x_1 + ... {\vec e_{n-1}} x_{n-1} = \sum_k {\vec e_k} x_k
\\
{\vec v^2} &= (\sum_k^{n-1} {\vec e_k} x_k) (\sum_l^{n-1} {\vec e_l} x_l)
= \sum_k^{n-1} \sum_l^{n-1} {\vec e_k} {\vec e_l} x_k x_l
\\
&= \underset{\diagdown}{\sum_k^{n-1} {\vec e_k^2} x_k^2}
+ \underset{◥}{ \sum_k^{n-1} \sum_{l > k} {\vec e_k} {\vec e_l} x_k x_l }
+ \underset{◣}{ \sum_k^{n-1} \sum_{l < k} {\vec e_k} {\vec e_l} x_k x_l }
\end{align*}
$$
Due to anticommutativity, we can cancel the upper and lower triangles, leaving only the diagonal.
$$
\begin{align*}
◣ &= \sum_k^{n-1} \sum_{l < k} {\vec e_k} {\vec e_l} x_k x_l
= \sum_k^{n-1} \sum_{k < l} {\vec e_l} {\vec e_k} x_l x_k
\\
&= - \sum_k^{n-1} \sum_{l > k} {\vec e_k} {\vec e_l} x_k x_l
= - ◥
\\[10pt]
&\implies \diagdown + ◥ + ◣ = \diagdown + ◥ - ◥ = \diagdown
\end{align*}
$$
To align with the prior examples *i* and *j*, we'll assume that ${\vec e_k^2} = -1$ for all *k*.
This means that ${\vec v}^2 = - ||{\vec v}||$, the sum of squares of the extent
in each basis (or Euclidean norm).
### Being Hyperrational
Finally, we can consider an expression analogous to the one from which we derived
the 1- and 2-spheres.
Suppose that a vector and a scalar are added together, as $a + {\vec u}$.
If this point is on a sphere and the scalar component is considered the extent in a new dimension,
then the norm of the entire quantity should be
$$
||a + {\vec u}|| = a^2 + ||{\vec u}|| = a^2 - {\vec u}^2 = 1
$$
Now let a vector $\vec v$ range over *n*-dimensional space.
The expression...
$$
{\bm o_n}({\vec v}) = a + {\vec u} = {1 + {\vec v} \over 1 - {\vec v}}
$$
...seems to be a ratio between two distinct quantities with the same norm,
since $1^2 - {\vec v}^2 = 1^2 - (-{\vec v})^2$.
However, it's ill-defined since there is a vector we can't divide by in the denominator.
Due to the properties of the algebra, we can use a conjugation trick to clear it:
$$
\begin{align*}
{1 + {\vec v} \over 1 - {\vec v}}
&= \left( {1 + {\vec v} \over 1 - {\vec v}} \right)
\left( {1 + {\vec v} \over 1 + {\vec v}} \right)
= {(1 + {\vec v})^2 \over (1 - {\vec v})(1 + {\vec v})}
\\
&= {1 + 2{\vec v} + {\vec v}^2 \over 1 - {\vec v}^2}
\\
&= {1 - ||{\vec v}|| \over 1 + ||{\vec v}||} + {2{\vec v} \over 1 + ||{\vec v}||}
= a + {\vec u}
\end{align*}
$$
The quantity in the denominator of both components is always a scalar and greater than zero,
so there are no concerns about the validity of division.
We can also show that the norm of this expression is 1, as desired:
$$
\begin{align*}
a^2 - {\vec v}^2 &= 1
\\
\implies
\stackrel{\text{Numerator of } a}{(1 + {\vec v}^2)^2}
- \stackrel{\text{Numerator of } \vec u}{(2{\vec v})^2}
&= \stackrel{\text{Common denominator}}{1 - {\vec v}^2}
\end{align*}
$$
This is true no matter how many dimensions $\vec v$ has[^1], justifying our earlier abuse of notation.
[^1]: Technically, this should only hold for finitely many dimensions.
The $\infty$-sphere, composed of vectors with only finitely many nonzero components,
is probably also valid under this construction, but it warrants a proper proof.
Inducing an Alternative
-----------------------
The previous topological description of spheres lacks a couple of things:
- It does not make reference to lower-dimensional spheres
- "Points at infinity", while intuitive, are logically suspect
Fortunately, topology has an alternate description.
The 0-dimensional sphere is a little bit special.
On a number line, there are two points equidistant to the origin,
and these comprise the 0-sphere $S^0$.
This can (topologically) be turned into a 1-sphere $S^1$ (the circle) by an operation called
[suspension](https://en.wikipedia.org/wiki/Suspension_%28topology%29), which connects
all points in the space to two new, auxiliary points.
Subsequently, we can take the circle and repeat the operation to build the 2-sphere $S^2$.
![
Example of suspension of the 0- and 1-spheres, forming the 1- and 2-spheres, respectively.
The space is duplicated along the blue lines except at the two blue endpoints.
](suspension.png)
In general,
$$
\text{Susp}(S^{n-1}) = S^n
$$
### Algebraic Suspension
Let's compare the topological definition with what we have algebraically.
We first definied the circle, or 1-sphere as
$$
o(t) = {1 + it \over 1 - it}
= {1 - t^2 \over 1 + t^2} + i{2t \over 1 + t^2}
$$
Negating *t* keeps the real part the same, but negates the imaginary part.
So in most cases, where there *is* an imaginary part,
the space looks two discrete points; to wit, a 0-sphere.
The remaining two points 1 and -1 are the exception.
Similarly, when we intersect the 2-sphere with a plane along a line of latitude,
the space looks like a 1-sphere except at the two poles, also 1 and -1.
![
The sphere, as parametrized by ${\bm o_2}({\vec v})$, being intersected by a plane.
The plane is perpendicular to the line connecting -1 and 1 and intersects the sphere
in a circle (1-sphere).
](parametrized_suspension.png)
Halfway between the two poles, at the equator, the scalar component is 0 and the sphere is a pure vector.
For a general sphere, this happens when $||{\vec v}|| = 1$:
$$
{\bm o_n}({\vec v})
= {1 - ||{\vec v}|| \over 1 + ||{\vec v}||}
+ {2{\vec v} \over 1 + ||{\vec v}||}
= {1 - 1 \over 1 + 1} + {2 \over 1 + 1}{\vec v}
= {\vec v}
$$
In general, this happens when $\vec v$ is a point on a unit sphere of one dimension lower.
For the 2-sphere, this is a 1-sphere, which we can easily parametrize using *o*.
Being a unit sphere, all points on it behave similarly to *i* in that their square is -1.
Thus, we can construct an expression for the 2-sphere by replacing *i* with the vector in question.
$$
\begin{align*}
{\vec v} = {\vec w}_1(s)
&= {1 - s^2 \over 1 + s^2} e_0 + {2s \over 1 + s^2} e_1
\\[10pt]
{\bm \varsigma}_2(s,t) &= {1 + {\vec w}_1(s)t \over 1 - {\vec w}_1(s)t}
= {1 - t^2 \over 1 + t^2} + {2t \over 1 + t^2} {\vec w}_1(s)
\end{align*}
$$
Just like with *o*, if *t* is replaced with *-t* in the above expression,
then the scalar part remains the same, but the vector part
(which corresponds to latitudinal circles) is negated.
Since the circle is a connected space, we only need one of the two circles this generates,
and *s* must range over $[0, \infty]$.
*s*, however, ranges over $[-\infty, \infty)$, since that's the domain of *o*.
This process can be continued indefinitely -- at each stage,
$\bm \varsigma_n$[^2] describes a *n*-dimensional unit sphere.
It can be converted to a pure vector ${\vec w}_n$ by multiplying the scalar component
with a new unit vector $e_n$.
In this form, ${\vec w}_n^2 = -1$ for any *n*-dimensional algebra[^3].
This provides an inductive construction parallel to the topological one.
[^2]: For "σφαίρα", sphere. I'm using ς rather than σ in hope that it's less prone to confusion with "o".
[^3]: This should sound familiar from the first post -- it matches the "unit quaternions".
$$
\begin{align*}
{\vec w}_n(x_0, x_1, ..., x_{n-1})
&= V({\bm \varsigma}_n(x_0, x_1, ..., x_{n-1}))
\\
&= \text{Scalar}({\bm \varsigma}_n)e_n + \text{Vector}({\bm \varsigma}_n)
\\
{\bm \varsigma}_{n+1}(x_0, x_1, ..., x_{n-1}, x_n)
&= {1 + {\vec w}_n(x_0, x_1, ..., x_{n-1})x_n \over 1 - {\vec w}_n(x_0, x_1, ..., n_{n-1})x_n}
\\
&= {1 - x_n^2 \over 1 + x_n^2} + {2x_n \over 1 + x_n^2}{\vec w_n}
\end{align*}
$$
When the new parameter $x_n$ is 0 or $\infty$, the vector part collapses,
and we get either 1 or -1, the "new points" of the suspension.
$$
\begin{align*}
{\bm \varsigma}_{n+1}(..., 0)
&= {1 + {\vec w}_n(...)\cdot 0 \over 1 - {\vec w}_n(...) \cdot 0}
- {1 \over 1} = 1
\\
{\bm \varsigma}_{n+1}(..., \infty)
&\approx {1 + {\vec w}_n(...)\cdot \infty \over 1 - {\vec w}_n(...) \cdot \infty}
\approx {\infty \over -\infty} \approx -1
\end{align*}
$$
All spheres but the 0-sphere are connected spaces, so duplicate latitudinal spheres
occur in all dimensions greater than 1.
Only in dimension 1 are negative numbers required for the expected duplication.
More directly, this means that the parameter attached to the 1D case ($x_0$) ranges over
positive and negative numbers, but all others range over only positve numbers.
Multiple Wrappings
------------------
One feature of the complex rational circle mentioned in [the previous article](../2/)
was that its powers correspond to going around multiple times.
Conveniently, a similar fact holds for *n*-spheres in general.
Starting with the scalar/vector form of the sphere, we can square the sphere and apply
the fact that the difference of squares of each part is constant:
$$
\begin{align*}
{\bm o}_n &= a + {\vec u}
\\
{\bm o}_n^2 &= (a + {\vec u})^2
\\
&= a^2 + {\vec u}^2 + 2a{\vec u} +\textcolor{red}{(0 = a^2 - {\vec u}^2 - 1)}
\\
&= 2a^2 - 1 + 2a{\vec u} = 2a(a + {\vec u}) - 1
\\
&= 2a {\bm o_n} - 1
\end{align*}
$$
This gives the familiar recurrence relation...
$$
{\bm o}_n^{m+2} = 2a {\bm o}_n^{m+1} - {\bm o}_n^m
$$
...and thus a sphere can be wrapped around itself any number of times, as given by
$$
{\bm o}_n^m = T_m(a) + U_{m-1}(a){\vec u}
$$
where *T* and *U* are the standard Chebyshev polynomials.
### Negative Indices
The topological equivalent to this statement is
$$
H_n(S^n) = \Z
$$
More directly, a map from the *n*-sphere to itself can be characterized by an integer,
the *degree*, and these compose as integers add.
Since this is an integer, there's the notion of maps in an opposite direction
which correspond to negative degrees.
This seems to align with the behavior of the exponent *m* in ${\bm o}_n^m$.
However, we've only defined *m* over positive integers;
after all, $\bm o_n$ contains a vector, so we can't really divide by it.
Fortunately, it's pretty easy to make sense of this.
Since we have a recurrence relation for the powers of the *n*-sphere, we
can extend it backwards to define it over negative indices[^4].
$$
\begin{align*}
{\bm o}_n^1 &= 2a {\bm o}_n^{0} - {\bm o}_n^{-1}
\\
a + {\vec u} &= 2a - {\bm o}_n^{-1}
\\
{\bm o}_n^{-1} &= a - {\vec u}
\end{align*}
$$
[^4]: The same argument holds for the Chebyshev polynomials.
In general, $T_{-n}(x) = T_n(x)$ and $U_{-1} = 0$, $U_{-n}(x) = -U_{n-2}(x)$ for
the standard indexing of *U*.
If anything, this is another argument that this indexing of *U* isn't very well-suited,
since if $U_0 \stackrel{\Delta}{=} 0$, it follows that $U_{-n}(x) = -U_{n}(x)$.
This actually aligns with what we'd expect according to adding powers, since:
$$
({\bm o}_n^1)({\bm o}_n^{-1})
= (a + {\vec u})(a - {\vec u}) = a^2 - {\vec u}^2
= 1 = {\bm o}_n^0
$$
### Degrees and Induction
The inductive case was established by noticing that a vector $\vec w$ lying on a unit sphere
behaves similarly to *i* in that that ${\vec w}^2 = -1$.
We can use the same trick for higher-order wrappings -- the only thing that needs changing
from the previous article is replacing "real" with "scalar" and "nonreal" with "vector".
$$
{\bm \varsigma}_n^m
= ( c + s { {\vec w}_{n-1}} )^m
= T_m(c) + s U_m(c) {\vec w}_{n-1}
$$
Similarly,
$$
\begin{align*}
{\bm \varsigma}_n^{-1} &= ( c - s{\vec w}_{n-1} )
\\
({\bm \varsigma}_n^{1}) ({\bm \varsigma}_n^{-1})
&= ( c + s{\vec w}_{n-1} )( c - s{\vec w}_{n-1} )
\\
&= c^2 - s^2 {\vec w}_{n-1}^2 = c^2 + s^2 = 1
\\
&= {\bm \varsigma}_n^0
\end{align*}
$$
Technically, $\bm \varsigma_n$ is already a higher-degree map when all parameters
(besides the one from the base case) are allowed to range over negative numbers.
In this case, $\bm \varsigma_2^\pm$ is a degree-2 map, $\bm \varsigma_3^\pm$ is a degree-4 map,
and $\bm \varsigma_n^\pm$ is a degree-$2^{n-1}$ map.
De-infinitizing
---------------
The degree also gives us the tools to address "points at infinity".
If $\vec w_n$ is a point on the equatorial unit *n-1*-sphere, then $\bm o_n$
behaves as the identity.
But we also know that it squares to -1, and that squaring $\bm o_n$ produces a degree-2 map.
$$
{\bm o}_n({\vec w}_n)^2 = {\vec w}_n^2 = -1
$$
This means that the degree-2 map can be interpreted as collapsing the equator
to a single point, the pole -1.
The hemi-*n*-sphere surrounding the antipode 1 gets closed, resulting in the whole *n*-sphere.
```{python}
#| code-fold: true
#| output: false
# circle map
s,t = sympy.symbols("s t", real=True)
o = (1 + sympy.I*s) / (1 - sympy.I*s)
# doubled map for finite range
o2 = o**2
o2_real, o2_imag = o2.as_real_imag()
# inductive 2-sphere
sphere_x = o2_real.subs(s,t)
sphere_y = o2_imag.subs(s,t)*o2_real
sphere_z = o2_imag.subs(s,t)*o2_imag
def animate_sphere(filename: str, n=30, interval=80):
lerp_steps = np.linspace(0, 1, n)
t_hemisphere = 2**0.5 - 1
with SympyAnimationWrapper(filename) as animate:
@animate(len(lerp_steps), interval=interval)
def ret(fr):
plt.clf()
lerp = lerp_steps[fr]
t_upper = t_hemisphere*(1 - lerp) + 1*lerp
p = plot.plot3d_parametric_surface(
sphere_x, sphere_y, sphere_z,
(s, -1, 1), (t, 0, t_upper),
xlim=(-1,1), ylim=(-1,1), zlim=(-1,1),
show=False,
backend="matplotlib",
)
p2 = plot.plot3d_parametric_line(
sphere_x.subs(t, t_upper), sphere_y.subs(t, t_upper), sphere_z.subs(t, t_upper),
(s, -1, 1),
show=False,
backend="matplotlib",
)
p.append(p2[0])
p.show()
ret.save() # type: ignore
animate_sphere("close_equatorial_sphere.mp4")
```
::: {#fig-hemisphere-closure}
{{< video "./close_equatorial_sphere.mp4" >}}
Effect of the degree-2 map on the hemisphere containing the scalar 1.
:::
In the one-point construction, this region can only be described using all components of the input vector,
since the scalar component depends on it.
Thus, the domain is made finite just by squaring ***o***.
However, in the inductive construction, the scalar component only depends on
the new free parameter, leaving the domain of lower-dimensional spheres unaffected,
and potentially still unbounded.
The layered nature of the inductive construction means there are different "levels"
at which wraps can be placed.
For example, for the 2-sphere, the smallest domain for which the entire sphere is parametrized
is shown in the table below:
| Sphere | Domain for first wrap around the sphere |
|----------------------------------------|----------------------------------------------------|
| ${\bm o}_2^2({\vec e_0} s + {\vec e_1} t)$ | $s^2 + t^2 \le 1$ |
| ${\bm \varsigma}_2^2({\bm \varsigma}_1(s),t)$ | $s \in [-\infty, \infty] \quad t \in [0, 1)$ |
| ${\bm \varsigma}_2({\bm \varsigma}_1^2(s),t)$ | $s \in [-1, 1] \quad t \in [0, \infty]$ |
| ${\bm \varsigma}_2^2({\bm \varsigma}_1^2(s),t)$ | $s \in [-1, 1] \quad t \in [0, 1]$ |
A finite domain is only achieved in the final case, corresponding to the combination of
two separate degree-2 maps (i.e., a degree-4 map).
### Closing the Disc
Of course, the behavior of the equator comes with another topological analogue.
Another description of the *n*-sphere is by taking the boundary of an *n*-dimensional disc
and collapsing its boundary to a single point.
$$
{ D^n / \partial D^n } = S^n
$$
This exactly aligns with the behavior of the equator when going from the degree-1 to the degree-2 map.
If ${\vec u}_n$ has a norm of less than or equal to 1, then it lies within a unit disc.
This unit disc gets sent by $\bm o_n$ to the aforementioned "hemisphere around the scalar 1",
and when fed to $\bm o_n^2$, it produces the *n*-sphere.
Closing
-------
There's still a lot worth discussing here.
For spheres themselves, one-point spheres provide an base-case in any dimension
for inductive spheres.
This, combined with the choice of degree at each level of induction,
grants the potential for many interesting descriptions,
which get more numerous in higher dimensions.
For example, while there's only one degree-4 map for the 1-sphere,
there are four for the 2-sphere (depending on choice of bounds).
For topology, I find that these constructions do a lot to nail down its typically abstract nature.
There are still a lot of interesting arguments to nail down,
such as the degree of the antipodal map, or describing explicit, purely algebraic homotopies.
Finally there's the geometric algebra itself.
Choosing anything but vectors with the expected properties results in surfaces other than spheres.
This can get even more complicated when considering product of vectors as non-scalar components
of the "sphere".
It's difficult to imagine what these look like in higher dimensions, or what interesting
propositions they connect to.
The most convenient part of these constructions is the complexity they manage.
The alternative is attempting to come up with complicated polynomials
in way too many variables to keep track of individually,
all while managing equalities between them.
Instead, algebra serves algebra while also significantly benefitting geometry and topology.
Diagrams created with Geogebra, Sympy and Matplotlib.

BIN
posts/math/stereo/3/one-point_compactification.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
posts/math/stereo/3/parametrized_suspension.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
posts/math/stereo/3/suspension.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,286 @@
---
title: "Stereography, Algebraic, and Hyperspheres"
description: |
TODO
format:
html:
html-math-method: katex
jupyter: python3
date: "2026-09-11"
categories:
- algebra
draft: true
---
```{python}
#| echo: false
import sympy
from IPython.display import Markdown
from tabulate import tabulate
x, x1, z = sympy.symbols("x x_1 z")
```
The Algebra Part
----------------
Though I alluded to the ability of the stereoscopic circle to generate the Chebyshev polynomials,
there is an important caveat which differs their use from typical spheres.
To review, the stereoscopic definition of the circle is:
$$
\begin{align*}
o_1(t) &= {1 + it \over 1 - it}
\\
&= c_1 + i s_1
= {1 - t^2 \over 1 + t^2} + i{2t \over 1 + t^2}
\end{align*}
$$
The second line decomposes the first into real and nonreal terms, which are each rational functions.
We can further define terms for the numerator and denominator:
$$
\begin{gather*}
x_1 = 1 - t^2
\qquad
y_1 = 2t
\qquad
d = 1 + t^2 = 2 - x_1
\\
o_1 = {z_1 \over d} = {x_1 \over d} + i{y_1 \over d}
\end{gather*}
$$
We have a recurrence relation for *o*, but it does not obey same relations as *z*:
$$
\begin{align*}
o_{n+2} &= 2c_1 o_{n+1} - o_n
\\
z_{n+2} &\stackrel{✗}{=} 2x_1 z_{n+1} - z_n
\end{align*}
$$
Fortunately, the correction is simple.
The denominator term $d^{n+2}$ can be multiplied through the top equation to produce:
$$
z_{n+2} = 2x_1 z_{n+1} - z_n d^2
$$
The only term that changes is the term lagging two terms behind, so the generating function *Z* is:
$$
\begin{align*}
O(x; o_1)
&= {1 + x(o_1 - 2 c_1) \over 1 - 2 c_1 x + x^2}
\\[10pt]
Z(x; z_1)
&= {1 + x(z_1 - 2 x_1) \over 1 - 2 x_1 x + \textcolor{red}{d^2} x^2}
\end{align*}
$$
We can express *d* in terms of $x_1$, so the terms of the series, like the one for *F*, have
- A real component which is a polynomial in $x_1$ (cf. $c_1$)
- An imaginary component which is the product of $y_1$ (cf. $s_1$) and a polynomial in $x_1$
$$
Z(x; z_1) = X(x; x_1) + i y_1 Y(x; x_1)
$$
Surprisingly, the polynomials in *Y* still factor cleanly,
like the [Chebyshev *U* polynomials](../../chebyshev/1/#tbl-chebyshevu).
```{python}
#| code-fold: true
#| label: tbl-newupolynomials
#| tbl-cap: "Table of numerator polynomials"
#| classes: plain
# cosine series
X = ( 1 - x1*x ) / ( 1 - 2*x1*x + (2 - x1)**2*x**2 )
# sine series
Y = x / ( 1 - 2*x1*x + (2 - x1)**2*x**2 )
def factor_sequence(polys, offset=0, symbol_name="p"):
ret = []
symbols = []
for i, poly in enumerate(polys):
new_poly = poly.copy()
old_factor = 1
for old, symbol in zip(ret, symbols):
q, r = sympy.div(new_poly, old)
if r == 0:
new_poly = q
old_factor *= symbol
if new_poly != 1:
ret.append(new_poly)
symbols.append(sympy.symbols(f"{symbol_name}_{i + offset}"))
yield poly, old_factor*new_poly.factor()
Markdown(tabulate(
[
[ n+1, "$" + sympy.latex(poly) + "$", sympy.Poly(unfactored, z).as_list() ]
for n, (unfactored, poly) in enumerate(
factor_sequence(
sorted(
[
i.subs(x,1).subs(x1, z).expand().factor()
for i in Y.series(x, n=11).args
][:-1],
key=lambda x: sympy.degree(x, z)
),
1
)
)
],
headers=[ "*n*", "$[x^n]Y(x; z) = p_n(z)$", "Coefficients (descending powers)" ],
numalign="left",
stralign="left",
))
```
Unfortunately, the sequence formed by the coefficients of the polynomials
does not appear in the OEIS.
Their factorizations appear to have the following traits:
- Like the Chebyshev *U* polynomials, they have "cyclotomic factoring" --
for the new term of index *n*, the factors can be separated into old factors
at indices of factors of *n* and new factors.
- If the index is even, then there is only one new monic, irreducible factor.
- If the index is odd, then there are two new irreducible factors
- If the index is prime or a prime power, the new factors are a monic and a non-monic
whose leading coefficient is that prime.
- Otherwise, the new factors are both monic.
The characterization of the leading terms of the new factor corresponds to
[OEIS A014963](https://oeis.org/A014963), which is related to cyclotomic polynomials.
### Similar Sequences
In fact, for a polynomial $q(z)$, it seems to be the case that the terms of
$$
Y(x; z) = {x \over 1 - 2 z x + q(z) x^2}
$$
tend to factor similarly.
Naturally, the *U* polynomials are the choice where *q = 1* and the new polynomials
are the choice when $q = (2 - z)^2$.
One can also write down a series for $z^n - 1$, which factor as the cyclotomic polynomials,
and also end up being generated by an order-2 recurrence.
$$
\begin{align*}
N(x; z) &= \sum_n (z^n - 1)x^n = {x(z - 1) \over 1 - (z + 1)x + zx^2}
\\
&= \sum_n \left ( x^n \prod_{d | n} \Phi_d(z) \right )
\end{align*}
$$
Actually, this shouldn't be terribly surprising.
For example, a simple result from generating functions tells us
that a series for the integers is:
$$
\begin{align*}
F(z) &= {1 \over 1 - z}
= \sum_n z^n
&& \text{All coefficients equal 1}
\\
F'(z) &= {1 \over ( 1 - z )^2 }
= \sum_n n z^{n - 1}
&& \text{Integers}
\\
z F'(z) &= {z \over 1 - 2z + z^2}
= \sum_n n z^n
&& \text{Integers matching powers}
\end{align*}
$$
The denominator being a quadratic polynomial means that the series terms *n*,
the integers, obey an order-2 recurrence, and factor in a similar way.
Obviously, the integers factor into primes by the fundamental theorem of arithmetic.
There's still an important distinction to be made about the polynomials, though.
Factoring a composite like 6 into 2 and 3 leaves an empty product behind, but
for polynomials, nonprime indices end up accumulate an "extra" factor.
Additionally (or rather, probably because of this), *all* factors of the index correspond
to a factor in the factorization, rather than pairing off as in integers.
For example, factoring 12 once gives either 3 and 4 or 2 and 6,
but the polynomial at index 12 includes polynomials at indices of all factors: 2, 3, 4, 6, and 12.
### Higher-order Recurrences
The integers also obey an order-3 recurrence:
$$
\begin{align*}
F(x) &= {x \over 1 - 2x + x^2} = {x(1 - x) \over (1 - 2x + x^2)(1 - x)}
\\
&= {x - x^2 \over 1 - 3x + 3x^2 - x^3}
\\[10pt]
&\equiv a_{n+3} = 3a_{n+2} - 3a_{n+1} + a_n
\end{align*}
$$
Another sequence that obeys similar factoring rules rules to the integers is
$$
G(x; z) = {x - x^2 \over 1 - z x + z x^2 - x^3}
$$
```{python}
#| code-fold: true
#| tbl-cap: "Table of G polynomials"
#| classes: plain
G = (x - x**2) / ( 1 - z*x + z*x**2 - x**3 )
Markdown(tabulate(
[
[ n+1, "$" + sympy.latex(poly) + "$", sympy.Poly(unfactored, z).as_list() ]
for n, (unfactored, poly) in enumerate(
factor_sequence(
sorted(
[
i.subs(x,1).subs(x1, z).expand().factor()
for i in G.series(x, n=11).args
][:-1],
key=lambda x: sympy.degree(x, z)
),
1,
"o"
)
)
],
headers=[ "*n*", "$[x^n]G(x; z) = o_n(z)$", "Coefficients (descending powers)" ],
numalign="left",
stralign="left",
))
```
There are a couple of things to note here.
Some of the factor polynomials here are the
[minimal polynomials of cosine](/posts/math/chebyshev/1/#tbl-cosinepolynomials)
The row where *n* = 5 is somewhat interesting.
Namely, $x^2 - x - 1$ has $\varphi$ (the golden ratio) as a root.
The other polynomial, $x^2 - 3x + 1$, has $\varphi^2$ as a root.
This seems to indicate that the other polynomial has roots which are
an algebraic expression of the other's, but I haven't bothered attempting a proof of this.
Unfortunately, peppering polynomials into the denominator and hoping that the same factorization
occurs isn't as easy as in the order-2 recurrence.
In fact, higher-order recurrences become more and more restrictive as $x^\bullet$ terms are added to
the numerator and denominator.
If there is a rule to determine what relation must be obeyed between the coefficients
for factorization to occur, it is not obvious, especially as the order grows.

View File

@ -1,4 +1,4 @@
# freeze computational output # freeze computational output
freeze: auto freeze: auto
sidebar: stereograph-sidebar sidebar: stereography-sidebar