STATUS: Draft
import numpy as np
import sympy as sp
import pickle
from IPython.display import HTML, Image
import ipywidgets as widgets
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
mpl.rcParams['legend.fontsize'] = 10
import pandas as pd
import itertools
pd.set_option('display.max_colwidth', None)
import treelib as tr
# function to print latex
def renderListToLatex(e):
latex_rendering = []
for i in range(len(e)):
latex_rendering.append("$$" + sp.latex(e[i]) + "$$")
return(HTML("".join(latex_rendering[0:])))
Ref: Polygonal Dissections and Reversions of Series, Alison Schuetz, Gwyneth Whieldon
Observe This paper also examines Lagrange's inversion formula for series
ObserveRecall the conjecture in a previous notebook regarding solutions to a general cubic, $ c_0 + c_1x + c_2x^2 + c_3x^3 $, which can also be regarded as a general formula for the number of subdivisions of a roofed polygon into polygons.
Let $c_0, c_1, c_2, \ldots$ be unknown types
c_0, c_1, c_2, c_3, c_4, x, t, a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, x_1, x_2, s_1, s_2 = sp.symbols('c_0, c_1, c_2, c_3, c_4, x, t, a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, x_1, x_2, s_1, s_2')
Let $P1$ be an a solution to a general cubic to a limited number of terms.
with open('./SharedOutputs/SPE5.pickle', 'rb') as input:
importedFromSPE5 = pickle.load(input)
P1 = importedFromSPE5['cubicSolutionsAsPolynomial']
P1
Observe: All terms of $P1$ have a power of $c_1$ in the denominator, and powers of $c_0, c_2$ and $c_3$ in the numerator.
Observe: The sign of each term in $P1$ appears to depend on the parity of the power of $c_3$ (where even parity denotes a negative signs).
Observe: The terms of $P1$ are balanced, having total degree 0. This suggests that the solution should not depend on a uniform rescaling of all the coefficients.
Observe: All terms in $P1$ have a total index degree of -1 and each term has the form:
$$ C(m, m_3)\equiv(-1)^{n + 1} \frac{(2m + 3 n)!}{(1 + m + 2 n)!m!n!} \frac{c_0^{1 + m + 2n} c_2^{m} c_3^{n} }{c_1^{2 m + 3 n + 1}} $$
Observe: There appears to be a relationship between the power of $c_3$ and the parity that appears in each term.
Observe: Recall that when multisets of BiTri subdivisions were considered, a generating frunction was found for $F$ which has the form:
$$ F = 1 + tF^2 + qF^3 \text{ or } 0 = 1 - F + tF^2 + qF^3 $$Observe: Consider that $0 = 1 - F + tF^2 + qF^3$ is similar to the general cubic, $ c_0 + c_1x + c_2x^2 + c_3x^3 $, except for the appearance of the negative sign.
Observe: The relationship between the sign of each term appears to depends on $n$. Note that $n$ appears as not only as a power of $c_3$, but also in the context of $2n$ with $c_0$. In this latter context, as $2n$ will always produce an even value, it will not contribute to the determination of parity.
Observe: The value of $3n$ acts the same way as $n$ does when it determines parity, and this suggests that parity may not depends on $c_3$ as previously assumed, and that there may be a more fundamental version of the general cubic.
Observe: This suggests that it is not the pwer of $c_3$ that determines the sign of each term, but rather the power of $c_1$, given by the multiset formula from a BiTri rootfied polygon.
Observe: If $c_1$ is replaced with $-c_1$ in the general cubic equation, the sign dissapears from the formula
Observe: This leads to the following (updated) theorem.
Theorem
A solution to $c_0 - c_1x + c_2x^2 + c_3x^3 = 0$ is given by
$$x = \Sigma_{m = 0}^+ \Sigma_{n = 0}^+ \frac{(2m + 3 n)!}{(1 + m + 2 n)!m!n!} \frac{c_0^{1 + m + 2n} c_2^{m} c_3^{n} }{c_1^{2 m + 3 n + 1}} $$Observe: This suggests that $c_3$ is not the critical variable for determining parity.
Observe: This simplification of the formula suggests that the formula could be generalised to higher degrees as all degrees will contain $c_1$
Observe: A general formula for a quadratic may be given by:
A solution to $c_0 - c_1x + c_2x^2 + c_3x^3 + c_4x^4 = 0$ is given by
$$x = \Sigma_{m = 0}^+ \Sigma_{n = 0}^+ \Sigma_{p = 0}^+ \frac{(2m + 3n + 4p)!}{(1 + m + 2n + 3p)!m!n!p!} \frac{c_0^{1 + m + 2n + 3p} c_2^{m} c_3^{n} c_4^{p} }{c_1^{4p + 2m + 3n + 1}} $$Observe: This could be generalised to a quintic and higher degrees.